Skip to Content

BAPI_CONTRACT_CREATE item condition order

Nov 14, 2017 at 07:02 AM


avatar image

Hi all,

I tried to create a contract with item condition with BAPI "BAPI_CONTRACT_CREATE", and I already input the "COND_COUNT" in parameter "ITEM_CONDITION".

the contract created successfully, but the order of item condition was wrong, can anyone give me some advise?

Thanks and best regards,


10 |10000 characters needed characters left characters exceeded

Functionality wise, does it really matter as it is a time dependent condition ?


Hi Dibyendu Patra,

it will make net price different as I need after the condition calculate, do you know how to use this ?


you accepted the answer and rejected the acceptance again, but you did not ask anything more, what do you actually expect now?

Is it solved or not?

* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Axel Ackermann Mar 29 at 05:24 AM

After a longer discussion we got a final answer (works as designed).

In fact there are two different ways to sort the added conditions.

ME31K / ME32K do not notice the order given by the counter of the calculation scheme.

Using the BAPI step and counter is taken into account.

Solution will be to adjust the calculation scheme or enhance the custom specific coding.

Best regards


10 |10000 characters needed characters left characters exceeded
Jürgen L Nov 14, 2017 at 06:45 PM

How does your system behalf if you do it in its normal maintenance transaction ME31K / ME32K?

If I am not mistaken then the positions of the conditions are defined in the calculation schema and not freely exchangeable

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Jürgen,

ME31K / ME32K remains the order as typed in. No change within the order.
Further tests using the BAPI did show different system behaviour using additional manual Condition Types.
Some of them are taken in the order we expect, others are shifted according to the counter within the Calculation Scheme.
Checking the Condition Master Data we could not find any difference.

Thanks for any helpful hint.



And what does SAP do if you exchange the sequence of conditions in the BAPI ? Does it post then correct or does this not change anything? How is the sorting then, is it in alphabetical order or just random clutter?

what values are actually maintained in



Nic Teunckens Nov 21, 2017 at 08:16 PM

Hello Shujian

Please verify how the Sorting of Item Conditions in a 'regular' (Manually) created Contract is registered in the Tables "A016" or "A068".

Verify the Relationship of the "ITEM_NO" / "SERIAL_ID" / "COND_COUNT" of such a Regularly created Contract via BAPI "BAPI_CONTRACT_GETDETAIL" and emulate that type of Logic ...

(So I'm assuming the Links between those Fields are not respected in your Custom Development ...)

Further, check the SAP ONE Support for SAP-KBA's on the BAPI as there are some recent Updates in the form of SAP-KBA's, there are dozens of new SAP-KBA's ...

Hope that helps

Nic T.

10 |10000 characters needed characters left characters exceeded