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.

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
    regards,
    Naim

    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)
    BADI
    <b>DELIVERY_PUBLISH</b>regards
    vinod

  • 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,
    Rakesh.

    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.
    Rgds,
    JP

  • BAPI for Creation of Inbound delivery Document

    Hi
    I have found a BAPI for Creating Inbound delivery Document, BBP_INB_DELIVERY_CREATE. I filled the below parameters and executed it.
    IS_INB_DELIVERY_HEADER     
        DELIV_DATE                     11.04.2007                           
    IT_INB_DELIVERY_DETAIL                                       
                MATERIAL                       1096               
                VEND_MAT                                          
                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
    Rakesh

    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.
    Rgds,
    JP

  • 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

  • FM/BAPI for Packing in Inbound Delivery

    Hi,
    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?
    BR,
    Christian

    Check if this works for u.
    BAPI_HU_PACK

  • 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.
    Regards,
    Shyam

    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 -> http://help.sap.com/saphelp_nw70/helpdata/en/67/232037ebf1cc09e10000009b38f889/frameset.htm
    By the way, it may not match your requirement as I explained previously.
    BR
    Sandra

  • 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*
    *TransPlanngDate*
    *BillOfLad*
    *GR/GI Slip*
    in Export i need ASN no and in tables we can use ITEM details.
    Regards,
    Sunil sahoo.

    Hi,
    Check the below link
    [https://forums.sdn.sap.com/click.jspa?searchID=16938983&messageID=5780492]
    Regards,
    Surinder

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

    Hi,
    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.

    Hi,
    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.
    Regards
    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?
    Thanks,
    Anil

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

  • Create inbound delivery VL31N

    HI,
    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 ,
    Greetings!
    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.
    Regards
    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.

    Hi,
    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.
    Regards
    Irfan.

  • 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????????

    Hi,
    Try FM RV_DELIVERY_CREATE or GN_DELIVERY_CREATE.
    For creating a delivery wrt PO u 1st need to have a sales order i guess.
    Regards,
    Amit

  • 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
    Regards,
    Thiru

    hi,
    please maintain the uom  for tour material.
    or
    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.
    Thanks,
    Parimal.

    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

  • PDF to InDesign

    I have a adobe PDF on my computer that i would like to open in indesign to edit and then re-save it as a PDF!? Does anyone know how to go about opening a PDF in InDesign?? Thank you in advance! Sam

  • Huge Problems with WD Mycloud... files disappearing...

    I recently installe done of these in a small clients office (they have 4 or 5 users) and wanted a simple storage device. I had used these before andf they loooked good so I bought one. It has been a huge embarrassment and I hope you can help me resol

  • Just upgraded to FireFox 29. What is Wired-Marker? and how to use

    Just need an explanation of wired Marker and its uses

  • Cannot create playlist with new OS

    I just updated my touch (3rd generation) to OS5.1.1 and now I cannot create a playlist on my device.  I used to be able to just right click on the music folder under my device and create a playlist that I could drag music into, but now that doesn't h

  • Mac Book Pro and not Intel Imac[ don't know how to edit my post?]

    I have Mac OS X version 10.6.8 and the screen is freezing up and/or somewhat crashing when I use my old version of imovie. I say old version which is hd 6.0.3. I also have the new version but I find the old much easier to use. New to me is imovie 09,


HashFlare