WORKING WITH PUSH BUTTON ON SELECTION-SCREEN:
In this program created one push button on the selection screen. Whenever we provide lower limit value is lower than higher limit value and if we click on Push button then it will display some information message and if the lower limit value is greater than higher limit value then system will automatically display default error message.
PROGRAM:
REPORT ZR_PUSH_BUTTON.
TABLES : afru.
TYPES : BEGIN OF ty_test,
ism01 LIKE afru-ism01,
END OF ty_test.
TABLES sscrfields.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : so_werks FOR afru-werks.
SELECTION-SCREEN PUSHBUTTON /79(10) XYZ USER-COMMAND abcd.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
MOVE 'Press' TO XYZ.
START-OF-SELECTION.
END-OF-SELECTION.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'ABCD'.
MESSAGE I000(ZMSG) WITH SO_WERKS-LOW 'SUCCESS'.
ENDIF.
OUTPUT:
If you give lower limit is higher than higher limit and click on press button it will display default system error message.
In this program created one push button on the selection screen. Whenever we provide lower limit value is lower than higher limit value and if we click on Push button then it will display some information message and if the lower limit value is greater than higher limit value then system will automatically display default error message.
PROGRAM:
REPORT ZR_PUSH_BUTTON.
TABLES : afru.
TYPES : BEGIN OF ty_test,
ism01 LIKE afru-ism01,
END OF ty_test.
TABLES sscrfields.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : so_werks FOR afru-werks.
SELECTION-SCREEN PUSHBUTTON /79(10) XYZ USER-COMMAND abcd.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
MOVE 'Press' TO XYZ.
START-OF-SELECTION.
END-OF-SELECTION.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'ABCD'.
MESSAGE I000(ZMSG) WITH SO_WERKS-LOW 'SUCCESS'.
ENDIF.
OUTPUT:
If you give lower limit is higher than higher limit and click on press button it will display default system error message.