10-08-2008 10:48 AM
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
10-08-2008 10:55 AM
10-08-2008 10:58 AM
That FM will delete the whole delivery, and not a specfied item/line, as I described.
10-08-2008 11:14 AM
10-08-2008 11:01 AM
10-08-2008 12:28 PM
But I have tried this, but couldn't get it function...
Can you provide an example?
10-08-2008 11:46 AM
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
10-08-2008 12:29 PM
Sorry Satish
I can't see that it would delete any item line for me...
10-08-2008 12:54 PM
Hi,
Looks iys not possible from BAPI.....you might have to go with BDC.....
10-08-2008 1:18 PM