Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV Grid display

Former Member
0 Likes
463

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

2 REPLIES 2
Read only

abdulazeez12
Active Contributor
0 Likes
416

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
416

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