2008 Sep 09 7:12 AM
Hi experts:
Do we got a bapi can do picking in vl02n? I want to copy the delivery quantity to picked quantity exactly the same.
thanks in advance.
Eric
2008 Sep 09 7:26 AM
Hi Eric ,
for VL02n there is a bapi
long back i worked on it
chek for BAPI_GET_DOCUMENT or BAPI_DOCUMENT_GET
Regards,
Chinna
2008 Sep 09 7:26 AM
Hi Eric ,
for VL02n there is a bapi
long back i worked on it
chek for BAPI_GET_DOCUMENT or BAPI_DOCUMENT_GET
Regards,
Chinna
2008 Sep 09 7:29 AM
2008 Oct 01 4:58 PM
2008 Oct 01 5:20 PM
Check it
Delivery header
wa_vbkok-vbeln_vl = delivery #
wa_vbkok-vbeln = sales order #
wa_vbkok-lifex = likp-lifex
wa_vbkok-traid = likp-triad
wa_vbkok-traty = likp-traty
DN item
TAB_VBPOK-VBELN_VL = WA_VBKOK-VBELN_VL.
TAB_VBPOK-POSNR_VL = Item #
TAB_VBPOK-VBELN = SY-DATUM.
TAB_VBPOK-POSNN = SY-UZEIT.
TAB_VBPOK-VBTYP_N = 'J'
TAB_VBPOK-MATNR = material
TAB_VBPOK-CHARG = batch
TAB_VBPOK- LFIMG = pick qty
TAB_VBPOK-VRKME = unit of measure
CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
EXPORTING
vbkok_wa = wa_vbkok
synchron = 'X'
delivery = wa_vbkok-vbeln_vl
nicht_sperren_1 = 'X'
if_error_messages_send = 'X'
it_partner_update = is_partner
TABLES
VBPOK_TAB = TAB_VBPOK
prot = i_prott.
2008 Oct 08 4:51 AM
Hi Maybe you can try FM: WS_DELIVERY_UPDATE . It will call FM WS_DELIVERY_UPDATE_2 inside !
REPORT ztest_ls_001.
DATA: l_vbeln LIKE likp-vbeln,
wa_vbkok LIKE vbkok,
i_vbpok LIKE vbpok OCCURS 0 WITH HEADER LINE,
i_prott LIKE prott OCCURS 0 WITH HEADER LINE,
i_sernr TYPE shp_sernr_update_t.
DATA: e1 TYPE c,
e2 TYPE c,
e3 TYPE c,
e4 TYPE c,
e5 TYPE c,
e6 TYPE c,
e7 TYPE c,
e8 TYPE c.
CONSTANTS dn_num TYPE vbpok-vbeln_vl VALUE '0085000062'.
CONSTANTS so_num TYPE vbak-vbeln VALUE '0025000036'.
l_vbeln = dn_num.
DATA: l_date LIKE sy-datum.
l_date = sy-datum.
wa_vbkok-vbeln_vl = l_vbeln.
wa_vbkok-bolnr = 'bolnr'.
wa_vbkok-traid = 'Test001'.
wa_vbkok-wadat_ist = l_date. "Actual GI date
i_vbpok-vbeln_vl = dn_num.
i_vbpok-posnr_vl = 10.
i_vbpok-vbeln = so_num.
i_vbpok-posnn = 10.
i_vbpok-pikmg = '91'.
APPEND i_vbpok.
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = wa_vbkok
synchron = 'X'
update_picking = 'X'
commit = 'X'
delivery = l_vbeln
IMPORTING
ef_error_any_0 = e1
ef_error_in_item_deletion_0 = e2
ef_error_in_pod_update_0 = e3
ef_error_in_interface_0 = e4
ef_error_in_goods_issue_0 = e5
ef_error_in_final_check_0 = e6
ef_error_partner_update = e7
ef_error_sernr_update = e8
TABLES
prot = i_prott
vbpok_tab = i_vbpok
EXCEPTIONS
error_message = 1
OTHERS = 2.
IF sy-subrc <> 0. " Or I_PROTT has type E/A errors in it
ROLLBACK WORK.
DATA: l_text(100) TYPE c.
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = sy-msgid
msgnr = sy-msgno
msgv1 = sy-msgv1
msgv2 = sy-msgv2
msgv3 = sy-msgv3
msgv4 = sy-msgv4
IMPORTING
message_text_output = l_text.
WRITE l_text.
ELSE.
COMMIT WORK AND WAIT.
ENDIF.