In using BAPI_SALESORDER_SIMULATE?

Hi guys,
what are the parameters to be imported in using BAPI_SALESORDER_SIMULATE?
thanks a lot!

Hi Mark,
These are the Importing Parametres
ORDER_HEADER_IN
CONVERT_PARVW_AUART
ORDER_HEADER_IN  is of structure BAPISDHEAD
CONVERT_PARVW_AUART is of  type BAPIFLAG-BAPIFLAG field.
Thsi is a Single-Character Indicator.
Best regards,
raam

Similar Messages

  • Problem to get the availability of a product using BAPI_SALESORDER_SIMULATE

    Hi folks,
    I am trying to use BAPI_SALESORDER_SIMULATE to get the availability of a product but the BAPI does not send me the expected result :
    I am trying to get the availability of a "to be discontinued" product. The available quantity of this product is 592 unit.
    1/ Here is what I have in VA01 when I order a quantity of 1000 unit : [VA01|http://img689.imageshack.us/img689/4982/va012.jpg]
    --> only 592 units available : OK !
    2/ Here is what I have with BAPI_MATERIAL_AVAILABILITY when I order a quantity of 1000 unit : [Table WMDVEX|http://img707.imageshack.us/img707/9793/wmdvex2.jpg]
    --> only 592 units available : OK !
    3/ Here is what I have with BAPI_SALESORDER_SIMULATE when I order a quantity of 1000 unit : [TableORDER_SCHEDULE_EX|http://img101.imageshack.us/img101/830/orderscheduleex2.jpg]
    --> Nothing available : not OK !
    For information to run BAPI_SALESORDER_SIMULATE I am filling ORDER_HEADER_IN, ORDER_PARTNERS and ORDER_ITEMS_IN.
    Thanks in advance for your help.

    @Brad : If I fill ORDER_SCHEDULE_IN-REQ_QTY in place of ORDER_ITEMS_IN-REQ_QTY I receive an error : E-06070-Enter a quantity (I suppose ORDER_ITEMS_IN-REQ_QTY is mandatory).  Which field do you use to specify the schedule quantity ?
    For information here are the information I am using to run BAPI_SALESORDER_SIMULATE :
    ORDER_HEADER_IN
    DOC_TYPE
    SALES_ORG
    DISTR_CHAN
    DIVISION
    REQ_DATE_H
    PO_METHOD
    ORDER_ITEMS_IN
    ITM_NUMBER
    MATERIAL
    REQ_QTY
    SALES_UNIT
    ORDER_PARTNERS
    PARTN_ROLE
    PARTN_NUMB

  • Calculate Tax using BAPI_SALESORDER_SIMULATE

    Hi All,
    I am doing a proof of concept to get some data from the third party tool and calculate tax using BAPI_SALESORDER_SIMULATE.
    I am gonna wrap this BAPI in a web service and pass the calculated tax amount back to the third party. I want to pass the default values for all the fields except for the credit card parameters.
    Can some one help me with the default values that I can pass to this BAPI to check how it works.
    Thanks,
    Guru.

    Hi Anurita,
    How did you solve this issue? Do you also have an example code?
    I am trying to enable auto vat calculation for vendor invoices.
    Many Thanks!
    Kenan

  • Error in using bapi_salesorder_simulate

    Hi guys,
    Im having this error is BAPI_SALESORDER_SIMULATE:
    "please enter ship-to party or sold-to party"
    What causes this error?
    Please show some sample also on how to populate this bapi to retrieve pricing condition given the delivery number for PO(STO)...
    thanks a lot!

    Hello Mark
    You need to provide both, ship-to-party and sold-to-party, in order to create a sales order. Use the TABLES parameter ORDER_PARTNERS for adding the partners, e.g.:
    PARTN_ROLE  = 'SP'        " sold-to-party, 'SH' = ship-to-party
    PARTN_NUMB = <debitor number with leading zeros>
    ITM_NUMBER  = '000000'  " I assume this is for the header
    Regards
      Uwe

  • How to use " BAPI_SALESORDER_SIMULATE "

    hi,all
          now have such requirement ,as below:
          I need get price by call "BAPI_SALESORDER_SIMULATE".
    But how to set the parameter " ORDER_ITEMS_IN ". i don't know where normal got "CUST_MAT" ,"REQ_QTY".
         plz give me a hand, some sample is good for me
    thanks in advance.
    kevin

    Hello Kevin,
    take this one:
    REPORT  z_salesorder_simulate.
    DATA: order_header_in LIKE bapisdhead,
          order_items_in LIKE TABLE OF bapiitemin,
          return LIKE bapireturn,
          wa_order_items_in LIKE LINE OF order_items_in,
          order_partners LIKE TABLE OF bapipartnr,
          wa_order_partners LIKE LINE OF order_partners,
          order_items_out LIKE TABLE OF bapiitemex,
          wa_order_items_out LIKE LINE OF order_items_out.
    * Fill order_header_in
    order_header_in-doc_type = 'TA'.
    * Fill order_items_in
    wa_order_items_in-material = '000000000000000001'.
    wa_order_items_in-req_qty = '1000'.
    APPEND wa_order_items_in TO order_items_in.
    * Fill order_items_in
    wa_order_partners-partn_role = 'AG'.
    wa_order_partners-partn_numb = '0000000001'.
    APPEND wa_order_partners TO order_partners.
    * Execute Function Module BAPI_SALESORDER_SIMULATE
    CALL FUNCTION 'BAPI_SALESORDER_SIMULATE'
      EXPORTING
        order_header_in           = order_header_in
      IMPORTING
        return                    = return
      TABLES
        order_items_in            = order_items_in
        order_partners            = order_partners
        order_items_out           = order_items_out.
    * The return structure gives any error messages
    WRITE: return-message.
    * Print out the order items
    LOOP AT order_items_out INTO wa_order_items_out.
      WRITE: wa_order_items_out-material,
             wa_order_items_out-short_text,
             wa_order_items_out-subtotal_2.
    ENDLOOP.
    Regards
    Gregor

  • Need help on BAPI_SALESORDER_SIMULATE.....very urgent

    Hi all,
    Is there a way to pass material pricing group for each item to BAPI_SALESORDER_SIMULATE?I could not find any field in items structure that could accept material pricing group?I need the pricing conditions and credit card out details based on material pricing group while simulating a sales order?If there is any other way to achieve the purpose please let me know....
    Thanks in advance...
    Santhoshi

    Hi Yoeri,
    Thanks for your reply.But the field PRC_GROUP1 is price group(KONDA) but not material pricing group(KONDM).You can observe the difference in VA03 transaction in Item Overview->Sales B tab.They are two different fields Material Pricing Group and Price Group.
    <b>Actual requirement is</b>:
    I need to simulate a sales order using BAPI_SALESORDER_SIMULATE, and retrieve the pricing details and credit card details. Now the problem is i am unable to find a field which holds material pricing group, due to which the pricing details and credit card ammount details that are returned are having incorrect values.
    I would appreciate if you could please help me out in solving this requirement.
    Thanks in advance
    Santhoshi

  • BAPI_SALESORDER_SIMULATE vs GN_INVOICE_CREATE

    Hi
    there is a SAP standard program SDNETPR0 that can be used to list Prices for Customer and range of Materials.
    This uses function module GN_INVOICE_CREATE to bring back the Prices.
    I was going to use that program as a base of a new Z program to extend some of the selection criteria.
    Now I am wondering if in my new Report I should be using BAPI_SALESORDER_SIMULATE or GN_INVOICE_CREATE.
    Both seem to do the same result.  But GN_INVOICE_CREATE is much much faster.
    What is your experience on this.
    Should I be using that or the BAPI...?

    Hello,
    When using GN_INVOICE_CREATE and if you are using the user exit to populate the custom fields in pricing communication structure, it has to be implemented in this function call as well.
    However BAPI_SALESORDER_SIMULATE works out of the box.
    Refer : SAP OSS: 536806

  • BAPI_SALESORDER_SIMULATE Performance Problem

    HI All,
    My requirement is to select all Materials from MARA (as per certain condition), may be this can be some 50000 materials.....!!
    After this i have to use BAPI_SALESORDER_SIMULATE to simulate the creation of a sale order to check whether the material is correct or not. This BAPI stops when it finds an incorrect material. I will check the material and delete from my internal table. After deleting this material, i will run the BAPI for the rest of materials. I will do this till the BAPI returns a success message. This will help me give the success Materials.
    This program of min eis running for 8 hours, when i am giving all the materials to select.
    I did a performance check, and it is telling that the most time taken one is MARA_ARRAY_READ function module and this function module is calling the subroutine "PERFORM SPERREN_MARA USING SY-SUBRC". If you see in the subroutine, the time consuming one is this function module "ENQUEUE_EMMARAS". This one is called for each material.
    Please let me know if anything can be done to by pass this check...or to improve the performance..
    Regards
    Rakesh.

    HI Rakesh
    I guess you can expect better solutions if you can let us know the exact requirement...
    <b>After this i have to use BAPI_SALESORDER_SIMULATE to simulate the creation of a sale order to check whether the material is correct or not.</b>
    What do u mean by correct or not???
    If you can provide a clear requirement, i guess friends here can give better advises and alternatives if any...
    Kind Regards
    Eswar

  • BAPI_SALESORDER_SIMULATE & AFS 6.0

    Hi experts:
    Iam currently involved in an AFS migration from v3.0 to v6.0, and I,ve found an include that uses  BAPI_SALESORDER_SIMULATE.
    The problem is that in the old code we use  the
    order_sizes_in and order_sizes_out tables of this BAPIand I can´t find the correct BAPI to replace the old one : 
          CALL FUNCTION 'BAPI_SALESORDER_SIMULATE'
               EXPORTING
                    order_header_in    = le_order_header_in
               IMPORTING
                    return             = le_return
               TABLES
                    order_items_in     = lt_order_items_in
                    order_partners     = lt_order_partners
                    order_items_out    = lt_order_items_out
                    order_schedule_ex  = lt_order_sched_ex
                    messagetable       = lt_return
                   order_sizes_in     = lt_order_sizes_in
                    order_sizes_out    = lt_order_sizes_out
                    order_condition_ex = lt_order_conditions.
    I`ve found the /AFS/BAPI_SALESORD_CREATEFDATA, but these two tables don´t have equivalent ones.
    Does anybody know a solution to this problem
    Thanks in advance for your help.

    Hi again:
    The question is to find the way to do the same as before, doesn´t matter if i have to use one or more FM.
    It´s VERY importan to solve this problem as soon as possible
    Thanks for your help.

  • BAPI_SALESORDER_SIMULATE ref contract

    Hello all,
    I've create a contract with a price condition. Now I'm trying to simulate a salesorder via BAPI_SALESORDER_SIMULATE that orders an item from this contract. The problem I have is that it's not giving me the same price as I created in the contract. Instead I get the "standard" condition price (transactio VK13).
    I've refered to the contract in the bapi via the Orderheaderin (fields REF_DOC and REF_DOC_CA). Maybe I'm missing a parameter? Does anybody have an idea? Thanks in advance!
    Kind regards
    Roel Vankerkom
    Message was edited by: Roel Vankerkom

    hi Roel,
      checkout the links..,
    how to use " BAPI_SALESORDER_SIMULATE "
    for basics..,
    BAPI_SALESORDER_SIMULATE
      hope it helps..,
    regards,
    Vinoth

  • BAPI_SALESORDER_SIMULATE with local data

    Hi people:
    I am using BAPI_SALESORDER_SIMULATE to simulate pricing, but I have a problem with data included in VBKD-J_1ATXREL. Although this field is included in VBKD table, it is not included in any of the data objects used by the BAPI. This field is a key field in one condition table used in the access sequence of one of the condition types included into the pricing procedure used by the sales order, so I need the BAPI use it !!!!
    How can I do that ?
    (I thinking about using the EXTENSIONIN table, but I am no sure because the field already exist in VBKD.)
    Thanks in advance.
    Gustavo.

    Hello Henrick,
    no, the answer at your question is no. the reason is that the bapi is a standard MF and you can't modify the stanard flux.
    The only thingh you can do is to copy the bapi into a zbapi and comment the part concerning  CE_C_PROCESSING.
    But this operation is dangerous because you modify the standard SAP and is not easy to control the impact you can have about this operation.
    Regards,
    Roberto.

  • BAPI_SALESORDER_SIMULATE: Getting wrong Net price

    Hi,
    We are using BAPI_SALESORDER_SIMULATE to get price of a material. Problem is "in  ORDER_ITEMS_OUT table NET_VALUE field is not giving the exact value. it is truncating the right most digit of the the net value."
    Does anybody know how rectify this issue.
    Thanks in advance.

    Re: BAPI problem  
    Posted: Jun 28, 2006 1:49 PM      Reply      E-mail this post 
    You are using currency fields that reference a currency code. Most currencies in SAP have two decimal places. Dividing by 100 will work in most cases. Ideally you should get the CURRDEC value in table TCURX for the currency you are working with... then divide by 10 that number of times.
    example-
    USD, 2 decimals, divide by 10 twice.
    There is a function module that will do this for you.
    function modules G_DECIMAL_PLACES_GET or TCURX_READ

  • BAPI_SALESORDER_SIMULATE Conditions with no value

    When using BAPI_SALESORDER_SIMULATE to get a price for a customer / material the BAPI is returning the conditions however some condition value's and amounts are not returned. This leads to the net price being incorrect.
    I'm passing the following data into the BAPI...
    Header
      doc_type
      sales_org
      distr_chan
      division
      currency
      purch_no
      purch_date
    Item
      material
      target_qty
      req_qty
    Partners
      partn_role = 'WE'
      partn_numb
    Thanks
    Glenn

    It appears the qty of 1 is being interpereted as qty 0,001.

  • BAPI_SALESORDER_SIMULATE NetValue is inconsistent with Confir Qty

    I am using BAPI_SALESORDER_SIMULATE to find out availability and price. When the available quantity is less than requested quantity, the price (Net Value in ORDER_ITEMS_OUT) is still calculated based on required quantity.
    Example
        Required Quantity = 100
        Item unit price = 10
        Sum of Confir Quantity = 80
        I expect the net value to be 80 X 10 = 800.
        But the net value comes out to be 100 X 10 = 1000.
    It seems that the price calculation is not aware of availability check.
    Is there a way to find out the exact price that is based on actually available units?
    Thanks.
    Rahul

    Hi Rahul!
    Pricing is based on the ordered quantity. I'm not sure, it might even be executed <i>before</i> availability check. In case you plan to delivery just the confirmed quantity, then reduce the ordered quantity in a second step.
    How is this done online? Normally simulation uses identical logic. If the change is done manually, then you need a second simulation call.
    Regards,
    Christian

  • BAPI_SALESORDER_SIMULATE is  hangs up when running for multiple users

    Hi SAP Gurus,
    I am using BAPI_SALESORDER_SIMULATE for price repricing . However when multiple users or same user runs in multiple sessions, one session will run , however other sessions till it reaches BAPI it is fast and once it enters to BAPI, it got hangs up or keeps running  & not giving any output.
    Any thoughts how i can impove the performace for muliple users when i am using this BAPI.
    Here are the details i am sending to BAPI .
    call function 'BAPI_SALESORDER_SIMULATE'
          exporting
            order_header_in    = lv_sd_order_header
          importing
            return             = lv_return
          tables
            order_items_in     = lit_sd_order_items_in
            order_partners     = lit_sd_order_partners
            order_schedule_in  = lit_sd_order_schdl_in
            order_items_out    = lit_sd_order_items_out
            order_condition_ex = lit_sd_order_condition.
    Your thoughts most appricated.
    Regards
    Harikrishna

    Hi,
    Please let me know where i have to use this destniation .
    I didn't find any parameter like this in BAPI.
    Regards
    Harikrishna

Maybe you are looking for

  • Can't remove a movie from my autoload file

    when i remove a movie from my autoload file, it reappears next time i open the autoload file. is there a way to permenantly delete the movie? thanks

  • Stored Procedure for UDO

    Hi All!!! ) May my question be silly to u...But kindly share ur ideas in the following concept to throw light in my perspective... We dont go with SDK (Not at all using it). We being in mid of a R&D. We hav created a UDO. the table contains some fiel

  • Parsing datestring to GregorianCalendar on Solaris.

    Hi There! I?m parsing strings to GregorianCalendar object with the class SimpleDateFormat. The problem is that when I?m running on a Windows platform everything works out great but when I deploy it on a Solaris platform the parser parse it wrongly. H

  • NANO WILL NOT TURN OFF!!

    Please help - Everything works fine with the Nano when it is connected to laptop. When not connected, all works but it can not be turned off - only put in pause. If I connect back to laptop, I can turn it off just fine. I have reset, restored, etc. w

  • Blue dots not showing up anymore

    Updated apps and new apps are no longer displaying g a blue dot. Showing up fine until today.