Skip to Content
0

BAPI_SHIPMENT_CHANGE called from EXIT_SAPLV56U_005

Oct 26, 2017 at 07:12 AM

44

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers