BAPI to Create a Delivery

Hi,
I have created a STO. I want to create a Delivery for this STO. Can anyone pls let me know the BAPI for creation of delivery and Shipment for a STO?
Pls help
Thnaks
Ram

U can use the below FM...for the same.
call function 'SHP_VL10_DELIVERY_CREATE'
        exporting
          IF_LEDAT           = I_LFDAT
          IF_NUR_VORGABE_POS = YES
          IT_KEY_ENQUE_READ  = IT_KEY_ENQUE_READ
          IT_KOMDLGN         = IT_KOMDLGN
        changing
          CX_SD_ORDER        = XS_SD_ORDER
          CT_VBSK_ALL        = XT_VBSK_ALL
          CT_VBLS            = XT_VBLS
          CT_KEY_LATE        = XT_KEY_LATE.
<b>--I will get you the BAPI for shipment creation but please assign points for all helpful answers!!</b>
Message was edited by: Anurag Bankley

Similar Messages

  • BAPI for creating outbound delivery

    Hi,
    Can anyone please let me know the bapi for creating outbound delivery.I have checked for few bapi's like
    BAPI_OUTB_DELIVERY_SAVEREPLICA
    BAPI_DELIVERPROCESSING_EXEC
    If i use the first one i would like to know whether i need to do the PGI seperately by using any bdc or is it taken care in the same bapi.
    Its basically for the workflow task werein we have all the required parameters like delivery numb, sales order num ...etc
    Iam new to BAPI's.Please consider my request and let me know the details for the same.
    thanks
    keith

    The below is for creating delivery for STO's.
        Delivery creation
          call function 'SHP_VL10_DELIVERY_CREATE'
            exporting
              IF_LEDAT           = I_LFDAT
              IF_NUR_VORGABE_POS = YES
              IT_KEY_ENQUE_READ  = IT_KEY_ENQUE_READ
              IT_KOMDLGN         = IT_KOMDLGN
            changing
              CX_SD_ORDER        = XS_SD_ORDER
              CT_VBSK_ALL        = XT_VBSK_ALL
              CT_VBLS            = XT_VBLS
              CT_KEY_LATE        = XT_KEY_LATE.
    Message was edited by: Anurag Bankley

  • BAPI for creating Return delivery to vendor using transaction MIGO

    Hi All,
             My requirement is to create Return delivery to vendor using transaction MIGO.
    In MIGO transaction to create return delivery, the following steps needs to be followed.
    i) Select the option A02 Return delivery, R02 Material document,
        Enter Material document xxxxxxxx.
        Reson for movement:xxxx
        By selecting the option item ok and via delivery check box, then save.
    After saving return delivery needs to be created.
    Is there any BAPI/FM exist for this requirement?
    I made lot of search in sdn, but i could not find any thing helpful.
    Appreciate quick help.
    regards
    surya

    Hi
    In VL02n->Extras->Delivery Output->Header
    Check if you see any message type (LD00 ?).
    If you do not see any, insert a message type LD00.
    If you want to check the IMG settings, see Txns : V/71 (for delivery types RL/RLL) and V/73 (for Item category RLLN)
    Best regards
    Ramki

  • Bapi to create outbound delivery

    hi experts,
    I want a BAPI to create a outbound delivery.URGETN
    KIRAN J

    Hi
    Please Check BAPI_OUTB_DELIVERY_CREATENOREF.
    You can go to transaction SE37 and search for the relevant BAPIs using the search pattern BAPIDELIVERYCREATE* and the pressing F4.
    Cheers,
    Hakim

  • BAPi to create Outbound delivery with PGI

    Hi all,
    What BAPi , we can use to create Outbound delivery with PGI.
    Please help me in this regards.
    Deekshitha.

    Hi,
    Use the BAPI BAPI_GOODSMVT_CREATE
      check this link.... u will get all help from this code..
    http://sap4.com/wiki/index.php?title=BAPI_GOODSMVT_CREATE&printable=yes
    <b>rEWARD POINTS</b>
    rEGARDS

  • BAPI to create inbound delivery

    Is there any BAPI to create a new inbound delivery without reference to a PO?
    As far as I know, there is bapi to create outbound deliveries:
    BAPI_OUTB_DELIVERY_CREATENOREF.
    Thanks.

    try these
    GN_DELIVERY_CREATE
    GN_DELIVERY_CREATE_FOR_DIALOG

  • BAPI to create Inbound Delivery without reference

    Hi Folks,
    I'm working for a client who requires a process to create Inbound Deliveries <i><b>without reference</b></i> to a PO. Does anyone know of an existing BAPI that will meet this criteria?
    The fallback position is to look at using a BAPI like BAPI_DELIVERYPROCESSING_EXEC or BAPI_OUTB_DELIVERY_SAVEREPLICA with a custom document type, but these are less than ideal options.
    Points rewarded for helpful answers.
    Cheers,
    Steve

    Hi!
    I can't seem to find a working example using this function modules. I want to create an inbound delivery without reference to a PO.
    Thanks!
    abapGenin

  • BAPI for creating outbound delivery reference to PO

    Hi all,
       I want to crate delivery against the the PO. scenario is i want to create delivery in one plant which will be copy of delivery in some other plant. I require it for automation. Main thing is that BAPI should handle batch split scenario. The problem is that i used 'GN_DELIVERY_CREATE' bt although it meets po quantity it is not closing PO's ELIKZ flag. Plz suggest some solution on it.
    Theme is I want to create delivery against PO but quantity should be from other delivery and it should handle battch split.
    I will thankful to u .

    hi Amol,
    welcome to SDN
    here is related scenario check it out
    BAPI to Copy Materials from one Plant to Another
    Copy Materials from one Plant to Another
    First run   GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk
    Second run  UPDDATA AS CHECKBOX. "Tick to update date to Materials Master
    Check data in Excel before Second run
    REPORT ZBAPIMM01 LINE-SIZE 255 NO STANDARD PAGE HEADING
                     LINE-COUNT 065(001).
    TABLES: T001L, "Storage Locations
            MARA,  "General Material Data
            MAKT,  "Material Descriptions
            MBEW,  "Material Valuation
            MARC.  "Plant Data for Material
    DATA: BAPI_HEAD   LIKE BAPIMATHEAD,
          BAPI_MAKT   LIKE BAPI_MAKT,    "Material Description
          BAPI_MARA1  LIKE BAPI_MARA,    "Client Data
          BAPI_MARAX  LIKE BAPI_MARAX,
          BAPI_MARC1  LIKE BAPI_MARC,    "Plant View
          BAPI_MARCX  LIKE BAPI_MARCX,
          BAPI_MBEW1  LIKE BAPI_MBEW,    "Accounting View
          BAPI_MBEWX  LIKE BAPI_MBEWX,
          BAPI_RETURN LIKE BAPIRET2.
    DATA: BEGIN OF INT_MAKT OCCURS 100.
            INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF INT_MAKT.
    DATA: BEGIN OF INT_MAT OCCURS 100,
             WERKS(4),     "Plant
             MTART(4),     "Material type
             MATNR(18),    "Material number
             MATKL(9) ,    "Material group
             MBRSH(1),     "Industry sector
             MEINS(3),     "Base unit of measure
             GEWEI(3),     "Weight Unit
             SPART(2),     "Division
             EKGRP(3),     "Purchasing group
             VPRSV(1),     "Price control indicator
             STPRS(12),    "Standard price
             PEINH(3),     "Price unit
             SPRAS(2),     "Language key
             MAKTX(40),     "Material description
           END OF INT_MAT.
    SELECT-OPTIONS:
                PLANT    FOR  MARC-WERKS OBLIGATORY MEMORY ID PLT,
                MATERIAL FOR  MARA-MATNR MEMORY ID MAT,
                MATLTYPE FOR  MARA-MTART MEMORY ID MTY,
                DIVISION FOR  MARA-SPART MEMORY ID DIV.
    PARAMETERS:  F_FILE LIKE RLGRAP-FILENAME
                 DEFAULT 'C:\DATA\ZMATERIAL.XLS' MEMORY ID F_FILE,
                 GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk
                 UPDDATA AS CHECKBOX. "Tick to update date to Materials Master
    IF GETDATA = 'X'.
       PERFORM DOWNLOAD_DATA.
       PERFORM DOWNLOAD_FILE.
    ENDIF.
    IF UPDDATA = 'X'.
       PERFORM UPLOAD_FILE.
       PERFORM UPDATE_MM.
    ENDIF.
    FORM DOWNLOAD_DATA.
    SELECT * FROM MARC  WHERE LVORM EQ ' '
                          AND WERKS IN PLANT
                          AND MATNR IN MATERIAL.
        CLEAR MARA.
        SELECT SINGLE * FROM MARA WHERE MATNR =  MARC-MATNR.
        CHECK MATLTYPE.
        CHECK DIVISION.
        CLEAR MBEW.
        SELECT SINGLE * FROM MBEW WHERE MATNR =  MARC-MATNR
                                    AND BWKEY =  MARC-WERKS.
        CLEAR MAKT.
        SELECT SINGLE * FROM MAKT WHERE SPRAS =  'EN'
                                    AND MATNR =  MARC-MATNR.
        WRITE:/ MARC-WERKS,    "Plant
                MARA-MTART,    "Material type
                MARA-MATNR,    "Material number
                MARA-MATKL,    "Material group
                MARA-MBRSH,    "Industry sector
                MARA-MEINS,    "Base unit of measure
                MARA-GEWEI,    "Weight Unit
                MARA-SPART,    "Division
                MARC-EKGRP,    "Purchasing group
                MBEW-VPRSV,    "Price control indicator
                MBEW-STPRS,    "Standard price
                MBEW-PEINH,    "Price unit
                MAKT-SPRAS,    "Language key
                MAKT-MAKTX.    "Material description
                INT_MAT-WERKS = MARC-WERKS.    "Plant
                INT_MAT-MTART = MARA-MTART.    "Material type
                INT_MAT-MATNR = MARA-MATNR.    "Material number
                INT_MAT-MATKL = MARA-MATKL.    "Material group
                INT_MAT-MBRSH = MARA-MBRSH.    "Industry sector
                INT_MAT-MEINS = MARA-MEINS.    "Base unit of measure
                INT_MAT-GEWEI = MARA-GEWEI.    "Weight Unit
                INT_MAT-SPART = MARA-SPART.    "Division
                INT_MAT-EKGRP = MARC-EKGRP.    "Purchasing group
                INT_MAT-VPRSV = MBEW-VPRSV.    "Price control indicator
                INT_MAT-STPRS = MBEW-STPRS.    "Standard price
                INT_MAT-PEINH = MBEW-PEINH.    "Price unit
                INT_MAT-SPRAS = MAKT-SPRAS.    "Language key
                INT_MAT-MAKTX = MAKT-MAKTX.    "Material description
                APPEND INT_MAT.
                CLEAR  INT_MAT.
    ENDSELECT.
    ENDFORM.
    FORM DOWNLOAD_FILE.
    call function 'WS_DOWNLOAD'
      EXPORTING
        FILENAME                      = F_FILE
        FILETYPE                      = 'DAT'
      FILETYPE                      = 'WK1'
      tables
        data_tab                      = INT_MAT
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_WRITE_ERROR              = 2
        INVALID_FILESIZE              = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        OTHERS                        = 10.
    IF SY-SUBRC = 0.
       FORMAT COLOR COL_GROUP.
       WRITE:/ 'Data Download Successfully to your local harddisk'.
       SKIP.
    ENDIF.
    ENDFORM.
    FORM UPLOAD_FILE.
    call function 'WS_UPLOAD'
      EXPORTING
        FILENAME                      = F_FILE
        FILETYPE                      = 'DAT'
      FILETYPE                      = 'WK1'
      tables
        data_tab                      = INT_MAT
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_WRITE_ERROR              = 2
        INVALID_FILESIZE              = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        OTHERS                        = 10.
    IF SY-SUBRC = 0.
       FORMAT COLOR COL_GROUP.
       WRITE:/ 'Data Upload Successfully from your local harddisk'.
       SKIP.
    ENDIF.
    ENDFORM.
    FORM UPDATE_MM.
    LOOP AT INT_MAT.
    Header
        BAPI_HEAD-MATERIAL        = INT_MAT-MATNR.
        BAPI_HEAD-IND_SECTOR      = INT_MAT-MBRSH.
        BAPI_HEAD-MATL_TYPE       = INT_MAT-MTART.
        BAPI_HEAD-BASIC_VIEW      = 'X'.
        BAPI_HEAD-PURCHASE_VIEW   = 'X'.
        BAPI_HEAD-ACCOUNT_VIEW    = 'X'.
    Material Description
        REFRESH INT_MAKT.
        INT_MAKT-LANGU           = INT_MAT-SPRAS.
        INT_MAKT-MATL_DESC       = INT_MAT-MAKTX.
        APPEND INT_MAKT.
    Client Data - Basic
        BAPI_MARA1-MATL_GROUP     = INT_MAT-MATKL.
        BAPI_MARA1-BASE_UOM       = INT_MAT-MEINS.
        BAPI_MARA1-UNIT_OF_WT     = INT_MAT-GEWEI.
        BAPI_MARA1-DIVISION       = INT_MAT-SPART.
        BAPI_MARAX-MATL_GROUP = 'X'.
        BAPI_MARAX-BASE_UOM   = 'X'.
        BAPI_MARAX-UNIT_OF_WT = 'X'.
        BAPI_MARAX-DIVISION   = 'X'.
    Plant - Purchasing
        BAPI_MARC1-PLANT      = INT_MAT-WERKS.
        BAPI_MARC1-PUR_GROUP  = INT_MAT-EKGRP.
        BAPI_MARCX-PLANT      = INT_MAT-WERKS.
        BAPI_MARCX-PUR_GROUP  = 'X'.
    Accounting
        BAPI_MBEW1-VAL_AREA   = INT_MAT-WERKS.
        BAPI_MBEW1-PRICE_CTRL = INT_MAT-VPRSV.
        BAPI_MBEW1-STD_PRICE  = INT_MAT-STPRS.
        BAPI_MBEW1-PRICE_UNIT = INT_MAT-PEINH.
        BAPI_MBEWX-VAL_AREA   = INT_MAT-WERKS.
        BAPI_MBEWX-PRICE_CTRL = 'X'.
        BAPI_MBEWX-STD_PRICE  = 'X'.
        BAPI_MBEWX-PRICE_UNIT = 'X'.
        WRITE:/ BAPI_HEAD, BAPI_MARC1.
        call function 'BAPI_MATERIAL_SAVEDATA'
          exporting
            HEADDATA                   = BAPI_HEAD
            CLIENTDATA                 = BAPI_MARA1
            CLIENTDATAX                = BAPI_MARAX
            PLANTDATA                  = BAPI_MARC1
            PLANTDATAX                 = BAPI_MARCX
          FORECASTPARAMETERS         =
          FORECASTPARAMETERSX        =
          PLANNINGDATA               =
          PLANNINGDATAX              =
          STORAGELOCATIONDATA        =
          STORAGELOCATIONDATAX       =
            VALUATIONDATA              = BAPI_MBEW1
            VALUATIONDATAX             = BAPI_MBEWX
          WAREHOUSENUMBERDATA        =
          WAREHOUSENUMBERDATAX       =
          SALESDATA                  = BAPI_MVKE1
          SALESDATAX                 = BAPI_MVKEX
          STORAGETYPEDATA            =
          STORAGETYPEDATAX           =
          IMPORTING
            RETURN                     = BAPI_RETURN
          TABLES
            MATERIALDESCRIPTION        = INT_MAKT
          UNITSOFMEASURE             =
          UNITSOFMEASUREX            =
          INTERNATIONALARTNOS        =
          MATERIALLONGTEXT           =
          TAXCLASSIFICATIONS         =
          RETURNMESSAGES             =
          PRTDATA                    =
          PRTDATAX                   =
          EXTENSIONIN                =
          EXTENSIONINX               =
    IF BAPI_RETURN-TYPE = 'E'.
       WRITE:/ 'Error Message ', BAPI_RETURN.
    ENDIF.
    ENDLOOP.
    ENDFORM.
    *---End of Program
    if u find it useful mark the points
    Regards,
    Naveen

  • BAPI to create a delivery and do post goods

    I'm trying to write a function module that will take a sales document number and then create an outbound delivery and do a post goods issue on it.  I've seen a lot of people recommend various BAPIs but what are the differences?  Can anyone point me in the right direction?
    Thanks,
    Curtis

    Read Documentation of BAPI "BAPI_GOODSMVT_CREATE"
    Regards
    Vinod

  • 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

  • BAPI to create inbound delivery of an SO

    Hi,
    I need to create an inboud delivery through the outbound delivery for SO. I would to know the best available BAPI to acheive this. Also, please specify the mandatory paramters that needs to be passed as input for the given BAPI.
    Thanks,
    Kalahasti

    Hi!
    I can't seem to find a working example using this function modules. I want to create an inbound delivery without reference to a PO.
    Thanks!
    abapGenin

  • Bapi to create delivery for purchase orders

    Hi Expets,
    what is the bapi to create a delivery for purchase orders.urgent.please do the needful
    kiran j

    Hi,
       Check below link.
    Re: BAPI for Inbound delivery
    Re: BAPI_OUTB_DELIVERY_CREATE_STO

  • How to create outbound delivery except bapi BAPI_DELIVERYPROCESSING_EXEC

    Hi,
    I have a problem with bapi BAPI_DELIVERYPROCESSING_EXEC.
    I use this bapi to create outbound delivery from delivery due list. But there is no shipping point as a parameter in this function module. So if there is two shipping point in a sales order, only one delivery is created for only one shipping point. How can I solve this problem.
    Or Can I create outbound delivery from a sales order with using bapi ?
    Thanks.

    I think(It's strictly my opinion), if a suitable serial number profile is maintained in plant/material then this assignment should happen automatically!!
    **You gotta refer to a functional consultant. I am not very sure..

  • BAPI to create Delivery from Sales Order posting EIKP data

    Hi All,
    I'm searching for BAPIs to create a Delivery from Sales Order which I can update/insert data into EIKP table because I am receiving data that it must be saved into ZOLLA and ZOLLB fields (Customs Office: Office of Exit/Entry and Destination for Foreign Trade).
    I tried with BAPI_OUTB_DELIVERY_SAVEREPLICA, BAPI_OUTB_DELIVERY_CREATE_SLS and BAPI_DELIVERYPROCESSING_EXEC but I didn't find structures with these fields.
    Please, I need some help to resolve this issue.
    Thanks in advance.

    Hello Manoj what you have to do to create PO from PR is that
    1) Use   BAPISDORDER_GETDETAILEDLIST (pass sales order number in sales_document table) and then get PR (Purchase requisition number from this BAPI.
    2) Use  BAPI_REQUISITION_GETDETAIL to get PR items
    3) Use BAPI_PO_CREATE1 to craete PO from PR then.
    to create goods movement you can use
    BAPI_GOODSMVT_CREATE
    REWARDS IF USEFUL.

  • Need IDOC type to create outbound Delivery in SAP

    Hello,
    I am looking for the IDOC basic type, message type and process code which will be able to create an outbound Delivery in SAP.   
    Scenario:
    Inbound data needs to be integrated into SAP to create an outbound delivery with reference to a Sales Order.
    Thanks
    Satie

    Satie,
    To confirm, you want the Delivery create triggered as a result of a file received from your Customer ? Is it purely a trigger, or will there be other information included in the file that might be included on the SAP Delivery ? If it's purely a trigger, I think I'd probably look into blocking the Sales Order in some fashion (e.g. Header Delivery Block), and using the trigger to release the Sales Order, i.e. ORDCHG. You could probably write additional data, such as Delivery Instructions, at the same time. If however, you need the inbound file to directly create the Delivery, I suspect you will need to create a custom iDoc / Function Module to call a BAPI to create the Delivery with reference to the Sales Order.
    Cheers, Paul.

Maybe you are looking for