The document describes output modules for modifying screen elements dynamically based on subtype values. It contains modules that loop through a SCREEN internal table to set certain elements to inactive based on their GROUP2 value and the subtype. The modules are checking the subtype and selectively hiding elements in the user interface as needed for that subtype.
Download as DOC, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
42 views
Code in PBO
The document describes output modules for modifying screen elements dynamically based on subtype values. It contains modules that loop through a SCREEN internal table to set certain elements to inactive based on their GROUP2 value and the subtype. The modules are checking the subtype and selectively hiding elements in the user interface as needed for that subtype.
* * * Output-modules for infotype MMMM * * MODULE P9007 OUTPUT. IF PSYST-DSUBT = '01'. "Subtype LOOP AT SCREEN. IF SCREEN-group2 = 'B'. SCREEN-ACTIVE = 0. "Inactive/Hide MODIFY SCREEN. ENDIF. ENDLOOP. ENDIF.
IF PSYST-DSUBT = '02'. "Subtype
LOOP AT SCREEN. IF SCREEN-GROUP2 = 'A'. which we write in LAYOUT->PROPERTIES WINDOW SCREEN-ACTIVE = 0. ""Inactive/Hide MODIFY SCREEN. ENDIF. ENDLOOP. ENDIF. *Note: SCREEN is an Itab With Header Line that holds the Details Of *All the UI Elements on the Screen. *The Fields of the ITAB - SCREEN Are *NAME -> Name Of the UI ELement *GROUP1 -> *GROUP2 -> *GROUP3 -> *GROUP4 -> *INPUT -> Possible Values: 0(Disabled) and 1(Enabled) *REQUIRED -> Possible Values: 0(Optional) and 1(Mandatory) *ACTIVE -> Possible Values: 0(InVisible) and 1(Visible) *Note : Changes to this SCREEN ITAB , Before Displaying the Screen i.e *in the PBO are applicable to the UI Elements. *Note : Modifying the Selection-Screen dynamically also through the *Same Process But as part of Event : AT SELECTION-SCREEN OUTPUT. *is triggered for Each Change to the Selection-Screen UI Elements i.e *Before ReDisplaying the Screen . IF PSYST-NSELC EQ YES. * read text fields etc.; do this whenever the screen is show for the * first time: * PERFORM RExxxx. IF PSYST-IINIT = YES AND PSYST-IOPER = INSERT. * generate default values; do this the very first time on insert only: * PERFORM GET_DEFAULT. ENDIF. ENDIF. ENDMODULE. *----------------------------------------------------------------------*
MODULE P9444 OUTPUT.
IF PSYST-NSELC EQ YES. * read text fields etc.; do this whenever the screen is show for the * first time: * PERFORM RExxxx. IF PSYST-IINIT = YES AND PSYST-IOPER = INSERT. * generate default values; do this the very first time on insert only: * PERFORM GET_DEFAULT. ENDIF. ENDIF. if psyst-dsubt = '001'. loop at screen. IF SCREEN-GROUP2 = 'B'. SCREEN-ACTIVE = 0 . MODIFY SCREEN. ENDIF. IF SCREEN-GROUP2 = 'C'. SCREEN-ACTIVE = 0 . MODIFY SCREEN. ENDIF. endloop. ENDIF. if psyst-dsubt = '002'. loop at screen. IF SCREEN-GROUP2 = 'A'. SCREEN-ACTIVE = 0 . * SCREEN-ACTIVE = 'C' . MODIFY SCREEN. ENDIF. IF SCREEN-GROUP2 = 'C'. SCREEN-ACTIVE = 0 . * SCREEN-ACTIVE = 'C' . MODIFY SCREEN. ENDIF. endloop. ENDIF. if psyst-dsubt = '003'. loop at screen. IF SCREEN-GROUP2 = 'B'. SCREEN-ACTIVE = 0 . * SCREEN-ACTIVE = 'C' . MODIFY SCREEN. ENDIF. IF SCREEN-GROUP2 = 'A'. SCREEN-ACTIVE = 0 . * SCREEN-ACTIVE = 'C' . MODIFY SCREEN. ENDIF. endloop. ENDIF. ENDMODULE.