Creating a Design Object
Firstly, you define the basic layout for your design object. You decide whether to display a single element, a sequence of elements in a row, or elements arranged in multiple rows and columns. You use one of the following classes for this purpose:
Classes for the Layout of Design Objects
Layout  |  Class  |  
Single element  |  See Elements Types and Their Classes (except for the element type Label)  |  
Row-type layout  |  CL_SALV_FORM_LAYOUT_FLOW  |  
Table-type layout  |  CL_SALV_FORM_LAYOUT_GRID  |  
When creating an element of the element type Label, you must always specify the corresponding text element. This means that you cannot use this element as a single element in a design object.
Creating an Element
After you have created a layout for a design object (see above), you can use methods to create elements with the various element types: These methods can be found in the classes CL_SALV_FORM_LAYOUT_FLOW and CL_SALV_FORM_LAYOUT_GRID.
Methods for Creating Elements for a Design Object
Function  |  Method  |  
Create row-type layout (for nested layouts)  |  CREATE_FLOW  |  
Create table-type layout (for nested layouts)  |  CREATE_GRID  |  
Create text element  |  CREATE_TEXT  |  
Create a label for a specific text element  |  CREATE_LABEL  |  
Create a header element  |  CREATE_HEADER_INFORMATION  |  
Create action information  |  CREATE_ACTION_INFORMATION  |  
You use the elements to create objects of the following classes:
Element Types and Their Classes
Element Type  |  Class  |  
Row-type layout (for nested layouts)  |  CL_SALV_FORM_LAYOUT_FLOW  |  
Table-type layout (for nested layouts)  |  CL_SALV_FORM_LAYOUT_GRID  |  
Text element  |  CL_SALV_FORM_TEXT  |  
Label element  |  CL_SALV_FORM_LABEL  |  
Header element  |  CL_SALV_FORM_HEADER_INFO  |  
Action information  |  CL_SALV_FORM_ACTION_INFO  |  
No parameters are required for the row-type layout.
However, for the table-type layout you specify the parameters ROW and COLUMN.
Exception: When creating an element of the element type Label, you must always specify the corresponding text element (R_LABEL_FOR) too, regardless of the layout type.
No comments:
Post a Comment