Application Development 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: 

code written after leave to screen nnn

bhakti2
Active Participant
0 Kudos

hi

this is not leave to screen 0, this is leave to screen <screen number>

suppose I have some code written after this leave to screen number statement.

as per my analysis, there  is no way to get control execute the code written below leave to screen number.

I have tried different things

remove the next screen attribute from the called screen

save calling screen number in global variable and write leave to screen number of previous screen

because then it calls the PBO of that screen and go directly to the code after leave to screen no statement

if I use call screen statement then I can get back to code written after call screen

but I need to kind of replace all the call screen statements with leave to screen statements in a rather big module pool

this is to avoid the dump of more than 50 nested screens

thanks

bhakti

6 REPLIES 6

VenkatRamesh_V
Active Contributor
0 Kudos

This message was moderated.

Sandra_Rossi
Active Contributor
0 Kudos

How come have you arrived to the situation of "code written after LEAVE [TO] SCREEN ? You explain your final analysis, BUT to achieve what?

You said "in a big module pool"; is it a standard module pool?

Juwin
Active Contributor
0 Kudos

Your analysis is correct:


Bhakti joshi wrote:

as per my analysis, there  is no way to get control execute the code written below leave to screen number.

There is no way to execute the code written after leave to screen ...

BTW, you still haven't completely explained the problem you are facing.

Thanks,

Juwin

bhakti2
Active Participant
0 Kudos

hi Juwin, thanks for your reply.

my problem: we have a big module pool program, totally custom, Zprogram with many screens

we are facing too many dumps when users are using this because there is lot of screen navigation

we need to over come list_too_many_lpros short dump

we know that using leave to screen number instead of call screen will solve this dump

but before replacing all call screen statements with leave to screen number vr checking impact

one impact is that  , there is lot of code written after calls screen statement in present coding

so I want to confirm that there is no way to make the control execute the code if I replace the call screen to leave screen.

so we need to redesign and remove that code,

or find some other way

thanks

bhakti

Juwin
Active Contributor
0 Kudos

You cannot just replace all call screens with leave to screens, and still expect everything to work as-is. I think you will have to re-engineer your program. It seems like a very badly written code, causing all this trouble.

Thanks,

Juwin

Patrick_vN
Active Contributor
0 Kudos

Though it is far from easy to advise with so little information, I'd say that it isn't obligatory to replace all of the call screen statements.

If you pick a strategic few to replace, your problem could be solved. You need of course to analyze the sequence of the screens. If you jump to a screen, to return later on, a call screen x should be combined with a leave to screen 0. But if you jump to a screen and never go back (to that specific point) then a leave to screen x would make your screen sequence start over.

I'd make sure first that your code does not use call screen to jump back to a previous screen, and if you have several chained call-screens, then you have to check and decide whether that chain can be cut into smaller pieces..