Skip to Content
avatar image
Former Member

BRF Plus function returning internal table after processing decision table

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 01, 2017 at 07:24 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 01, 2017 at 11:49 AM

    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
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 30, 2017 at 08:31 AM

    Can Anyone please help me here.

    Add comment
    10|10000 characters needed characters exceeded