cancel
Showing results for 
Search instead for 
Did you mean: 

Updated price in pricing user exit cannot be saved

0 Kudos

Hi Gurus,

Can anyone help me to save the updated price in sales order?

[Requirement]

Overwrite the condition amount with the amount which is determined and calculated outside of standard pricing procedure.

[What's been done so far]

- Implement a logic to overwrite XKOMV-KBETR in USEREXIT_NEW_PRICING_VBKD

- Implement a logic to overwrite XKOMV-KBETR in USEREXIT_NEW_PRICING_VBAP

Somehow it's been successful in debug mode.

But when I run through without debugging after we implement the logic, the price is updated according to the amount in the condition table.

Is there any other user exit where I have to take care of?

Your help would be much appreciated.

Best Regards,

Mari

Accepted Solutions (0)

Answers (1)

Answers (1)

sridhar_v
Active Contributor
0 Kudos

Hi,

Can you please elaborate your requirement ?

as I am trying to understand but seems I am failing somewhere to complete my picture.

What do you mean by "Outside the pricing procedure"? does this condition type is a manual condition?

or will it be having some condition records?

Sorry but need the requirement again in clarity.

Thanks,

Sridhar.

0 Kudos

Hi Sridhar,

Thanks a lot for your reply.

Please let me explain a bit deeper;

[Requirement]

- Condition record is maintained for the condition type, normally it's retrieved from there.

- Only when there are multiple items with the same customer material, we need to sum up the quantities and check the scale price for the total quantity.

- If there is scale price found, overwrite the price from standard pricing procedure with the retrieved amount.

[Example]

SO#12345

Item#100 Customer Material: ABC, Quantity 200EA

Item#200 Customer Material: ABC, Quantity 100EA

Condition record for Customer Material ABC

base price: 10USD

200EA ~: 8USD

300EA ~: 6USD

In this case, the price for both item#100 and item#200 are to be 6USD.

We will sum up the quantity and it goes 300EA, then utilize CONDITION_RECORD_READ.

Retrieve KBETR based on 300EA.

[Issue]

Reading condition is working well, and it seems we are successful to overwrite XKOMV-KBETR with 6USD both in USEREXIT_NEW_PRICING_VBKD and USEREXIT_NEW_PRICING_VBAP.

But item #100 will be overwritten with 8USD and #200 with 10USD when the document is saved.


Your advice would be much appreciated.

Best Regards,

Mari

Former Member
0 Kudos

Hi Mari,

Why don't you mark your condition as 'Group condition' and use suitable routine (standard or create a new one with help of ABAPer) in field 'GrpCond.routine'?

I think this would meet your requirement.

Please revert back to us for any further assistance, if needed.

Regards

SD

0 Kudos

Hi Samier,

Thanks a lot for your feedback.

In fact, we've been unaware of group condition.

Thanks for giving us a light on it.

But since we are sharing the global template and the condition type is also used by other companies, we prefer to use userexit rather than customizing/routine.

And now we found FRM_KONDI_WERT_800 (RV64A800) where finally I was successful to update the price as I wanted.

Thanks a lot.

Best Regards,

Mari

jobis
Contributor
0 Kudos

HI,

I agree with Samier.  Group conditions will be the best option here.

Another option is to create your own pricing routines ( Alt Condition Base value) with the proper logic.

Thanks

Jobi

0 Kudos

Hi Jobi,

Thanks for your feedback as well.

Group condition sounds like a good solution for this requirement, but this time we are already in the middle of implementation of our own logic.

Next time I will take this option into consideration.

Thanks.

Best Regards,

Mari