‎2009 Feb 04 8:40 AM
Hi,
I have a main screen '9970' and subscreen '7300'.
The subscreen '7300' is also a subscreen of some other screen say '9000'.
Now I need to disable the fields of '7300' only when it is called from the main screen '9970'. When i disable in fields in PBO of subscreen , then it will be disabled in screen '9000' also.
Is there any way to disable fields of subscreen from the main screen '9970'.
I tried the following in PBO of main screen
LOOP AT SCREEN.
If Screen-name = 'SCRAREA1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDLOOP.
ENDLOOP.
ps: call subscreen SCRAREA1 using <prog-name> <screen-no>
SCRAREA1 is the name of the subscreen area.
But the above code is not capturing the subscreen area name at all..
Anyone please suggest..
Thanks
Hemalatha
‎2009 Feb 04 9:21 AM
Hi,
check if the screens are activated.
now call the subscr from the scr u want to call using
call subscreen SUBSCR including 'ZPRG' 'C_SCRNUM'.
in PBO, write the logic for disabling and
also write CALL SUBSCREEN SUBSCR in ur PAI
‎2009 Feb 04 9:30 AM
Hi Kalyan
All the screens are activated. I have included everything in PBO and PAI.
the fields are displayed already. I want to make all fields 'Readonly'.
Please suggest
Rgds
Hemalatha.
‎2009 Feb 04 9:29 AM
Hi,
In The main screen 9000 and 9970 pass the screen number to a global variable before calling subscreen 7300.
In PBO of 7300 chek the variable to know if it has been called from the desired main screen say 9970. If yes disable it and pass another indicator say dibale = X.
Return to main screen.
In the PBO of the Main screen check the variable DISABLE and grayout the fields you want.
IMPORTANT.
If you are doing CALL SCREEN 7300 from 9000.And then a LEAVE TO SCREEN from 7300 after processing, you will not go to the PBO of 9000. Control will execute the flow logic of 9000 after the CALL SCREEN statement.
Let me know if any issues.
Thanks,
Vivekanand
‎2009 Feb 04 9:55 AM
Hi Vivekanand
The subscreen 7300 is in a different package.
I have a global variable to call subscreen 7300 in the top include of
the package to which screen 9970 belongs to.
I could not access this variable in a different package..
Please suggest how to access this variable? or
is there any other way for disabling..?
Rgds
Hemalatha
‎2009 Feb 04 9:34 AM
u can write the logic in the PBO to chck if it is being called from the Screen u want to call i.e 9970 and if its yes..u can disable.
‎2009 Feb 04 11:44 AM
Hi Hemalatha,
As far as i have understood the issue... you want to disable some fields from screen 9970 and not from 9000.
in
at selection-screen output. " give a condition in such a way that the loop runs only for 9970.
if sy-dynnr = 9970.
LOOP AT SCREEN.
If Screen-name = 'SCRAREA1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
endif.
ENDLOOP.
endif.