on 10-02-2015 12:46 PM
Funny I execute the function
FUNCTION Z_MM_0530_AMOUNT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IV_PRICE) TYPE NETWR
*" REFERENCE(IV_CURRENCY) TYPE WAERS
*" EXPORTING
*" REFERENCE(ES_AMOUNT) TYPE FDT_S_AMOUNT
*"----------------------------------------------------------------------
ES_AMOUNT-NUMBER = IV_PRICE.
ES_AMOUNT-CURRENCY = IV_CURRENCY.
Entering as parameter 20,00 EUR I get 20,00 EUR
If I do the same in class method I get 2.000EUR
Can someone explain the difference ?
Cheers
Stephane
Hi Stephane
you mean in BRFplus when calling the function module/class via the call procedure expression?
BR
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
No in fact I am working with workflow and before calling a task generated by the BRF+ where I have an amount (type FDT_S_AMOUNT) I need to assign the value to number and currency
So I build a function but there is no real integration possible in SWO1 because FDT_S_AMOUNT is not recognized so I build a method in a class
And the result was different from the function call ...
When I insert the function in the class method then everything is fine.
I find it really strange
Cheers
Stephane
Hi Stephane,
I a not sure if I understood your setup completly (might be due to my not too depp knowledge in workflow), but that sound completly strange that wrapping a function module in a class delivers different results than putting the code directly in the class. Did you check calling the class standalone without any integration into workflow? Does this already give the strange results or do ethese results appear only when integrated in workflow?
BR
Christian
Christian,
I fully agree that is really really strange
But if you do have a dev system please construct a class with
IV_PRICe type NETWR
IV_CURRENCY TYPE WAERS
then a returning parameter RS_AMOUNT type FTD_S_AMOUNT
Make it static and public for testing purpose
the code is just
RS_AMOUNT-NUMBER = IV_PRICE.
RS_AMOUNT-CURRENCY = IV_CURRENCY.
You'll see that for 20,00 EUR it provides you with 2.000EUR
do the same in a function .... 20,00 EUR
That is just crazy to me
the problem occurs in a 731 005 (SAP_ABA) but correct in a 740 006....
Well things happens ....
Hi Carsten ,
Taking the opportunity, Great Book, I have already implemented some project without issue with BRF+ and with my knowledge in workflow it is really amazing what we can achieve .... really I would like the BRF+ to replace the BRF in SRM too 😉
I am part of a company of more than 250 consultant and promoting BRF+ everytime I get a chance.
Next session next week 🙂
Going back to the subject, the function I was refering to is an ABAP Function not BRF+ Function.
So that is why I don't get the difference between the same code done in a function module and in a class method. when the function is included in the Class Method the result is correct.
However I have tested in another environement and I successfully have the same result in function and Class Method.
So it might be an issue with ABAP 731 005 ??? I don't know really that is weird.
Cheers
Stephane
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.