Application Development 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: 

Change a sales order while delivery

Former Member
0 Kudos

Hi Gurus,

I need to change the status of a sales order line item from being complete to incomplete in case it fails some validation during delivery creation.

I was earlier planning to code this in the copy-control routine ( order to delivery) and use the standard FM BAPI_SALESORDER_CHANGE in the copy control code to attain this, but however, the sales order cannot be edited when being delivered.

Is there any other means of attaining this. Backend update of tables can lead to a couple of challenges and undesired behavior that I want to avoid.

Regards,

Jasmit

5 REPLIES 5

madhu_vadlamani
Active Contributor
0 Kudos

Hi Jasmit,

I need to change the status of a sales order line item from being complete to incomplete in case it fails some validation during delivery creation

After delivery failure what is the business process you are following.

Regards,

Madhu.

0 Kudos

Hi Madhu,

The idea is to stop the delivery from being created in case it does not pass certain validations .

Once the delivery fails, a periodic review and release process will remove the blocks from such transactions.

Do you see there is a way to push the Sales order into incompletion mode back again while the delivery creation is attempted against the same. !!

Regards,

Jasmit

Former Member
0 Kudos

Dear Jasmit ,

As Regards to the Change a sales order while delivery.

There will be 2 Approaches for it

1. Firstly use the User Exit SAPMV45A.

2. Use the Enhancement V45S0001/V50S0001/V50R0004

This will definitely help in your requirement .

Regards,

Saurabh Goel

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Instead of calling the BAPI directly, you could try to call it in a subroutine that is executed when a DB commit is done. So a PERFORM... ON COMMIT would call the BAPI, thus delay the processing until when the delivery is already saved.

0 Kudos

Can you kindly share what would be the trigger point for the subroutine.

Also,if the same should be present into some enhancement point ( kindly guide me on the name for the same) such that in case the delivery is not created, the enhancement point is still reached and the change to the incompletion status is done.

Regards,

Jasmit