Bapi for vl01no create outbound delivery without order reference

Hi Guru's, i need help, I'm looking for BAPI VL01NO
Any suggestions?
Thanks for everything
Edited by: GaBo_s Gabo on Sep 22, 2009 8:48 PM

Hi,
Following is the sample code for creation of outbound delivery Using BAPI 'BAPI_DELIVERYPROCESSING_EXEC'
Which may be helpful.
PARAMETERS: p_vbeln LIKE vbak-vbeln.
DATA: BEGIN OF t_vbap OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
kwmeng LIKE vbap-kwmeng,
matnr LIKE vbap-matnr,
werks LIKE vbap-werks,
END OF t_vbap.
DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
WITH HEADER LINE.
DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
WITH HEADER LINE.
DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
SELECT vbeln posnr kwmeng matnr werks
INTO TABLE t_vbap
FROM vbap
WHERE vbeln = p_vbeln.
LOOP AT t_vbap.
t_request-document_numb = t_vbap-vbeln.
t_request-document_item = t_vbap-posnr.
t_request-quantity_sales_uom = t_vbap-kwmeng.
t_request-id = 1.
t_request-document_type = 'A'.
t_request-delivery_date = sy-datum.
t_request-material = t_vbap-matnr.
t_request-plant = t_vbap-werks.
t_request-date = sy-datum.
t_request-goods_issue_date = sy-datum.
t_request-goods_issue_time = sy-uzeit.
APPEND t_request.
ENDLOOP.
CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
TABLES
request = t_request
createditems = t_created
return = t_return
READ TABLE t_return WITH KEY type = 'E'.
IF sy-subrc = 0.
MESSAGE e208(00) WITH 'Delivery creation error'.
ENDIF.
COMMIT WORK.
READ TABLE t_created INDEX 1.
WRITE: / 'Delivery ', t_created-document_numb, ' created'.
Let me know if any issues.
Thanks & Regards,
Naveen

