2007 Jul 16 8:04 AM
HI All,
I have added one Function button in ALV grid display menu Bar. Now i have to use that button for secondary list display but when i click that button i am not getting that function code in my main program. based on that code i want to display sencondary list. I am using ALV thru function module "Reuse ALV...'.
Any help will be highly appreciated.
Thanks in advance.
Regards,
Lokesh
HI All,
I have added one Function button in ALV grid display menu Bar. Now i have to use that button for secondary list display but when i click that button i am not getting that function code in my main program. based on that code i want to display sencondary list. I am using ALV thru function module "Reuse ALV...'.
Any help will be highly appreciated.
Thanks in advance.
Regards,
Lokesh
2007 Jul 16 8:10 AM
Hi Lokesh-
Use the function code of the menu bar option in 'USER_COMMAND' of REUSE_ALV_GRID_DISPLAY.
supose if function code is 'MEU' then under the dynamic form of USER_COMMAND, use CASE stmt like below:
case sy-ucomm.
when 'MEU'.
< secondary list coding>
when others.
endcase.
Hope this will help.
Tx
2007 Jul 16 8:11 AM
Have you filled the "i_callback_program" and "i_callback_user_command" parameters with the name of a routine and of the calling program. Then any function code you added to the status will be executed within the specified routine of the calling program.
The call must look like :
i_callback_program = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
(...)
i_callback_program = i_callback_program
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
(...)The form must look like :
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.Function code is in r_ucomm.
Regards