Skip to Content
0
Former Member
Nov 29, 2006 at 11:46 AM

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

21 Views

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