SAP MODIFY SCREEN ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID DYNPRO%
• MODIFY SCREEN ABAP Statement
• FROM MODIFY SCREEN

MODIFY SCREEN
Short Reference

ABAP_SYNTAX
MODIFY SCREEN FROM wa.

What does it do?
This statement can be used in the statement block after LOOP AT SCREEN only and makes sense only during PBO processing. A work area wa of the type SCREEN from the ABAP Dictionary must be specified after FROM. The statement modifies the properties of the current screen element with the values from the work area.
The name component must contain the name of the current screen element, otherwise the statement is not executed. Apart from the components group1 through group4 and length, all other components of wa have either the value 0 or 1. The value 0 deactivates the corresponding field property and the value 1 activates it. In addition, required and value_help can also have the value 2:
If MODIFY SCREEN is executed during PBO processing, the modified properties for the display of the screen layout affect the current dynpro after PBO processing. The properties of the screen elements of the dynpro are reset to their static properties at the start of each PBO processing, so that the execution of MODIFY SCREEN during PAI processing does not affect the display of the following screen layout.
The active component
The active component is used to set the input, output , and invisible components at the same time. When PBO processing starts, the component active is always 1. If active is set to 0 by MODIFY SCREEN, input and output are set to 0 and invisible is set to 1. Any other values in input, output, and invisible are ignored. Conversely, setting input and output to 0 and invisible to 1 automatically sets active to 0 and any other values in active are ignored.
Special Cases
The following special cases should be noted:
If the current dynpro field with the property output field only is defined in Screen Painter, it cannot be set to ready for input and the assignment of the value 1 to the component input is ignored.
If the current dynpro field with the property required is defined in Screen Painter or if the component required is set to 1, the component input should stay as 1. Otherwise, setting input to 0 would cancel the required property.
Modifications in Table Controls and Step Loops
When processing a table control or a step loop, the changes affect the current line of the table control or the current step loop group. Before the processing of a table control, the change to the properties of a screen element that is part of a line in the table control does not affect the table control, since the values are passed from the structure created using CONTROLS. Before a step loop is processed, the change to the properties of a screen elements that is part of a step loop group affects all groups in the step loop.
Modifications to Tabstrip Controls
If the active component for a tab title of a tabstrip control is set to 0, the whole tabstrip page is hidden.



Latest notes:

More specifically, the statement MODIFY SCREEN can be used for selection screens during the selection screen event AT SELECTION-SCREEN OUTPUT in selection screen processing.
This statement has an obsolete short form that works with the obsolete built-in structure screen.
The obsolete built-in structure screen should not be specified explicitly after FROM.
ABAP_HINT_END



Example ABAP Coding

In the following PBO module, an input field called val is made mandatory and converted to display in the foreground.
ABEXA 00435
ABAP_EXAMPLE_END

ABAP_EXAMPLE_ABEXA
The program DEMO_DYNPRO_MODIFY_SCREEN demonstrates all possible dynamic screen modifications.
ABAP_EXAMPLE_END

...More SAP MODIFY Examples

Return to menu