Skip to Content

BAPI_CONTRACT_CREATE item condition order

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,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    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


    Add comment
    10|10000 characters needed characters exceeded

  • 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

    Add comment
    10|10000 characters needed characters exceeded

    • 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



  • 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.

    Add comment
    10|10000 characters needed characters exceeded