BAPI_SALESORDER_CREATEFROMDAT2 problems

Hi all.
I have dificulties to make this BAPI working well.
I use the .net connector 2.0.
I entered the fields mandatory in the order_header_in and order_header_inx and the partners.
After the call to the BAPI i have these folowing warnings:
V4 081 : "Consider delivery unit 120 PAI in item 000010"
whereas i filled the rights field in the tables (Sale_unit etc).
the second isue is that salesDocumentEx's value is "\0\0\0\0\0\0\0\0\0\0" and not the document number.
Is someone had a case similar?
Thanks in advance

yes the unit is good because in other case i have an error message and not a warning.
Eventhough thank you for your help

Similar Messages

  • BAPI_SALESORDER_CREATEFROMDAT2 - Problem with price

    Hi
      I'm trying to create a Sales Document with the BAPI_SALESORDER_CREATEFROMDAT2 with SE37, i don't know what is missing, because it gives me the order number but when i call the BAPI_TRANSACTION_COMMIT,  it doesn't create the document, the result of the BAPI_SALESORDER_CREATEFROMDAT2 is next:
    S V4233SALES_HEADER_IN has been processed successfully   
    S V4233SALES_ITEM_IN has been processed successfully     
    W V1555The sales document is not yet complete: Edit data 
    S V1311Pedido Nacional 0000281711 has been saved         
    I feel the problem is in the parameters i'm sending, because i'm creating a sales order with VA01, and when debugging the BAPI and VA01, comparing table XVBAP at BAPI and VA01, i have difference at XVBAP-KWMENG and XVBAP-NETWR, at the BAPI'S table i don't have data, and at the VA01 transaction i have it, i give the parameters i'm sending so maybe somebody can help me.
    <b>ORDER_HEADER_IN</b>
    DOC_TYPE
    SALES_ORG
    DISTR_CHAN
    DIVISION
    REQ_DATE_H
    PURCH_DATE
    INCOTERMS1
    PMNTTRMS
    PRICE_DATE
    PURCH_NO_C
    <b>ORDER_ITEMS_IN</b>
    MATERIAL
    PLANT
    TARGET_QTY
    TARGET_QU
    INCOTERMS1
    ROUTE
    <b>ORDER_PARTNERS</b>
    PARTN_ROLE       
    PARTN_NUMB  
    And that's all.
    Thanks
    Best Regards.
    Soraya Cervantes

    Soraya,
    You need to pass in the Pricing COnditions via the ORDER_CONDITIONS_IN and ORDER_CONDITIONS_INX parameters.
    eg.
    tbl_bapicond-itm_number = '000010'.
    tbl_bapicond-cond_type  = 'ZP01'.
    tbl_bapicond-cond_value = '100'.
    append tbl_bapicond.
    tbl_bapicondx-itm_number  = '000010'.
    tbl_bapicondx-cond_type   = 'ZP01'.
    tbl_bapicondx-update_flag = 'U'.
    tbl_bapicondx-cond_value  = 'X'.
    append tbl_bapicondx.
    Hope this helps.
    Cheers,
    Pat.
    PS. Kindly assign Reward Points to the posts you find helpful.

  • Bapi_salesorder_createfromdat2 problem with filling Configuration values

    Hi All,
    I am trying to create a sales order using "bapi_salesorder_createfromdat2". Good part is I am able to create the sales order with item details, schedule line info and partners. However the BAPI did not fill the characteristic values.
    Here I am giving the code snippet and request you to help me in identifying what I am missing or where i am doing wrong.
    we checked in config and the material has perfectly configured for characteristics.
    LOOP AT it_soitem_dtls INTO lwa_soitem_dtls.
        wa_soitem_dtls = lwa_soitem_dtls.
        lv_posnr       = lv_posnr + 10.
        lv_configid    = lv_configid + 1.
        CONDENSE lv_configid.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = lv_configid
          IMPORTING
            output = lv_configid.
    * Fill the Item Configuration Characteristics
          wa_order_cfgs_ref-posex      = lv_posnr.
          wa_order_cfgs_ref-config_id  = wa_curef_out-config_id.
          wa_order_cfgs_ref-root_id    = wa_curef_out-inst_id.
          APPEND wa_order_cfgs_ref TO it_order_cfgs_ref.
          wa_order_cfgs_inst-config_id     = wa_cuinst_out-config_id. "lv_configid.
          wa_order_cfgs_inst-inst_id       = wa_cuinst_out-inst_id.
          wa_order_cfgs_inst-obj_type      = 'MARA'.
          wa_order_cfgs_inst-class_type    = '300'.
          wa_order_cfgs_inst-obj_key       = wa_soitem_dtls-material.
          wa_order_cfgs_inst-quantity      = wa_soitem_dtls-qty * 1000.
          CONDENSE wa_order_cfgs_inst-quantity.
          wa_order_cfgs_inst-quantity_unit = 'KG'.
          wa_order_cfgs_inst-complete      = 'T'.
          wa_order_cfgs_inst-consistent    = 'T'.
          wa_order_cfgs_inst-persist_id_type = 'G'.
          APPEND wa_order_cfgs_inst TO it_order_cfgs_inst.
          wa_order_cfgs_part_of-config_id  = wa_cuinst_out-config_id. "lv_configid.
          wa_order_cfgs_part_of-parent_id  = wa_cuinst_out-inst_id.
          wa_order_cfgs_part_of-inst_id    = '00000001'.
          wa_order_cfgs_part_of-obj_type   = 'MARA'.
          wa_order_cfgs_part_of-class_type = '300'.
          wa_order_cfgs_part_of-obj_key    = wa_soitem_dtls-material.
          APPEND wa_order_cfgs_part_of TO it_order_cfgs_part_of.
        wa_curef_in-posex     = wa_soitem_dtls-contractitem. "lv_posnr.
        wa_curef_in-config_id = wa_cuinst_out-config_id. "lv_configid.
        wa_curef_in-inst_id   = wa_cuinst_out-inst_id.
        APPEND wa_curef_in TO it_curef_in.
      wa_order_cfgs_value-config_id   = p_configid.
      wa_order_cfgs_value-inst_id     = p_instanceid.
      wa_order_cfgs_value-charc       = p_char.
      wa_order_cfgs_value-value       = p_val.
      APPEND wa_order_cfgs_value TO it_order_cfgs_value.
    ENDLOOP.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
        EXPORTING
          order_header_in         = wa_so_header_in
          convert                 = 'X'
        IMPORTING
          salesdocument           = gv_vbeln
        TABLES
          return                  = it_return
          order_items_in          = it_order_item_in
          order_schedules_in      = it_order_schedules_in
          order_partners          = it_so_partners
          order_cfgs_ref          = it_order_cfgs_ref
          order_cfgs_inst         = it_order_cfgs_inst
          order_cfgs_part_of      = it_order_cfgs_part_of
          order_cfgs_value        = it_order_cfgs_value
          order_cfgs_refinst      = it_curef_in
          order_text              = it_so_texts.
    * Roll back LUW if any error returned by BAPI otherwise commit
      READ TABLE it_return WITH KEY type = 'E'
                           TRANSPORTING NO FIELDS.
      IF sy-subrc = 0.
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = c_x.
      ENDIF.
    Thanks in advance for all your help.
    Rgds,
    Lakshmi
    Please use code tags to make your code easier to read
    Edited by: Rob Burbank on Dec 6, 2010 2:31 PM

    Soraya,
    You need to pass in the Pricing COnditions via the ORDER_CONDITIONS_IN and ORDER_CONDITIONS_INX parameters.
    eg.
    tbl_bapicond-itm_number = '000010'.
    tbl_bapicond-cond_type  = 'ZP01'.
    tbl_bapicond-cond_value = '100'.
    append tbl_bapicond.
    tbl_bapicondx-itm_number  = '000010'.
    tbl_bapicondx-cond_type   = 'ZP01'.
    tbl_bapicondx-update_flag = 'U'.
    tbl_bapicondx-cond_value  = 'X'.
    append tbl_bapicondx.
    Hope this helps.
    Cheers,
    Pat.
    PS. Kindly assign Reward Points to the posts you find helpful.

  • [ABAP] Create sales order using FM BAPI_SALESORDER_CREATEFROMDAT2 problem

    Hello All,
    In a report I have to create sales orders, I use function  BAPI_SALESORDER_CREATEFROMDAT2, but I got the message like "ship-to-party xxxx is not assigned to sold-to-party" if I_PARTNERS-PARTN_ROLE = 'WE' and when is 'SH' I get 'please enter ship-to-party or sold-to-party'. Please suggest how to correct this. Thank you
    Bogdan
    Here is the code:
    order header values
    HEADER-DOC_TYPE = 'ZRTA'.
    HEADER-SALES_ORG = '4301'.
    HEADER-DISTR_CHAN = '43'.
    HEADER-DIVISION = '40'.
    HEADER-PURCH_DATE = '20051109'.
    HEADER-PURCH_NO_C = '11111'.
    header-date_type = 'D'.
    *HEADER-REF_DOC = .
    *HEADER-REFDOC_CAT = 'E'.
    *HEADER-***_NUMBER = ZCONSGACTVSV-HUBREFNUM.
    order item level data
    I_ITEM-ITM_NUMBER = '000010'.
    I_ITEM-MATERIAL = '950700129'.
    *I_ITEM-ROUTE = CON-ROUTE.
    *IF NOT ZCONSGAGRMSV-CHARG IS INITIAL.
      I_ITEM-BATCH = ZCONSGAGRMSV-CHARG.
    *ELSE.
      I_ITEM-BATCH = '1'.
    *ENDIF.
    I_SCHEDULE-ITM_NUMBER = '000010'.
    I_SCHEDULE-REQ_QTY = '13'.
    *shipto = 'WE'.
    I_PARTNERS-PARTN_ROLE = 'SH'. " Ship to
    I_PARTNERS-PARTN_NUMB = '2000001'.
    *I_PARTNERS-PARTN_ROLE = 'SH'. " Ship to
    *I_PARTNERS-PARTN_NUMB = '2000001'.
    I_PARTNERS-name =
    APPEND: I_ITEM,
            I_SCHEDULE,
            I_PARTNERS.
    CLEAR: I_ITEM,
           I_SCHEDULE,
           I_PARTNERS.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
         EXPORTING
    SALESDOCUMENTIN =
                 ORDER_HEADER_IN = HEADER
    ORDER_HEADER_INX =
    SENDER =
    BINARY_RELATIONSHIPTYPE =
    INT_NUMBER_ASSIGNMENT =
    BEHAVE_WHEN_ERROR =
    LOGIC_SWITCH =
    TESTRUN =
    CONVERT = ' '
         IMPORTING
                 SALESDOCUMENT = ORDER
         TABLES
                 RETURN = RETURN
                 ORDER_ITEMS_IN = I_ITEM
    ORDER_ITEMS_INX =
                 ORDER_PARTNERS = I_PARTNERS
                 ORDER_SCHEDULES_IN = I_SCHEDULE
    ORDER_SCHEDULES_INX =
    ORDER_CONDITIONS_IN =
    ORDER_CFGS_REF =
    ORDER_CFGS_INST =
    ORDER_CFGS_PART_OF =
    ORDER_CFGS_VALUE =
    ORDER_CFGS_BLOB =
    ORDER_CFGS_VK =
    ORDER_CFGS_REFINST =
    ORDER_CCARD =
    ORDER_TEXT =
    ORDER_KEYS =
    EXTENSIONIN =
    PARTNERADDRESSES =

    Hi Bogdan,
       The documentation says
    Document Partner
    Description
    This table parameter is used to enter partners such as sold-to party, or ship-to party, both at header and item level.
    The minimum requirement is that the sold-to party is entered at header level. Additional partner functions can then be automatically determined.
    You can also enter different addresses in the structure.
    Check if it is useful to you in some way.
    Regards,
    Ravi

  • Sale Order Item Quantity Not Populating When Create A Sale Order Using BAPI

    I am having a problem when creating a sale order using BAPI
    BAPI_SALESORDER_CREATEFROMDAT2
    Problem is that sale order item quantity field is not populating
    code is as follows
    ORDER_ITEMS_IN-ITM_NUMBER = '0010'.
    ORDER_ITEMS_IN-MATERIAL = '000000000010000262'.
    ORDER_ITEMS_IN-TARGET_QU = 'LB'.
    ORDER_ITEMS_IN-TARGET_QTY = 1.

    Hi,
    Try populating ORDER_SCHEDULES_IN table in the bapi field REQ_QTY.
    Regds,
    Rudra

  • Problem with STORE_LOC in BAPI_SALESORDER_CREATEFROMDAT2

    Hi gurus.
    I'm using BAPI_SALESORDER_CREATEFROMDAT2 to create sales orders and it works almost fine ...
    I've only one problem: is it possible to get automatically the storage?
    If I set the field STORE_LOC in the item, I get that storage in my order, otherwise the storage in the row order is empty.
    But if I insert rows by the transactionVA01/02 I get automatically the storage, I don't need to force it.
    Thanks for your help ...

    Hi
    If Storage Location is assigned against the particular Plant and Shipping point functionally, then using VA01 transaction, it will
    pick the storage location automatically. So when using your BAPI try with passing PLANT or SHIPPING POINT and see whether
    storage location getting populated or not.
    Regards,
    Murali

  • Problem in lock Sales order create with BAPI BAPI_SALESORDER_CREATEFROMDAT2

    Hi All,
    i have the z program to create the sales order with reff  quotation in SD With BAPI BAPI_SALESORDER_CREATEFROMDAT2.
    this program will  excute every 30 mins .
    Problem: Some times if i excute the program in background it is taking morethan 30mins so second batch excution also gets starting to create the sales order for same quotation then it is creating 2 sales orders at atime with 1 quotation.
    here i am getting duplicate sales orders so i want to lock the creation of duplicate sales order.

    Some solutions
    - Just lock (ENQUEUE) any object at the start of the job(*), if not locked, you can exit or wait in a loop, will be released at end of job (use a _SCOPE '3' so commit work wont release the lock)
    -> This will insure the job runs only once at a time
    - Lock the quotation before calling the BAPI, will be released by the COMMIT_WORK (from where do you fetch the quotation, if it is a customer Z_table, you can use the lock object that you have surely created ?) (use a _scope '2')
    -> This will insure that at most one job will convert a quotation (i suppose you set a "done" flag or status  in the quotation record)
    Read [SAP Locks |http://help.sap.com/abapdocu_70/en/ABENSAP_LOCK.htm] if you are not familiar with the concept of lock in SAP.
    Regards,
    Raymond
    (*) E_TABLEE for table, E_TRDIR for program, anything not required by another process

  • Problem when creating a sales order using BAPI_SALESORDER_CREATEFROMDAT2

    Hello All,
    I am working on a requirement where i  need to create a new sales order from old sales order (Not all the items of the old sales order are to be copied) i am doing this by getting the data using BAPISDORDER_GETDETAILEDLIST to get the old sales order details and send them to BAPI_SALESORDER_CREATEFROMDAT2.
    My problem is that i when i send the condition also the system in addition to the conditions sent to the BAPI is also automatically proposing the condition types . So the final result is that the sales order ends up having the condition types twice .
    For example VPRS AZWR are visible twice in the sales order.
    Any inputs to solve the problem will be definitely rewarded.
    Thanks in advance.
    Regards,
    Sowmya.

    Hello All,
    I am working on a requirement where i  need to create a new sales order from old sales order (Not all the items of the old sales order are to be copied) i am doing this by getting the data using BAPISDORDER_GETDETAILEDLIST to get the old sales order details and send them to BAPI_SALESORDER_CREATEFROMDAT2.
    My problem is that i when i send the condition also the system in addition to the conditions sent to the BAPI is also automatically proposing the condition types . So the final result is that the sales order ends up having the condition types twice .
    For example VPRS AZWR are visible twice in the sales order.
    Any inputs to solve the problem will be definitely rewarded.
    Thanks in advance.
    Regards,
    Sowmya.

  • BAPI_SALESORDER_CREATEFROMDAT2 multiple items problem

    hi,
       experts ,I'm facing a problem when using  BAPI_SALESORDER_CREATEFROMDAT2 to creat SO,I create a sale order with six items and  one of the item has problem. It is possible for me to create the SO successfully with the the other three items ?

    Hi,
    When creating Sales Order with reference or without reference then you can do a test run and as per suggested by Maxim that if there is any issue with the particular line item then you can exclude that line and proceed to create order with the rest of the line items.
    There is no such restriction that if there is error in the line item then you cannot create order with rest of the line items.

  • Problem qty BAPI_SALESORDER_CREATEFROMDAT2

    Hello all,
    I create a specific function to call BAPI_SALESORDER_CREATEFROMDAT2 via RFC and I have a problem to have a good qty if I view the sales orders via VA03 the qty is equal to 0 and that a good qty is 70,25.Why I don't see a good qty in a field qty KWMENG in VBAP table ?
    I verify an debug and I see a good qty 70.25 in the field t_order_items-target_qty
    Thanks

    hI MADY
    DO LIKE THIS
    CODE ************************************** 
    local data 
    DATA: HEADER LIKE BAPISDHD1. 
    DATA: I_PARTNERS LIKE BAPIPARNR OCCURS 1 WITH HEADER LINE. 
    DATA: I_ITEM LIKE BAPISDITM OCCURS 10 WITH HEADER LINE. 
    DATA: I_SCHEDULE LIKE BAPISCHDL OCCURS 10 WITH HEADER LINE. 
    DATA: RETURN LIKE BAPIRET2 OCCURS 1 WITH HEADER LINE. 
    order header values 
    HEADER-DOC_TYPE = 'ZSED'. 
    HEADER-SALES_ORG = ZCONSGAGRMWK-VKORG. 
    HEADER-DISTR_CHAN = ZCONSGAGRMWK-VTWEG. 
    HEADER-DIVISION = ZCONSGAGRMWK-SPART. 
    HEADER-PURCH_DATE = ZCONSGACTVSV-TRNACTDAT. 
    HEADER-PURCH_NO_C = ZCONSGACTVWK-PONUM. 
    HEADER-REF_DOC = ZCONSGAGRMSV-SCHDAGRM. 
    HEADER-REFDOC_CAT = 'E'. 
    HEADER-***_NUMBER = ZCONSGACTVSV-HUBREFNUM. 
    order item level data 
    I_ITEM-ITM_NUMBER = '000010'. 
    I_ITEM-MATERIAL = ZCONSGACTVSV-MLXPART. 
    I_ITEM-ROUTE = CON-ROUTE. 
    IF NOT ZCONSGAGRMSV-CHARG IS INITIAL. 
       I_ITEM-BATCH = ZCONSGAGRMSV-CHARG. 
    ELSE. 
       I_ITEM-BATCH = '1'. 
    ENDIF. 
    <b>I_SCHEDULE-ITM_NUMBER = '000010'. 
    I_SCHEDULE-REQ_QTY = ZCONSGACTVWK-QTY. 
    I_PARTNERS-PARTN_ROLE = 'AG'. " Soldto 
    I_PARTNERS-PARTN_NUMB = ZCONSGAGRMSV-SOLDTO.</b> 
    APPEND: I_ITEM, 
            I_SCHEDULE, 
            I_PARTNERS. 
    CLEAR: I_ITEM, 
           I_SCHEDULE, 
           I_PARTNERS. 
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2' 
         EXPORTING 
    SALESDOCUMENTIN = 
                 ORDER_HEADER_IN = HEADER 
    ORDER_HEADER_INX = 
    SENDER = 
    BINARY_RELATIONSHIPTYPE = 
    INT_NUMBER_ASSIGNMENT = 
    BEHAVE_WHEN_ERROR = 
    LOGIC_SWITCH = 
    TESTRUN = 
    CONVERT = ' ' 
         IMPORTING 
                 SALESDOCUMENT = ORDER 
         TABLES 
    <b>             RETURN = RETURN 
                 ORDER_ITEMS_IN = I_ITEM 
    ORDER_ITEMS_INX = 
                 ORDER_PARTNERS = I_PARTNERS 
                 ORDER_SCHEDULES_IN = I_SCHEDULE </b>
    ORDER_SCHEDULES_INX = 
    ORDER_CONDITIONS_IN = 
    ORDER_CFGS_REF = 
    ORDER_CFGS_INST = 
    ORDER_CFGS_PART_OF = 
    ORDER_CFGS_VALUE = 
    ORDER_CFGS_BLOB = 
    ORDER_CFGS_VK = 
    ORDER_CFGS_REFINST = 
    ORDER_CCARD = 
    ORDER_TEXT = 
    ORDER_KEYS = 
    EXTENSIONIN = 
    PARTNERADDRESSES = 
    REGARDS
    KISHORE
    REWARD IF HELPFUL

  • Problem: Create SO with BAPI_SALESORDER_CREATEFROMDAT2 & Head-Text Elements

    Hi all,
    I hape that sb can help me with my problem.
    I have created a ABAP-Program to create sales-orders with the function module:
    BAPI_SALESORDER_CREATEFROMDAT2
    Everythiunk works fine but I can not create text-elements (from the head) with this bapi.
    I know that I have to use the table "ORDER_TEXT" but I do not know how to fill this table.
    Can anybody help me?
    Best regards,
    pb974

    Hi,
    yes, you have to fill the order_text table. The following fields you have to fill:
    DOC_NUMBER   
    -> not to fill, let it blank
    ITM_NUMBER     
    -> if you want to create a header-text then fill ITM_NUMBER with '000000'
    -> if you want to create a position-text then fill the related position-number '000010' or '000020'....
    TEXT_ID
    -> fill this field with the text-id for which you want to create the text.
    -> The text-id must be defined in your customizing
    LANGU
    -> set the language for the text: 'E' or 'D' or......
    LANGU_ISO
    -> let it blank
    FORMAT_COL
    -> set a star (*) if you want to have the standard-format. If you have a special format defined in SapScript or in a Style you can set this one.
    TEXT_LINE
    -> fill in the text
    FUNCTION
    -> let it blank
    see below:
    data: i_text     LIKE bapisdtext  OCCURS 0 WITH HEADER LINE.
    Texte...
            CLEAR i_text.
            i_text-itm_number  = '000010'.    "Text for Position 10
            i_text-text_id         = 'ZA10'.        "Defined Text-ID
            i_text-langu           = 'D'.             "Language German
            i_text-format_col    = '*'.              "Standardformat
            i_text-text_line       = 'This is text for Pos. 10 - line 2'.   "the text
            APPEND i_text.
    ...if your text has more then one row... the same one to do...
            i_text-itm_number  = '000010'.    "Text for Position 10
            i_text-text_id         = 'ZA10'.        "Defined Text-ID
            i_text-langu           = 'D'.             "Language German
            i_text-format_col    = '*'.              "Standardformat
            i_text-text_line       = 'This is text for Pos. 10 - line 2'.   "the text
            APPEND i_text.
    ...and so one...
    and now text for position 20...
            CLEAR i_text.
            i_text-itm_number  = '000020'.    "Text for Position 20
            i_text-text_id         = 'ZA10'.        "Defined Text-ID
            i_text-langu           = 'D'.             "Language German
            i_text-format_col    = '*'.              "Standardformat
            i_text-text_line       = 'Text für Pos. 20 - Zeile 1'.   "the text
            APPEND i_text.
    ...and now the text for position in englisch
            i_text-itm_number  = '000020'.    "Text for Position 20
            i_text-text_id         = 'ZA10'.        "Defined Text-ID
            i_text-langu           = 'E'.             "Language German
            i_text-format_col    = '*'.              "Standardformat
            i_text-text_line       = 'This is text for Pos. 20 - line 1'.   "the text
            APPEND i_text.
    I hope it's a help for you.
    Erhard

  • Problems with running BAPI   BAPI_SALESORDER_CREATEFROMDAT2

    Hi all,
    I’ve got a problem running BAPIs in SD invironment.
    I’m creating contract releases in SD via BAPI.
    First I run BAPI BAPISORDER_GETDETAILEDLIST in my program to get detaildata of the contract.
    Then I run the BAPI   BAPI_SALESORDER_CREATEFROMDAT2 filled with contract reference data and in addition with order data to create the contract release.This works properly so far. On both sides in the contract and in he contract release I find the correct document flow. Means: in document flow of the contract I find all the releases created . Also I find the contract in the documentflow of the releases.
    But…something does not work: In the contract the released values are not updated. When I create a release manually, the release values are accumulated  in the contract in field  ‘value released’ under flag ‘item detail’. But this does not work, when the leases are created via BAPI. However I checked several parameters in the BAPIS but I cannot find something that leads to an update .
    Can somebody help me and can tell me what is to be done to get this field updated? Thanks in advance.
    same in German...
    Ich habe ein Problem mit BAPIs im SD.
    Ich erzeuge Abrufe zum Kontrakt im SD mittels BAPIs.
    Zuerst lasse ich den BAPI BAPISORDER_GETDETAILEDLIST laufen, um mittels Kontraktnummer alle Daten zum Kontrakt zu bekommen. Dann lasse ich den BAPI   BAPI_SALESORDER_CREATEFROMDAT2 gefüllt mit SD-Abrufdaten und den Referenzdaten des Kontraktes laufen Dies funktioniert soweit sehr gut. Sowohl im Kontrakt als auch im Abruf sind jeweils die übergeordneten bzw. untergeordneten Vertiebsbelege zu sehen. Die Referenz wird also hergestellt. Jedoch wird im Kontrakt nicht die Abrufwerte aufsummiert. Normalerweise wird bei manueller Erstellung der Abrufe im Kontrakt die jeweilgen abgerufenen Werte gegen den Kontraktwert aufsummiert (Feld abgerufene Werte im Kontrakt unter Reiter ‚Positionsdetail‘. Ich habe alle möglichen Parameter im BAPI geprüft und getestet aber nichts gefunden, was mir die abgerufenen Werten aufsummiert.
    Kann mir dazu einen Tip geben, was ich tun kann, damit auch die Werte richtig referenzieren ? Danke im Voraus.

    the usage of exactly this BAPIs in the way I described  is in according to SAP note 370988.
    BAPI_SALES_DEL_SCHEDULE_CREATE ist for SD schedule agreements and not for SD contracts and does not offer Input parameters for e.g.  adding price conditions what is needed for my task.
    The field in contract I mentioned e.g. in Transaction VA42 VA43 is filled / gets its Information out of Infostructure/table S135. The BAPI seems not be able to fill this structure while creating the contract release.
    I'm looking for example an input parameter I did not found already or any other option that leads to an update of infostructure S135 while creating/posting a release via BAPI.

  • PROBLEM  BAPI_SALESORDER_CREATEFROMDAT2 condvalue

    Dear all,
    We have an issue with BAPI BAPI_SALESORDER_CREATEFROMDAT2. We try change the value for the field condition KONV-KWERT with the following field from the bapi CONDITIONS_IN-CONDVALUE. The condition to  modify is a percentage condition. We can modify the percentage condition (KONV-KBETR) with CONDITIONS_IN-COND_VALUE , but canu2019t modify KONV-KWERT without modify percentage. If not we assigned value for field COND_VALUE, the condition is 0. Always calculate the field KWERT based on percentage (cond_value).
    This also happens if we try to modify the document with BAPI_SALESORDER_CHANGE
    We can modify this field from VA01/VA02 without change the percentage.
    We copied the source code where filled the condition structure.
    CLEAR u_cond.
    u_cond-itm_number = '000010'.
    u_cond-cond_type =  u2018ZPMAu2019.   
    u_cond-COND_COUNT = u201801u2019.
    u_cond-cond_updat = 'X'.
    u_cond-COND_ST_NO = u2018010u2019.
    u_cond-CONDVALUE = u20182000u2019.
    u_cond-currency = 'BRL'.       
    APPEND u_cond.
    u_condx-itm_number = u2018000010u2019.
    u_condx-COND_ST_NO = u2018010u2019.
    u_condx-COND_COUNT =  u201801u2019.
    u_condx-cond_type = u2018ZPMAu2019.
    u_condx-updateflag = 'U'.
    u_condx-cond_value = 'X'.
    u_condx-currency = 'X'.
    APPEND u_condx.
    Thank in advance,
    Best regards,
    Joel

    Hello,
    Is this an unresolvable problem, or do people eventually fix it and then just decide to not share it?
    April, could you restate the problem, I can't follow the original description.
    I hope you will be the one to share the solution when you find it.
    Probably best to open a new thread and put a link to it here.
    regards
    Rick Bakker
    Hanabi Technology

  • Problem on BAPI_SALESORDER_CREATEFROMDAT2

    Hi ,
    I want to populate FISTL ( Fund Centre )  field  of vbap in fm BAPI_SALESORDER_CREATEFROMDAT2.
    How I can do that.

    Hi,
    Here you can add new import parameter by using enhencement point and end of every function module there is one implicit enhencement point where you can write the code for updating the field FISTL.This is possible in ECC6.0.
    Please read below para.
    All application function modules can be enhanced by adding parameters to the standard function module interface. These parameters must be u2018optionalu2019 in nature, since adding a mandatory parameter will require all calls to be changed. Additionally any function module that is part of the Central Basis can not be enhanced (for example: function module u2018POPUP_TO_CONFIRMu2019). From the menu, choose u2018Function module -> Enhance interfaceu2019 to add optional parameters to a function module.
    Thanks,
    radha.

  • A Problem about BAPI (BAPI_SALESORDER_CREATEFROMDAT2)

    Hi, all.
    Now i try to use BAPI to create order,following is part of my codes:
    function=this.createFunction("BAPI_SALESORDER_CREATEFROMDAT2 ");
                       JCO.ParameterList input = function.getImportParameterList();
                       JCO.ParameterList table = function.getTableParameterList();
                       JCO.Structure ORDER_HEADER_IN = input.getStructure("ORDER_HEADER_IN");
                        ORDER_HEADER_IN.setValue("TA","DOC_TYPE");
                        ORDER_HEADER_IN.setValue("3000","SALES_ORG");
                        ORDER_HEADER_IN.setValue("10","DISTR_CHAN");
                        ORDER_HEADER_IN.setValue("00","DIVISION");
    JCO.Table ORDER_PARTNERS = table.getTable("ORDER_PARTNERS");
    ORDER_PARTNERS.setValue("SP","PARTN_ROLE");
                  ORDER_PARTNERS.setValue("3250","PARTN_NUMB");
    JCO.Table ORDER_ITEMS_IN = table.getTable("ORDER_ITEMS_IN");
                  ORDER_ITEMS_IN.setValue("P104","MATERIAL");
                  ORDER_ITEMS_IN.setValue("10","ITM_NUMBER");
    I ha already setup "ORDER_HEADER_IN"`s parameters.
    But i still can`t create an order successfully.
    And i got two message:
    1.Plz enter sold-to party or ship-to party
    2.Sales documents was not changed.
    Can anyone help me solve this situation?

    hi Louis,
       Checkout the link..,
      http://www.henrikfrank.dk/abapexamples/Java/sapjava_createsalesorder.htm
      hope it helps..,
    regards,
    Vinoth

Maybe you are looking for

  • Outlook 2010 freezes when pasting text from email into filename

    I use Microsoft Outlook 2010 (32-bit version), in a 64-bit computer (Dell laptop) using Windows 7 Enterprise, SP1.  (I work in a company and can't change what version of the Outlook program I am using.)  If I copy text out of an Outlook email, and th

  • Where is "All Mail" in Mac Mail?

    I have an email that arrived this morning at 8:08.  I have 6 email accounts setup in Mail.  Under Inbox, I see each of those accounts and their related mail.  I usually click Inbox and keep it there so I can see mail coming into any account.  The 8:0

  • JTable Awt -Event Queue problem

    Hi I've been looking everywhere for a solution to this, but can't seem to find one. I've got a JTable with an underlying model that is being continuously updated (every 100ms or so). Whenever I try to sort the JTable using TableRowSorter while the mo

  • Unstable Airport Express connection

    I have a problem of unstable connection to the Internet via Airport Express and Time Capsule. I have read a number of messages in the Discussions and learnt the signal-to-noise measurement. But, I still cannot resolve my own problem: the wireless con

  • Retouch photo without reducing the file size/quality?

    I have been retouching some pictures for use in a photo book but notice that each time I do so, the file size decreases fairly significantly e.g from 4MP to 2MP. Is there a way I do minor retouching to a photo without reducing the file size/quality?