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

diffrence between leave screen and call screen

Former Member
0 Likes
1,127

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

1 ACCEPTED SOLUTION
Read only

Vinod_Chandran
Active Contributor
0 Likes
767

Hi,

CALL SCREEN is for calling a screen and LEAVE SCREEN is for return from the called screen.

LEAVE SCREEN - Leaves the current screen and processes the next screen. The next screen can be set in the called screen in screen painter or using SET SCREEN.

LEAVE TO SCREEN scr - Here the screen number is given.

Thanks

Vinod

Message was edited by: Vinod C

6 REPLIES 6
Read only

Vinod_Chandran
Active Contributor
0 Likes
768

Hi,

CALL SCREEN is for calling a screen and LEAVE SCREEN is for return from the called screen.

LEAVE SCREEN - Leaves the current screen and processes the next screen. The next screen can be set in the called screen in screen painter or using SET SCREEN.

LEAVE TO SCREEN scr - Here the screen number is given.

Thanks

Vinod

Message was edited by: Vinod C

Read only

Former Member
0 Likes
767

for going back avoid using call screen, always use leave screen.

else you can face error LIST_TOO_MANY_LPROS

regards

for more infor in se38 type these keywords and place cursor above them and press F1.

Message was edited by: Surpreet Singh Bal

Read only

Former Member
0 Likes
767

Call Screen statement takes you to the screen specified. After called screen is processed the control returns to statement in the original screen from where the new screen was called.

In case of leave to screen the first screen is terminated and the new screen is called. So the control will not return to the point from where 'leave to screen' was executed.

Read only

Former Member
0 Likes
767

CALL SCREEN is to go to screen,

LEAVE SCREEN is to leave screen.

You can use LEAVE SCREEN as CALL SCREEN, if you use it with SET SCREEN:

CALL SCREEN 100 is the same of SET SCREEN 100. LEAVE SCREEN.

You can write the stataments SET SCREEN <DYNPRO>. LEAVE SCREEN in only one statament like this: LEAVE TO SCREEN <DYNPRO>.

So:

- CALL SCREEN <DYNPRO>.

- SET SCREEN <DYNPRO>. LEAVE SCREEN.

- LEAVE TO SCREEN <DYNPRO>.

these stataments do the same thing: to go screen <DYNPRO>.

But if you use CALL SCREEN, everytime a screen is called it is placed in a new internal mode, so you can use LEAVE TO SCREEN 0 to back to calling screen automatically:

- CALL SCREEN 100: it goes to screen 100;

- LEAVE TO SCREEN 0: it back to calling screen from screen 100.

If you use LEAVE SCREEN you can't use LEAVE TO SCREEN 0, but you have to indicate the number of calling screen.

The problem with CALL SCREEN is that the system can only run some internal modes at the same time, after a dump occurs.

So if you have to develop a module pool with many screens it's better to use LEAVE SCREEN.

Message was edited by: max bianchi

Read only

Former Member
0 Likes
767

hi, add something in my opinion.

You can image the screen flow as a bus.

the bus has some fixed stops which has been planed preliminarily, it will stop at them.

CALL SCREEN means we get on the bus, it start to run.

then if we do nothing, the bus will run as the preliminary plan.

when we are at a stop

SET SCREEN offer us a chance to change the next stop.

LEAVE SCREEN let us leave this stop, move to the next one(preliminarily planed)

LEAVE SCREEN let us leave this stop, move to the next one(dynmaically planed)

Hope it will be helpful

thanks

Read only

Former Member
0 Likes
767

Leave screen is to leave current screen and terminate internal session for current screen.

Call screen is to start another internal session and loading called screen.