cancel
Showing results for 
Search instead for 
Did you mean: 

re: screen

Former Member
0 Kudos

Hi,

what is the difference between call screen and leave to screen.

rgds

p.kp

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi paulri,

1.<b>CALL SCREEN</b> .

If you call a screen sequence during processing

of a particular list level, it is processed until the end of a screen with next screen 0....

Then the

dialog processor returns control to the list processor, and processing carries on after the CALL

SCREEN statement...

2.<b>LEAVE TO SCREEN</b>

The LEAVE TO SCREEN statement exits the current screen and calls the dynamic next screen,

which you specify as part of the statement. ...

The LEAVE TO SCREEN statement is no more than

a contraction of the two statements

SET SCREEN <next screen>.

LEAVE SCREEN.

These statements do not end the screen sequence. They merely branch to another screen in the

same sequence. The screen sequence only ends when you leave to next screen 0.

regards

satesh

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi p.kp,

You can find some information about it also from this page:

http://www.sapbrain.com/FAQ/FAQ.html

Hope it helps,

Ville

Former Member
0 Kudos

Hi

CALL SCREEN create a link between the caller screen and the calling screen, so if you want to back to caller screen you don't need to indicate it, but you can use the command LEAVE TO SCREEN 0 and the system'll automatically back to caller screen.

The system can do it because it creates an internal mode by command CALL SCREEN.

So you can write:

--> CALL SCREEN XXX: go to screen XXX from ZZZ

---> LEAVE TO SCREEN 0: back to screen ZZZ

The problem is the system support only certain numbers of internal modes and then an error occurs.

LEAVE SCREEN don't create an internal mode, so you have to indicate always the caller screen when you want to back.

---> LEAVE TO SCREEN XXX: go to screen XXX from ZZZ

---> LEAVE TO SCREEN ZZZ: back to screen ZZZ

So if you have to create a program where you have to use many screen it's better to use LEAVE SCREEN to avoid the error.

Max

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Check these links and kindly reward points by clicking the star on the left of reply,if it helps.

leave to screen:

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/leave_sc.htm

call screen :

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/call_scr.htm

Former Member
0 Kudos

change is in regard to memory areas Call Transaction opens new one

LEAVE TO in same

Call Transaction allows you to return from where you called

LEAVE TO not does notreturn

Former Member
0 Kudos

The difference is that in case of CALL SCREEN XXXX the program returns to the next statement after the CALL SCREEN as soon as the SCREEN XXX has been finished.

Regards,

John.

Former Member
0 Kudos

LEAVE SCREEN : leaves the current screen

CALL SCREEN : goes to the next screen without quiting the current one.