Тестируя dynpro приложения, часто приходится заполнять параметры одинаковыми значениями. Возникает желание сохранить вариант экрана, но проблема в том, что это не стандарный отчет, а Dynpro приложение. После поиска подходящих функциональных модулей, создан пример.
Нам необходим Dynpro экран с подэкраном, содержащим параметры.
*-----------------------------------------------------------------*
* INTERNAL TABLES *
*-----------------------------------------------------------------*
DATA: T_RKEY TYPE STANDARD TABLE OF RSVARKEY WITH HEADER LINE,
T_SELCTAB TYPE STANDARD TABLE OF RSSCR WITH HEADER LINE,
T_VARI TYPE STANDARD TABLE OF RVARI WITH HEADER LINE,
IT_EXTAB TYPE SLIS_T_EXTAB,
WA_EXTAB LIKE LINE OF IT_EXTAB.
*-----------------------------------------------------------------*
* VARIABLES *
*-----------------------------------------------------------------*
DATA: OK_CODE TYPE SY-UCOMM,
W_VARIANT TYPE RSVAR-VARIANT,
W_USER_VARI TYPE RSVAR-VARIANT,
W_VARI_REPORT TYPE RSVAR-REPORT,
SEL_VARIANT TYPE RSVAR-VARIANT,
SEL_VARIANT_TEXT TYPE RSVAR-VTEXT,
W_REPORT TYPE RSVAR-REPORT,
VARIANT_EXISTS TYPE C.
*-----------------------------------------------------------------*
* SELECTION-SCREEN *
*-----------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
SELECT-OPTIONS: S_CARRID FOR SPFLI-CARRID,
S_CONNID FOR SPFLI-CONNID.
SELECTION-SCREEN END OF SCREEN 101.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'SAVE'.
PERFORM SAVE_VARIANT.
PERFORM VARIANT_EXISTS.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'GET_VAR'.
PERFORM LOAD_VARIANT.
WHEN 'DEL_VAR'.
PERFORM DELETE_VARIANT.
PERFORM VARIANT_EXISTS.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&----------------------------------------------------------------*
*& Form SAVE_VARIANT *
*&----------------------------------------------------------------*
FORM SAVE_VARIANT.
*&----------------------------------------------------------------*
*& Form LOAD_VARIANT *
*&----------------------------------------------------------------*
FORM LOAD_VARIANT.
*&----------------------------------------------------------------*
*& Form DELETE_VARIANT *
*&----------------------------------------------------------------*
FORM DELETE_VARIANT.
*-----------------------------------------------------------------*
* FORM CHOOSE_VARIANT *
*-----------------------------------------------------------------*
FORM CHOOSE_VARIANT CHANGING L_SEL_VARIANT.
*&----------------------------------------------------------------*
*& Form VARIANT_EXISTS *
*&----------------------------------------------------------------*
FORM VARIANT_EXISTS.
CALL FUNCTION 'RS_VARIANT_FOR_ONE_SCREEN'
EXPORTING
PROGRAM = W_REPORT
DYNNR = '0101'
IMPORTING
VARIANT_EXISTS = VARIANT_EXISTS.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.