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: 

BAPI_SHIPMENT_CHANGE called from EXIT_SAPLV56U_005

Former Member
0 Kudos

I have a customer requirement to manipulate the start date of a shipment VTTK-DPTBG based on the end date VTTK-DPTEN of the previous shipment related to the same delivery.

I managed to find the date of the previous shipment in EXIT_SAPLV56U_004 and I wrote a function module that would allow me to manipulate the date of the shipment in EXIT_SAPLV56U_005 using a memory id to pass the information from one exit to the other.

Using BAPI_SHIPMENT_CHANGE is not easy but fortunately I found Pavels notes here: http://pavelgk.pbworks.com/w/page/14905977/Change-shipment-using-BAPI

So far so good, but now the tricky bit...

It turns out that the exits are called again by BAPI_SHIPMENT_CHANGE and consequently I end up with an infinite loop where the exit calling the BAPI is calling the exit, which is calling the BAPI etc.

What other alternatives do I have to manipulate the header dates of the shipment?

Best regards, Anders

0 REPLIES 0