Application Development 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: 

user exit in BDC

Former Member
0 Kudos

Hi all,

I have written one module pool program, transaction code is YMM01

There one pushbutton is there which will call transaction MM01.

In MM01 one user exit is placed.

My Requirement is when I am calling MM01 thru YMM01 , the program for user exit should not afffect .

My idea if i get the main Tcode or program I can do that, but while debugging sy-tcode is MM01.

how to get it done.

Regards

Nancy Coner

2 REPLIES 2

aabhas_wilmar
Contributor
0 Kudos

Hello Nancy,

In your user exit, check the value of system variables:

SY-CPROG "Calling Program SY-CALLD SY-DYNNR SY-DYNGR

etc,

and see if you can distinguish whether YMM01 called it or not.

Otherwise,

When you are calling MM01 from YMM01, set a variable gv_tcode to 'YMM01'. After doing so, export this variable to memory using EXPORT statement.

In your user-exit, IMPORT this variable from memory.

If the user exit was called from MM01, it won't get anything from memory; therefore, you will know it's MM01.

If the user exit was called from YMM01, you will be able to import this (and, it's value will be YMM01) ; therefore, you will know it's YMM01.

regards,

Aabhas K Vishnoi

Former Member
0 Kudos

Thnks.