Application Development 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: 

Interactive ALV with REUSE_ALV_LIST_DISPLAY

Former Member
0 Kudos

Hi ,

I like to add one button in the appication tool bar of the ALV . I am using the REUSE_ALV_LIST_DISPLAY . And on firing the button , i like to display another list in the output.

Please post me a simple sample program for this option .

Hope i would get the answer immedly .

Cheers,

Jeeva

3 REPLIES 3

Former Member
0 Kudos

Hi,

You can add buttons in the

SET PF-STATUS 'ZSTATUS'.( Double click on zstatus)

GUI Status > Application ToolBar > specify the function code.

U can control the button by giving a funtion code and in the PAI.

MODULE user_command_9001 INPUT.

CASE sy-ucomm.

when 'functioncode'.

perform what u need to call eg. call transaction.

endcase.

endmodule.

eg:U can search this forum i have given an example earlier.

Thanks & Regards,

Judith.

Former Member
0 Kudos

Hi,

Prabhu this side,Use Ur Own PF-status and Pass same thing my using pf_status parameter in FM.

regards

Prabhu

0 Kudos

Hello ,

step 1.

Data : gc_status TYPE slis_formname VALUE 'STAN',

gt_user_command TYPE slis_formname VALUE 'USER_COMMAND'.

Step 2:

*----


  • FORM STAN *

*----


FORM stan USING extab TYPE slis_t_extab.

SET PF-STATUS 'SAMPLE' . " Create your own PF *status ,copy standard and your own buttons

ENDFORM. "STAN

Step 3:

----


  • FORM user_coomand

*----


FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield .

r_ucomm = sy-ucomm.

CASE r_ucomm.

WHEN 'ADDEDBUTTON'.

PERFORM call_Another_list USING rs_selfield.

ENDCASE.

ENDFORM. "USER_COMMAND

Step 4.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • i_buffer_active = 'X'

i_callback_program = g_repid

i_callback_pf_status_set = gc_status

i_callback_user_command = gt_user_command

is_layout = gs_layout

it_fieldcat = v_fieldcat[]

i_save = g_save

is_variant = gs_variant

it_events = gt_events[]

it_sort = it_sort

IMPORTING

  • e_exit_caused_by_caller = g_exit_caused_by_caller

es_exit_caused_by_user = gs_exit_caused_by_user

TABLES

t_outtab = p_table

EXCEPTIONS

program_error = 1

OTHERS = 2.

Step 5.

form call_Another_list USING rs_selfield TYPE slis_selfield.

  • List Header for Top-Of-Page

PERFORM comment_build.

  • Fill the Field Catlog details

PERFORM fieldcat_init USING 'IT_ALL_BOMS'.

  • Modify the Field Catalog

PERFORM modify_fieldcat.

  • Fill the necessary events

PERFORM eventtab_build USING gt_events.

rs_selfield-refresh = 'X'.

endform.

Let me know if it helps you !

Regards,

Manohar