‎2008 Jul 08 10:53 AM
I have the current screen number in an ABAP processing block in system variable sy-dynnr. I would like to know the screen attributes like
1. Which program has called this screen( As in the case of subscreen a different program may call it)
2. Screen type:
IF it is a subscreen then which is the current container screen for it
and also
How to leave a SUBSCREEN ( As 'Leave SCREEN', 'LEAVE To SCREEN' can not be applied for subscreen).
‎2008 Jul 08 11:21 AM
Hi,
In System field SY-CPROG you get the Program Name.
sy-dynnr give the Screen Number.
There is no such Command to Leave Subscreen.
As a subscreen belongs to a normal screen You can use Leave to screen 0 or Leave screen.
Regards,
Sujit
‎2008 Jul 08 11:24 AM
hi,
SY-CPROG fetches you the current program where as SY-REPID fetches you the main program ..
Regards,
Santosh
‎2008 Jul 08 11:47 AM
Hi ,
I wanted to know caller program of the current screen and not current program.
Example: Prog A calls screen S and from screen S processing block a call to a function module F may be their which belongs to the program B. If my control is in function module F, then sy-cprog will be B, while I expect the value as A.
Regards
Anirudha