
Because ABAP is a language with (too) many possibilities, called procedures can strangely affect the flow of the calling program. In some cases, even a trace does not clarify the behavior.
Sometimes this can be hard to figure out.
The cruel thing with the following commands is that they are performed anywhere, but affect later! So looking at the last performed command does not help.
If the code you are calling via a dynpro performs set screen 0, your dynpro will be left after your PAI has completely run.
If the called code performs set screen <nnnn> (<>0), this dynpro will be called after your PAI has completely run.
If the called code performs leave screen, the last set screen will be performed, and the calling program will not be continued.
If in this case the last set screen is 0, see set screen 0.
If in this case the last set screen <> 0, this screen will be performed.
If the called code performs leave to screen <nnnn> the same is true for dynpro nnnn.
If you are calling code in your PBO that performs suppress dialog, the PAI of your dynpro will be processed as if the user would have hit enter (but he did not) although you even don´t see your dynpro (you still see the last dynpro).
As ABAPers we know that the message command can influence many many things, e. g. if the called program sends a message of type E your PAI-Module gets interrupted and no PBO is performed, but the program does not stop. But this command can do so much more strange things, this is why I call it the monster command :shock: .
Not such cruel, but also in this context interesting statements are:
We called BAPI_PROCORD_CHECK_MAT_AVAIL and after that call, the PAI was still processed and after PAI the program easily has ended.
See here: BAPI_PROCORD_CHECK_MAT_AVAIL affecting screen flow.
Well, next time I see such a strange behavior, I will set break points at the following commands:
Did I miss something? If you have more commands that could be interesting here, please tell me.
If you have any questions or other notes, please tell me.
Greets
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |