Skip to content
Advertisement

Multiple functions calling a same function. I need to create a flag

Multiple functions calling a same function. I need to create a flag. Suppose I have 4 functions(f1,f2,f3 and f4) in a PLSQL package. F1 is being called by F2,F3 and F4. All I want a flag in order to track which function call the F1. For example . If f2 called f1 then flag=2,flag=3 when f3 called f1 and so on and this should be accessible in such way that I can this flag inside function F1.

Advertisement

Answer

You don’t need to pass any flag, as PL/SQL can tell you the call stack.

Test:

You can adjust the calls to util_call_stack to exclude the package name if you only want the function names.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement