BAPI for VL31N:Create Inbound Delivery

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

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.
    read table xekpo_short index 1.
    call function 'ME_EKKO_SINGLE_READ'
        pi_ebeln         = xekpo_short-ebeln
        po_ekko          = ekko
        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.
  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'
        nr_range_nr = tvsa-numki
        object      = 'RV_SAMMG'
        number      = xvbsk-sammg
        others      = 01.
    if sy-subrc ne 0.
      message e700(me) with tvsa-numki text-007.
    message e700(me) with space text-007.
  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'
        pi_lifnr       = ekko-lifnr
        pi_ekorg       = ekko-ekorg
        pe_lfm1        = lfm1
        no_entry_found = 1
        others         = 2.
    xkomdlgn-vsbed = lfm1-vsbed.
    clear xkomdlgn-vsbed.
  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.
  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'.
  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.
  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.
*- Konsignation - SOBKZ 'K' hart reinsetzen, da  von Pstyp abhäng......
  if xekpo_short-pstyp eq '2'.
    xkomdlgn-sobkz = 'K'.
  if xekpo_short-sobkz eq 'E' or xekpo_short-sobkz eq 'Q'.
    call function 'MMPUR_EKKN_READ_EBELN_EBELP'
        pi_ebeln                   = xekpo_short-ebeln
        pi_ebelp                   = xekpo_short-ebelp
      PI_BYPASSING_BUFFER        =
      PI_REFRESH_BUFFER          =
        pto_ekkn_po                = xekkn
        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.
  append xkomdlgn.

Similar Messages

  • User exit  or Badi for VL31N (create inbound delivery)

    Dear friends.
              I wish to add a check before saving in the transaction VL31N for that  i need to know user exit or BADI..can you help me to know what possible user exit or badi available for this task.. your suggestion and article will be greate help of mine,
    thanking you

    Exit Name           Description
    V02V0001            Sales area determination for stock transport order
    V02V0002            User exit for storage location determination
    V02V0003            User exit for gate + matl staging area determination (headr)
    V02V0004            User Exit for Staging Area Determination (Item)
    V50PSTAT            Delivery: Item Status Calculation
    V50Q0001            Delivery Monitor: User Exits for Filling Display Fields
    V50R0001            Collective processing for delivery creation
    V50R0002            Collective processing for delivery creation
    V50R0004            Calculation of stock for POs for shipping due date list
    V50S0001            User Exits for Delivery Processing
    V53C0001            Rough workload calculation in time per item
    V53C0002            W&S: RWE enhancement - shipping material type/time slot
    V53W0001            User exits for creating picking waves
    VMDE0001            Shipping Interface: Error Handling - Inbound IDoc
    VMDE0002            Shipping Interface: Message PICKSD (Picking, Outbound)
    VMDE0003            Shipping Interface: Message SDPICK (Picking, Inbound)
    VMDE0004            Shipping Interface: Message SDPACK (Packing, Inbound)

  • Help Rgd. BAPI for Creation of Inbound delivery Document

    Hi all,
    I need a Bapi to create inbound delivery document without using PO reference. I have seen the below BAPIs. i) BAPI_IBDLV_CREATE_FROM_OBDLV, 
    ii) BAPI_GOODSMVT_CREATE. I am not sure whether they are for creating inbound delivery document without using PO reference.
    It will be of great use if anyone can give me the BAPI for the purpose and the mandatory parameters or sample test data for the BAPI.
    Thanks in Advance,

    If you create the inbound delivery->check the purchase order in the tabstrip "Confirmations" on item level. There are three fields: "Confirmation control key", "Order acknowl." and "acknowl. required".
    Ckeck if there is a value in "confirmation control key".
    You should get the same error if you try to create VL31N in dialog mode, not only by using the bapi.

  • BAPI for Creation of Inbound delivery Document

    I have found a BAPI for Creating Inbound delivery Document, BBP_INB_DELIVERY_CREATE. I filled the below parameters and executed it.
        DELIV_DATE                     11.04.2007                           
                MATERIAL                       1096               
                MATL_DESC                      SHARP CAMERA111    
                DELIV_QTY                               795,000   
                UNIT                           KG                 
                PO_NUMBER                      4500000011         
                PO_ITEM                        00010              
    I recieve a error 'This function is only possible for items with confirmation key'.
    I dont know whether the error is with the data. Is there any other fields to be filled.
    It will be of great help if anyone provide me with any input. ;>)
    Thanks in Advance

    If you create the inbound delivery->check the purchase order in the tabstrip "Confirmations" on item level. There are three fields: "Confirmation control key", "Order acknowl." and "acknowl. required".
    Ckeck if there is a value in "confirmation control key".
    You should get the same error if you try to create VL31N in dialog mode, not only by using the bapi.

  • 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

    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
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
    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.
    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'.
    READ TABLE t_created INDEX 1.
    WRITE: / 'Delivery ', t_created-document_numb, ' created'.
    Let me know if any issues.
    Thanks & Regards,

  • FM/BAPI for Packing in Inbound Delivery

    I can´t find a FM/BAPI for packing of handling units in the inbound delivery.
    Is there any information that you can help me with?

    Check if this works for u.

  • How to make "External ID" mandatory in VL31N (Create Inbound Delivery)

    Hello All,
    I have a requirement, Make "External ID" field mandatory in VL31N. Can anyone please provide the details?
    If it can be done through Configuration(SPRO), Please provide me the step-by-step details.
    If it can be done through Coding, please let me know how can we achieve this functionality?
    Thanks in Advance for your inputs.

    Both are part of the same concept.
    You must create a screen variant to make the field obligatory, and attach the screen variant to the screen, that can be done by defining a transaction variant.
    Assigning the transaction variant to the transaction VL31N may be done either by defining it as so-called "standard" transaction variant, or by defining a variant group (for groups of users).
    All this is in transaction SHD0.
    If you are not familiar with the concept, I advise you to read the documentation ->
    By the way, it may not match your requirement as I explained previously.

  • Finding FM/BAPI/RFC for Create Inbound Delivery(vl31n).

    Hi all,
    i need for a FM/BAPI/RFC for Create Inbound Delivery(vl31n) or ASN
    where in import Parameter i have to pass -
    *vendor no*
    *PO no*
    *External ID no*
    *Delivery date*
    *GR/GI Slip*
    in Export i need ASN no and in tables we can use ITEM details.
    Sunil sahoo.

    Check the below link

  • Step for creating inbound delivery in case of customer return.

    When I start vl31N I can create with reference to vendor or PO an inbound delivery.
    How to create inbound delivery with reference to a customer return?
    What to do?
    Thank you in advance,
    Eric van Zundert.

    You can try to create a copy control for return sales order to inbound delivery document. Depending on business requirements like combining vendor PO and returns sales orders, you can try to use VL31N.
    If it is only returns sales orders that needs to be processed, then SAP standard document types and its associated copy control would help.
    P.S: Does your scenario relate to import process? I am in the same boat.
    Edited by: Shiva Ram on Jan 22, 2008 2:17 PM

  • Create inbound delivery for same material with multiple batches

    Hi Experts,
    An ASN( advanced shipping notification) contains multiple batch numbers for same material or line item.An IDOC has different segments with batch numbers but in SAP while creating Inbound delivery(VL31N) only batch number ( segment) get posted automatically in SAP other batches are need to post manuaaly.
    I am using IDoc type : Delivery03 ,Message type: DESADV
    How to resolve this problem?

    Hi Anil,
    Welcome to SCN for your first post. Did you check with your functional people about this.

  • Create inbound delivery VL31N

    I have created new plant. When I make PO (UB) and then create inbound delivery in vl31n the vendor already appears and the vendor is what I entered in the PO as Supplying Plant.
    Now when I do the same for the new plant the vendor does not appear automatically. What I forgot to customize ?
    Thank you.

    Hi ,
    Generally, the vendor number is not populated to the PO/inbound delivery for intra company stock transfer.
    However, if you to the following settings, the vendor number will be populated to the intra company stock transfer PO and subsequently to the inbound delivery.
    SPRO -- > MM -- > Purchasing -- > Purchase order --> Define Document Types --> You have a check box "Stock transfer: Take vendor data into account". Check this.
    Now if you create a new stock transfer PO with document type UB and create inbound delivery, you should get the vendor number.
    Gobinathan G

  • Creating inbound delivery for the purchase order line items

    Hi Experts,
    Please let me know how can I create inbound delivery for the purchase order line items?  Say, I have a purchase order with 5 line items in it.  I wanted to create an inbound delivery for only 2 line items at this point of time.  Which SAP Standard transaction I have to use and what all  data I need to populate?  I would appreciate any help on this and will reward the right answer.  Please let me know.
    Thank you in advance.
    with regards,
    Muthu Ganapathy.

    While creating the inbound delivery (VL31N), intially all the items will be shown, see the advance shipping notfication - from the vendor for which he has send confirmation & rest items you can delete simply & save. & next time when the vendor sends rest advance shipping notifcation (confirmation), you can receive them.
    Hope this answers your query.

  • Function module to create Inbound delivery with reference to Purchase Order

    Hi experts,
    I want to create Inbound delivery with refernce to Purchase Order. But I want to create item wise. For example If one purchase order is there with 10 line items. 10, 20, 30, 40, 50......100.
    If I am showing report for Purchase Order with select option and if I select first 5 line items 10, 20, 30, 40, 50 then my program should be create one Inbound delivery for selected line items only. I have tried BDC for Tcode VL31N, but its not worked. Is there any Function module to create Inbound delivery with reference to Purchase Order for selected line items????????

    For creating a delivery wrt PO u 1st need to have a sales order i guess.

  • Error while creating inbound delivery

    Hi All,
    I get an error while creating inbound delivery from ASN
    "Error during conversion of unit of measure: UoM is missing -> ST BOR131
    Please help solve this issue.
    Thanks in advance

    please maintain the uom  for tour material.
    reffer this link
    Alternate Unit of Measure Conversion Rule Error
    /thread/2000551 [original link is broken]
    Thanking you.

  • Creating inbound delivery without reference to PO - from inbound idoc

    Hi guys,
    I have a scenario wherein I need to create inbound delivery from inbound Idoc from external system without reference of PO. There is no PO created in SAP and this inbound delivery will be used just to receive material (purely for logistic purpose).
    I have identified DELVRY03 or 05 as Idoc type but I am not sure whether system will create inbound delivery without having reference PO. I have two questions here -
    1. Can we create inbound delivery without reference to PO?
    2. If yes, which Idoc type should I use to create such inbound delivery?
    Please help.

    Dear Parimal,
    In standard, An inbound delivery can be created as follows:
    With reference to a purchase order
    With collective processing for several purchase orders
    With reference to a stock transport order
    With reference to a customer return

Maybe you are looking for

  • Error message-itunes detected a problem with av

    itunes has detected a problem with your audio config, av plyback may not opperate properly. i get this message when i open itunes. followed other instructions to uninstall quicktime and reinstall. can't play music files or cd's. hit play and nothing

  • How do I get to the info to send in my Ipad because the screen is cracked?

    My dog chewed on my Ipad and the screen cracked. I just want to know how to get to the info to send my Ipad in to get it fixed. Help!!

  • Applescript to open Windows file

    I'me using Parallels to run Windows XP on my MAC. Is it possible to "tell" a Windows application (specifically Excel 2010 as opposed to Excel 2007 which I also have) to open a particular file, or alternatively to "tell" Finder to open my file using E

  • Contact Center CAD IP Address

    Is there any way I can get currently logged in CAD's IP address from UCCX application or select from DB? Get User Info step doesn't have IP field. Running UCCX 8.5. Thanks

  • Start up folder apps

    How do I eliminate programs from starting up when restarting my computer? I went to start up items folder and nothing was in the folder. For example: Excell, word and a couple other programs startup on every restart.