Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BRFplus Application Exit - Formula Function (Returning Amount Parameter)


  I'm trying to add a user defined function for the Formula Expression.

    1. I've created a user defined function ZCOPOUN_DISC_CALC.

    2. Assigned it to the formula functions using the application exit

    3. Then I created a Formula Expression that uses the function ZCOPOUN_DISC_CALC from the drop down.

    4. I've assigned the appropriate parameters (2 parameters: a. Amount_param b. Char10_param).

    5. Now I try to execute a rule that evaluates this expression and get an Unicode error when BRFplus tries to convert the Amount field.

Note: The Amount_param will fill the two importing parameters I_PRICE and I_CURRENCY

I'm using NetWeaver EHP2 SP7.


While browsing through the SDN forum I came across a message which said:

"NW 702 BRFplus is more intelligent and can also take non-BRFplus format."

Message Reference:

I guess this means the Unicode error during type conversion from BRFplus format to non-BRFplus format and vice versa should not occur.


The user defined method:

  The the user defined function is defined with 3 importing parameters and 1 returning parameter

class-methods ZCOPOUN_DISC_CALC
      !I_COPOUN type CHAR10
      value(RV_DISC_PRICE) type SFBE_AMOUNT .

NOTE: I've even tried using the return type FDT_S_AMOUNT instead of SFBE_AMOUNT. It still gives the same Unicode Dump


The following method is not correct, but I've just written it.

Alternatively I've tried using two exporting parameters, one for currency and another for currency key. Now BRFplus gives a dump when I try to check the formula. (This must be due to the usage of two exporting parameters I guess). Also the function now asks for currency and currency key separately in the importing parameters (Which was not the case when I was using a returning parameter).

    Is there any alternative to return the amount fields in user defined formula functions to avoid this dump?

Thanks & Regards

Not what you were looking for? View more on this topic or Ask a question