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

User Exit

Former Member
0 Likes
637

Hi,

In the prg. SAPMF02K I am writing my code inside user exit EXIT_SAPMF02K_001 under Include ZXF05U01...

My requirement is that I have to change the name1 feild for an existing vendor. So my user exit code should trigger only when XK02 tcode is used and only for existing vendors... How do I capture the Tcode which is given on the command line?? and how do I check if the vendor is existing or not??

Please help.

Thank You,

-SB.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
577

Just use if SY-TCODE = 'XK02'.

4 REPLIES 4
Read only

suresh_datti
Active Contributor
0 Likes
577

Tcode is available in the system field SY-TCODE

Suresh

Read only

Former Member
0 Likes
578

Just use if SY-TCODE = 'XK02'.

Read only

0 Likes
577

And how do I check for existing vendors??

Read only

0 Likes
577

Pl try this...

IF SY-TCODE = 'XK02'.

select single * from lfa1 where lifnr = i_lfa1-lifnr.

if sy-subrc eq 0.

i_lfa1-name1 = new_name.

endif.

ENDIF.

Good Luck,

Suresh Datti