Skip to Content
avatar image
Former Member

BAPI_PRICES_CONDITIONS creates multiple records with overlapping dates

Hi,

I am using BAPI_PRICES_CONDITIONS to create / change condition records.

When i am using it to create and change rate its working fine.

However when i am trying to change dates or create new record with overlapping dates I get multiple recorrds in my condition table.

Scenario 1.

Before

Condition_1 21.10.2016 --> 31.12.9999

After

EXpected:

Condition_1 21.10.2016 --> 30.10.2016

Condition_2 31.10.2016 --> 31.12.9999

Actual:

Condition_1 21.10.2016 --> 31.12.9999

Condition_2 31.10.2016 --> 31.12.9999

Scenario 2

Before

Condition_1 21.10.2016 --> 31.12.9999

After

EXpected:

Condition_1 21.10.2016 --> 30.10.2016 (change end date)

Actual:

Condition_1 21.10.2016 --> 31.12.9999

Condition_1 21.10.2016 --> 30.10.2016

Add comment
10|10000 characters needed characters exceeded

  • It is always recommended to update the pricing condition in a create mode and not in change mode. This means, if you update a revised price for some material with the same existing combination of condition record, it will overwrite the existing record irrespective of validity dates. Try manually for some existing condition record via VK11 and update the outcome.

  • Get RSS Feed

3 Answers

  • Oct 21, 2016 at 05:53 PM

    With the risk to sound rude - have you tried to search SAP notes?

    When you use BAPI_PRICES_CONDITIONS as a criteria, the first result in my list is 135984 - Conditions cannot be created with BAPI_PRICES_CONDITIONS.

    In the Solution part of the note, you can read the following:

    When you use this function module, inconsistencies may occur; you should therefore not use it!

    There is another note mentioned there, which explains how to resolve potential inconsistencies and mentions alternative ways to create condition records.

    I am not a developer, but probably it makes sense to read the note carefully and follow the advice.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 21, 2016 at 03:57 PM
    -2

    Could you guys please inform me how can i avoid creation of multiple records in condition table .

    Many Thanks!!!

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 12 at 04:06 AM

    Thank you everyone,im facing the same issue with BAPI_PRICES_CONDITIONS(Overlapping Dates:

    Internal error: T IVAKE F IVAKE_INSERT I MV130F0I),

    previously i was going to try RV_CONDITION_COPY, but after reading this blog Pricing Upload : Overlapping Dates -- RV_CONDITION_COPY

    it may also has the same issue with BAPI_PRICES_CONDITIONS,

    but this notes 1135984 - Conditions cannot be created with BAPI_PRICES_CONDITIONS is useful,

    i will follow it and re-try the 'Solution'.

    Add comment
    10|10000 characters needed characters exceeded