cancel
Showing results for 
Search instead for 
Did you mean: 

My own user exit formula doesnu00B4t work: HELP!!!

Former Member
0 Kudos

Hi Experts,

I have created my own user exit formula an doesn´t work.

The steps I have followed are:

1.- I have implemented my own class ZPR00ValueFormula wich inherits from ValueFormulaAdapter SAP standard class.

2.- I have overwritten the method overwriteConditionValue, with the following piece of code:

public class ZPR00ValueFormula extends ValueFormulaAdapter {

private static UserexitLogger userexitlogger = new UserexitLogger(ZPR00ValueFormula.class);

public BigDecimal overwriteConditionValue(IPricingItemUserExit item, IPricingConditionUserExit condition) {

BigDecimal result;

IPricingDocumentUserExit header = item.getUserExitDocument();

ICurrencyValue val = condition.getConditionValue(); //KONV-KWERT

userexitlogger.writeLogDebug("valor antiguo" + val.getValueAsString());

BigDecimal qnt = item.getProductQuantity().getValue();

result = qnt.multiply(new BigDecimal("100"));

userexitlogger.writeLogDebug("valor nuevo" + result);

return result;

}

public BigDecimal overwriteGroupConditionValue(IPricingDocumentUserExit item, IGroupConditionUserExit condition) {

// no se hace nada

return null;

}

}

3.- I have uploaded my class (.jar file) to CRM server using transaction /SAPCND/UE_DEV (previously I have created anABAP Package for my implementation and a workbench trasnport order).

4.- I have assigned my implementation ZPR00VF to a formula number 603 for user exit type VAL using transaction /SAPCND/UEASS.

5.- I have attached eclipse to VM debugging mode and I have set a java breakpoint in my code. When I create an order from transaction CIC0, the debugging is started and the execution is suspended at the breakpoint allocated in sentence line (see above code):

private static UserexitLogger userexitlogger = new UserexitLogger(ZPR00ValueFormula.class);

However never achieve the breakpoint allocated within the method

overwriteConditionValue, which means that it is not executed durig price calculation procedure. ¿Why happens that? ¿Do I need to customize something else? ¿From where this method is called fom ABAP source code?

Please, I woud appreciate any recommendation. I will reward points.

Thanks in advance.

Pedro

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

When any change is done in IPC, the VMC or the application server must be rebooted in order to apply this change. Then the system recognized the formula you has been yet created, and it can be assigned to the properly condition in your pricing procedure through SPRO transaction.