cancel
Showing results for 
Search instead for 
Did you mean: 

PO Number field mandatory for specific customer group in Sales

Former Member
0 Kudos

Hello All,

The problem is related to Sales Order where I want to make the field PO Number mandatory with respect to a specific customer group. For example for customers having customer groups 1, 2, 4 etc when we save the Sales Order it will allow me to save the Sales Order without any text or number in the PO number field. But in case of customers having customer group 3 it will not allow the Sales Order to be saved without a PO number.

How to configure this ? Is there any user exit or source code need to be written to achieve this ?

Please help with some valuable suggestions at the earliest.

Thanks & Regards

Priyanka Mitra

Accepted Solutions (1)

Accepted Solutions (1)

sarthak_mohantysd
Active Contributor
0 Kudos

Hello Priyanka,

How to configure this ? Is there any user exit or source code need to be written to achieve this ?

I think your requirement can be easily met with a User Exit in the Sales Order processing.

  1. USEREXIT_MOVE_FIELD_TO_VBAK

Here you need to put a check on the basis of your requirement such that when the Sales Order transaction goes on for the Customer Group # 3, the PO field is checked and when entries are not found then an Error is thrown back !!

Hope this information helps you in resolving your issue and please don't forget to close this thread if your query is answered.

Regards,

SARTHAK

Answers (4)

Answers (4)

Former Member
0 Kudos

Closed.

Former Member
0 Kudos

Problem is solved.

Thanks to All.

Regards

Priyanka Mitra

Former Member
0 Kudos

There is no standard customizing available for this. Please ask your ABAPer to code the logic in exit MV45AFZZ.

former_member1115366
Active Participant
0 Kudos

This is pretty easily done with a user exit. I recommend the subroutine USEREXIT_SAVE_DOCUMENT_PREPARE in program SAPMV45A. The logic would go something like this:

IF creating or changing a document AND
Order type is appropriate to this situation AND
Sold-to partneru2019s Customer Group = 3 AND
Purchase order field is blank THEN

Issue an annoying pop up message telling the order entry person that a PO number is necessary.
On acknowledgement, return to the document with the cursor in the PO number field.

ENDIF

Regards,

Ken