‎2009 Aug 20 2:57 PM
I am trying to set screen field as read only and write mode, depending on some condition. for doing the same i am setting screen field attribute in loop-at-screen. This is working fine, but the problem is screen contains a control tab and once the screen gets called it gives error exactly as discussed in the forum .
now my problem, some of the field on main screen is not part of sub screen area. so this part can not be covered if i do loop-at-screen only for sub-screen area.
Could you please tell me how we can set screen field attribute without loop-at-screen.
If you have any code snippet please post it.
Thanks in Advance.
Pritam
‎2009 Aug 20 3:34 PM
Hello Pritam,
To modify control properties looping at the screen is the only way available. This is the way ABAP works.
You can assign different set of controls to different MODIF ID so that during LOOP AT SCREEN you can differenciate
between the controls on normal screen and subscreen.
Following is the example:
PARAMETERS: TEST1(10) MODIF ID SC1,
TEST2(10) MODIF ID SC2,
TEST3(10) MODIF ID SC1,
TEST4(10) MODIF ID SC2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
IF SCREEN-GROUP1 = 'SC2'.
SCREEN-INTENSIFIED = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
You can analize GROUP3 for following options:
BLK for SELECTION-SCREEN ... BLOCK ...: Block
COF for SELECTION-SCREEN COMMENT ... FOR FIELD ...: Field-related comment
COM for SELECTION-SCREEN COMMENT: Comment
HGH for SELECTION-OPTIONS: Interval upper limit
ISX for PARAMETERS ... AS SEARCH PATTERN: Komplex selection
LOW for SELECTION-OPTIONS: Interval lower limit
OPU for SELECTION-OPTIONS: Selection option icons
PAR for PARAMETERS: Parameters
PBU for SELECTION-SCREEN PUSHBUTTON ...: Pushbutton
TAB for SELECTION-SCREEN TAB: Tab title
TOT for SELECTION-OPTIONS: Text of interval upper limit
TST for SELECTION-SCREEN ... TABBED ...: Tabstrip
TXT for PARAMETERS, SELECT-OPTIONS: Selection text
ULI for SELECTION-SCREEN ULINE: Horizontal Line
VPU for SELECT-OPTIONS: Pushbutton for multiple selection
Hope this helps!
Thanks,
Augustin.
‎2009 Aug 20 3:34 PM
Hello Pritam,
To modify control properties looping at the screen is the only way available. This is the way ABAP works.
You can assign different set of controls to different MODIF ID so that during LOOP AT SCREEN you can differenciate
between the controls on normal screen and subscreen.
Following is the example:
PARAMETERS: TEST1(10) MODIF ID SC1,
TEST2(10) MODIF ID SC2,
TEST3(10) MODIF ID SC1,
TEST4(10) MODIF ID SC2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
IF SCREEN-GROUP1 = 'SC2'.
SCREEN-INTENSIFIED = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
You can analize GROUP3 for following options:
BLK for SELECTION-SCREEN ... BLOCK ...: Block
COF for SELECTION-SCREEN COMMENT ... FOR FIELD ...: Field-related comment
COM for SELECTION-SCREEN COMMENT: Comment
HGH for SELECTION-OPTIONS: Interval upper limit
ISX for PARAMETERS ... AS SEARCH PATTERN: Komplex selection
LOW for SELECTION-OPTIONS: Interval lower limit
OPU for SELECTION-OPTIONS: Selection option icons
PAR for PARAMETERS: Parameters
PBU for SELECTION-SCREEN PUSHBUTTON ...: Pushbutton
TAB for SELECTION-SCREEN TAB: Tab title
TOT for SELECTION-OPTIONS: Text of interval upper limit
TST for SELECTION-SCREEN ... TABBED ...: Tabstrip
TXT for PARAMETERS, SELECT-OPTIONS: Selection text
ULI for SELECTION-SCREEN ULINE: Horizontal Line
VPU for SELECT-OPTIONS: Pushbutton for multiple selection
Hope this helps!
Thanks,
Augustin.
‎2009 Aug 21 5:03 AM