cancel
Showing results for 
Search instead for 
Did you mean: 

ATP check after all items has been processed

former_member271718
Participant
0 Kudos

Hi,

We have a requirement that we change the storage location vbap-lgort / xvbap-lgort, after all items of a sales order have been processed with VA01. When we change the storage location of all items in MV45AFZZ, the ATP isn't triggered again.

We use ATP on storage location level (that is the storage location will be stored in the sales order, this triggers ATP on storage loc. level) and not on plant level.

Is there a way to process all items again including an ATP check?

I have checked for instance, but the first user exit is only triggered when processing every item in the standard way.

Exit name: ATP00001 - User Exits in the Availability Check

EXIT_SAPLATPC_001              Processing Requirements Table Before Calling Actual Check

EXIT_SAPLATPC_002              Processing Results of Actual Check

Regards Kees

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member271718
Participant
0 Kudos

Hi after a lot of debugging and brainstorming I may have found the solution to trigger ATP again. So maybe this will help others with the same problem.

If an order is blocked for delivery, before processing the items then this will cause all items to be unconfirmed in our case, if you save it and if you later release the order then, the ATP is checked.

Now in debug mode I was able to set the delivery block VBAK-LIFSK in MV45AFZZ user exit MOVE_FIELD_TO_VBAK. When I press the save button, it will pass the same user exit above again, at that moment I release the delivery block, it will trigger the ATP for all items, . If I also release the VBAK-LIFSK in the user exit SAVE_PREPARE then it works ok.

The challenge now is how can we determine that we are in the "save step" in the user exit MOVE_FIELD_TO_VBAK because only at that moment we need to release the delivery bock. This user exit will be triggered muliple times. Does someone have a clue?

Regards

sez41
Active Contributor
0 Kudos

How about checking SY-UCOMM = 'SICH' ?

former_member182805
Active Participant
0 Kudos

Here, you are changing the storage location in the background, after an order has been saved.

May I ask why you are changing the storage location for all the items?. In case you want to use a particular storage location, you can directly specify that storage location while entering the items in the order.

There is a storage location determination that can be used to automatically propose a storage location in the sales orders.

former_member271718
Participant
0 Kudos

Hi Kari,

Thanks for replying. The problem was I advised them to use a new plant, but they didn t want that for many reasons, I told them the riscs not using a plant and they accepted that.

Now goods can only be sent either from location A or location B, based on a parameter of the material the system determines the intial storage loc. If all items have been processed there might be a mix of storage locations. Via priority rules the end result will be either location A or B, so items needs to be changed (exit save prepare), but at that point no ATP will be triggered anymore, which I think is logical.

We are building the second option mentioned by you also anyhow, but they rather like to have it immediatly when saving the order. They process deliveries multiple times a day. You will never be sure that ATP has been done. This option will also be a transaction code, so they can process it before the deliveries.

PS. It is 4.6C

Regards.