Skip to Content
0

BAPI_PRICES_CONDITIONS creates multiple records with overlapping dates

Oct 21, 2016 at 03:51 PM

313

avatar image

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

10 |10000 characters needed characters left 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.

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

2 Answers

Veselina Peykova
Oct 21, 2016 at 05:53 PM
1

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.

Share
10 |10000 characters needed characters left characters exceeded
Manish Kumar 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!!!

Share
10 |10000 characters needed characters left characters exceeded