DATA lr_table_settings TYPE REF TO if_salv_wd_table_set tings lv_table

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
DATA:
lr_table_settings TYPE REF TO if_salv_wd_table_settings,
lv_table_config TYPE REF TO CL_SALV_WD_CONFIG_TABLE,
lv_column_settings TYPE REF TO IF_SALV_WD_COLUMN_SETTINGS,
lr_field_settings TYPE REF TO IF_SALV_WD_FIELD_SETTINGS,
lr_field_amnt TYPE REF TO CL_SALV_WD_FIELD,
lv_aggr_rule TYPE REF TO CL_SALV_WD_AGGR_RULE.
LV_TABLE_CONFIG = LR_SALV_WD_TABLE->GET_MODEL( ).
LV_COLUMN_SETTINGS ?= LV_TABLE_CONFIG.
LT_COLUMNS = LV_COLUMN_SETTINGS->GET_COLUMNS( ).
* aggregation rules
LR_FIELD_SETTINGS ?= LV_TABLE_CONFIG.
LOOP AT LT_COLUMNS ASSIGNING <FS_COLUMN>.
CASE <FS_COLUMN>-ID.
WHEN 'RFID_KOLVO'.
LR_FIELD_AMNT = LV_TABLE_CONFIG->IF_SALV_WD_FIELD_SETTINGS~GET_FIELD( <FS_COLUMN>-id ).
LV_AGGR_RULE = LR_FIELD_AMNT->IF_SALV_WD_AGGR~CREATE_AGGR_RULE( AGGREGATION_TYPE = IF_SALV_WD_C_AGGREGATION=>AGGRTYPE_TOTAL ).
WHEN OTHERS.
ENDCASE.
ENDLOOP.