cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancing Price Conditions to PO

Former Member
0 Kudos

Hi Experts,

I am working on a requirement on PO Price Conditions. It is required to update the price condition of PO according to certain customer fields on the PO line items. I have tried several BAdi with no luck.

BBP_DOC_CHECK_BADI - cannot actually change the document

BBP_DOC_CHANGE_BADI - does not offer the price condition information

BPP_DOC_SAVE_BADI - worse, just provide the document GUI

tried to use some other function modules (condadd*), but no luck as well.

those are internal function modules and are coupled with some global variants/checkings

Anyone has experience on this ?

Any advice ? Many Thanks.

Yours,

Chun Fai

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Chun Fai

Did you find a way to enhanse your price conditions

I have a smilar requirement and would appreciate your input as to what you did

cheers

alex

Former Member
0 Kudos

BBP_DOC_CHANGE_BADI - does not offer the price condition information

This BADI would be the only reasonable place for document update. However since price condition is not part of the interface, there is very slim chance that you can make use of this BADI for your requirement.

What I would suggest you do is that you enhance the source code of FM BBP_PD_PO_UPDATE. In the enhancement implementation, update the internal table lt_upd_pridoc based on your criteria and call FM 'BBP_PROCDOC_UPDATE' again.

Former Member
0 Kudos

Thanks Jay,

I have done a debugging with the function module "BBP_PD_PO_UPDATE".

However, i found that the function module does not process the price condition at all.

Internal tables for price documents are always empty.

Even when a condition is added using the screen control, the price document is not available as well.

Values manually updated during debug does not take any effect.

The document information is not full available. (e.g. the header GUID, etc)

Certainly we can call other function modules to obtain such document informations (BBP_PD_PO_GETDETAIL, BBP_PD_PO_ITEM_GETDETAIL)

However, I am doubtful as to

1. whether the function module can handle the information as proposed

2. whether price document creation, etc, "backend" operations are required if no condition pre-exists

3. whether there are other side effects

At the meantime, I am still looking forward to solutions around BAdi, in order to keep the complexity and side effects to a minimum. Enhancement framework has more or less side effects on the existing system functions.

PS: the price condition function modules i mentioned in the first message are "PRC_PD_ITEM_ADD_COND", "PRC_PD_ITEM_CHANGE_COND" and "PRC_PD_ITEM_DELETE_COND".

Any other experience or recommendations?

Many thanks.

Yours,

Chun Fai

Former Member
0 Kudos

Internal tables for price documents are always empty.

Even when a condition is added using the screen control, the price document is not available as well.

Values manually updated during debug does not take any effect.

During document update, FM 'BBP_PD_PO_UPDATE' is called a number of times. When you add the price condition on screen and go back to debugging, pay attention to the calls to this FM and see if I_PRIDOC has any value. My guess is that it would in one of the calls.