Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_PRICES_CONDITIONS

Former Member
1,901

Dear all,

I'm using FM BAPI_PRICES_CONDITIONS to perform the condition update. Where the actual update is on fields "Valid to" and "Valid from".

I'm in version 4.7 and using OPERATION = '004' <--Change: Message contains changes

This is my scenario:

Existing record

Valid to = 99991231

Valid from = 20090101

Condition rec no = 0000281909

I want change the above to:

Valid to = 20201231

Valid from = 20100101

Condition rec no = 0000281909

With the above, i'm succeed the execution of the FM. But the result is out of expection. Because instead of changing Condition rec 0000281909's valid to and from date, it created a new entry in my condition table. By knowing that the "Valid to" field is part of the key field in condition table, so in technical point of view it can not match the old record and it proceed to create a new entry.

I might need your advice on how should achive the above by changing existing condition rec's "Valid to" and "Valid from" date without creating a new entry.

Your opinion is highly appreciated.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,417

Hi,

One Option could be to delete the existing Condition Record and Create a New One with New Valid From and Valid to dates.

Refer :

Dear all,

I'm using FM BAPI_PRICES_CONDITIONS to perform the condition update. Where the actual update is on fields "Valid to" and "Valid from".

I'm in version 4.7 and using OPERATION = '004' <--Change: Message contains changes

This is my scenario:

Existing record

Valid to = 99991231

Valid from = 20090101

Condition rec no = 0000281909

I want change the above to:

Valid to = 20201231

Valid from = 20100101

Condition rec no = 0000281909

With the above, i'm succeed the execution of the FM. But the result is out of expection. Because instead of changing Condition rec 0000281909's valid to and from date, it created a new entry in my condition table. By knowing that the "Valid to" field is part of the key field in condition table, so in technical point of view it can not match the old record and it proceed to create a new entry.

I might need your advice on how should achive the above by changing existing condition rec's "Valid to" and "Valid from" date without creating a new entry.

Your opinion is highly appreciated.

3 REPLIES 3
Read only

Former Member
0 Likes
1,418

Hi,

One Option could be to delete the existing Condition Record and Create a New One with New Valid From and Valid to dates.

Refer :

Read only

0 Likes
1,417

Hi Ajay,

Thanks for your reply and i've read through the url link before. Yes, we can proceed with the idea of 1st delete the existing condition and then follow by create a new one with the new validity date.

Perhaps the deletion(003) function from the FM is just only mark "X" to deletion indicator, field KONP-LOEVM_KO but NOT the physical delete. So in order to achieve physical delete we need to apply OSS note 1101523.

Am i correct? Please comment.

Read only

0 Likes
1,417

I think so....