Skip to Content
author's profile photo Former Member
Former Member

Pricing Conditions via BAPI_SALESORDER_CREATEFROMDAT2

Hello SAP Developers,

My bapi creation of sales orders with pricing is failing.

The Pricing conditions I pass in to the bapi BAPI_SALESORDER_CREATEFROMDAT2 are not picked up for my item.

I'm filling in the

ITM_NUMBER

COND_TYPE

COND_VALUE

and

CURRENCY

fields of the ORDER_CONDITIONS_IN table. But the pricing analysis of the items don't seem to reflect the value passed.

I'd appreciate any suggestions.

Regards,

Jeff

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Aug 19, 2005 at 04:01 PM

    Hi Jeff,

    I don't understand: I did the same thing and it works for me.

    You must make sure that the ITM_NUMBER in the condition table is the same as in the item and itemX tables and that the condition type is valid for the order type.

    I have another issue with the conditions: First, I did not fill the currency field with the result that values where divided by 10. Now it's OK for currency values but still for percentage values it's unsolved: Percentage values appear in the order divided by 10; i.e. a value of '10.0' goes to the item condition as 1.000 %.

    Until now, I am not willing to multiply all my percentage values by 10 hoping that there is a better way.

    regards,

    Clemens Li

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 19, 2005 at 05:02 PM

    Are you filling in the ORDER_CONDITIONS_INX table?

    I had trouble working with this BAPI until I got a handle on the INX tables.

    I've created a program called Z_BAPI_ORDER_SIM2 that creates orders using this BAPI. I'd be happy to share it with you.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Ed,

      if you used function module BAPI_SALESORDER_CREATEFROMDAT2, you may have noticed that there is a table parameter ORDER_CONDITIONS_IN of structure BAPICOND but no ORDER_CONDITIONS_INX table, at least not for (this company) release 46C.

      Wherever I have X tables (as for items and schedules) I use a little form routine passing value fieldname an both parameter and corresponding X table. In my subroutine I assign field symbols dynamically to the fields in both tables - the value goes to the params table, 'X' goes to x table.

      But still I don't know how to pass a percentage conditions value correctly all the more after I found this coding in the subsequently called function SD_SALESDOCUMENT_CREATE:

      • ex_konvkom-kbetr = conditions_in-cond_value / 10.

      ex_konvkom-kbetr = conditions_in-cond_value * 10.

      Still, if I put in a value of 10.00 [%], the value in the order will be 1 [%].

      After I found the above coding (FORM MOVE_CONDITIONS_IN), I'll multiply my value by 10 beforehand and hope that after a release change everything will be the same 😊

      regards,

      Clemens

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.