cancel
Showing results for 
Search instead for 
Did you mean: 

Limit entries to one contact person for a particular function type

Former Member
0 Kudos

Good afternoon, I've been asked if we can limit the number of contact person in the Customer master/Contact Persons tab to one, for one of the many contact types we have, so I wanted to pose the question to this forum. For example, we have a code for "Primary Contact' in table TPFK. Is there a way to force only one "Primary contact"? Either thru config or a user exit? I have searched but I can't find an answer to this in the archives. Any info is much appreciated!!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Create a transaction variant for the XD01/XD02 and grey out all the open rows in contact persons except the first one...I have not tried this..so not sure if this is 100% possible

Second option is to find a screen exit for the transaction XD01/XD02 and write a code to grey out all th rows of the contact person except the first one, this is quite possible, tried and tested method. The code can be written in include "MF02DFEX". Or you need to write the code in module pool (PBO)

Hope this helps

Chandra Kiran

Former Member
0 Kudos

This is not exactly what I'm trying to do, because I might have 2 or 3 "Secondary Contacts". I only want to limit a particular "type" of contact, only if I have a certain value in the KNVK-PAFKT field. Does that make sense? Probably the same answer though, right, put some code in the user exit?

Former Member
0 Kudos

Yes you can do that too, with the same procdure that I mentioned ....find a user exit/BADI in the customer master program and restrict the type of contact to only one value and if you enter more than one, system can issue an error message. you can use the same include that I have mentioned in my previous post or probably find a BADI......your ABAPER can help you

Hope this helps

Chandra Kiran

Former Member
0 Kudos

This worked, thank you!

Former Member
0 Kudos

But you have not awarded points to me....please award points, this will encourage people to come forward with suggestions more willingly..

Thanks

Chandra Kiran