‎2007 Dec 14 6:46 AM
hi can u guts plss let me know what do u mean by loop at screen,screen-group,screen-active and modify screen.
‎2007 Dec 14 6:53 AM
Hi,
'loop at screen' allows the user to change the selection screen.
Syntax
LOOP AT SCREEN [INTO wa].
...
ENDLOOP.
Effect
The statements LOOP AT SCREEN ... ENDLOOP define a loop around a statement block. For every screen element of the current dynpro, to which a dynpro field is assigned, one loop pass is executed. After the LOOP statement either the predefined workarea screen or the workarea wa (when using INTO) contains the properties of the respective screen element. wa must have the same data type as screen.
While processing a table control or a step loop (that is, within a LOOP loop of the dynpro flow logic), for its screen elements the current properties are determined in the current row or group. Outside of the processing of a table control or step loop, for its screen elements the statically predefined properties of all rows or groups are determined.
The table below shows the components of screen and their assignment to the fproperties in the dynpro.
The component name in the loop contains the name of the current dynpro field. The components group1 to group4 can contain three-character IDs, which were assigned to the current screen element in its definition. These IDs allow you to combine the screen elements in up to four different modification groups. In the statement block after LOOP AT SCREEN, these can be queried in logical expressions in order to process several elements in the same way.
The other components of table screen represent the display properties of the current screen element. With the exception of length, they can contain 0 or 1, where 1 is "active" and 0 is "inactive".
Except active, all components of structure screen directly correspond to one attribute of the current screen element. The component active has no match in the attributes. If you change its content with MODIFY SCREEN, this affects the attributes Input, Output and Invisible and thus the components input, output and invisible of structure screen.
Generally ww will use it <b>at selection-screen output.</b>
<b>Reward points if it helps</b>
‎2007 Dec 14 6:48 AM
Hi,
to modify a selection screen we use that.
refer this code
----
PARAMETERS & SELECT-OPTIONS *
----
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-011.
PARAMETERS : p_pay1 RADIOBUTTON GROUP grp USER-COMMAND fc DEFAULT 'X',
p_pay2 RADIOBUTTON GROUP grp.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_pernr FOR pa0000-pernr. "Personnel Number
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (31) text-018.
PARAMETERS : p_begda LIKE pa0000-begda OBLIGATORY. "Start Date
SELECTION-SCREEN COMMENT 52(05) text-019.
PARAMETERS : p_endda LIKE pa0000-endda OBLIGATORY. "End Date
SELECTION-SCREEN END OF LINE.
SELECT-OPTIONS : s_stat2 FOR pa0000-stat2, "Status
s_werks FOR pa0001-werks, "Personnel Area
s_raufnr FOR catsdb-raufnr MODIF ID md1. "Internal Order Number
SELECTION-SCREEN END OF BLOCK b2.
----
AT SELECTION-SCREEN *
----
AT SELECTION-SCREEN OUTPUT.
IF p_pay1 EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MD1'.
screen-active = '1'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF p_pay2 EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MD1'.
screen-active = '1'.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Prashant
‎2007 Dec 14 6:53 AM
wen doin a module pool program...
if v want 2 access n modify the individual elements of a screen
lik a textbox etc..during runtime..
we use LOOP AT SCREEN.
SCREEN is table which has data durig runtime..and accesses the individual elements on screen sequentially..n has their attributes as well..
so if u want to mak an element on screen invisible..
den u can write
screen-invisible = 1.
Hope dis helps..
Reward if it does
‎2007 Dec 14 6:53 AM
Hi,
'loop at screen' allows the user to change the selection screen.
Syntax
LOOP AT SCREEN [INTO wa].
...
ENDLOOP.
Effect
The statements LOOP AT SCREEN ... ENDLOOP define a loop around a statement block. For every screen element of the current dynpro, to which a dynpro field is assigned, one loop pass is executed. After the LOOP statement either the predefined workarea screen or the workarea wa (when using INTO) contains the properties of the respective screen element. wa must have the same data type as screen.
While processing a table control or a step loop (that is, within a LOOP loop of the dynpro flow logic), for its screen elements the current properties are determined in the current row or group. Outside of the processing of a table control or step loop, for its screen elements the statically predefined properties of all rows or groups are determined.
The table below shows the components of screen and their assignment to the fproperties in the dynpro.
The component name in the loop contains the name of the current dynpro field. The components group1 to group4 can contain three-character IDs, which were assigned to the current screen element in its definition. These IDs allow you to combine the screen elements in up to four different modification groups. In the statement block after LOOP AT SCREEN, these can be queried in logical expressions in order to process several elements in the same way.
The other components of table screen represent the display properties of the current screen element. With the exception of length, they can contain 0 or 1, where 1 is "active" and 0 is "inactive".
Except active, all components of structure screen directly correspond to one attribute of the current screen element. The component active has no match in the attributes. If you change its content with MODIFY SCREEN, this affects the attributes Input, Output and Invisible and thus the components input, output and invisible of structure screen.
Generally ww will use it <b>at selection-screen output.</b>
<b>Reward points if it helps</b>
‎2007 Dec 14 6:55 AM
Hi,
Screen is the table where u generally use to modify the screen changes and we use tht in At selection screen-output . screen has fields like screen-input i.e active has two values '0' and '1'. if screen-input = 0. when we use this the input filed will be disabled for giving the value and vice versa for screen-input =1. we hav some other fields like screen-output here it also has same values which will be applcable for output.. coming to screen group here it will be used for grouping couple of input fields for eg. we hav 2 options and want to display one item whn clicked one item and the other should be dissappeard. we go for grouping.
Screen active here it shows tht whether the fields should be visisble or not on the screen...Other mandatory thing is tht we need to mandatorly loop screen elements because screen table has many eleemnts and since we will be usong only few thngs we need to loop it...
Hope u get something out of this
regards,
Sana.