on 09-28-2016 10:54 AM
Hello community and staff,
please have a look at the following problem:
I have a BRFplus function that i call from ABAP. This function recieves a Z-structure as input. The mentioned Z-struc. has several fields of type CURR and one field of type CUKY. Some of the CURR-fields are includes from other structures (blue fields in SE11).
So far i was calling the BRFplus functions from my ABAP code in the deprecated way (according to , with ->get_process_context ... ->set_value ... ->process ... ->get_value). It was slow, but it worked right.
Now, in order to improve the performance i tried to call BRFplus via the workbench-generated code, as suggested by Christian Lechner in the link above. The folowing thing happens:
- the Z-struc. fields of type CURR that are not includes are correctly converted into FDT_S_AMOUNT fields. The resulting FDT_S_AMOUNT fields have the value and the currency (from CUKY) filled.
- the Z-struc. fields of type CURR that are includes are not correctly converted into FDT_S_AMOUNT fields. The resulting FDT_S_AMOUNT fields have the value but they are missing the currency - its just empty.
Without the currency getting set right BRFplus fails on performing the compares on amounts and returns incorrect results (without any kind of warning).
Additionaly i have tried to call BRFplus via the workbench-generated function block. Here the execution got aborted by "cx_fdt_processing" exception in the method move_currency_to_ext at the code part with the following comment:
* check whether the same reference field has a different currency
* than the previous amount field with same reference field
I appreciate any comments and suggestions - especialy such that help me to get the better performance of the workbench-generated call together with the correct execution of the old call
BR
Andreas Adler
Message was edited by: Andreas Adler
Hi Andreas,
so this is not the way it should be (that's the good news :-)). It should not matter if the currency field is included in a structure or "explicit" part of the structure.
Can you provide some screenshots of the structure (the relevant parts) and the referencing for the currency fields?
What would also be of interest is the values that are handed over to BRFplus when doing the mapping.
Another point: On which system stack are you (NW Version and SP).
Best Reagrds,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again,
first things first: im working on a NW 7.4 SP 14.
Now to screenshots:
- Here are two pics of my structure in SE 11
- here are two pictures from the debugger. The first one shows my structure before being passed to the BRFplus function. The second pic shows the resulting BRFplus structure. Here you can see that the non-include fields have their currency set and and include fields dont.
- the last pic is from debugging an autogenerated method that is used to transfere the values from my struc. to the BRFplus struc.. Here you can see that the generated code differs for include- and non-include fields.
BR
Andreas Adler
Message was edited by: Andreas Adler
Hi Andreas,
I tried to reproduce it on my system (750 SP04) but was not able to
I created some dummy structure with an include that mimics your structure (at least the relevant parts):
This structure is then used as input parameter in BRFplus with DDIC binding. All fields are properly mapped to their BRFplus part
The call of the BRFplus works (no dump)
and also the generated code looks fine:
So the behavior is as you (and I) would expect it. You should first check SAP marketplace for a note on that (which I doubt as your SP is quite high) and if you are not lucky there open an OSS ticket to SAP to get a correction note
BR
Christian
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.