on 06-16-2014 11:57 AM
Hi experts,
I have the following requirement:
based on an input table I have to fill three different tables. To determine the values of the output tables, all the entries of the input tables need to be analyzed. As it is not possible to add three result data objects, I defined a structure with three nested table as result object.
Within a loop I want to insert the data to the nested tables of the result data object. But BRF+ doesn't offer me the nested table as target for the insert.
Are there any other ways of achieving this?
As all this is regarded as one rule from a functional point of view, I don't want to create three functions. If I create three functions, one could call them separately which would lead to a wrong result.
Thanks in advance for any help & cheers!
Martin
Hi Martin,
You don't need to have 3 result data objects. Just put all 3 tables into your context and then you can choose which context parameters you treat as importing, changing, or exporting.
Typically in complex BRFplus functions like this we name the context parameters I_xxxx for importing, E_xxxxxx for exporting etc.
Hope that helps
Jocelyn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
Jocelyn's proposal is quite cool as this avoids the handling of nested tables in the result parameter, so its easier to handle in the BRF+ workbench.
If you go this way (which I would do) just keep in mind to create the code template for the ABAP call in the backend in the proper way, namely tick the option "Return Changed Context Values" in order to receive the manipulated context values:
BR
Christian
Hi Martin,
One way to do it would be to create table variables , filling them up with data , and then looping through each such variable and inserting each line to the target attribute of the result object which represents the same table.
X is the table variable filled up with data.
Loop at X.
insert values into Result_Object-attribute from x_wa.
Regards,
Indranil.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.