‎2014 Jan 29 7:52 AM
Hi all,
i want to read screen attributes (e.g. is the field editable or not) in abap. But i can't find a way to do that.
i know the fm RS_SCREEN_IMPORT or RPY_DYNPRO_READ but these functions do only read the static attributes of the screen (Table D021S). But i need the attributs at runtime (including if they where modified by MODIFY SCREEN at PBO).
Has anyone a solution to this issue?
Thanks a lot.
André
‎2014 Jan 29 9:54 AM
Hi Andre,
Export the screen attributes in PAI of first screen and import them again in next screen call.
Thanks
Saurabh
‎2014 Jan 29 7:59 AM
Hi,
If you want to check the screen attributes at run time. You can use the LOOP at Screen.
Check the structure of the 'SCREEN'
‎2014 Jan 29 8:02 AM
‎2014 Jan 29 8:07 AM
Hi Andre,
Just to elaborate, in module pool programming, you can set screen field property in PBO. For that you use LOOP statement and a runtime table, SCREEN. This contains screen fields and their attributes.
Do not forget to use MODIFY screen.
Regards
Abhi
‎2014 Jan 29 8:56 AM
you can use loop at screen . endloop.
this will let you to process all the screen attribute.
‎2014 Jan 29 9:14 AM
thanks for your answers.
in deed i can edit and read the attributes directly in the pbo by "loop at screen".
the problem is, that i need to read the values in another screen.
In screen B i need to read the attribute of screen A. and it is not possible to read the attributes in the PBO of screen A, because it is an standard screen. i can not "loop at screen" and read the current value.
i hope i could describe my problem more specific.
Regards
André
‎2014 Jan 29 9:21 AM
Hi Andre
You can store the attributes of Screen A in PAI via some implicit enhancemnt and then when PBO of your screen triggers you can read it..
Please provide program and screen number
Nabheet
‎2014 Jan 29 11:47 PM
I think I did not read that in the post and I thought you wanted to read same screen.
Regards
Abhi
‎2014 Jan 29 9:36 AM
Hi Andre,
You can use loop at sceen. endloop in the event at selection-screen output.
In between you can use the different variables from structure screen.
For example.:-
LOOP AT SCREEN.
IF screen-name EQ 'S_TXT04' OR
screen-group1 EQ 'ID1'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF. " IF screen-name EQ 'S_TXT04' OR
ENDLOOP. " LOOP AT SCREEN.
Here it searches for screen name is eq to S_TXT04 or its group is equal to ID1.
if it matches then screen fields with group ID1 will be active.
Like screen-active you can use these variables as well:
NAME
GROUP1
GROUP2
GROUP3
GROUP4
REQUIRED
INPUT
OUTPUT
INTENSIFIED
INVISIBLE
LENGTH
ACTIVE
DISPLAY_3D
VALUE_HELP
REQUEST
VALUES_IN_COMBO
COLOR
Regards,
Vineesh.
‎2014 Jan 29 9:56 AM
I did solve the problem by saving the data in the PBO of screen A (by loop at screen) in an internal talbe and read this stored data in screen B
thanks a lot for your help!
‎2014 Jan 29 9:54 AM
Hi Andre,
Export the screen attributes in PAI of first screen and import them again in next screen call.
Thanks
Saurabh