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

Changing multiple lines in VBAP during Save

Former Member
0 Likes
911

Hi Gurus!

We are updating multiple vbap lines during save_prepare user exit. Does this change forces all the line changes to run through batch processing again?.

We have a requirement to make decisions on order after we have all the lines available to us together.

Really appreciate any guidance.

Thanks

Shahid

8 REPLIES 8
Read only

Former Member
0 Likes
872

No. The processing is not re-done. There is some processing that takes place after this userexit, but most happens before.

You can look at program SAPMV45A and search for the user exit form name. You can see what processing occurs after the exit.

Be sure to put "U" in the XVBAP internal table field UPDKZ for the rows that are updated.

Read only

Former Member
0 Likes
872

Batch determination occurs much, much earlier that this user exit. It will not be done again. What exactly are you trying to do in this user exit that you want the batch determination to happen again? You had another thread open for this issue, I think. Please close that one and continue with this one.

Read only

0 Likes
872

We have items available at multiple plants. If the product is not available than the default plant is applied. At the save if the plant at any single line item is different from other line item than we mark all the line items to the default plant. Once the plant information is updated we want to rerun the (ATP) product availabilty and pricing again on all the line items.

Thanks for the spontanous reply. I will close the other issue.

Shahid

Read only

0 Likes
872

No, ATP will not run after this user exit.

This user exit is only available to check the values and change if you want , but it wont trigger the processing again.

You should try this at the user exit; MOVE_FIELD_TO_VBAP and/or CHECK_VBAP. Once you determine if the plant has to be updated, update XVBAP table.

Bhavani.

Read only

0 Likes
872

Could you please review the details on the issue, We have already tried this in MOVE_FIELD_TO_VBAP. It is not working since this is not about one material. This is to update all the materials in the order.

Here is a scenario - Order has 3 materials in it if 2 materials are being sourced from plant 5000 and one from plant 7000 than update all the materials such that they all source from plant 1000 (default plant).

By making such an update we would like to make sure that products are also available at plant 1000, so we would like to run ATP again.

Spontanous reply will be helpful.

Thanks

Shahid

Read only

0 Likes
872

In that case, I think you need to try some user exit available for ATP purpose. I think there is one, but I will let you know once I find it.

Read only

0 Likes
872

You are right, this is not about 1 material.

But as soon as you identify that one material is from 7000, you can change this to 1000, as well as all other materials in XVBAP to 1000 and any subsequent material plant to 1000.

Rgds

Bhavani

Read only

0 Likes
872

Really appreciate your expert reply. We are really stuck on this one for right now. Any urgent help is highly appreciated!!!!!.

Thanks

Shahdi