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: 

Userexit to update the delivery text to shipment while creating it

Former Member
0 Kudos

Hi Experts,

I have a requirement, where I need to copy the text of Delivery to the shipment while creating it. Is there any User Exit or BADI where I can copy these Delivery texts to Shipment.

Thanks,

Sree.

Moderator message: please do more (or show you have done) research before asking, you have been asked before.

Edited by: Thomas Zloch on May 19, 2011 5:44 PM

1 REPLY 1

Venkat_Sesha
Advisor
Advisor
0 Kudos

Hi Sree,

Use this BADI BADI_LE_SHIPMENT and in mthod BEFORE_UPDATE write the following code. It will work damn sure.

TB_VTTP[] = IM_SHIPMENTS_BEFORE_UPDATE-NEW_VTTP[].

tb_VTTK[] = IM_SHIPMENTS_BEFORE_UPDATE-NEW_VTTK[].

Loop At TB_VTTP Into X_VTTP Where TKNUM = X_VTTK-TKNUM.

CALL FUNCTION 'READ_TEXT'

IF SY-SUBRC = 0.

Append Lines Of TB_LINES TO TB_LINES_FINAL.

endif.

At Last.

If TB_LINES_FINAL[] Is Not Initial.

CALL FUNCTION 'CREATE_TEXT'

endat.

If Sy-Subrc Ne 0.

If IM_SHIPMENTS_BEFORE_UPDATE-NEW_VTTK[] Is Initial.

Loop At IM_SHIPMENTS_BEFORE_UPDATE-OLD_VTTP Into X_VTTP.

X_HEADER-TDNAME = X_VTTP-TKNUM.

CALL FUNCTION 'DELETE_TEXT'

EndLoop.

EndIf.

EndIf.

Thanks,

Bhargav.