It is not required of you to create and maintain different dialog screen for each screen functions for Create, Change, Delete and Dispaly. You can shared the used of a single Dialog Screen and used the MODIFY SCREEN to make the Field to be modify or not. Modifications and maintenance will be easier when user request you to change any screen layout.
PROCESS BEFORE OUTPUT.
MODULE 0250_STATUS.
LOOP.
MODULE STATUS_0120.
ENDLOOP.
LOOP.
MODULE STATUS_0110.
ENDLOOP.
LOOP.
MODULE STATUS_0100.
ENDLOOP.
*
PROCESS AFTER INPUT.
MODULE REFRESH_0250.
LOOP.
MODULE USER_COMMAND_0120.
ENDLOOP.
LOOP.
MODULE USER_COMMAND_0110.
ENDLOOP.
* For example, if the user enter the Delete Screen, you will make all the Fields non-Editable.
*&---------------------------------------------------------------------*
*& Module 0250_STATUS OUTPUT
*&---------------------------------------------------------------------*
* text *
*----------------------------------------------------------------------*
MODULE 0250_STATUS OUTPUT.
SET PF-STATUS 'Z250'.
SET TITLEBAR 'Z250'.
IF OKSAVE = 'DEL'.
* Make the SAVE Menu button inactive
SET PF-STATUS 'Z250' EXCLUDING 'SAVE'.
* Make all the Fields non-Editable
LOOP AT SCREEN.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
* For example, if the user enter the Modify Screen, you will make all the Fields Group 1 that
* have a 'M' non-Editable.
* You specify the 'M' for Group 1 using the Screen Painter Attribute
IF OKSAVE = 'MOD'.
* Make the DELE Menu button inactive
SET PF-STATUS 'Z250' EXCLUDING 'DELE'.
* Make all the Fields Groups 'M' non-Editable
LOOP AT SCREEN.
check screen-group1 = 'M'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
CLEAR OKCODE.
ENDMODULE.
No comments:
Post a Comment