Skip to Content
avatar image
Former Member

bapi of picking in tcode 'vl02n'

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 09, 2008 at 06: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2008 at 06:29 AM

    don't exit....

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 01, 2008 at 03:58 PM

    Hi,

    try this one Ws_Delivery_Update

    Hugo

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • avatar image
    Former Member
    Oct 08, 2008 at 03: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.

    Add comment
    10|10000 characters needed characters exceeded