Skip to Content
0

Input table values to a field to the BRF+ function

Dec 14, 2017 at 08:17 AM

148

avatar image
Former Member

To one of the input fields in a decision table, i have multiple values to be passed.

I have added table to the context of function. Also, created decision table with input as data element which is the line type of table added to the context of function. Output is also a table.

But, table values are not getting populated. In debugging, I found that data element is not getting the values passed to the context table input.

Request your input/suggestions on this topic

Thanks and Regards,

Eldho

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mike Pokraka Dec 15, 2017 at 12:38 AM
0

Not entirely sure what your'e trying to accomplish, but it sounds like you want to return all results that match a number of input values?

If this is correct, BRFplus doesn't support that. You can call the expression multiple times, either via a table loop in BRFplus or by calling it multiple times from ABAP for each entry and combining the result. Performance should be similar.

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Requirement is:

Decision table :

Input Output

Data element A | Data element B | Table Output C

Function :

Input- Data element A & Table Input of line type Data element B.

Here, in the ABAP end, I will be passing multiple values as input to the table

Output- Table Output C

I do not get value in table output C. While debugging, I understood that input value for data element B is used in the generated program and not the table values of B.

Is it possible to be achieved in BRF+ or any other ways?

Regards,

Eldho

0

No, it doesn’t work like that. You can only evaluate one value at a time in a decision table, please see my previous answer for alternatives.

0
Former Member

Thank you Mike for the response.

Think i should go with ABAP to read the entries in decision table and then find out the correct one.

I am using DSM to deploy the BRF+ entries. Could you please help me with ABAP code to read the contents of decision table

Thanks and regards,

Eldho

0

This is probably the worst option. BRF+ decision table are not really tables in the database sense. They can contain complex expressions for any field, so you cannot just 'read the contents'.

I would still go with one of the two alternatives I suggested:

- Perform a BRF+ query from ABAP for each row, or

- create a BRF+ expression to loop though your values and call the table expression for each entry.

I would imagine the performance would be similar.

A third option is to simplify the BRF+ query by leaving out the table parameter (Element B), get the whole result set and filter it in ABAP. But I'm not a big fan of this approach because you're splitting your rule across two platforms.

Or redesign your rule.

0