Regarding the bapi BAPI_OUTB_DELIVERY_CHANGE

Hi all,
Iam using the bapi 'BAPI_OUTB_DELIVERY_CHANGE' to change the deliveries..However i need to update three header fields which are not avaialble in the bapi.so i have added those three fields to the extension structure ..Now i have to update them to the database table....I found one badi 'SMOD_V50B0001' but this is not triggered which we use the FM..so unable to upload the data..can anyone suggest how to update the above three header fields.
Regards,
raj

Hi,
  Try to use the FM 'WS_DELIVERY_UPDATE'.
Rgds,
Bujji

Similar Messages

  • Add the new item through the Bapi 'bapi_outb_delivery_change'

    I want to add the new item to the existing outbound delivery.How to add the new item in the bapi 'bapi_outb_delivery_change'. Please provide me the code for the bapi 'BAPI_OUTB_DELIVERY_CHANGE' to add the new item.

    Hi Kyndal,
    I have a requirment to add new items in a delivery which will refer to the higher items in the  same delivery itself.
    I am trying to use the BAPI BAPI_OUTB_DELIVERY_CHANGE for the purpose.
    Could u pls give some clue on how to tried to do it?
    I am constantly getting a error VL216.
    Also I tried passing the reference document and item : same delivery number and the higher level item in the delivery
    VBTYP_N = J

  • Regarding the BAPI calls without input

    Hi all,
    We are developing on webdynpro component. I came across a scenario where we call the BAPI through Adaptive BAPI model. This bapi doesnt take any input parameters but returns 7 tables with data.
    So, My problem here is i am not getting output in the 7 tables. i am sending a dummy input and executing on the input elements modelobject.
    Could anyone ddid this scenario.. ie., calling/executing teh BAPI call which doesnt have any input s but expects output.
    Here is what i have
    <i><b>Z_Sales_Order_Header_Input bapiSalesOrderHeader=new Z_Sales_Order_Header_Input();
    wdContext.nodeZ_Sales_Order_Header_Input().bind(bapiSalesOrderHeader);                    
    wdContext.currentZ_Sales_Order_Header_InputElement().modelObject().execute();
    int ilSalesOrderTypeSize=0;
    ilSalesOrderTypeSize=wdContext.nodeZ_Sales_Order_Header_Output().nodeSalesordertype().size();</b></i>
    Thanks & Regards,
    Raghavendra Pothula

    Hi Raghavendra,
    If I read you correctly, you are printing the size of the root output node (Z_Sales_Order_Header_Output) and not that of the output node inside your 'Z_Sales_Order_Header_Input' node. When you execute the RFC, the output node inside the 'Z_Sales_Order_Header_Input' node gets populated. so try printing the size of the  'Salesordertype' node  inside the 'Z_Sales_Order_Header_Input' node.
    -Z_Sales_Order_Header_Input
    ---output (this is the default name)
       ---Salesordertype
    Infact there is no need to create the 'Z_Sales_Order_Header_Output' node itself in the controller or view.
    Hope this helps,
    Best Regards,
    Nibu.

  • Help in bapi bapi_outb_delivery_change

    Hi
    i want to use extension in the bapi bapi_outb_delivery_change
    but i don't unserdatns how to do it.
    Maybe you can send me an example how to do it!!!!
    Thanks
    Have a nice day

    Hi,
    BAPI_OUTB_DELIVERY_CHANGE
    Regards
    Sudheer

  • DELETE Delivery with BAPI BAPI_OUTB_DELIVERY_CHANGE

    Hi all
    i try delete delivery with the bapi BAPI_OUTB_DELIVERY_CHANGE, but isn't don't.
    i don't know why, what's wrong
      loop at gt_likp assigning <gs_likp>.
        gf_delivery = <gs_likp>-vbeln.
        gs_header_data-deliv_numb = <gs_likp>-vbeln.
        gs_header_control-deliv_numb = <gs_likp>-vbeln.
        gs_header_control-dlv_del = 'X'.
        call function 'BAPI_OUTB_DELIVERY_CHANGE'
          exporting
            header_data                   = gs_header_data
            header_control                = gs_header_control
            delivery                      = gf_delivery
    *       TECHN_CONTROL                 =
    *       HEADER_DATA_SPL               =
    *       HEADER_CONTROL_SPL            =
    *       SENDER_SYSTEM                 =
          tables
    *       HEADER_PARTNER                =
    *       HEADER_PARTNER_ADDR           =
    *       HEADER_DEADLINES              =
    *       ITEM_DATA                     =
    *       ITEM_CONTROL                  =
    *       ITEM_SERIAL_NO                =
    *       SUPPLIER_CONS_DATA            =
    *       EXTENSION1                    =
    *       EXTENSION2                    =
            return                        = gt_bapiret2
    *       TOKENREFERENCE                =
    *       ITEM_DATA_SPL                 =
    *       COLLECTIVE_CHANGE_ITEMS       =
    thx

    Hi,
    1) Use BAPI_TRANSACTION_COMMIT after Bapi.
    2) Check whether any subsequent documents has been created against the delivery (Refer to VBFA table).
    Regards
    Vinod

  • Problem regarding the creation of sales order using bapi.

    Hai all,
    I am creating sales order using bapi but i am, get following error messages :
    TYPE ID  NUMBER MESSAGE
    E       VP   112       Please enter sold-to party or ship-to party
    E       V4   219       Sales document  was not changed
    I have entered all the parameters.
    my program is as follows :
    *& Report  ZSD_SALES_ORDER
    REPORT  ZSD_SALES_ORDER.
        Tables
    *table definitions
    TABLES:vbak,      "Sales Document: Header Data
            knvv,     "Customer Master Sales Data
            mara,     "General Material Data
            t001l,    "Plants/Branches
            mvke,     "Sales Data for Material
            vbap,     "Sales Document: Item Data
            konv.     "Conditions (Transaction Data)
        Types
    *type for upload data
    TYPES :BEGIN OF ty_upload,
           matnr(20) TYPE c,                  " Old material number
           quantity(20) TYPE c,               " Cumulative order quantity in sales units
    VALUE TYPE       BAPIKWERT1,
          value(20) TYPE c,                  " Condition value
                 value TYPE konv-kwert,                  " Condition value
    END OF ty_upload.
    *type for final output table
    TYPES :BEGIN OF ty_main,
               bismt  TYPE mara-bismt,    "Old material number
               matnr  TYPE vbap-matnr,    "Material Number
               kunnr  TYPE vbak-kunnr,    "customer number
               auart  TYPE vbak-auart,    "Sales Document Type
               vkorg  TYPE vbak-vkorg,    "Sales Organization
               vtweg  TYPE vbak-vtweg,    "Distribution Channel
               spart  TYPE vbak-spart,    "Division
               vbeln  TYPE vbak-vbeln,    "Sales document
               werks  TYPE marc-werks,    " Plant
               lgort  TYPE mard-lgort,    "Storage Location
               posnr  TYPE vbap-posnr,    "Sales Document Item
               parvw  TYPE vbpa-parvw,    "Partner function
               kwmeng TYPE vbap-kwmeng,   "Cumulative order quantity in sales units
               kschl  TYPE konv-kschl,    "Condition type
              kwert  TYPE konv-kwert,    "Condition value
    KWERT TYPE       BAPIKWERT1,
              kwert(20)  TYPE c,    "Condition value
               waers  TYPE konv-waers,    "Currency
         END OF ty_main.
    *type for old material number
    TYPES: BEGIN OF ty_matnr,
           matnr TYPE mara-matnr,
           bismt TYPE mara-bismt,
           END OF ty_matnr.
    *type for order number
    TYPES :BEGIN OF ty_output,
           vbeln  TYPE vbak-vbeln,       "Sales Document
         END OF ty_output.
        Constants                Begin with C_                           *
    CONSTANTS:
    c_zpmu(4) TYPE c VALUE 'ZPMU',
    c_zpmm(4) TYPE c VALUE 'ZPMM'.
    DATA: c_ch(1) TYPE c VALUE 'X'.
        Data                     Begin with W_                           *
    *global data for validations
    DATA: w_count TYPE i,
          w_vkorg TYPE vbak-vkorg,
          w_vtweg TYPE vbak-vtweg,
          w_spart TYPE vbak-spart,
          w_werks TYPE t001l-werks,
          w_check TYPE c,
          w_itemno TYPE posnr_va,
         W_COND TYPE C.
          w_cond(3) TYPE c.
        Internal tables          Begin with IT_                          *
    *internal table definitions
    DATA : it_upload TYPE STANDARD TABLE OF ty_upload ,
           wa_upload TYPE ty_upload.
    DATA : it_main TYPE STANDARD TABLE OF ty_main,
           wa_main TYPE ty_main.
    DATA: it_matnr TYPE STANDARD TABLE OF ty_matnr,
          wa_matnr TYPE ty_matnr.
    DATA : it_output TYPE STANDARD TABLE OF ty_output.
    Internal table for BAPI.
    DATA: it_bapisdhd1  TYPE STANDARD TABLE OF bapisdhd1,        "Sales and Distribution Document Header
          wa_bapisdhd1 TYPE bapisdhd1.
    DATA: it_bapisditm  TYPE STANDARD TABLE OF bapisditm ,       "Sales and Distribution Document Item
          wa_bapisditm TYPE bapisditm.
    DATA: it_bapiparnr  TYPE STANDARD TABLE OF bapiparnr,        "SD Document Partner: WWW
          wa_bapiparnr TYPE bapiparnr.
    DATA: it_bapischdl  TYPE STANDARD TABLE OF bapischdl,       "Schedule Lines
          wa_bapischdl TYPE bapischdl.
    DATA: it_bapicond TYPE STANDARD TABLE OF bapicond,       "Communication Fields for Maintaining Conditions in the Order
          wa_bapicond TYPE bapicond.
    DATA: it_bapiret2 TYPE STANDARD TABLE OF bapiret2,        "Return Parameter
          wa_bapiret2 TYPE bapiret2.
          Parameters              Begin with PR_                        *
    *selection screen definition
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME .
    PARAMETERS: pr_vkorg TYPE vbak-vkorg OBLIGATORY,
                pr_vtweg TYPE vbak-vtweg  OBLIGATORY,
                pr_spart TYPE vbak-spart  OBLIGATORY,
                pr_kunnr TYPE kna1-kunnr  OBLIGATORY,
                pr_werks TYPE marc-werks  OBLIGATORY,
                pr_lgort TYPE mard-lgort  OBLIGATORY.
    PARAMETERS: pr_auart TYPE vbak-auart OBLIGATORY,
               PR_AUGRU TYPE VBAK-AUGRU OBLIGATORY.
                            pr_augru TYPE vbak-augru.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME.
    PARAMETERS : pr_file TYPE ibipparms-path OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk2.
          At selection-screen                                           *
    AT SELECTION-SCREEN.
      PERFORM f006_validate_vkorg.
      PERFORM f007_validate_vtweg.
      PERFORM f008_validate_spart.
      PERFORM f009_validate_kunnr.
      PERFORM f010_validate_werks.
      PERFORM f011_validate_lgort.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_file.
    *for f4 help----
      PERFORM f003_f4_help.
          S T A R T   O F   S E L E C T I O N                           *
    START-OF-SELECTION.
    *for material ,quantity and value upload
      PERFORM f001_upload_file.
    *get data
      PERFORM  f003_get_data.
    *for check the data
      PERFORM f002_check_data .
      PERFORM f004_process.
    *for posting
      PERFORM f005_posting.
    END-OF-SELECTION.
          E N D       O F   S E L E C T I O N                           *
    *&      Form  f001_upload_file
          upload file
    FORM f001_upload_file .
      DATA : lw_fname TYPE string.
      CLEAR lw_fname.
      lw_fname = pr_file.
      REFRESH it_upload.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = lw_fname
          filetype                = 'ASC'
          has_field_separator     = c_ch
        TABLES
          data_tab                = it_upload
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT it_upload INTO wa_upload.
       wa_upload-value = ( wa_upload-value ) / 10.
       MODIFY it_upload FROM wa_upload.
      ENDLOOP.
    ENDFORM.                    "F001_UPLOAD_FILE
    *&      Form  f003_f4_help
          f4 help
    FORM f003_f4_help .
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = ' '
        IMPORTING
          file_name     = pr_file.
    ENDFORM.                    " f003_f4_help
    *&      Form  check_data
          text
    FORM f002_check_data .
      DATA: lw_lines TYPE i.
      DESCRIBE TABLE it_main LINES lw_lines.
      IF lw_lines LE 0.
        RETURN.
      ENDIF.
      SELECT a~matnr
             a~bismt FROM mara AS a INNER JOIN mvke AS b
                   ON amatnr = bmatnr
                   INTO CORRESPONDING FIELDS OF TABLE it_matnr
                   FOR ALL ENTRIES IN it_main
                   WHERE a~bismt = it_main-bismt.
      IF sy-subrc = 0.
        LOOP AT it_main INTO wa_main.
          CLEAR : wa_matnr.
          READ TABLE it_matnr INTO wa_matnr WITH KEY bismt = wa_main-bismt.
          IF sy-subrc = 0.
            MOVE: wa_matnr-matnr TO wa_main-matnr.
          ENDIF.
          MODIFY it_main FROM wa_main TRANSPORTING matnr WHERE bismt = wa_main-bismt.
        ENDLOOP.
      ELSE.
       MESSAGE e000(zmsd) WITH  text-001.
      ENDIF.
    ENDFORM.                    "CHECK_DATA
    *&      Form  F009_validate_vkorg
          text
    FORM f006_validate_vkorg .
      CLEAR w_vkorg.
      SELECT SINGLE vkorg
          INTO w_vkorg FROM tvko
          WHERE vkorg EQ pr_vkorg.
      IF sy-subrc <> 0.
        MESSAGE e000(zmsd) WITH text-012 pr_vkorg.
      ENDIF.
    ENDFORM.                    " F009_validate_vkorg
    *&      Form  f007_validate_vtweg
          text
    FORM f007_validate_vtweg .
      CLEAR:w_vtweg.
      SELECT SINGLE vtweg
           INTO w_vtweg FROM tvtw
           WHERE vtweg EQ pr_vtweg.
      IF sy-subrc <> 0.
        MESSAGE e089(zmsd).
      ENDIF.
    ENDFORM.                    " f007_validate_vtweg
    *&      Form  f008_validate_spart
          text
    FORM f008_validate_spart .
      CLEAR:w_spart.
      SELECT SINGLE spart
            INTO w_spart FROM tspa
            WHERE spart EQ pr_spart.
      IF sy-subrc <> 0.
        MESSAGE e087(zmsd).
      ENDIF.
    ENDFORM.                    " f008_validate_spart
    *&      Form  F010_validate_kunnr
          text
    FORM f009_validate_kunnr .
      DATA: l_kunnr TYPE kunnr.
      CLEAR: w_vkorg, w_vtweg,w_spart.
      SELECT  SINGLE  kunnr FROM  knvv
             INTO l_kunnr
             WHERE  kunnr  = pr_kunnr
             AND    vkorg  = pr_vkorg
             AND    vtweg  = pr_vtweg
             AND    spart  = pr_spart.
      IF sy-subrc <> 0.
       MESSAGE e000(zmsd) WITH text-010 pr_kunnr text-011 pr_vkorg  .
      ENDIF.
    ENDFORM.                    " F010_validate_kunnr
    *&      Form  f010_validate_werks
          text
    FORM f010_validate_werks .
      CLEAR:w_werks.
      SELECT SINGLE werks
            INTO w_werks FROM t001w
            WHERE werks EQ pr_werks.
      IF sy-subrc <> 0.
        MESSAGE e088(zmsd).
      ENDIF.
    ENDFORM.                    " f010_validate_werks
    *&      Form  F011_validate_lgort
          text
    FORM f011_validate_lgort .
      CLEAR:w_werks .
      SELECT   SINGLE werks  FROM  t001l
             INTO w_werks
             WHERE  werks  = pr_werks
             AND    lgort  = pr_lgort.
      IF sy-subrc <> 0.
        MESSAGE e000(zmsd) WITH text-007 pr_lgort text-008 pr_werks .
      ENDIF.
    ENDFORM.                    " F011_validate_lgort
    *&      Form  f003_get_data
          text
    FORM f003_get_data .
      CLEAR wa_main.
      REFRESH it_main.
      LOOP AT it_upload INTO wa_upload.
        CLEAR : wa_main.
        MOVE: wa_upload-matnr     TO  wa_main-bismt,
              wa_upload-quantity  TO  wa_main-kwmeng,
              wa_upload-value     TO  wa_main-kwert,
              pr_vkorg            TO  wa_main-vkorg,
              pr_vtweg            TO  wa_main-vtweg,
              pr_spart            TO  wa_main-spart,
              pr_kunnr            TO  wa_main-kunnr,
              pr_werks            TO  wa_main-werks,
              pr_lgort            TO  wa_main-lgort.
        APPEND wa_main TO it_main.
      ENDLOOP.
    ENDFORM.                    " f003_get_data
    *&      Form  f004_process
          text
    FORM f004_process .
    CLEAR w_check.
    LOOP AT it_main INTO wa_main.
       IF wa_main-matnr = ''.
         WRITE:/ text-006,
                     wa_main-bismt.
         w_check = 1.
       ENDIF.
       IF wa_main-kwmeng = 0.
         WRITE:/ text-005,
                 wa_main-bismt.
         w_check = 1.
       ENDIF.
       IF    pr_auart <> 'ZM01'.
         IF wa_main-kwert IS INITIAL.
           WRITE:/ text-004,
                    wa_main-bismt.
           w_check = 1.
         ENDIF.
       ENDIF.
    ENDLOOP.
    ENDFORM.                    " f004_process
    *&      Form  f005_posting
          text
    FORM f005_posting .
      CLEAR: w_itemno,
             w_cond.
      w_itemno = 10.
      w_cond = 1.
    IF w_check = '' OR w_check = 1.
      wa_bapisdhd1-doc_type = pr_auart.
      wa_bapisdhd1-ord_reason = pr_augru.
      LOOP AT it_main INTO wa_main.
        IF w_cond = 1.
          CLEAR: it_bapiret2,
                 it_bapisditm,
                 it_bapiparnr,
                 it_bapischdl,
                 it_bapicond.
          REFRESH:it_bapiret2,
                  it_bapisditm,
                  it_bapiparnr,
                  it_bapischdl,
                  it_bapicond.
          MOVE: wa_main-vkorg TO wa_bapisdhd1-sales_org,
                wa_main-vtweg TO wa_bapisdhd1-distr_chan,
                wa_main-spart TO wa_bapisdhd1-division.
          wa_bapisdhd1-wbs_eleM = 'Y561.1'.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
            EXPORTING
              INPUT         = pr_kunnr
           IMPORTING
             OUTPUT        = pr_kunnr.
          wa_bapisdhd1-PURCH_NO_S = pr_kunnr.
          wa_bapisdhd1-PURCH_NO_C = pr_kunnr.
        ENDIF.
        MOVE: w_itemno TO wa_bapisditm-itm_number,
               wa_main-matnr TO wa_bapisditm-material,
              wa_main-BISMT TO wa_bapisditm-material,
              wa_main-werks TO wa_bapisditm-plant,
              wa_main-lgort TO wa_bapisditm-store_loc.
                           wa_bapisditm-target_qty = '10'.
        wa_bapisditm-PURCH_NO_S = pr_kunnr.
        wa_bapisditm-PURCH_NO_C = pr_kunnr.
        APPEND wa_bapisditm TO it_bapisditm.
        IF w_cond = 1.
          wa_bapiparnr-partn_numb = pr_kunnr.
          wa_bapiparnr-itm_number = 10.
            wa_bapiparnr-partn_role = 'SP'.
          APPEND wa_bapiparnr TO it_bapiparnr.
          wa_bapiparnr-partn_role = 'AG'.
          APPEND wa_bapiparnr TO it_bapiparnr.
          CLEAR wa_bapiparnr-partn_role.
                   wa_bapiparnr-partn_numb = pr_kunnr.
          wa_bapiparnr-partn_role = 'RE'.
          APPEND wa_bapiparnr TO it_bapiparnr.
          CLEAR wa_bapiparnr-partn_role.
                   wa_bapiparnr-partn_numb = pr_kunnr.
          wa_bapiparnr-partn_role = 'RG'.
          APPEND wa_bapiparnr TO it_bapiparnr.
          CLEAR wa_bapiparnr-partn_role.
                   wa_bapiparnr-partn_numb = pr_kunnr.
          wa_bapiparnr-partn_role = 'WE'.
          APPEND wa_bapiparnr TO it_bapiparnr.
        ENDIF.
        wa_bapischdl-itm_number = w_itemno.
        wa_bapischdl-req_qty    = wa_main-kwmeng.
         wa_bapischdl-PURCH_NO_S = pr_kunnr.
        APPEND wa_bapischdl TO it_bapischdl.
        wa_bapicond-itm_number = w_itemno.
        wa_bapicond-cond_type  = 'ZECL'.
         IF    ( wa_bapisdhd1-doc_type = 'ZPMU' ) OR ( wa_bapisdhd1-doc_type = 'ZPMM' ).
           wa_bapicond-cond_type  = 'ZVAL'.
         ELSE.
           wa_bapicond-cond_type  = 'ZMRP'.       "+PK12122006
         ENDIF.
        wa_bapicond-cond_value = wa_main-kwert.
        APPEND wa_bapicond TO it_bapicond.
        w_itemno = w_itemno + 10.
        w_cond   = w_cond + 1.
      ENDLOOP.
      data : SALESDOCUMENTIN like BAPIVBELN-VBELN.
      CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
        EXPORTING
          order_header_in     = wa_bapisdhd1
        IMPORTING
          salesdocument       = SALESDOCUMENTIN
        TABLES
          return              = it_bapiret2
          order_items_in      = it_bapisditm
          order_partners      = it_bapiparnr
          order_schedules_in  = it_bapischdl
          order_conditions_in = it_bapicond.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = c_ch.
    ENDIF.
      LOOP AT it_bapiret2 INTO wa_bapiret2.
        DATA : w_err(100) TYPE c,
        w_matnr TYPE matnr.
        IF wa_bapiret2-type = 'E' AND wa_bapiret2-id = 'V1' AND wa_bapiret2-number = 392.
          UNPACK wa_bapiret2-message_v1 TO w_matnr.
          READ TABLE it_matnr INTO wa_matnr WITH KEY matnr = w_matnr.
          IF sy-subrc EQ 0.
            CONCATENATE text-013 wa_matnr-bismt INTO w_err SEPARATED BY space.
            MESSAGE w_err TYPE 'S'.
          ENDIF.
        ENDIF.
        IF WA_BAPIRET2-TYPE = 'S'.  " Comment
          WRITE: 40 TEXT-009, WA_BAPIRET2-MESSAGE_V2+0(10).
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " f005_posting
    I have given all the necessary parameters. it is telling that error is in parameter
    sales_header_in.
    I have checked it.
    i have assigned purch_no_s and purch_no_c of the structure BAPISDHD1(ORDER_HEADER_IN)
    in the bapi with customer number.
    and also i have assigned the partnumber of the structure BAPIPARNR ORDER_PARTNERS
    in the bapi with customer number.
    but still , it is diplaying the error message, please enter the sold to or ship to party number.
    how to resolve this error.
    this is urgent requirement.
    points will be awarded.
    thanking u in advance,
    a.srinivas.

    Hi,
    Did u have a look at the standard programs which make use of BAPI_SALESORDER_CREATEFROMDAT1
    Heres a list...
    LWSSOU08                     
    MV45WF0S                     
    MWWMJF21_BAPI_SALESORDER_CREAT
    RBUS2032                    
    Regards,
    Tanveer.
    <b>Please mark helpful answers</b>

  • Open Purchase Order UPload Using the BAPI 's

    i need to upload the open Purchase Order using the BAPI function BAPI_PO_CREATE1., below is the given fileds blod are for Header, header will Repeat for the line items,can any one help me out  using the BAIP's for upload the PO, i need sample code for this ........
    Thanks & Regards
    Raghu
    <u>Field Name     Field Description                              Type     Length</u>
    <b>EBELN             Purchasing Document Number                         CHAR     010          X
    BUKRS             Company Code                                                     CHAR    004     MN10     C
    EKORG             Purchasing Organization                              CHAR     004     MN00     C
    EKGRP             Purchasing group                              CHAR     003          X
    BSART             Order type (Purchasing)                              CHAR     004          X
    LIFNR             Account Number of Vendor or Creditor                    CHAR     010          X
    BEDAT             Purchase Order Date                              DATS     010          X
    ZTERM             Terms of payment key                              CHAR     004          X
    WAERS             Currency Key                                   CUKY     005          X
    INCO1             Incoterms (part 1)                              CHAR     003          X
    INCO2             Incoterms (part 2)                              CHAR     028          X</b>
    EBELP             Item Number of Purchasing Document                    NUMC     005          X
    EMATN             Material number                                   CHAR     018          X
    WERKS             Plant                                        CHAR     004          X
    LGORT             Storage location                              CHAR     004          X
    EPSTP             Item category in purchasing document                    CHAR     001          X
    KNTTP             Account assignment category                         CHAR     001          X
    EINDT             Item delivery date                              DATS     010          X
    MENGE            "Purchase order quantity (direct input, transfer of POs)"     CHAR     013          X
    MEINS            Order unit                                   UNIT     003          X
    NETPR            "Net price: Document currency (direct input, transfer of"     CHAR     011          X
    PEINH            "Price unit (direct input, transfer of POs)"               CHAR     005          X
    BPRME            Order Price Unit (Purchasing)                         UNIT     003          X
    BPUMZ            Numerator: Conversion OPUn into OUn (direct input of POs          CHAR     005          X
    BPUMN            Denominator: Conversion OPUn into OUn (direct input of P          CHAR     005          X
    SAKTO            Cost element                                   CHAR     010          X
    KOSTL              Cost Center                                   CHAR     010          X
    VBELN          Sales and Distribution Document Number                    CHAR     010          X
    VBELP          Sales document item                              NUMC     006          X
    WEMPF          Goods recipient                                   CHAR     012          X
    WEBTH          "Amount in local currency (direct input, transfer of POs)"     CHAR     013          X
    WEBTF          "Amount in document currency (direct input, transfer of P"     CHAR     013          X
    WEREF          Flag for treatment of GR/IR (direct input of POs)          CHAR     001          X
    SPINF          Indicator: Update info record                         CHAR     001          X
    WEPOS          Goods Receipt Indicator                              CHAR     001          X
    REPOS          Invoice receipt indicator                         CHAR     001          X

    i need to upload the open Purchase Order using the BAPI function BAPI_PO_CREATE1., below is the given fileds blod are for Header, header will Repeat for the line items,can any one help me out  using the BAIP's for upload the PO, i need sample code for this ........
    Thanks & Regards
    Raghu
    <u>Field Name     Field Description                              Type     Length</u>
    <b>EBELN             Purchasing Document Number                         CHAR     010          X
    BUKRS             Company Code                                                     CHAR    004     MN10     C
    EKORG             Purchasing Organization                              CHAR     004     MN00     C
    EKGRP             Purchasing group                              CHAR     003          X
    BSART             Order type (Purchasing)                              CHAR     004          X
    LIFNR             Account Number of Vendor or Creditor                    CHAR     010          X
    BEDAT             Purchase Order Date                              DATS     010          X
    ZTERM             Terms of payment key                              CHAR     004          X
    WAERS             Currency Key                                   CUKY     005          X
    INCO1             Incoterms (part 1)                              CHAR     003          X
    INCO2             Incoterms (part 2)                              CHAR     028          X</b>
    EBELP             Item Number of Purchasing Document                    NUMC     005          X
    EMATN             Material number                                   CHAR     018          X
    WERKS             Plant                                        CHAR     004          X
    LGORT             Storage location                              CHAR     004          X
    EPSTP             Item category in purchasing document                    CHAR     001          X
    KNTTP             Account assignment category                         CHAR     001          X
    EINDT             Item delivery date                              DATS     010          X
    MENGE            "Purchase order quantity (direct input, transfer of POs)"     CHAR     013          X
    MEINS            Order unit                                   UNIT     003          X
    NETPR            "Net price: Document currency (direct input, transfer of"     CHAR     011          X
    PEINH            "Price unit (direct input, transfer of POs)"               CHAR     005          X
    BPRME            Order Price Unit (Purchasing)                         UNIT     003          X
    BPUMZ            Numerator: Conversion OPUn into OUn (direct input of POs          CHAR     005          X
    BPUMN            Denominator: Conversion OPUn into OUn (direct input of P          CHAR     005          X
    SAKTO            Cost element                                   CHAR     010          X
    KOSTL              Cost Center                                   CHAR     010          X
    VBELN          Sales and Distribution Document Number                    CHAR     010          X
    VBELP          Sales document item                              NUMC     006          X
    WEMPF          Goods recipient                                   CHAR     012          X
    WEBTH          "Amount in local currency (direct input, transfer of POs)"     CHAR     013          X
    WEBTF          "Amount in document currency (direct input, transfer of P"     CHAR     013          X
    WEREF          Flag for treatment of GR/IR (direct input of POs)          CHAR     001          X
    SPINF          Indicator: Update info record                         CHAR     001          X
    WEPOS          Goods Receipt Indicator                              CHAR     001          X
    REPOS          Invoice receipt indicator                         CHAR     001          X

  • Need to upload mass excel sheet using the bapi bapi_acc_document_post.

    I am assigned with an object, where I need to post the records from a mass excel sheet in to ECC or/and BW basing the dimensions using the bapi bapi_acc_document_post.the excel sheet has header and Item data. I am pretty much new to this bapi's
    please do the need ful

    Check report "ACC_BAPI_TEST_INVOICE_RECEIPT",
    this report calls BAPI "BAPI_ACC_INVOICE_RECEIPT_POST",
    but the parameters are nearly the same.
    Best Regards, Dirk

  • Create a Purchase order using the BAPI using the data in the XML file.

    Hello Gurus,
    here is the scenario can anyone help me how to proceed explaining the procedure?
    Create a Purchase order using the BAPI using the data in the XML file.
    comprehensive explanations are appreciated.
    thanks in advance.

    hi,
      first use fm "bapi_po_create".
      then use fm "BAPI_ACC_GL_POSTING_POST"
    The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
    •     No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
    •     In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
    •     A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM).

  • HOw to find the BAPI function module

    Hi all,
    I have a field called IEVER in table EIKP.
    How to find the related BAPI function module and BAPI structure for this filed.
    Thanks in advance
    KP

    Hi KP,
       can you tell us the name of the transaction in which you saw this field?
    If it is in PO Creation or Change you can probably look at the bapis
    BAPI_PO_CREATE or BAPI_PO_CHANGE
    Regards,
    Ravi

  • Error while using the Bapi   BAPI_GOODSMVT_CREATE

    Hi all,
    I am using the BAPI     BAPI_GOODSMVT_CREATE to Upload the Data in MB01 and for creating the MATERIAL DOCUMENT  for Multiple Lineitems at a time.
    But i am getting the error as  * NO ITEMS WERE TRANSFERRED*
    I am using two separate intenal tables One for Header records and One for Line item records
    and passing the tables in the BAPI.
    Please Solve my issue and if possible please send me the sample code along with the flatfile or excel sheet.
    Thanks and Regards
    ajay

    Check the below link for a sample code.
    [http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm|http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm]
    Hope this helps.
    Thanks,
    Balaji

  • Reversing a document using the bapi 'BAPI_ACC_DOCUMENT_REV_POST'

    Hi All,
    I have posted a document using the FM 'BAPI_ACC_DOCUMENT_POST' and it is working fine .
    How can I reverse the same posted document using the FM
    'BAPI_ACC_DOCUMENT_REV_POST'?
    What are the mandatory parameters to be filled?
    Can anyone explain me with a example
    Thanks in Advance.

    Hi Siva,
    The bapi you have mentioned is the correct one.
    Look at the BAPI documentation which is pretty informative.
    In case you don't have it, i'm just copy pasting it.
    Functionality
    Reversing an external document in Accounting. (negative posting)
    The method "Reverse" can be used to reverse the relevant document in the accounting components.
    Parameters
    REVERSAL
    Reference information for reversal in Accounting
    Description
    Parameter for transferring a reversal document. The reversal document for the source document is not transferred - the reversal documents are generated in the individual components from the documents to be reversed. This is only possible however, if the corresponding documents are available, meaning that line item update is active in all components and no documents have been archived. If this is not the case, an appropriate error message is issued in the return parameter. If this happens, the document can only be reset by means of a corresponding inverse posting by the sender.
    You must make entries in the following fields
    Reversal document number:
    OBJ_TYPE     Sender ID
    OBJ_KEY     Reference number of the reversal document (source document)
    OBJ_SYS     Logical system
    OBJ_KEY_R     Reference number of the document to be reversed.
    Default
    All other fields are transferred from the FI document to be reversed.
    BUS_ACT
    Business Transaction
    Description
    To reverse the document, the same business transaction must be entered that was used for the posting.
    OBJ_TYPE
    Reference procedure
    Source document
    Description
    When a business transaction is updated in Accounting, it may be that several documents are updated at the same time (FI document, CO document, etc). If the business transaction is not initiated in Accounting, a source document must exist outside Accounting. The information from this document must be transferred when the FI/CO interface is called up. The source information is updated in all accounting documents, and is made up of the following fields:
    AWTYP (OBJ_TYPE) Reference transaction
    Sender ID
    AWKEY (OBJ_KEY) Reference key
    Source document number
    The reference key is made up of:
    AWREF Reference document number (10 digits)
    Source document number
    AWORG Reference organizational unit (10 digits)
    Number range ID (if required)
    AWSYS (OBJ_SYS) Logical system
    Logical system of source document
    When the document is being processed, the system checks whether a reference document number (first part of the reference key) has been transferred.
    Notes
    Use a separate value in the OBJ_TYPE field (reference transaction). You must maintain an entry for this value in table TTYP, which could be a function module that is called when the user wants to branch back to the source/sender document from an accounting document. This makes it possible for documents updated using BAPIs to be included in the document navigation (revision). If you use SAP defined characters in the field OBJ_TYPE, errors can occur in the navigation.
    The FI and CO line item suppression is defined separately for each reference transaction.
    It is not necessary to separate the reference key into reference document number and reference organizational unit. This means that reference document numbers that are longer than 10 digits can be transferred into the reference key.
    OBJ_KEY
    Reference Key
    Source document
    Description
    When a business transaction is updated in Accounting, it may be that several documents are updated at the same time (FI document, CO document, etc). If the business transaction is not initiated in Accounting, a source document must exist outside Accounting. The information from this document must be transferred when the FI/CO interface is called up. The source information is updated in all accounting documents, and is made up of the following fields:
    OBJ_SYS
    Logical system of source document
    Source document
    Description
    When a business transaction is updated in Accounting, it may be that several documents are updated at the same time (FI document, CO document, etc). If the business transaction is not initiated in Accounting, a source document must exist outside Accounting. The information from this document must be transferred when the FI/CO interface is called up. The source information is updated in all accounting documents, and is made up of the following fields:
    AWTYP (OBJ_TYPE) Reference transaction
    RETURN
    Return Parameter
    Description
    This table contains the return messages from the method call.
    Value range
    The first message contains the general status of processing:
    Type ID Number Message 
    S RW 605 Document posted successfully  
    S RW 614 Document check without errors 
    A RW 609 Error in document 
    The fields MESSAGE_V1, MESSAGE_V2 and MESSAGE_V3 contain the following information:
    Reference transaction ( OBJ_TYPE)
    Reference key ( OBJ_KEY)
    Logical system of source document ( OBJ_SYS)
    Additional messages are transferred with the following information:
    Parameter ( PARAMETER)
    Row ( ROW)
    Field ( FIELD)
    in which the error occurred.
    REgards.
    Ravi

  • Error while testing the BAPI

    Hey all,
    when am testing the bapi BAPI_LOAN_CONTRACT_CREATE (standard BAPI FOR LOAN CREATION) for creation of loan i am facing with an error saying TR0100 : ROLE TYPE DOES NOT EXIST.
    Role Type is an entry for which the master data is TR0100and is in the table TB003
    i have checked the master data for it but everything is fine i have maintainedd all the requisite fields in it .
    Can anyone please advice me as to how do i check further and recify the same and successfully create the loan through this BAPI.
    Any help in this regards is highly appreciated.
    Sincerely
    vinila kanakala

    After testing in se37 i got yhe following error message in bapireturn.  Tell me how to solve as soon as possible.
    T ID                   NUM MESSAGE
    E 69                   879 Role TR0100 does not exist

  • Unable to update sales order unsing the BAPI 'BAPI_SALESORDER_CHANGE'

    Hi All,
    I am unable to update the payment method field for some sales orders using the bapi 'BAPI_SALESORDER_CHANGE'. I am getting the reason in the table RETURN as 'Field 'ZLSCH' cannot be changed, VBAPKOM 000050  ready for input'.
    Could anyone throw some light on it.
    Thanks a ton.
    Regards,
    Santosh Kotra.

    Hi
    Without reversing invoice we can't update price and this is standard bevaior which is logical too. For your scenario I am wondering why would you want to change price for a line item or order which is alrady invoiced and posted to FI. What difference would it make to change price in sale order when this has already been posted in FI?
    Thank$

  • How to delete an operation from order using the bapi

    Can somebody please tell me how to delete an operation from order using the bapi
    BAPI_ALM_ORDER_MAINTAIN.
    Following was the test data for the BAPI.
    000000 OPERATION DELETE 0000040052810070
    000000 SAVE 0000040052810070
    Even I tried entering the operation table. The BAPI control ends fine, but when I check the order using IW32, the operation still exists.
    So, can you please tell me where Iam going wrong.

    Hi Subash Mohanvel,
    Check bapireturn parameter of the bapi BAPI_ALM_ORDER_MAINTAIN after execution of the code , and if there is no error message in the return table then call bapi_Transaction_commit.
    Unless you call this database saving of the records/values will not get reflected in the system.
    Hope that helps.
    Regards
    Kapadia
    ***Assigning points is the way to say thanks in SDN.***

Maybe you are looking for

  • View Options in iTunes 8

    Two customizable view options in iTunes 7 seem to have disappeared from iTunes 8, can anyone help me find them? First of all, those annoying little arrows that take you to the iTunes store. They appear in the list after song title, artist, and album

  • Movie rental won't play and doesn't show in library (not in video app)

    I've downloaded the movie successfully. It is not in my iTunes library but when I search using Finder, it says that it is there? (location says iTunes/iTunes Media/Movies/TITLE) When I click to watch via the route file in finder, it rediects to iTune

  • Zero quantity to Delivery and A/R invoice

    Hi, The delivery and A/R invoice document can be added with zero quantity. Is there any set up by which i can block this. I am using 2007B, PL:11,SP:000 Thanks Md.nazeer Shaikh

  • Deleting imported pictures

    Deleting imported pictures from iPad?

  • How to put songs into the 5300 player from compute...

    When i sync or just drop it into the phone it only shows up to the memory card and it won't be on the player on the 5300. How can I put it into the 5300 player? Thanks in advance.