Skip to Content
0
Dec 09, 2016 at 08:31 PM

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

855 Views Last edit Dec 09, 2016 at 09:07 PM 2 rev

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

Attachments

source-tables.jpg (35.0 kB)
target-table.jpg (19.7 kB)