‎2022 Dec 09 12:02 PM
Is it possible to determine in a program whether this program was called from another program via SUBMIT?
The function module "SYSTEM_CALLSTACK" or the class "CL_ABAP_GET_CALL_STACK" are unfortunately not usable for this.
I am grateful for any hint.
Best wishes
Marco
‎2022 Dec 09 12:30 PM
you could create a SingleTon class in the calling program. But this will not work if you are searching for solution without update calling programs
‎2022 Dec 09 12:48 PM
where the SingleTon class is the heavier version of the singleton? 😉
(ok, it's friday...)
‎2022 Dec 09 12:52 PM
I could do a DP_Single_Ton but matthew.billingham certainly lurk somewhere against Hungarian notation ...
‎2022 Dec 09 2:02 PM
No (as far as I know).
You need to change the calling program to pass the information (either via EXPORT ... TO MEMORY ID ... or via new parameter).
‎2022 Dec 09 2:07 PM
Sandra ? you prefer the EXPORT ... IMPORT instead of the SinGlEtOn design pattern ??
‎2022 Dec 09 5:10 PM
frdric.girod I don't see how singleton pattern can overcome the Internal Session barrier. The singleton will exist only in Internal Session "1", it won't exist in Internal Session "2".
‎2022 Dec 09 3:08 PM
Sandra, that's a good idea with EXPORT-IMPORT. Why didn't I think of that? 😉
Frederic, if I'm honest, I don't understand how you mean that with the singleton class.