Similar Messages

  • BAPI to Create Outbound Delivery Without Order Reference

    Hi everyone
    I need to create <b>outbound delivery without order reference</b> ( like i create manual in VL01NO) . Can anyone help me to find this bapi or function?
    Thanks & regards
       David

    Hi,
    Please check this BAPI.
    BAPI_DELIVERYFREE_PROXY_CREATE
    BAPI_DELIVERYPROCESSING_EXEC
    Regards,
    Ferry Lianto

  • Create outbound delivery without order reference but with order data

    I am interested in creating an outbound delivery without order reference...but include data from a sales order that has already been PGI'd. Has anyone come up against this and found a solution?

    There is a button on VL01N transaction saying W/o Order Reference...
    Click on that and then enter the shipping type, delivery type... and in the main screen enter the data that u have in ur order...
    try that.... all the best
    reward points if helpful...

  • FM for create outbound delivery with order reference

    Hi,
      Can u pls tell me the function module name for create outbound delivery with order reference.
    regards,
    Mahi.

    Hi,
    You can use the BAPI BAPI_DELIVERYPROCESSING_EXEC
    Check this sample code..
    PARAMETERS: p_vbeln LIKE vbak-vbeln.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
            kwmeng LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr kwmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = p_vbeln.
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-kwmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
      TABLES
        request               = t_request
        createditems          = t_created
        return                = t_return
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    READ TABLE t_created INDEX 1.
    Write: /  t_created-document_numb.
    Thanks
    Naren

  • CREATE OUTBOUND DELIVERY WITH ORDER REFERENCE

    Hi All,
    I am working on VL01N Tcode for "CREATE OUTBOUND DELIVERY WITH ORDER REFERENCE", where Return Check serial number of incoming material in case of sales return and compare against serial number in outgoing delivery. If the serial number doesnu2019t match then it should throw an error.
    For the same when serial number is entered after selecting, EXTRAS-> Serial Number. If it does not match with Return Check serial number of incoming material in case of sales return and compare against serial number in outgoing delivery, for the same i am using a BADI  LE_SHP_DELIVERY_PROC and method DELIVERY_FINAL_CHECK, i am not able to find where this value entered is stored.
    Please help.
    Regards,
    Nagesh

    Hi Venkat,
    Thanx for the reply, but ANZSN field only mentions Number of serial numbers, but my query is to check Serial Number GERNR entered when selecting item number and selecting EXTRAS->SERIAL NUMBER and entered serial number with Check serial number of incoming material in case of sales return and compare against serial number in outgoing delivery.
    Please let me know.
    Nagesh

  • BAPI for outbound delivery without order reference - VL01NO

    Hi ,
    I need a BAPI to create a outbound delivery without a Order reference ( transaction VL01NO ). Please provide the BAPI. Sample code will be helpful.
    Thanks,
    R~

    Hi,
    Following is the sample code for creation of outbound delivery Using BAPI 'BAPI_DELIVERYPROCESSING_EXEC'
    Which may be helpful.
    PARAMETERS: p_vbeln LIKE vbak-vbeln.
    DATA: BEGIN OF t_vbap OCCURS 0,
    vbeln LIKE vbap-vbeln,
    posnr LIKE vbap-posnr,
    kwmeng LIKE vbap-kwmeng,
    matnr LIKE vbap-matnr,
    werks LIKE vbap-werks,
    END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
    WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
    WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr kwmeng matnr werks
    INTO TABLE t_vbap
    FROM vbap
    WHERE vbeln = p_vbeln.
    LOOP AT t_vbap.
    t_request-document_numb = t_vbap-vbeln.
    t_request-document_item = t_vbap-posnr.
    t_request-quantity_sales_uom = t_vbap-kwmeng.
    t_request-id = 1.
    t_request-document_type = 'A'.
    t_request-delivery_date = sy-datum.
    t_request-material = t_vbap-matnr.
    t_request-plant = t_vbap-werks.
    t_request-date = sy-datum.
    t_request-goods_issue_date = sy-datum.
    t_request-goods_issue_time = sy-uzeit.
    APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
    TABLES
    request = t_request
    createditems = t_created
    return = t_return
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
    MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    READ TABLE t_created INDEX 1.
    WRITE: / 'Delivery ', t_created-document_numb, ' created'.
    Let me know if any issues.
    Thanks & Regards,
    Naveen

  • BAPI for outbound delivery without order reference???????????????????

    hello folks
    i want to a bapi for transaction <b>VL01NO</b>. this transaction is used for creating outbound delivery <b>wihtout a order reference</b>. I did a search but was not able to find a bapi pls help.

    Hi,
    Could you please send me the sample code for BAPI_DELIVERYFREE_PROXY_CREATE? I am using the IDOC for outbound delivery w/o order reference. I didnt find any standard process code for this..
    Any suggestions on the same??
    Thanks,
    Prasad

  • Problem in Outbound delivery with order reference

    Hi,
    I am facing problem with creation of outbound delivery with order reference from transaction VL01N. When i enter into the transaction with order key in, but in the tab Picking there is one column Pick quantity which is showing as grey field with zero value(Grey field don't allow to change the quantity). This Pick quantity is always allow to put us required quantity but i come across this kind of scenario very first time. Can you please help.
    Thank you.

    Hi,
    Your combination of Plant+Storage location is enabled for warehouse management. So directly putting the picking value is not possible. You have two options now.
    1. If you know howto put pickign through transfer orders, do it through LT03 and confirm teh TO for picking quantity to be updated in delivery. You have to find out teh stock in the source bin and use it in transfer order. You may get in touch with WM consultant, if you dont know how to do it.
    2. If you are ok with just doing picking without WM, then you can change the storage location in delivery and then try picking in delivery itself. The storage location should not be enabled for WM for the plant.

  • RFC to Create Outbound Delivery without Reference

    Hello, we used the function module  "SHP_VL10_DELIVERY_CREATE" to create a PO and outbound delivery. Our business process has changed, just need to create an Outbound Delivery without reference to an order. Having trouble identifiying what function module to use? Looks like SHP_VL10_DELIVERY_CREATE is dependant on a sales order.
    Any ideas?

    Hi,
    BAPI_DELIVERYPROCESSING_EXEC
    refer this thread:
    Re: BAPI to create outbound delivery
    Best regards,
    Prashant

  • Create Outbound Delivery without Stocks

    Hello.
    Anybody with AFS experience?
    When creating outbound delivery with reference to an STO, the system allows me to allocate the full quantity (60pcs), even if the available stocks is only 40pcs.
    How is this possible?  My understanding, we will only be able to create the delivery for the available stocks.
    Help.

    Hi Gemma,
       If there are no stock at all, then you will not be able to create delivery agianst STO. If there is partail qty available, then delivery can be created. eg. if stock is 20 kg  and in the STO if the qty is 40 kg, you will still be able to create delivery, but when stock is 0 kg, you will not be able to create delivery..........it will give an error message" An item with no delivery quantity is not permitted. Item will be deleted."
    hope this helps............
    Rgds,
    Anitha J

  • Outbound delivery with order reference - VL01N

    Hi experts,
    I got this error while creating outbound delivery: "Error Info...   6R 094: There is no conversion factor for material E150C02".
    In develop environment it works fine !! I got this error just in production !
    What can I do ?
    Thanks a lot in advance.
    Regards.
    Marco

    Hi,
    The alternative UOM is not maintained for the material.
    Check in MM02 the material and maintain the alternative UOM whihc is needed to be maintained.
    Basically the UOM which is specified in the error message cannot be converted into the Base UOM. So maintain the same.
    Regards,
    Ankur Parab

  • Bapi for Goods Receipt - Outbound Delivery

    Hello all,
    I am looking for a Bapi for <b>Goods Receipt for Outbound Delivery</b>.
    I have searched the forum but found BAPIs only for GR for Inbound Delivery, GR for purchase order etc. But not for GR for Outbound Delivery.
    Can someone guide?
    Thanks and Regards,
    Reena

    Hi Reena,
    use this code....
    *& Report  ZSAN_BAPI_GOODSMVT_CREATE                                   *
    REPORT  ZSAN_BAPI_GOODSMVT_CREATE .
    DATA: GOODSMVT_HEADER LIKE BAPI2017_GM_HEAD_01,
          " Material Document Header Data
          GOODSMVT_CODE LIKE BAPI2017_GM_CODE,
          " Assign code to transaction for BAPI goods movement
          MATERIALDOCUMENT LIKE BAPI2017_GM_HEAD_RET-MAT_DOC,
          " Number of Material Document
          GOODSMVT_ITEM LIKE BAPI2017_GM_ITEM_CREATE OCCURS 0 WITH HEADER LINE,
          " Create Material Document Item
          RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE
          " Return table for messages
    *Fill values in header
    GOODSMVT_HEADER-PSTNG_DATE = '20030825'.
    GOODSMVT_HEADER-DOC_DATE = '20030802'.
    *Fill GOODSMVT_CODE
    GOODSMVT_CODE-GM_CODE = '05' .
    *Fill Item Table
    GOODSMVT_ITEM-MATERIAL = '100-100'.
    GOODSMVT_ITEM-PLANT = '1000'.
    GOODSMVT_ITEM-STGE_LOC = '0001'.
    GOODSMVT_ITEM-MOVE_TYPE = '501'.
    GOODSMVT_ITEM-ENTRY_QNT = '50'.
    GOODSMVT_ITEM-ITEM_TEXT = 'Test Sanket'.
    *GOODSMVT_ITEM-COSTCENTER = '1000'.
    APPEND GOODSMVT_ITEM.
    *Create Good's movement
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        GOODSMVT_HEADER  = GOODSMVT_HEADER
        GOODSMVT_CODE    = GOODSMVT_CODE
      IMPORTING
        MATERIALDOCUMENT = MATERIALDOCUMENT
      TABLES
        GOODSMVT_ITEM    = GOODSMVT_ITEM
        RETURN           = RETURN.
    *Commit BAPI
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        WAIT = 'X'.
    *Display Goods movement number
    FORMAT COLOR 6 INVERSE ON.
    READ TABLE RETURN WITH KEY TYPE = 'E'.
    IF SY-SUBRC = 0.
      WRITE: /,'ERROR! Goods movement not created'.
    ELSE.
      WRITE: /,'Goods movent number',MATERIALDOCUMENT COLOR 5,
               'posted for material',GOODSMVT_ITEM-MATERIAL.
    ENDIF.
    FORMAT COLOR OFF INVERSE OFF.
    If useful reward me with points.
    Thanks
    Sanket.

  • BAPI for creation Partial Outbound delivery

    Hi Guru
    Please suggest me any BAPI's for creating Partial Outbound Delivery
    I am working on BAPI_OUTB_DELIVERY_CREATE_SLS           but its creating full delivery
    Pls suggest me anythg..
    Best Regards
    Subham Arya

    Hi
    For finding the right BAPI, have a look at the following blog:
    /people/g.koopmann/blog/2010/03/07/using-bapis
    Best regards,
    Guido Koopmann

  • BAPI for VL31N:Create Inbound Delivery

    Hi all,
    Please give the BAPI for VL 31N: Create Inbound delivery transaction
    thanks

    No bapi but you can use this function module GN_DELIVERY_CREATE
    Select the data required - see below
      select ebeln ebelp menge meins matnr werks lgort bstae loekz elikz
             lmein umrez umren insmk pstyp sobkz knttp kzfme kzvbr
             ematn mfrnr mfrpn emnfr cuobj uebto untto uebtk bwtar idnlf
             txz01 mfrgr gewei voleh ntgew brgew volum ean11 aktnr abeln
             abelp aurel matkl upvor uptyp uebpo wepos
              into corresponding fields of table xekpo_short
              from ekpo
               where ebeln = i_ebeln
                 and ebelp = i_ebelp.
      if sy-subrc ne 0.
        e_rc = 4.
      else.
        read table xekpo_short index 1.
        call function 'ME_EKKO_SINGLE_READ'
          exporting
            pi_ebeln         = xekpo_short-ebeln
          importing
            po_ekko          = ekko
          exceptions
            no_records_found = 1
            others           = 2.
        if sy-subrc ne 0.
          e_rc = 4.
        elseif ekko-bstyp ne 'F' and ekko-bstyp ne 'L'.
          e_rc = 4.
        endif.
      endif.
      clear xvbsk.
      xvbsk-mandt = sy-mandt.
      xvbsk-ernam = sy-uname.
      xvbsk-erdat = sy-datum.
      xvbsk-uzeit = sy-uzeit.
      xvbsk-smart = 'L'.
    *- Nummer VBSK vergeben -
      select single * from tvsa where smart = xvbsk-smart.
      if sy-subrc = 0.
        call function 'NUMBER_GET_NEXT'
          exporting
            nr_range_nr = tvsa-numki
            object      = 'RV_SAMMG'
          importing
            number      = xvbsk-sammg
          exceptions
            others      = 01.
        if sy-subrc ne 0.
          message e700(me) with tvsa-numki text-007.
        endif.
      else.
        message e700(me) with space text-007.
      endif.
      data: h_grkor like lips-grkor,         "Liefergruppe         "386409
           h_bsmng like ekpo-menge.         "Bestellmenge übergeordnete Pos.
      if not ekko-lifnr is initial.
        call function 'VENDOR_MASTER_DATA_SELECT_12'
          exporting
            pi_lifnr       = ekko-lifnr
            pi_ekorg       = ekko-ekorg
          importing
            pe_lfm1        = lfm1
          exceptions
            no_entry_found = 1
            others         = 2.
        xkomdlgn-vsbed = lfm1-vsbed.
      else.
        clear xkomdlgn-vsbed.
      endif.
      xkomdlgn-lifnr = ekko-lifnr.
      xkomdlgn-inco1 = ekko-inco1.                              "363954
      xkomdlgn-inco2 = ekko-inco2.                              "363954
      xkomdlgn-exnum = ekko-exnum.                              "363954
      xkomdlgn-bukrs_best = ekko-bukrs.                         "363954
      xkomdlgn-matnr = xekpo_short-matnr.
      xkomdlgn-werks = xekpo_short-werks.
      xkomdlgn-lgort = xekpo_short-lgort.
    xkomdlgn-charg = ?
      xkomdlgn-vrkme = xekpo_short-meins.
      xkomdlgn-meins = xekpo_short-lmein.
      xkomdlgn-umvkz = xekpo_short-umrez.
      xkomdlgn-umvkn = xekpo_short-umren.
      if xekpo_short-matnr eq space.                            "386409
        xkomdlgn-meins = xekpo_short-meins.
        xkomdlgn-umvkz = 1.
        xkomdlgn-umvkn = 1.
      endif.
      xkomdlgn-insmk = xekpo_short-insmk.
      xkomdlgn-kzfme = xekpo_short-kzfme.
      xkomdlgn-kzvbr = xekpo_short-kzvbr.           "note 384051
      xkomdlgn-lfimg = p_lfimg.
      xkomdlgn-lfdat = p_eindt.
      xkomdlgn-vgbel = xekpo_short-ebeln.
      xkomdlgn-vgpos = xekpo_short-ebelp.
      xkomdlgn-lfart = gf_dlv_type.
      xkomdlgn-vgtyp = 'V'.
      xkomdlgn-kzazu = 'X'.                "??? what's that for ????
      xkomdlgn-knttp = xekpo_short-knttp.
      xkomdlgn-sobkz = xekpo_short-sobkz.
      if xekpo_short-matnr is initial or xekpo_short-pstyp = '6'.
        xkomdlgn-posar = 'B'.
      endif.
      xkomdlgn-ematn = xekpo_short-ematn.
      xkomdlgn-mfrnr = xekpo_short-mfrnr.
      xkomdlgn-mfrpn = xekpo_short-mfrpn.
      xkomdlgn-emnfr = xekpo_short-emnfr.
      xkomdlgn-cuobj = xekpo_short-cuobj.
      xkomdlgn-uebto = xekpo_short-uebto.
      xkomdlgn-untto = xekpo_short-untto.
      xkomdlgn-uebtk = xekpo_short-uebtk.
      xkomdlgn-bwtar = xekpo_short-bwtar.
      xkomdlgn-kdmat = xekpo_short-idnlf.
      xkomdlgn-arktx = xekpo_short-txz01.
      xkomdlgn-mfrgr = xekpo_short-mfrgr.
      xkomdlgn-gewei = xekpo_short-gewei.
      xkomdlgn-voleh = xekpo_short-voleh.
      xkomdlgn-ntgew = xekpo_short-ntgew * xkomdlgn-lfimg.
      xkomdlgn-brgew = xekpo_short-brgew * xkomdlgn-lfimg.
      xkomdlgn-volum = xekpo_short-volum * xkomdlgn-lfimg.
      xkomdlgn-ean11 = xekpo_short-ean11.
      xkomdlgn-aktnr = xekpo_short-aktnr.
      xkomdlgn-abeln = xekpo_short-abeln.
      xkomdlgn-abelp = xekpo_short-abelp.
      xkomdlgn-aurel = xekpo_short-aurel.
      xkomdlgn-idnlf = xekpo_short-idnlf.
      xkomdlgn-matkl = xekpo_short-matkl.
    Leergut-Stückliste übernehmen
      clear xkomdlgn-grkor.
      clear xkomdlgn-kmpmg.
      clear xkomdlgn-uepos.
      if xekpo_short-upvor ca '3X'.
        h_grkor = h_grkor + 1.
        xkomdlgn-grkor = h_grkor.
        h_bsmng = xekpo_short-menge.
      endif.
      if not xekpo_short-uebpo is initial and
             xekpo_short-uptyp ca '3X'.
        xkomdlgn-uepos = xekpo_short-uebpo.
        xkomdlgn-grkor = h_grkor.
        if h_bsmng ne 0.
          xkomdlgn-kmpmg = xekpo_short-menge / h_bsmng.
        endif.
      endif.
    *- Konsignation - SOBKZ 'K' hart reinsetzen, da  von Pstyp abhäng......
      if xekpo_short-pstyp eq '2'.
        xkomdlgn-sobkz = 'K'.
      endif.
    Kontierungsfelder
      if xekpo_short-sobkz eq 'E' or xekpo_short-sobkz eq 'Q'.
        call function 'MMPUR_EKKN_READ_EBELN_EBELP'
          exporting
            pi_ebeln                   = xekpo_short-ebeln
            pi_ebelp                   = xekpo_short-ebelp
          PI_BYPASSING_BUFFER        =
          PI_REFRESH_BUFFER          =
          tables
            pto_ekkn_po                = xekkn
          exceptions
            no_records_requested       = 1
            others                     = 2.
        if sy-subrc eq 0.
          read table xekkn index 1.
          xkomdlgn-ps_psp_pnr = xekkn-ps_psp_pnr.
          xkomdlgn-vbelv      = xekkn-vbeln.
          xkomdlgn-posnv      = xekkn-vbelp.
        endif.
      endif.
      append xkomdlgn.

  • Inbound Delivery without order reference

    Hello,
    Does anyone know if there is a way for creating an inbound delivery without PO as a reference?
    I need to create an inbound delivery with no reference, and I know that for the outbound process it is possible.
    Thanks in advance,
    Dikla

    Hi,
    Inbound delivery can be created with order reference not any other way.Even if you try to create Inbound delivery automatically through Idoc ,system in backgorund calls the Vl31N transaction so there is no other way .
    AMIT

Maybe you are looking for