cancel
Showing results for 
Search instead for 
Did you mean: 

Sales order requirement

Former Member
0 Kudos

I have requirement as below.

Into Sold-to master data we put a "Cessation date": custom filed KNA1-ZZDTCESS.

We need a user exit on the Sales Order creation that performs the following chek:

if the Sold-to has "Cessation date" valorized, you can create a sales order only if "customer PO date" < "Cessation date".

Else Else return an error message type 'E': "Not possibile creare order".

I want to know which exit should I use for this and what logic I need to write? During Sales order creation this exit will be triggered.

Accepted Solutions (1)

Accepted Solutions (1)

dirk_freyaldenhoven
Active Participant
0 Kudos

Hello Bedayana,

you can use USEREXIT_SAVE_DOCUMENT_PREPARE in SAPMV45A.

Best Regards, Dirk

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Please user exit MV45AFZZ

User Exits In Sales Document Processing

User exits in the program MV45AFZZ

The user exits which you can use for modifications in sales document processing are listed below.

Put your changes in below place

USEREXIT_SAVE_DOCUMENT_PREPARE

Use this user exit to make certain changes or checks immediately before saving a document. It is the last possibility for changing or checking a document before posting.

place your changes just befoe exit

if ZZDTCESS < PO date

Exit

Endif

Hope this will help

Regards,

Siva