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

ATP Check through programme while saving sales order

Former Member
0 Likes
1,750

Hi,

I have a requirement as follows:

In Sales Order, if I remove delivery block at header level, and save it, then ATP check availabily should happen automatically (without clicking on check availability).

Could you please help me, if any one had similiar kind of situation?

Thanks,

Sandeep

Hi,

I have a requirement as follows:

In Sales Order, if I remove delivery block at header level, and save it, then ATP check availabily should happen automatically (without clicking on check availability).

Could you please help me, if any one had similiar kind of situation?

Thanks,

Sandeep

2 REPLIES 2
Read only

Former Member
0 Likes
1,062

Hi Sandeep,

You can try the user exits before saving the Sales Order.

Include : MV45AFZZ

Exits : USEREXIT_SAVE_DOCUMENT_PREPARE

USEREXIT_SAVE_DOCUMENT

Try to make use of the below mentioned function modules in any one of the above EXITS.

BAPI_MATERIAL_AVAILABILITY

LE_ATP_CHECK_SINGLE

Also have a look at the include program MV45AFZA.

Regards

HM

Read only

0 Likes
1,062

You can try the user exits before saving the Sales Order.

Include : MV45AFZZ

Exits : USEREXIT_SAVE_DOCUMENT_PREPARE

USEREXIT_SAVE_DOCUMENT

Bad suggestion.....First of all, USEREXIT_SAVE_DOCUMENT is for updating other Z-tables, not for performing application checks or application data updates. USEREXIT_SAVE_DOCUMENT_PREPARE is for performing checks and limited changes prior to saving the order. Don't use it to update critical data after all of the application checks have been made.

@Sandeep: When you remove a delivery block, SAP already automatically performs an availability check. There are user exits that you can use to influence the parameters of the check. You will see this by tracing the transaction with SE30 or by debugging the delivery block removal.