Show TOC

Example documentationCreating Modeling Area Locate this document in the navigation structure

 

Procedure

Table-Type Layout at the Beginning of the ALV Display

The following example shows how you insert a design object with a table-type layout at the beginning of the ALV display:

  1. Map the content node TOP_OF_LIST to the Component Controller context and then the context of the view where you display the ALV.

  2. Insert the following coding into the method WDDOMODIFYVIEW of this view:

    Syntax Syntax

    1. *Example for TOP_OF_LIST
    2. DATA:
    3. lr_node type REF TO if_wd_context_node,
    4. lr_grid type REF TO cl_salv_form_layout_grid,
    5. lr_text type REF TO cl_salv_form_text,
    6. lr_label type REF TO cl_salv_form_label.
    7. CREATE OBJECT lr_grid.
    8. lr_text = lr_grid->create_text( text   = '1.2 TEXT' row    = 1 column = 2 ).
    9. lr_label = lr_grid->create_label(text   = '1.1 LABEL' row    = 1  column = 1  r_label_for = lr_text ).
    10. lr_text = lr_grid->create_text( text   = '2.2 TEXT' row    = 2 column = 2 ).
    11. lr_label = lr_grid->create_label(  text   = '2.1 LABEL'  row    = 2 column = 1 r_label_for = lr_text ). 
    12. lr_node = wd_context->get_child_node( name = 'TOP_OF_LIST' ).
    13. CALL METHOD lr_node->set_attribute EXPORTING
    14. value = lr_grid
    15. name  = 'CONTENT'.
    End of the code.

Then save and activate is displayed to you in the ALV display of the following header:

This graphic is explained in the accompanying text.