11-30-2009 9:51 AM
Hello experts,
I have created an simple ALV Grid report, in that I have implemented double click event n I want to create a new ALV grid with new data to be displayed. So I want to access field value ie using SLIS_SELFIELD or anything. Could anyone please guide me how can I access a field value using slis though SLIS_SELFIELD has methods like SEL_TAB_FIELD... I wan to access something like SEL_FIELD_VALUE but its not available in the class.
Thanks in advance...
Regards,
Viral Patel
11-30-2009 9:59 AM
Hello Viral,
SLIS_SELFIELD is not a class. It is infact a flat structure defined in the type-pool SLIS.
You can access the value in the field value. Check in SE11 for the other fields in SLIS_SELFIELD.
BR,
Suhas
11-30-2009 10:20 AM
Hi Suhas,
Thanks for the quick responce.
How do I access selected field's value using SLIS_SELFIELD? Is there any attribute for that like SEL_TAB_FIELD, SEL_TABNAME, etc..?
Thanks..
Regards,
Viral Patel
Edited by: Viral Patel on Nov 30, 2009 11:20 AM
11-30-2009 10:22 AM
Read the documentation for the param I_CALLBACK_USER_COMMAND of the FM: REUSE_ALV_GRID_DISPLAY.
Here you will get the details.
BR,
Suhas
11-30-2009 10:24 AM
Hi Viral,
SLIS_SELFIELD has an attribute named VALUE which holds the value you selected row & TBAINDEX holds the row number.
Refer below code snippet :-
FORM user_command
USING s_ucomm LIKE sy-ucomm
s_selfield TYPE slis_selfield. "#EC CALLED
CASE s_ucomm.
WHEN '&IC1'.
CLEAR wa_podat2.
READ TABLE itab_podat2 INTO wa_podat2 INDEX s_selfield-tabindex.
CHECK sy-subrc = 0.
IF wa_podat2-ebeln = s_selfield-value.
SET PARAMETER ID 'BES' FIELD wa_podat2-ebeln.
IF wa_podat2-ebeln IS NOT INITIAL.
CALL TRANSACTION c_tcode.
ENDIF.
For above event to happen, you have to use parameter I_CALLBACK_USER_COMMAND of REUSE_ALV_GRID_DISPLAY as below :-
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = itab_fieldcat
it_events = itab_events
TABLES
t_outtab = itab_podat2[].
Regards
Abhii
Edited by: Abhii on Nov 30, 2009 11:25 AM