Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have two tables, sales lines and item execption (see below).
Now I want to compre if an item from sales line is in exception table and if the posting date is between valid_from and valid_to. I used a tmap and did a look up from sales table item_no to exception table item_no.
Then I created a flag where I compared the interval at the output side.
row1.item_no != null &&
((TalendDate.compareDate(row1.posting_date , row2.valid_from) ==1 || TalendDate.compareDate(row1.posting_date , row2.valid_to) ==0) &&
(TalendDate.compareDate(row1.posting_date , row2.valid_to) == -1 || TalendDate.compareDate(row1.posting_date , row2.valid_to) ==0)) ? 1 : 0
My issue now: sales0003, item abc, output = 0 but must be 1.
I already checked the Lookup Model in item exception = load for every line, Match Model = all
Why the output is still 0 for sales line? It seems that always the first record of lookup table is checked.
How I can solve this issue?
Thanks for any hints.
Now I got the solution. You have to add after tmap the component taggregate and aggregate the flag to max(flag) then you'll get for n-input lines the exact n-output lines and the flag value is shown correctly.
Now I got the solution. You have to add after tmap the component taggregate and aggregate the flag to max(flag) then you'll get for n-input lines the exact n-output lines and the flag value is shown correctly.