cancel
Showing results for 
Search instead for 
Did you mean: 

alv get list

Former Member
0 Kudos

hi all,

i am getting values in alv table using select-options. if there are multiple line items for 1 PR no, its displaying all the line items(all the 16 line items with the same PR no) but i want PR no to be displayed only once .In alv i have used bind table method.

can anybody tel me if any other methods there?

(note: here i am calling rfc and passing lt_table of structure to table parameter of rfc)

Accepted Solutions (0)

Answers (1)

Answers (1)

saravanan_narayanan
Active Contributor
0 Kudos

Hello Vani,

yes its possible, first you need to set the sort order for the column and then you need to set the grouping

data lo_interfacecontroller type ref to iwci_salv_wd_table .
  lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
  data: lr_field type ref to cl_salv_wd_field.
  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( <column_name> ). 
  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 ).

BR, Saravanan