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

Check if screen exist

Former Member
0 Likes
1,365

Hi,

I've made a kind of screen exist in my application. It calls a screen from an other report, but no I want to include a check if the screen exists in that report and if the screen is of the type subscreen. Any ideas on how to do this?

kr,

Björn

Hi,

I've made a kind of screen exist in my application. It calls a screen from an other report, but no I want to include a check if the screen exists in that report and if the screen is of the type subscreen. Any ideas on how to do this?

kr,

Björn

3 REPLIES 3
Read only

Former Member
0 Likes
752

Hi Bjorn,

Use the statement CALL SUBSCREEN...

Check the value of sy-subrc immediately after this statement.

If the value is non zero, then the subscreen does not exist.

Ravi

Read only

Former Member
0 Likes
752

Hi Ravi,

Thank you for your answer.

However I don't think this is possible for different reasons:

1. I don't want to call my subscreen yet

2. I'm using selection-screen tabbed block as subscreen area so I'm not going into PBO or PAI modules and there's the only place to call subscreens I think

kr,

Björn

Read only

Former Member
0 Likes
752

I've managed to solve this issue using the function RS_SCREEN_LIST. This function takes as arguments a program name and a screen number. It returns a table with properties of the screen. If the column 'TYPE' of this table equals 'I', then it's a subscreen. It also has an exception 'Screen does'nt exist'.

kr,

Björn