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

Screen

Former Member
0 Likes
934

Difference b/w Call Screen & Set Screen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
851

Hi Bhavesh,

- 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 (screen chain) is called .The called can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0 .Sometime we might want to let an user call a pop up screen from the main application screen to let him enter secondary information.After they have completed their entries, the users should be able to close the pop up 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.

In Other Words:

In the screen attributes there is field for NEXT SCREEN.This means the next screen for the current screen.

This SET SCREEN is used to dynamically set the NEXT SCREEN.

See this code:

SET SCREEN 9000.
LEAVE SCREEN.

This means it will leave current screen and goto SCREEN 9000.

If we directly call CALL SCREEN 9000, it will also got screen 9000, but will internally create a new session inside.

Reward if Helpful.

Regards,

Sunil.

3 REPLIES 3
Read only

Former Member
0 Likes
851

Hi

CALL SCREEN dynnr

[STARTING AT col1 lin1

[ENDING AT col2 lin2]].

Addition:

... STARTING AT col1 lin1 [ENDING AT col2 lin2]

Effect

This statement calls the dynpro with the dynpro number specified in dynnr. For dynnr, a data object of type n and length 4 is expected. The call starts a new dynpro sequence, which is embedded into the current dynpro sequence. The dynpro with dynpro number dynnr is the initial dynpro of the dynpro sequence. In a dynpro sequence started by a transaction code, you can nest up to 50 other dynpro sequences.

The called dynpro sequence is terminated as soon as one of the involved dynpros branches to a next dynpro with number 0. The program continues after CALL SCREEN.

The statement CALL SCREEN accesses the dynpros of the relevant main program of the current program group and these use the global data and dialog modules of the main program. Except when calling a dynpro in an externally called subroutine, the main program usually is the current program. If the specified dynpro does not exist in the main program of the program group, an untreatable exception occurs.

By default, the screens of all dynpros of the called dynpro sequence are displayed in the current window. Use addition STARTING AT to open a modal dialog window.

Addition

... STARTING AT col1 lin1 [ENDING AT col2 lin2]

Effect

Use addition STARTING AT to open a new popup level and to display all screens of the called dynpro sequence in a modal dialog window. The upper left corner of the dialog window is determined by the values col1 and lin1 for column and line. The values refer to the window with popup level 0. The lower right corner is set automatically or you can use col2 and lin2 to specify it after ENDING AT. For col1, lin1, col2 and lin2, data objects of type i are expected. The values of col1, lin1 should be smaller than those of col2, lin2, because otherwise the behavior is undefined. The maximum popup level is 9.

Notes

The called dynpro should not be a selection screen. To call a selection screen, use the statement CALL SELECTION-SCREEN.

When nesting dynpro sequences and creating popup levels, remember that usually during the program execution, you are already within a (nested) dynpro sequence and that the system itself can also create other dynpro sequences or popup levels (for example, field or input help or messages in dialog windows). For this reason, you should never use the maximum values of 50 dynpro sequences or 9 popup levels within a program to capacity.

If during the processing of a modal dialog window a new dynpro sequence is called, it must be started in another popup level. You cannot use the statement CALL SCREEN without addition STARTING AT in this case.

When calling a dynpro in a dialog window, specify the window as a modal dialog window in its properties and set an appropriate GUI status beforehand. We recommend that a dynpro sequence in a modal dialog window consists of one dynpro only.

SET SCREEN dynnr.

Effect

This statement sets thescreen with the screen number specified in dynnr, as the next screen for processing of the current screen. For dynnr, a data object of type n and length 4 is expected. It must contain either the screen number of a screen in the main program of the current program group or the value 0, otherwise a non-catchable exception will be triggered. The specified next screen overwrites the previously-set next screen.

The next screen is automatically called when the system finishes the PAI processing of the current screen. If the screen number of the next screen is 0, the current next screen is ended.

Note

One next screen is always set during the processing of a screen. After you call a screen, the next screen whose characteristics are defined statically, applies; this next screen can be overwritten with the SET SCREEN statement for the duration of the actual next screen processing.

Read only

Former Member
0 Likes
852

Hi Bhavesh,

- 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 (screen chain) is called .The called can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0 .Sometime we might want to let an user call a pop up screen from the main application screen to let him enter secondary information.After they have completed their entries, the users should be able to close the pop up 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.

In Other Words:

In the screen attributes there is field for NEXT SCREEN.This means the next screen for the current screen.

This SET SCREEN is used to dynamically set the NEXT SCREEN.

See this code:

SET SCREEN 9000.
LEAVE SCREEN.

This means it will leave current screen and goto SCREEN 9000.

If we directly call CALL SCREEN 9000, it will also got screen 9000, but will internally create a new session inside.

Reward if Helpful.

Regards,

Sunil.

Read only

Former Member
0 Likes
851

Hi,

A important information if you need to decide to use SET SCREEN or CALL SCREEN.

If the user is using a program, report or module pool, and this program runs CALL SCREEN statement more than 50 times, it goes to a short dump.

In this cases um can use, SET SCREEN screen, and then, LEAVE SCREEN.

Regards,

Fernando