cancel
Showing results for 
Search instead for 
Did you mean: 

BRF Plus function returning internal table after processing decision table

0 Kudos

I want to create a BRF function which will accept a single parameter as input and will return an internal table with the corresponding match found in the decision table. For example, I have a decision table as below

Plant1 Mat1

Plant1 Mat2

Plant1 Mat3

Plant2 Mat4

Now my function will take plant as input parameter and process the decision table. It should bring the first 3 matched values in an internal table as a returning parameter in the function.

This entire process should done in BRF Plus only. Please suggest how we can achieve this.

Accepted Solutions (1)

Accepted Solutions (1)

christianlechne
Active Contributor

Hi,

as you already said, you can use a decision table for that. You can define the way how the decision table is evaluated within the setting of the decision table. Here you have to tick the checkbox "Return all matches found", which is the multiple match mode. This way all matching columns will be returned from the decision table. For more information see help.sap.com - Decision Table

Concerning the result object of your function: You have to define a corresponding data object within BRFplus that represents the structure of your internal table. You can also bind that to an existing DDIC object.For more information see: help.sap.com - Create a Table Data Object

BR

Christian

Answers (2)

Answers (2)

carsten_ziegler
Active Contributor

Rule with two steps:

  1. Have a decision table in all match mode with columns: condition column Plant, result column Material
  2. Have a table operation or loop expression to reduce the results to max 3 entries
0 Kudos

Can Anyone please help me here.