‎2011 Jun 27 9:08 PM
Hi,
I have an issue where a user exit is called in update task. I want to limit certain logic within the user exit depending on which main program calls it.
Since the user exit is called in update task, the variables SY-REPID / SY-CPROG dont have the main calling program name.
Is there a way to get the main program name from the user exit while in update task? Any help will be greatly appreciated.
PS: The main program is a program to mass-process the documents. So, SAP/ABAP memory usage will be a bad idea according to me.
rgds,
Raghav.
‎2011 Jun 27 10:17 PM
IMPORT / EXPORT memory would be ok, if you can FREE everytime after you IMPORT.
‎2011 Jun 27 11:25 PM
In update task, a new memory session is triggered, hence wont be able to see the EXPORTed parameters. Will you please elaborate more on your suggestion?
Many thanks!
Raghav,
‎2011 Jun 28 12:30 AM
Hello Ragav,
If you are in ECC 6.0 you can see for any enhancements/ enhancements options are there in the main program and then create a custom table and store your main program name in in that table with a unique key value for that transaction and then in the user exit using that key value you can get the main program name back .
I agree there will be some customization work and more testing involves in this scenario but you have to go for this as the user exit is calling in the update task (No other way).
Hope this helps.
Thanks,
Greetson
‎2011 Jun 28 5:40 AM
Shared memory is another possibility, if you take into account that it's per application server.