I have a characteristic <b>0BATCH</b> that is compounded on <b>0MATERIAL</b> and <b>0PLANT</b>. Also, 0BATCH has an attribute <b>0CREATEDON</b> (date the batch was created for that material in the plant). Since, 0BATCH is compounded on 0MATERIAL and 0PLANT, the same batch number can have multiple master data records with different materials and plants (with different 0CREATEDON dates for the batch/ material/ plant combination)
I want to select all batch/material/ plant combinations that have a created on date of say less than a year ago and then pass this set of material/plant/batch to another query to retrieve the total inventory quantity for the material/plant/batch (compounded set).
I tried to do this using two queries:
Query 1 - select material, plant and batch (in rows) combination from the batch infoobject where the creation date is more than a year old.
Query 2 - Create a replacement path variable on <b>batch</b> in query2 to retrieve data for all batches passed from query1
My issue is that query number 2 only conditions on batch numbers and not on the compounding infoobjects 0MATERIAL and 0PLANT. Thus, I could have two records for a batch such as
BATCH1, MATERIAL1, PLANT1, Created <b>more</b> than a year ago
BATCH1, MATERIAL2, PLANT2, Created <b>less</b> than a year ago
Since BATCH1 was created more than a year ago, the replacement variable passes it from query1 to query2, however, query2 also returns information about MATERIAL2, PLANT2 (which I do not want).
Any Ideas on how to correct this would be much appreciated.
Thanks