Skip to Content

Populate a BRF+ Table from 3 other Tables based on Match

Hello Experts,

I have this requirement in a BRF+ where I have data in 3 BRF+ Tables as shown below

Target Table needs to be populated from the values TAB1, TAB2 & TAB3 as per below logic

Logic -

1. Product in TAB2 are subset of Products in TAB1.

2. Product in TAB3 are subset of Products in TAB2

3. The Products from TAB3 should have the priority over TAB2 to populate into Target Table and TAB2 should have the priority over TAB1.

In other words, if a Product is in TAB1 but not in TAB 2 and TAB 3 then that record from TAB1 should be inserted to the Target table, else if the Product is in both TAB1 and TAB 2 then record from TAB2 should be inserted into Target Table else, if the Product is in all 3 tables, then record from TAB3 should be inserted into Target Table.

The final Output table should have data composition as shown in the TAB4 figure.

Looking for a quick help.



source-tables.jpg (35.0 kB)
target-table.jpg (19.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 13, 2016 at 09:26 PM

    Hi Shared,

    there is no real good way to solve this reading from tables using BRFplus. You can use the Loop Expression to loop over TAB1 and then check if there is an entry in the other tables using the Table Operations expression on TAB2 and TAB3. The final result can then be added to the Output table.

    This is kind of brute force and when taking a look at the generated ABAP code you become aware that the code is not very performant as the TABLE Operations can not use any performance optimized operations like binary search. So for this task I would go for plain ABAP and then use a procedure call expression in order to allow optimal performance for the searches.

    You did not state why you want to do this in BRFplus but from the top of my head I do not see an advantage to put the building of the output into BRFplus.

    Best regards,


    Add comment
    10|10000 characters needed characters exceeded

    • Hi Christian,

      Thank you for your response. Your approach works.

      So the problem I mentioned here was a part of the bigger prototype that I am working on that includes manipulation of data read from underlying BW via DSO or Input Ready IP queries, generating new set of data and then writing it back to BW Infoprovider.

      For initial approach I referred below SAP Doc -

      BRFplus Applications in BPC for S/4 HANA Finance

      As for the requirement, User should enter data via Input Ready BEx query at different levels of Product Hierarchy and then call the BRF Function to propagate the entered to the Child nodes of the Product and then Save it back to the BW InfoProvider.

      Though I was able to achieve the desired capability but with a smaller set of data, Now I am skeptical about the performance.

      Do you have any doc that explains the performance considerations when using functionalities of BRFPlus? Any DOs and DONTs will work too.



  • Dec 15, 2016 at 06:12 AM

    Hi Sharad,

    here is a paper on that topic:

    For Big Data scenarios this blog is worth a look:

    Best regards,


    Add comment
    10|10000 characters needed characters exceeded