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

module pool

Former Member
0 Likes
521

Hi all,

wht is the difference between leave screen and leave to screen.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
496

hi,

The screen can branch out to new screen depending upon user selection. Following command in module pool program can do this:

• SET SCREEM

• CALL SCREEN

• LEAVE TO SCREEN <NUMBER>

All these commands override the specifications given in the attributes. This overriding is temporary. The values stored in the attribute are not changed.

Set Screen

Syntax

Set screen <number>.

In module pool program

Case okcode.

When ‘DISP’.

Set screen 200.

When ‘LIST’.

Set screen 300.

Endcase.

In this case, the entire processing of current screen takes place and then the system branches out to next screen. If you want to branch out to the next screen without processing the current screen, LEAVE SCREEN should be used along with the SET SCREEN.

For Example:

Case okcode..

When ‘DISP’.

Set screen 200.

Leave Screen.

When ‘LIST’.

Set screen 300.

Leave Screen.

Endcase.

When SET SCREEN is used, control cannot be transferred to the main screen or previous screen, unless you write code for the same.

Call Screen

Usually used for pop up screens. Many times, there is a need for user to enter additional information or secondary information on another screen or pop up screen. Once the user enters the data, he should be able to go back to main screen or to the screen where he started. This is not possible by using SET SCREEN. CALL SCREEN achieves this functionality.

Syntax

Call Screen 200.

Will simply call a screen number 200 from a main screen. Once the screen is displayed the user can enter all the data and return to the main screen by clicking BACK button.

To call screen as pop up screen the syntax is

Call screen starting at <col.no.> <line no>

Ending at <col no> <line no>.

In this case window will be popped as window and user can close it by using BACK button.

Leave to screen

To SET a new screen without processing current screen, you need to use the following two statements together:

SET SCREEN 200.

LEAVE SCREEN.

Or a Single statement

LEAVE TO SCREEN 200.

3 REPLIES 3
Read only

Former Member
0 Likes
497

hi,

The screen can branch out to new screen depending upon user selection. Following command in module pool program can do this:

• SET SCREEM

• CALL SCREEN

• LEAVE TO SCREEN <NUMBER>

All these commands override the specifications given in the attributes. This overriding is temporary. The values stored in the attribute are not changed.

Set Screen

Syntax

Set screen <number>.

In module pool program

Case okcode.

When ‘DISP’.

Set screen 200.

When ‘LIST’.

Set screen 300.

Endcase.

In this case, the entire processing of current screen takes place and then the system branches out to next screen. If you want to branch out to the next screen without processing the current screen, LEAVE SCREEN should be used along with the SET SCREEN.

For Example:

Case okcode..

When ‘DISP’.

Set screen 200.

Leave Screen.

When ‘LIST’.

Set screen 300.

Leave Screen.

Endcase.

When SET SCREEN is used, control cannot be transferred to the main screen or previous screen, unless you write code for the same.

Call Screen

Usually used for pop up screens. Many times, there is a need for user to enter additional information or secondary information on another screen or pop up screen. Once the user enters the data, he should be able to go back to main screen or to the screen where he started. This is not possible by using SET SCREEN. CALL SCREEN achieves this functionality.

Syntax

Call Screen 200.

Will simply call a screen number 200 from a main screen. Once the screen is displayed the user can enter all the data and return to the main screen by clicking BACK button.

To call screen as pop up screen the syntax is

Call screen starting at <col.no.> <line no>

Ending at <col no> <line no>.

In this case window will be popped as window and user can close it by using BACK button.

Leave to screen

To SET a new screen without processing current screen, you need to use the following two statements together:

SET SCREEN 200.

LEAVE SCREEN.

Or a Single statement

LEAVE TO SCREEN 200.

Read only

Former Member
0 Likes
496

Hi Alex,

<b>LEAVE SCREEN.</b>- if you want to quit from the current screen, you use this option. so by default the next screen from attributes will be picked but if you have defined the next screen using SET SCREEN that it will overwrite.

ex: SET SCREEN 100.

LEAVE SCREEN.

<b>

LEAVE TO SCREEN.</b>- Leave to screen is combination of above two statements.

Check this thread...

REgards,

Santosh

Read only

Former Member
0 Likes
496

LEAVE SCREEN :

this will leaves the current screen & goto the screen which you mentioned thru SET SCREEN <SCREEN NO>.

LEAVE TO SCREEN <SCREEN NO>:

leaves the current screen & goes to the screen specified here

or we can say

LEAVE TO SCREEN is equal to the COMBINATION OF SET SCRREEN & LEAVE SCREEN.

regards

srikanth