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

The difference between CALL SCREEN and SET SCREEN

Former Member
0 Likes
3,593

Hi all abapers,

I have read thru the explanation via F1 for CALL SCREEN and SET SCREEN.

However, I am still not really clear of the main difference between these two.

If I am not wrong, the main difference is when first time calling to other screen, then we use CALL screen, subsequently, we will use SET screen for the following screen calling.

We are not supposed to use SET screen during the first time calling screen.

If I am wrong, Could someone explain it to me in example?

Please do not copy and paste the explanation from F1, as I have already read through.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,775

Hi myahsam wong

You are somehow right for the call screen and set screen. But the basic purpose of set screen is use to set the screen number before calling the statement call screen.

SET SCREEN 9999

CALL SCREEN.

Thanks,

Chidanand

Hi all abapers,

I have read thru the explanation via F1 for CALL SCREEN and SET SCREEN.

However, I am still not really clear of the main difference between these two.

If I am not wrong, the main difference is when first time calling to other screen, then we use CALL screen, subsequently, we will use SET screen for the following screen calling.

We are not supposed to use SET screen during the first time calling screen.

If I am wrong, Could someone explain it to me in example?

Please do not copy and paste the explanation from F1, as I have already read through.

Thanks in advance.

7 REPLIES 7
Read only

Former Member
0 Likes
2,776

Hi myahsam wong

You are somehow right for the call screen and set screen. But the basic purpose of set screen is use to set the screen number before calling the statement call screen.

SET SCREEN 9999

CALL SCREEN.

Thanks,

Chidanand

Read only

Former Member
0 Likes
2,775

Hi,

The major difference between these two statements is:

CALL SCREEN statement triggers the PBO section of the called screen immediately (as and when it encounters this statement).

SET SCREEN processes the remaining statements of the current screen and then goes to the called screen.

Regards,

Nitin.

Read only

0 Likes
2,775

Hi all,

Thanks for all the replies.

I am somehow still not really understand the process.

I have a sample program that developed by other developer. I able to find the SET SCREEN statement in the program, however there is not CALL SCREEN statement. And the program runs smoothly without any problem.

Is there something I have missed out?

Read only

0 Likes
2,775

hi,

there is stack process whn you talk about the call screen.

whenever you call any screen by using call screen 9000 then this gets added in your stack.

eg call screen 9000

then call screen 9001 then 9002 and so on..

so in your stack there will be entries of screen like

9002

9001

9000.

(last come first out).

in this senario when you use set screen 0.leave to screen. cursor will come to PBO of 9002 as it is last in stack but will get called first as default.

now when you say set screen 9000 , you will have to use leave to screen statement .without this you cant go to that screen. calling a screen by this method does not put screens in any stack.

hope you will understand nw

Read only

Former Member
Read only

GauthamV
Active Contributor
0 Likes
2,775

check this.

[https://forums.sdn.sap.com/click.jspa?searchID=20292383&messageID=5479740]

Read only

Former Member
0 Likes
2,775

HI ,

With SET SCREEN, the current screen simply specifies the next screen in the chain. control branches to this next screen as soon as the current screen has been processed. Return from next screen to current screen is not automatic. It does not interrupt processing of the current screen. If we want to branch to the next screen without finishing the current one, use LEAVE SCREEN.

With CALL SCREEN, the current (calling) chain is suspended, and a next screen (or screen chain) is called in. The called screen can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0. Sometimes we might want to let an user call a popup screen from the main application screen to let them enter secondary information. After they have completed their entries, the users should be able to close the popup and return directly to the place where they left off in the main screen. Here comes CALL SCREEN into picture. This statement lets us insert such a sequence into the current one.

Thanks & Regards

Sathish R Raj