‎2007 Oct 15 10:05 AM
hi gurus again........
i jst want to on whats the role of MODIFY SCREEN on the following code....
IF p_m NE 'X'.
LOOP AT SCREEN.
IF screen-name = 'P_MONTH'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
i hope someone can give me a helpful advice......
thanks its me again.....
ghers.....
‎2007 Oct 15 10:08 AM
Hi,
If someone select parameter(mostly radiobutton p_m) on the screen then the paramtetr for month P_MONTH should not be visible and for that you need to modify the screen and that is what this statement is doing.
Regards,
Atish
‎2007 Oct 15 10:08 AM
hi,
it is use to change the attribute of the fields taken on screen on certain condition.
here p_m is one parameter (check box or radio button i think).
Now user want that if it is checked (ticked) that element on screen with name p_mont should b disable.
Mean user cant enter value in this field.
Reward if useful.
‎2007 Oct 15 10:09 AM
Hi,
The below code modifies the screen..The field P_MONTH will be disabled by the code u wrote ..
Reward if helpful.
Regards,
Nagaraj
‎2007 Oct 15 10:10 AM
Hi,
MODIFY SCREEN
Syntax
Effect
This statement can be used in the statement block after LOOP AT SCREEN only and makes sense only during PBO processing. If FROM is not specified, MODIFY SCREEN modifies the attributes of the current screen element with the values from the predefined screen work area. If a wa work area is specified, its contents are used for the modification.
The wa work area must have the same data type as screen. The name component must contain the name of the current screen element, otherwise the statement is not executed. nweisung nicht ausgeführt. Up to the group1 to group4 and length components, all remaining components of screen and wa must contain either the value 0 or 1. The value 0 deactivates the corresponding field attribute, and 1 activates it.
If MODIFY SCREEN is executed during PBO processing, the modified attributes for the display of the screen affect the current dynpro after PBO processing. The attributes of the screen element of the dynpro are reset to their static attributes at the start of each PBO processing, so that the execution of MODIFY SCREEN during PAI processing does not effect the display of the following screen.
The active component
The active component is used to set the input, output and invisible components at once. At the start of PBO processing, the active component always has the value 1. If active is set to 0 with MODIFY SCREEN, input and output are automatically set to 0 and invisible is set to 1. 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 a different value in active is ignored.
Modifications in Table Controls and Step Loops
During processing of 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 attributes of a screen element that is part of a line in the table control does not effect the table control, since the values are transferred from the structure created using CONTROLS. Before a step loop is processed, the change to the attributes 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.
Example
In the following PBO module, an input field called val is made mandatory and converted to display in the foreground.
MODULE modify_0100 OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'VAL'.
screen-required = '1'.
screen-intensified = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDMODULE.
Reward points if useful
‎2007 Oct 15 10:13 AM
modify screen is used to <b>change the properties of screen attributes at runtime</b>.
In the piece of code you have provided here, if the var p_m <> 'X', then the screen attribute P_MONTH will be disabled.
‎2007 Oct 15 10:17 AM
Hi Jose,
If you dont use MODIFY SCREEN at that line..how the changes will effect?
Purpose: - It will change the properties of screen attributes at runtime.
Regards,
Hari
‎2007 Oct 15 10:37 AM
Hi
to modify the screen you need to attach a key word for ur parameter or selec-option
like this
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_WERKS LIKE MARC-WERKS <b>MODIF ID S1</b>.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS <b>MODIF ID S2</b>.
SELECTION-SCREEN END OF BLOCK B1.
and use that changes like this
***********SCREEN MODIFICATIONS*******************
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'S2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 EQ 'S1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
you have to write like this
<b>Reward if usefull</b>
********END OF SCREEN MODIFICATIONS*****************