cancel
Showing results for 
Search instead for 
Did you mean: 

Re-triggering ATP check for Sales orders using program (SAPMV45A userexits)

Former Member
0 Kudos

Hi,

I want to trigger ATP check in SD user-exits. The automatic ATP check works fine. Suppose on the VA01 screen, I have two line items. I entered two line items - for line item 10 with 200 FT2 qty and line item 20 with 100 FT2 qty and hit enter, ATP check triggers automatically and works fine for both line items. But then when I change only the line item 20 qty to 50 FT2 then it triggers ATP for line 20 only and it doesn't trigger ATP for line item 10. I want to trigger re-ATP for both the line items as if I make line item 20 with qty 50 FT2 then I change the qty for line item 10 in userexit to 250 FT2. It displays 250 FT2 for line item 10 in screen but triggers ATP only for line item 20.

I want to trigger ATP for all the line items. Please help.

Sidd

Accepted Solutions (1)

Accepted Solutions (1)

Lakshmipathi
Active Contributor

Why you want ATP to trigger for a line item when you are not changing the quantity? In SAP, certain things, you / your client needs to compromise on certain functionalities. For each and every small functionality, if you go for customization to restrict the standard, obviously, it will affect system performance.

Former Member
0 Kudos

Hello, I will change the qty for internally from exit not from VA01 screen. But ATP fires only for the line item(s) which we changed in screen, it doesnt call ATP again if we change the qty in exit. I want to trigger ATP for all line items, it doesnt matter I changed line item 20 qty in screen and line item 10 in exit, it should trigger ATP for both line items.

Regards,

Sidd

Answers (2)

Answers (2)

kartefact
Participant

Although I agree with the above comment that ATP check should not be triggered manually unless absolutely necessary, you can do it by calling the PERFORM fcode_pore IN PROGRAM SAPMV45A.

Former Member
0 Kudos

Hi Karthik,

I tried this but its not working, its triggering the ATP only for the line item which I change in screen, if I change anything for a line item in userexit it doesnt fires ATP again. I basically looking for ATP firing for all line items irrespective of screen change done for a line item or changed XVBAP/XVBEP structure in exits.

Regards,

Sidd

kartefact
Participant
0 Kudos

The item number in SVBEP-POSNR need to be set before calling FCODE_PORE

So, if you want it for all the items, set SVBEP-POSNR and call FCODE_PORE in a loop.

babu_kilari4
Active Contributor
0 Kudos

Mohanty,

If you debug the SAP routines, there is a flag that gets set in one of the internal tables which identifies all the line items that have been ATP Checked. So, in your case unflag both line 10 and 20 and your job is done.

Thanks & Best Regards,

Babu

Former Member
0 Kudos

Thanks Babu. Do you remember the internal table which sets the flag ?

Sidd