cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict Sales Order for Delivery Creation

Former Member
0 Kudos

Dear Experts,

We are supplying material to our customer (He is our subsidiary company). All the material codes within the two companies (i.e., our customer and us) are same. My customer is creating Purchase Order on us and through BDC program auto sales order is getting generated at our company. Pricing conditions are also copied from the PO to SO. We are not maintaining any pricing conditions for this customer.

My customer wants to supply the materials only against the sales orders created during the month only. Example: If auto sales orders are created during August'09 till 31st Aug, delivery should be created before 31st August only. From 1st Sept'09 onwards delivery should not create against the open sales orders created till 31st aug'09. When we try to do the delivery, system should not allow for creation of delivery from 1st Sept'09 onwards.

Can u please guide me whether we have any standard process for this to control the delivery creation? or we need to go for any development?

Your early reply in this regard is highly appreciated.

Thanks

Murthy SD

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

This can be achieved using the exit,

IncludeMV50AFZ1,----USEREXIT_SAVE_DOCUMENT

Here put a logic for the reference sales document if the period (month) is not equal to the current system date at the time of delivery creation then it should show the error message.

Regards,

Gopal.

Answers (3)

Answers (3)

Former Member
0 Kudos

HI murthy,

please revert whether soln hsa worked..

rwd pnts if helpful

regards

Former Member
0 Kudos

hi you can use scheduling aggrement concept for the same.

Alternatively , you can write logic in the exits .

program:

MV50AFZ1

code:

loop at xlips.

select single vbegdat venddat from VEDA into (VEDA-VBEGDAT,VEDA-VENDDAT)

where vbeln = xlips-vgbel

and vposn = xlips-vgpos.

if sy-subrc = 0.

if VEDA-VBEGDAT is initial and VEDA-VENDDAT is initial.

else.

if sy-datum ge VEDA-VBEGDAT and sy-datum le VEDA-VENDDAT.

else.

MESSAGE 'sales order referred is outside validity range' type 'E'.

endif.

endif.

endif.

endloop.

the code is to be writeen in exit of delivery i.e whenever delivery is being created wr to order it checks the dates in order

Rwd points if helpful

regards

chandresh

Former Member
0 Kudos

Hi,

This can be achieved using the exit,

IncludeMV50AFZ1,----USEREXIT_SAVE_DOCUMENT

Here put a logic for the reference sales document if the period (month) is not equal to the current system date at the time of delivery creation then it should show the error message.

Regards,

Gopal.