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

Code for Vendor Tax Code uniqueness

xt_inergo
Participant
0 Likes
639

Hi,

When we are trying to create a new customer (transaction XD01) we would like to be informed if the Vendor Tax Code (KNA1-stcd2) is being used already.

Can you tell me what code do we have to insert and where.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
577

Hello,

I dont there would be direct way to check this out in SAP R/3.

What you can do is create a Z-DB table , say ZTAXCODE, which has Customer,Customer Group as Key Fields and taxcode as another field.

Now when User tries to save the Customer- then u can

1) Make use of BADI - CUSTOMER_ADD_DATA (SE18/SE19)

2) Make use of User Exit - FM EXIT_SAPMF02D_001 (Customers: User Exit for Checks prior to Saving) (SMOD/CMOD)

Here, you can the entry to your newly created table and chk if the entry user tries to maintain already exists. If yes, you can display an error message to the user.

Hope this helps.

3 REPLIES 3
Read only

Former Member
0 Likes
578

Hello,

I dont there would be direct way to check this out in SAP R/3.

What you can do is create a Z-DB table , say ZTAXCODE, which has Customer,Customer Group as Key Fields and taxcode as another field.

Now when User tries to save the Customer- then u can

1) Make use of BADI - CUSTOMER_ADD_DATA (SE18/SE19)

2) Make use of User Exit - FM EXIT_SAPMF02D_001 (Customers: User Exit for Checks prior to Saving) (SMOD/CMOD)

Here, you can the entry to your newly created table and chk if the entry user tries to maintain already exists. If yes, you can display an error message to the user.

Hope this helps.

Read only

0 Likes
577

thanks for your answrer.

Can you be more specific in what to do with user exit EXIT_SAPMF02D_001

thanks.

Read only

Former Member
0 Likes
577

Use sm30 view V_TFKTAXNUMTYPEC to customize the duplicity check. It is not necessary to develop anything.

Svetlin