Function module for create outbound delivery

Hi,
      Can any one pls tell me the BAPI function module name for create outbound delivery with order reference.
Regards,
Mahi

Hi
This is the BAPI for creating Delivery with Sales Order Reference.
You can use the BAPI <b>BAPI_DELIVERYPROCESSING_EXEC</b>
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.
REWARD IF HELPFUL.

Similar Messages

  • BAPI or function module for creating outbound delivery agains STO

    Hi,
    Is there any function module or BAPI to create an outboud delivery against STO?  Appreciated if anybody tells what are all the mandatory fields to pass.
    Thanks and Regards,
    Suresh

    Hi,
    Pls check the BAPIs,
    BAPI_OUTB_DELIVERY_CONFIRM_DEC BAPI for Outbound Delivery Confirmation from a Decentralized System
    BAPI_OUTB_DELIVERY_SPLIT_DEC   BAPI for Subsequent Outbound-Delivery Split from a Decentralized Syste
    Regards,
    Renjith Michael.

  • Function Module for Creating Outbound Delivery

    Hi All,
    Please provide me the FM Name which will create the outbound delivery same as VL01N transaction and I needs to update Serial Numbers also. Please help me to find the FM which will create outbound delivery and behave same as VL01N transaction.
    Thanks in advance.

    hi
    check FM 1:
        CLEAR: ls_request.
        ls_request-document_type      = 'A'.
        ls_request-document_numb      = tvbap-vbeln.
        ls_request-document_item      = tvbap-posnr.
        ls_request-quantity_sales_uom = tvbap-KWMENG.
        ls_request-PLANT              = tvbap-werks.
        ls_request-STGE_LOC           = tvbap-lgort.
        ls_request-MATERIAL           = tvbap-matnr.
        ls_request-batch              = tvbap-charg.
        ls_request-date_usage         = p_datvw.
        ls_request-date               = p_date.
        ls_request-time               = p_time.
        APPEND ls_request TO lt_request.
      CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
    * EXPORTING
    *   DELIVERY_EXTEND         =
    *   TECHN_CONTROL           =
      TABLES
        REQUEST                 = lt_request
    *   PARTNER                 =
    *   PARTNER_ADDR            =
    *   TEXT_HEADER             =
    *   TEXT_LINES              =
        CREATEDITEMS            = CREATEDITEMS
        RETURN                  = RETURN
    *   EXTENSION1              =
    *   EXTENSION2              =
    *   CO_CHAR_VALUES          =
    *   BATCH_ATTRIBUTES        =
    *   BATCH_VALUES_CHAR       =
    *   BATCH_VALUES_CURR       =
    *   BATCH_VALUES_NUM        =
    *   TOKENREFERENCE          =
    or FM2:
      CALL FUNCTION 'W_FRM_DELIVERY_CREATE_GENERAL'
        EXPORTING
          I_INTERNAL_COMMIT   = 'X'
          I_NO_LOCK_DOCS      = 'X'
          I_INIT_UNIT_CONV    = 'X'
        TABLES
          T_DOCUMENTS         = ITAB_DOCUMENTS
          T_MESSAGELOG        = ITAB_MESSAGELOG
          T_VBLS              = T_VBLS
        EXCEPTIONS
          NOTHING_TO_DO           = 1
          MESSAGE_ACCORDING_LOGS  = 2
          OTHERS                  = 3.
    regards,darek

  • 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

  • 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

  • Function Module to create Outbound IDoc

    I have created a segment (ZSEGPRO), basic type (ZIDOCPRO) and message type (ZMSGPRO) to create a custom IDoc. Now I have to write a Function Module to create Outbound IDoc.
    I want to know what will be in Import, Export, Changing, Tables, Exceptions and Source code of that function module. The fields used in the segment ZSEGPRO is given below:
    Fld NameSource Data Elmn     Description
    PRODUCT MARA MATNR     Material number
    TEXT     MAKT     MAKTX     Material description
    PRN     MARA     YYBCEZNDR     Print Field
    Additional information: Export parameter will be BAPIRETURN for holding error message(if any).
    These Function Module need not require to be RFC enabled.

    Hi ,
    Refer these:
    There are two main reasons
    1) Make sure you call COMMIT WORK after the MASTER_IDOC_DISTRIBUTE
    http://help.sap.com/saphelp_nw04/helpdata/en/78/21783151ce11d189570000e829fbbd/content.htm
    2) The rest of the setting of the ALE IDoc might not have been done
    http://help.sap.com/saphelp_46c/helpdata/en/78/2177c951ce11d189570000e829fbbd/frameset.htm
    You can use the Area Menu WEDI and do the rest of the settings.
    ALE Quick Start guide and ALE Programming Guides for your reference
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    Recent discussion which could be helpful,
    About WE21, BD64, sm59
    Regards
    Shiva Kumar

  • 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

  • Function Module for creating Functional Location BOM and Equipment BOM

    Hi All,
    Is there any function module for creating and changing Functional Location BOM and Equipment BOM ???

    Hi,
    Tables for Eq., BOM: EQST, STKO, STPO.
    Tables fro Fun., Loc., BOM: TPST, STKO, STPO.
    You can use FMs: CS_BOM_EXPL_TPL_V1, CS_BOM_EXPL_EQU_V2 & CS_BOM_EXPL_MAT_V2 for extracting the appropriate BOM related data.
    And for the Alternatives please check the customizing or check with your respective Module experts for the appropriate configuration.
    Hope this helps.
    Best Regards, Murugesh AS

  • Function Module for Posting the Delivery Doument

    Dear Experts,
            Could you please send me the Function Module for Posting the Delivery Doument.
    Thanks & Regards,
    Ashok.

    Hi,
    What do you mean by POSTING the delivery document?
    Are you mentioning the creation of Goods Issue?

  • Are there BAPI or function modules for creating posting address ?

    Are there BAPI or function modules for creating posting address and budget address? We are currently use BDC program and T code FMBSPO_MULT (Posting address) and T code FMBSBO_MULT(budget address), but it is a very slow processing because we have thousands of funds centers.
    Your input will be appreciated!
    Regards,
    Fisher Li

    Li,
    You will have, may be more answers in the technical forum :
    https://www.sdn.sap.com/irj/sdn/collaboration
    Regards
    Valérie

  • L_TO_CREATE_DN function module for creating TO for a delivery

    Hi,
    I am using L_TO_CREATE_DN function module to create a TO for a delivery and it is working fine as long as the HU, I am picking has quantity less than the delivery quantity or equal to delivery qty. But whenever I try to pick a HU whose qty is little more than the delivery quantity, its throwing an error. Also, there is tolerance set on the delivery line item (and the qty I want to pick is within the tolerances). When I am trying to do it manually using LT03, it throws a popup about conversion error and is creating the TO taking the rouding into account. Here is the example of the above scenario.
    Delivery Qty = 1300 LB (pounds, base unit of measure)
    Alternate Unit of measure for this material is Roll (RL)
    I am trying to pick a HU which is 1350 LB.
    Manual Case : When I use LT03 it throws a popup (saying conversion error) and accepts only
    0.963 RL which is equal to 1300 LB and creates a TO. when I see the delivery after creating the TO, the picked qty is 1300LB.
    Function Module : When I use the function module, it does throw me the same popup but does not create the TO. Rather it throws an error "Available quantity in bin is zero".

    hi , it will create only 1 TO with multiple line items
      CALL FUNCTION 'l_to_create_multiple'
        EXPORTING
          i_lgnum                      = ls_9001_scrn-lgnum
          i_bwlvs                      = lc_bwartwa
          i_bname                      = sy-uname
        IMPORTING
          e_tanum                      = ltak-tanum
        TABLES
          t_ltap_creat                 = li_ltap_creat
    ls_9001_scrn-lgnum = warehouse number
    lc_bwartwa = movement type
    li_ltap_creat = itab containing the line items with diff material
    Just check if it helps
    Thanks

  • Function module for the Inbound Delivery

    Dear ABAPers,
            I have created the Inbound Delivery in VL01N Transaction.I want to create the Post goods issue for the Delivery number.What is the Function module for the Post goods issue for the Delivery number and what all the Parameter needs to be passed.
    Thanks & Regards,
    Ashok.

    Hi,
    Try this code...
    PARAMETERS: p_vbeln LIKE likp-vbeln OBLIGATORY.
    DATA:    l_vbkok_wa   TYPE vbkok,
             l_i_prott    TYPE STANDARD TABLE OF prott,
             l_pgi_status TYPE xfeld,
             c_check      TYPE c VALUE 'X'.
    l_vbkok_wa-vbeln_vl =  p_vbeln.
    l_vbkok_wa-vbtyp_vl = 'T'.
    l_vbkok_wa-wabuc    = c_check.
    Do PGI
    CALL FUNCTION 'WS_DELIVERY_UPDATE'
      EXPORTING
        vbkok_wa                  = l_vbkok_wa
        commit                    = c_check
        delivery                  = l_vbkok_wa-vbeln_vl
      IMPORTING
        ef_error_in_goods_issue_0 = l_pgi_status
      TABLES
        prot                      = l_i_prott.
    IF l_pgi_status IS NOT INITIAL.
    WRITE:/ 'PGI Failure : ', p_vbeln.
    ELSE.
    WRITE:/ 'PGI Success : ', p_vbeln.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = c_check.
    ENDIF.
    Regards
    Meenakshi

  • Function Module for creating condition record (XKOMV table record)

    Hi,
    I have a requirement as like below,
    In the repair order i need to sum the GRWR condition type's  conditional values for all the line items (Except deliverable line item) and then i need to create an condition type GRWR under the deliverable line item with the above calculated conditional values,
    the table XKOMV will be having details about all the line item's condition types, in this table i need to add one more new record with the condition type of GRWR and the above calculated conditional values under the deliverable line item.
    for the above logic i am using the user exit
    USEREXIT_SAVE_DOCUMENT_PREPARE
    All the above things need to be done when the user click the save button in the transaction (VA01/VA02).
    Problem here is table XKOMV contains somany fields so manually we can't create xkomv record, is there any Function module to create condition type record?
    Regards,
    Manikumar
    Edited by: Manikumar Shanmugam on Mar 8, 2008 3:53 PM

    Hi,
       You can use Function module PRICING_CHECK to check condition record. Do a where-used list on it to see how to call it.
    Regards
    Kiran Sure

  • BAPI/ Function Modules for creating Settlement rules for Project in CJ01 .

    Hi Experts ,
    I need to create Settlement rules for WBS elements in Projects . Please let me know if there are any BAPI or Function Modules for the same . The Function Modules "k_settlement_rules_update" , "IBAPI_ALM_ORDERSRULE_CREATE" & 'K_SRULE_CREATE'
    are in "Not Released" status . so our practices does not allow us to use them .. please suggest any other BAPI or FM for creating Settlement rules .
    Thanks in advance ...
    Anil

    Hi ,
    Thanx for ur prompt reply , This function module is used for creating WBS elements . I didnot find any parameters or process to create settlement rule .. Please let me know how to use this or if there are any other BAPI available .
    Thanks
    Anil

  • Function Module for creating order in CRM

    Hi ,
    I want to create order in crm. i have tried the function module given in SDN but all are for R/3. I have tried BAPI_SALESORDER_CREATEFROMDAT and  CRM_SERVICE_ORDER_CREATE  , L_TO_CREATE_MOVE_SU but all are for R/3. So please tell me function module which create order in CRM.
    Thanks
    Abhiiesh

    Sales Order      
    BAPI_BUSPROCESSND_CREATEMULTI->BAPI_BUSPROCESSND_SAVE and BAPI_TRANSACTION_COMMIT must be used.
    CRM_ORDER_MAINTAIN-> CRM_ORDER_SAVE and COMMIT WORK must be used.
    check this report program in se38
    CRM_TEST_ORDER_MAINTAIN
    Regards,
    Keshav

Maybe you are looking for

  • Itunes match deletes random songs from my iphone, even if i re download them from the cloud, the next day another 3 or 4 are deleted by itself, anyone know a fix?

    anybody know how i can fix this, i already tried to turn off itunes match off and on again on the iphone but it does not seem to work, also artwork once downloaded into the iphone it does not stay there, the next day its just a blank artwork and afte

  • Scanner Delimiter

    Im trying to read in a csv file, currently my delimiter is scan.useDelimiter(","); my problem is how do i get it to not include the start of the next line as part of the last token???

  • How do i get my ringtones on my new iphone

    i recently purchesed a iphone 4s and downloaded ringtones and music and had to get a new iphone 4s today and my music and contacts transferred but my ringtones did not how do i get my ringtones back

  • Column sorting problem

    The fields which represent prices are not sorted logically at all, whether I set the column type to "number" or not. If the price list contains values {90, 60.5, 42.5, 400}, sorted ascending gives {90, 60.5, 42.5, 400} and descending {400, 42.5, 60.5

  • Flexigrid in jdeveloper

    dear forum, i am user of jclient/swing in jdeveloper. i have to show data from table to grid. for this i findout the grid component in jdeveloper but i am unable to connect this grid to database table and i am also unable to show the data into grid f