‎2011 Sep 15 6:42 AM
Hi,
I have designed a ALV grid based report.
If i select more than 1 column and press button means,in user command i am getting only one field name which was selected last.
My user command subroutine is like :
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
endform.
How can i get both the column names (fields) in the user command subroutine.
‎2011 Sep 15 10:48 AM
‎2011 Sep 15 10:48 AM
‎2011 Sep 15 10:53 AM
Since this is a structure, I don not think this would be possible to get that value in thsi sturcture,.. But what is your exact requirement
Edited by: Suzie on Sep 15, 2011 3:24 PM
‎2011 Sep 15 11:08 AM
Hi
If you use FM REUSE ALVDRID display it will sort Or mean for any number of coloumns.
‎2011 Sep 15 11:30 AM
Yes in Reuse_ALV_Grid_Display we can use that sort parameter.
but in run time the user can click at any columns,
That user selected columns i need.
‎2011 Sep 15 2:26 PM
Hi ,
You can insert a coloumn of Checkbox in your ALV.
Based on the checkboxes selected by the user you can get to know the rows selected...
‎2011 Sep 15 2:38 PM
Thanks Praful,
but i need the columns selection,not row selection
‎2011 Sep 19 2:48 PM
‎2011 Sep 21 8:04 AM
The following is the FM we want to use in the User command subroutine to find out the columns which we user has selected.
DATA : it_layouts TYPE slis_layout_alv,
it_fields TYPE SLIS_T_FIELDCAT_ALV,
it_marked1 TYPE SLIS_T_FIELDCAT_ALV.
CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
IMPORTING
es_layout = it_layouts
et_fieldcat = it_fields
et_marked_columns = it_marked1
EXCEPTIONS
no_infos = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
‎2011 Sep 21 8:04 AM