cancel
Showing results for 
Search instead for 
Did you mean: 

BRFplus Use Table as Context and in Decision Table

0 Kudos

Hey Guys,

i have a problem. I want to use a table as context/input in BRFplus.

I want to use two columns of this table in my decision table as condition columns and one column, which is empty at the time of beginning as result column in my decision table and update the result column in my input table.

How can i assign columns of my context/input table as condition and result columns of my decision table? I tried different ways but the values are not passed correctly to the decision table...

Goal is to have an input table, fill one column based on other columns and send this updated table back.

Greetz

Nik

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

I get the following Error:

CL_FDT_RULE CHECK_DOBJ_ASSIGNMENT

I am not able to convert a source object into a target object.

RaminS
Participant
0 Kudos

I remember wanting to do this exact thing. You can have a table as input and change the value of certain columns in BRF+, but it does not readily expose the changes back in the calling program. At the time, I found two ways of getting around this:

  1. I put a breakpoint in my calling abap program and debugged the generated BRF+ process method. In there I found the internal name of the my input table, something like: data(lt_changed_input) = /FDT/0DGX5KB88SSS3STTDLFAMSF5O=>my_input_table. You can access this object after your call to the BRF+ function, and it will contain the changed columns.
  2. Have two tables of the same type, lt_input, lt_output. Create your BRF+ function with lt_input as context, and lt_output as result. After the loop where you call the decision table for each row of lt_input and update the result column(s), copy the changed lt_input table into lt_output.

The second option is cleaner which is why I went for that, although it requires you to create two objects of the same table type.

There may be better ways of doing it, but this is what I ended up doing.