Skip to Content

BRF+ formula convert quantity

Hi Folks,
I am currently facing the following issue and I haven't any clue how to solve it.

The requirement is to create a formula in BRF+ to calculate a quantity value.

The formula looks like this (seems pretty easy):
All fields are DDIC-Type QUAN 10 with decimals 2.
RUECK and AUFT_OPER are importing-structures and related to a DDIC-structure.
The returning-parameter is QUAN 10 with decimals 2 and related to a DDIC data-element.

The result quantity should always have unit "pieces".

My formula Expression Looks like this:

I implemented the Expression in different ways but I always get exception (see Pic) or a Syntax error.

I am wondering where my mistake is? How do I create the formula properly?
I would be really greatful for any help.

Many thanks in advance

Best regards


function.jpg (156.9 kB)
formula.jpg (117.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 08, 2017 at 08:55 PM

    Hi Jürgen,

    according to your simulation trace, there seems to be a problem with the unit of a quantity: an ISO code that is used here is either not valid at all or it is not customized. The GET_UNIT and SET_UNIT formula functions do not check the validity, the check is performed in the CONVERT_QUANTITY.

    How to debug: You have to check which parameter causes the problem, so you should reduce the formula to one conversion at a time (makes no sense for your use case, just for the sake of debugging). Alternatively, you can generate the BRFplus function and debug the generated ABAP code when you execute the function call.

    In addition, you should check if a valid ISO code is used via table T006 field MSEHI.

    In general, is the explicit GET/SET of the unit necessary?

    Best regards,


    P.S. You should not use function mode, I would go for event mode in order to be future proof although this might seem like a bit of an overhead for your scenario

    Add comment
    10|10000 characters needed characters exceeded