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: 

Which FM for deleting a line in delivery

Former Member
0 Kudos

Hi

I want to delete a line in a delivery (VL02N) by using a FM.

I have found FM: WS_DELIVERY_UPDATE but I can not delete a line.

Anybody who can/will help me?

Best regards

Lars

9 REPLIES 9

Former Member
0 Kudos

hi..

try this Fm

OIK_SD_DELETE_DELIVERY

regards,

Padma

0 Kudos

That FM will delete the whole delivery, and not a specfied item/line, as I described.

0 Kudos

chek out this BAPI...

BAPI_OUTB_DELIVERY_CHANGE

former_member188685
Active Contributor
0 Kudos

Try with the Function WS_DELIVERY_UPDATE

0 Kudos

But I have tried this, but couldn't get it function...

Can you provide an example?

satsrockford
Active Participant
0 Kudos

hi,

WS_DELIVERY_UPDATE is used to pack a

delivery.

About using WS_DELIVERY_UPDATE/WS_DELIVERY_UPDATE_2 I have achieved to delete all HUS assigned to a delivery, but I only want to delete one of them. I am not able to make that using those FM,

Of course BDC is the last last option for us.

I write down sample code I have tested for deleting all HUs assigned to a delivery. I think maybe could be a problem, I don't pack the items into the HU, I only assign the HU to the delivery. If you pack the materials into the HU, this might not work properly. Try it and then tell me if works in your case.

vbkok_wa-vbeln = '0187000063'.

vbkok_wa-vbeln_vl = '0187000063'.

vbkok_wa-vbtyp_vl = 'J'.

i_verko-object = '01'.

i_verko-objkey = '0187000063'.

APPEND i_verko.

CLEAR i_hus.

REFRESH i_hus.

CALL FUNCTION 'WS_DELIVERY_UPDATE'

EXPORTING

vbkok_wa = vbkok_wa

synchron = 'X'

NO_MESSAGES_UPDATE = ' '

commit = 'X'

delivery = '0187000063'

UPDATE_PICKING = ' '

nicht_sperren = ' '

IF_CONFIRM_CENTRAL = 'X'

IF_WMPP = ' '

IF_GET_DELIVERY_BUFFERED = ' '

IF_NO_GENERIC_SYSTEM_SERVICE = ' '

IF_DATABASE_UPDATE = '1'

IF_NO_INIT = ' '

IF_NO_READ = ' '

IF_ERROR_MESSAGES_SEND_0 = 'X'

IF_NO_BUFFER_REFRESH = ' '

IF_NO_MES_UPD_PACK = ' '

IMPORTING

EF_ERROR_ANY_0 =

EF_ERROR_IN_ITEM_DELETION_0 =

EF_ERROR_IN_POD_UPDATE_0 =

EF_ERROR_IN_INTERFACE_0 =

EF_ERROR_IN_GOODS_ISSUE_0 =

EF_ERROR_IN_FINAL_CHECK_0 =

TABLES

VBPOK_TAB =

prot = i_prott

verko_tab = i_verko

VERPO_TAB =

VBSUPCON_TAB =

IT_VERPO_SERNR =

IT_PACKING =

IT_PACKING_SERNR =

IT_REPACK =

IT_HANDLING_UNITS =

et_created_hus = i_hus.

Regards

Satish

0 Kudos

Sorry Satish

I can't see that it would delete any item line for me...

0 Kudos

Hi,

Looks iys not possible from BAPI.....you might have to go with BDC.....

0 Kudos

Thanks guys... I will make BI then 😐