Tuesday, December 21, 2010
Set I_SAVE = 'X' to save ALV layout as a variant. This program is used to select saved alv layout at selection screen.
REPORT ztest_notepad. DATA: BEGIN OF it_t100 OCCURS 0, sprsl TYPE t100-sprsl, arbgb TYPE t100-arbgb, msgnr TYPE t100-msgnr, text TYPE t100-text, END OF it_t100. TYPE-POOLS : slis. DATA: wa_variant TYPE disvariant. PARAMETERS : p_var TYPE disvariant-variant. "F4 help for Variant AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var. DATA:g_exit. wa_variant-report = sy-repid. CALL FUNCTION 'REUSE_ALV_VARIANT_F4' EXPORTING is_variant = wa_variant i_save = 'X' IMPORTING e_exit = g_exit es_variant = wa_variant. IF sy-subrc EQ 0. IF g_exit = space. p_var = wa_variant-variant. ENDIF. ENDIF. "START-OF-SELECTION START-OF-SELECTION. SELECT * FROM t100 INTO TABLE it_t100 UP TO 100 ROWS WHERE sprsl = sy-langu. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = sy-repid i_structure_name = 'T100' i_default = 'X' "Initial variant active i_save = 'X' "Display variants can be saved as standard display variants. is_variant = wa_variant TABLES t_outtab = it_t100.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Sending email with pdf attachment
- ABAP - Step by step tutorial on Smart Forms - Template Node
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.