Wednesday, December 22, 2010
Variant can be created using function module RS_CREATE_VARIANT.
REPORT ztest_program. DATA: g_report LIKE rsvar-report VALUE sy-repid, g_variant LIKE rsvar-variant VALUE 'TEST_VAR1', g_vari_desc LIKE varid. DATA: it_rsparams TYPE STANDARD TABLE OF rsparams, wa_rsparams LIKE LINE OF it_rsparams, it_vari_text TYPE STANDARD TABLE OF varit, wa_vari_text LIKE LINE OF it_vari_text. PARAMETERS :p_name TYPE char15. AT SELECTION-SCREEN. IF sy-ucomm = 'ONLI'."Variant is created when you press EXECUTE button on selection-screen. wa_vari_text-langu = 'EN'. wa_vari_text-report = g_report. wa_vari_text-variant = g_variant. wa_vari_text-vtext = 'Test variant'. APPEND wa_vari_text TO it_vari_text. CLEAR wa_vari_text. g_vari_desc-report = g_report. g_vari_desc-variant = g_variant. g_vari_desc-environmnt = 'A'. g_vari_desc-aedat = sy-datum. g_vari_desc-aetime = sy-uzeit. wa_rsparams-selname = 'P_NAME'. wa_rsparams-kind = 'P'. wa_rsparams-low = p_name. APPEND wa_rsparams TO it_rsparams. CLEAR wa_rsparams. CALL FUNCTION 'RS_CREATE_VARIANT' EXPORTING curr_report = g_report curr_variant = g_variant vari_desc = g_vari_desc TABLES vari_contents = it_rsparams vari_text = it_vari_text. ENDIF. START-OF-SELECTION. WRITE 'Variant created'.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- 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.