Skip to Content
0

purpose of call screen 0

Oct 26, 2016 at 11:35 AM

166

avatar image

Hello Experts,

I know the difference between call screen and set screen , In call screen the current processing of the screen is terminated and a new screen is called and once we press back from the new screen the original screen logic is processed and in set the screen once the current screen is completely processed the next screen would be set under set screen.

I want to know the purpose of call screen 0 and what does this 0 mean and what is the purpose of set screen 0 and what does this zero mean.

Thanks,

RG

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Raghu Govindarajan Oct 26, 2016 at 12:14 PM
0

With Call Screen 0, you need to have a screen numbered 0 in your program. When you call it, it will reset the screen call stack - from the documentation "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." If you try calling screen 0 with out creating it, you will get a short dump. The problem with this premise though - is that you cannot create a screen numbered 0.

Leave to Screen 0 goes back to the previous screen in the call stack. So, confusingly, you will be using LEAVE TO SCREEN 0 along with CALL SCREEN xyz.

For example, from SCREEN 100...

CALL SCREEN 200. "Call stack is now 100, 200

CALL SCREEN 300. "Call stack is now 100, 200, 300

LEAVE TO SCREEN 0. "Call stack is now 100, 200

LEAVE TO SCREEN 0. "Call stack is now 100

LEAVE TO SCREEN 0. "This will leave the program, because there are no other screens in the stack

Share
10 |10000 characters needed characters left characters exceeded
Sandra Rossi Oct 26, 2016 at 04:41 PM
1

I have never seen "call screen 0" ! Dynpro 0 cannot be created. But "SET SCREEN 0" exists to "leave the current screen sequence" (or using the variant "leave to screen" if one needs to EXIT the current dynpro event (PBO/PAI/...)).

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Call screen 0 is mentioned in the help https://help.sap.com/abapdocu_70/en/ABAPCALL_SCREEN.htm - I can't see any point to it though because like you say you can't create screen 0.

0

No, it's impossible, the number zero is reserved to leave the screen sequence. The documentation says "The called dynpro sequence is terminated as soon as one of the involved dynpros branches to a next dynpro with number 0" (static attribute "next dynpro" of a dynpro, or set dynamically in ABAP). If you click on the hyperlink of "next dynpro", it says "Next screens can be set statically in the Screen Painter or with SET SCREEN or LEAVE TO SCREEN in the ABAP program". So, it does not mention CALL SCREEN. I can't find a mention in the documentation that a dynpro cannot be zero, but if you try creating it, you'll get the error message "Screen number 0 is not permitted (Message number 37018), the screen number must always be greater than 0".

1

Ah ha, clever wording, or unclever reader - justifies my hate of documentation :)

1
Kali Charan Oct 26, 2016 at 11:49 AM
0

I hope Call screen 2000 ->Screen number.

It might be Leave to Screen 0,

Now i am at 2000
you are using Call screen 4000.
Now i am at 4000.
If you use Leave to screen 0. Means From(2000) Where the Screen called that place moving.

Share
10 |10000 characters needed characters left characters exceeded