Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Screen attributes at runtime.

Anirudha
Associate
Associate
0 Likes
443

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).

3 REPLIES 3
Read only

Former Member
0 Likes
409

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

Read only

Former Member
0 Likes
409

hi,

SY-CPROG fetches you the current program where as SY-REPID fetches you the main program ..

Regards,

Santosh

Read only

Anirudha
Associate
Associate
0 Likes
409

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