My program can be started in 2 ways:
the START OF SELECTION event that calls a MAIN function from one of my local classes.
the ZAVGTTA4 transaction that calls the same method.
at PAI, for the BACK event, when calling LEAVE TO SCREEN '0'., my program behaves in 2 ways according to how it was started. I want to get back to the selection screen (1000).
I thought about querying the stack, where i’m sure to find how my program was called. I can see that the stack trace is different, but i don’t know how to acces my stack from the program. I’ve heard about the RTTI that i think might be able to help me.
You may try
SYSTEM_CALLSTACK.But in your case I would prefer an additional parameter and the calling place can fill this entry. I would not call the parameter
called_bybut something likebehaviourormode.