cancel
Showing results for 
Search instead for 
Did you mean: 

IPC JAVA Userexit -Pricing routines

Former Member
0 Kudos

Hi experts,

I am new to IPC java pricing routines and i have a requirement like this,

1. The user enters manually in Quote the new price. (say cond type ZNEW)

2. The cond record for ZTKE is available with the price as well as Max price and Min Price.

3. The Routine formula should validate with ZTKEcondition record with maximum and minimum price available.

4. If the new price is within the max/min range then pass it. System will do nothing and accept the manual price entered.

5. If the price is not within the range then issue error message u2018Price not within the rangeu2019. The system does not accept the manual entry of the new price.

Please let me know how to approach for the solution of the above.

I know how to raise the error messages ,my main concern is to check the new price of condition type with the other condition type min n max values.

Please provide me some pointers on it.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

MichaelNe
Employee
Employee
0 Kudos

Hi,

the methods, which will help you in your JAVA user exit implementation are already outlined in my last reply.

Best Regards,

Michael

Former Member
0 Kudos

You can set the check the condition type ZNEW with the upper and lower limits and then set this condition to inactive if the validation fails. Also you can give an error message using following document extract from the pricing user exit manual:

A message can be raised in the application log using the following methods. Depending on the scenario the message is

then displayed along with the other application messages. This is not supported in every scenario, e.g. Mobile

Applications.

􀁸 IPricingDocumentUserExit.setStatusMessage(StatusEvent event)

􀁸 IPricingItemUserExit.setStatusMessage(StatusEvent event)

As StatusEvent you should use one of its subclasses ErrorStatusEvent, InfoStatusEvent or WarningStatusEvent

(all from package com.sap.spe.base.util.event. Here is the signature of the method to use:

/** Creates a new instance with specified context

  • @param source the source of this event

  • @param messageArea the message area of the status information

  • @param messageNumber the message number of the status information

  • @param messageArguments the arguments of the status information

  • @param message the current status information

  • @param context the context of this event

  • @param popup open message in PopUp

*/

public StatusEvent(Object source, String messageArea, int messageNumber,

String[] messageArguments, String message, String context, boolean popUp);

The boolean popUp should be false. True is not supported, source should be the local object this, messageArea is the

ABAP message class.

Regards,

Charles Antony

Edited by: charlza42 on Jul 24, 2010 9:23 AM

MichaelNe
Employee
Employee
0 Kudos

Hi,

why do you not simply allow the manual change of the rate for ZTKE? The system would automatically consider the limits of the condition record?

Anyway you could try the following in your formula: use pricingItem.findPricingCondition to retrieve the ZTKE, use pricingCondition.getConditionRecord and try to cast to IPricingConditionRecord. This interface contains the methods getUpperLimit and getLowerLimit. Hope this will help.

Best Regards,

Michael

Former Member
0 Kudos

Hi Micheal,

Thanks for the reply. I am not doing anything with ZTKE. I need to check with ZNEW.when user enters the new price in ZNEW condition type ,that price should be checked with the price in ZTKE with its min n max values. I.e if the entered new price is in the range between max n min values ,system will take that entered new value ,if its not it will through a error.

So, for this i need to get the condition record value of min n max and compare with the entered new price in ZNEW and check for the above. I hope you got my point.

Please let me knoe which way i can proced to do so....

Thanks.