Skip to Content
0

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

Dec 09, 2016 at 08:31 PM

99

avatar image

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.

Thanks

Sharad

source-tables.jpg (35.0 kB)
target-table.jpg (19.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Christian Lechner
Dec 13, 2016 at 09:26 PM
0

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,

Christian

Show 1 Share
10 |10000 characters needed characters left 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.

Thanks

Sharad

0
Christian Lechner
Dec 15, 2016 at 06:12 AM
0

Hi Sharad,

here is a paper on that topic: http://scn.sap.com/docs/DOC-4561

For Big Data scenarios this blog is worth a look: http://scn.sap.com/community/brm/blog/2014/07/04/brfplus-in-big-data-scenarios

Best regards,

Christian

Share
10 |10000 characters needed characters left characters exceeded