FROM VBRK ( SET ("table_weight" = '1') ) __SAP_LEFT_OUTER_JOIN VBRP ( SET ("table_weight" = '2') ) ON (
Mean that is is second in the join order ? which seems right to me - I join the header to the items.
As to volumes, I didn’t show the where clause which filters it meaning it isn’t too bad on performance. The reason I am not just pulling the tables on their own is they don’t all have this date logic, so I would need to pull the whole table each time otherwise.
((VBRK.AEDAT >= $EXTRACTSTARTDATE AND VBRK.AEDAT <= $EXTRACTENDDATE ) or
(VBRK.ERDAT >= $EXTRACTSTARTDATE AND VBRK.ERDAT <= $EXTRACTSTARTDATE ))
UPDATE:
ARGHHH !!!
Just notices the bug in my where cluase
Update 2: This didn’t fix it. Outer joins don’t see to be working. inner joins do however…
Sorry, I meant the join rank. The weight is your join rank and determines which tables are joined first.
Join can define the join rank on the tables (old, keep to 0 otherwise for backwards compatability this figure will be used) or in the From tab (new).
The higher the earlier the table will be used “first”. Same join rank means that it will be joined together.
So you set a filter on VBRK (header & starting table) to get new and changed records. That means that VBRK needs to have the highest join rank, not as I see now the lowest (1). So you switched the logic
By the way, the SAP supplement in the BODS manual has some pretty good explanations on this behaviour. On the SAP side this is extremely important to set for performance! On the database side it does not matter as BODS lets the database analyser handle the join, unless the data is processed on the job server.