Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Main program name from Update task

Former Member
812

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.

4 REPLIES 4
Read only

Former Member
0 Likes
672

IMPORT / EXPORT memory would be ok, if you can FREE everytime after you IMPORT.

Read only

0 Likes
672

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,

Read only

Former Member
0 Likes
672

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

Read only

matt
Active Contributor
0 Likes
672

Shared memory is another possibility, if you take into account that it's per application server.