Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BADI: LE_SHP_DELIVERY_PROC

Hi All,

I have a requirement to map the information from SO to Inbound Delivery based on the PO# available in inbound delivery. Following fields will have to be updated in the Inbound delivery to be created, before saving. (SAP standard program SAPMV50A transaction VL31n - Create inbound delivery)

Following check should be first performed:

IF LIKP-VBTYP = “7” and LIKP – LFART = “ZL”, then (if the delivery is a delivery shipping notification)

For LIPS-VGBEL = EKKN-EBELN (to retrieve the Purchase order related to the delivery)

LIPS – VGPOS = EKKN-EBELP

For the Purchase order find the related Sales order (header and items)

EKKN-VBELN = VBAK- VBELN = VBAP -VBELN

EKKN-VBELP = VBAK- POSNR = VBAP - POSNR

Copy following data from Sales order header to Delivery header

VBAK – VKORG to LIKP – VKORG – Sales organization

VBAK - AUTLF to LIKP – AUTLF - Complete delivery flag

VBAK – VSBED to LIKP- VSBED - Shipping condition

Copy Ship – to – party and Sold-to-party from Sales order partners to Delivery header

For VBAK – VBELN = VBPA – VBELN and VBPA – PARVW = “WE”

=> Copy VBPA – PARTNER to LIKP – KUNNR

For VBAK – VBELN = VBPA – VBELN and VBPA – PARVW = “AG”

=> Copy VBPA – PARTNER to LIKP – KUNAG\

Copy Incoterms data from VBKD to Delivery header

For VBAK – VBELN = VBKD – VBELN

 Copy VBKD – INCO1 to LIKP – INCO1

 Copy VBKD – INCO2 to LIKP – INCO2

Please guide me in which method of this BADI LE_SHP_DELIVERY_PROC to be used. Also if possible, write simple code how to do it.

Thanks in advance.

Arundhathi

Former Member
Former Member replied

Hi Arundhathi,

Just go for this method : SAVE_DOCUMENT_PREPARE

In this method all strucutes available in chnaging parameters , u can validate and also change.Just play around it .

Regards,

Madhu

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question