‎2015 Aug 10 8:49 AM
hi,
when we are inside a "IN UPDATE TASK" (or "IN NEW TASK") processing, is there any way to find some information about the caller / the calling transaction or even some information about the execution stack (like via FM SYSTEM_CALLSTACK) ?
Thanks a lot,
Roland
‎2015 Aug 10 10:40 AM
Hello Roland,
Is it a local update (SET UPDATE TASK LOCAL) or is it executed in an update workprocess?
If the update task is executed in a separate WP, i don't think SYSTEM_CALLSTACK will help.
BR,
Suhas
‎2015 Aug 10 9:44 AM
Hello Roland,
You can check in debug by switching on update debugging.
Thanks,
SK
‎2015 Aug 10 9:51 AM
‎2015 Aug 10 10:40 AM
Hello Roland,
Is it a local update (SET UPDATE TASK LOCAL) or is it executed in an update workprocess?
If the update task is executed in a separate WP, i don't think SYSTEM_CALLSTACK will help.
BR,
Suhas
‎2015 Aug 10 11:05 AM
It is an update work process.
I did check FM SYSTEM_CALLSTACK. It does not return the full stack (as we are in an update work process). But I wonder whether it is maybe possible to get some information about the process which started the update one.
‎2015 Aug 10 12:04 PM
But I wonder whether it is maybe possible to get some information about the process which started the update one.
I don't think update function modules need to know who the caller, they should only be doing the C(R)UD operations. The data checks should be done beforehand.
If you can explain your business requirement, may be we can suggest some alternative solution.
‎2015 Aug 10 12:21 PM
Technically you can get the information.
1. SYSTEM_CALLSTACK will give you the FM name where the code is being executed.
2. VBMOD table will give you the VBKEY - VBMOD-VBFUNC is your FM name.
3. VBHDR will give you the PROGRAM name in VBHDR-VBREPORT and Tcode details in VBTCODE
R
‎2015 Aug 10 12:22 PM
I need to collect some detailed statistics where some database entries are created from (which transaction, GUI or RFC call, use..). These entries are usually created in update task by a single function module. Instead of adding code to each place where the function module is called, I was hoping there is a way to collect these statistics inside the update task.
‎2015 Aug 10 12:30 PM
What if the update FM is called by multiple sources? How will you determine which is the relevant update key?