
You are able to define columns as internal data tables yourself or you can use individual fields or whole tables from the database. In the latter case, all information that is available for this element in the Data Dictionary (DDIC) is transferred to the new column objects. In the former case, only those are transferred that you provide with the definition.
For columns with DDIC reference, you are able to retrieve a variety of information on the properties of the DDIC element.
You are also able to change description of column objects by creating or changing a DDIC reference. Here you have the following options:
You change the description of an individual column
You change the description of multiple columns simultaneously.
No matter whether the type of your column agrees with that of the referenced DDIC field, the following properties are always transferred to your column.
Short, medium-length, and long text of your column title
F1 help text
If the typing also matches (internal type and internal length), the remaining properties are also transferred, such as
F4 help and search help
Data element and domain
Columns for quantity, currency, decimal places, and rounding
You are able to make the following settings for DDIC references:
Get information on the DDIC element
Change DDIC Reference of an Individual Column or of Multiple Columns
The following is valid for all of these functions:
|
ALV Tool |
Display Type |
Function Available |
|
Simple, two-dimensional table |
Classic ABAP List |
Yes |
|
Fullscreen |
Yes |
|
|
In the Container |
Yes |
|
|
Hierarchical-sequential list |
Classic ABAP List |
Yes |
|
Tree structure |
Fullscreen |
Yes |
|
In the Container |
Yes |
Get information on the DDIC element
You are able to get all sorts of information that results from the DDIC reference of a column:
|
Function |
Class |
Method |
|
Get name of the DDIC data element |
CL_SALV_COLUMN |
GET_DDIC_ROLLNAME |
|
Get DDIC data type |
GET_DDIC_DATATYPE |
|
|
Get DDIC decimal places |
GET_DDIC_DECIMALS |
|
|
Get DDIC domains |
GET_DDIC_DOMAIN |
|
|
Get output length according to DDIC (CHAR) |
GET_DDIC_OUTPUTLEN |
If a column does not have a DDIC reference, you are able to retrieve the following properties:
Internal Length
To do this, use method GET_DDIC_INTLEN
Internal Type
To do this, use method GET_DDIC_INTTYPE
Change DDIC Reference of an Individual Column or of Multiple Columns
You are able to create or change the DDIC reference for one or more columns. If multiple columns of your ALV output have the same name as the fields in a DDIC structure that already exists, you assign the entire DDIC structure to your ALV output. Like-named columns receive the properties of the corresponding fields in the DDIC structure.
|
Function |
Class |
Method |
|
Change DDIC reference for an individual column |
CL_SALV_COLUMN |
SET_DDIC_REFERENCE |
|
Get DDIC reference for the column |
GET_DDIC_REFERENCE |
|
|
Change DDIC reference for several columns |
CL_SALV_COLUMNS |
APPLY_DDIC_STRUCTURE |