cancel
Showing results for 
Search instead for 
Did you mean: 

column grouping?

Former Member
0 Kudos

Hi

i am using alv table in my application. iam sorting the alv table and allowing three columns to be grouped. its displays fine initially but after i sort the columns the grouping is gone.

any suggestions how can i maintain the grouping of the columns even after sorting.

regards

chythanya

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI

Can you please paste the code snippet for how to do column grouping in WDALV?

Former Member
0 Kudos

Hi

iam writing this code to do the column grouping.

DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

lo_cmp_usage = wd_this->wd_cpuse_alv_activity( ).

IF lo_cmp_usage->has_active_component( ) IS INITIAL.

lo_cmp_usage->create_component( ).

ENDIF.

DATA lo_config_model TYPE REF TO cl_salv_wd_config_table.

lo_config_model = lo_interfacecontroller->get_model( ).

lo_config_model->IF_SALV_WD_TABLE_SETTINGS~SET_MULTI_COLUMN_SORT( value = abap_true ).

lr_field = lo_config_model->if_salv_wd_field_settings~get_field( 'CARRID' ).

lr_field->if_salv_wd_sort~create_sort_rule( sort_order = if_salv_wd_c_sort=>sort_order_descending ).

lr_field->if_salv_wd_sort~set_grouping_allowed( value = ABAP_true ).

clear: lr_field.

lr_field = lo_config_model->if_salv_wd_field_settings~get_field( 'CONNID' ).

lr_field->if_salv_wd_sort~create_sort_rule( sort_order = if_salv_wd_c_sort=>sort_order_descending ).

lr_field->if_salv_wd_sort~set_grouping_allowed( value = ABAP_true ).

regards

chythanya