cancel
Showing results for 
Search instead for 
Did you mean: 

Replacement Path variable on compound infoobject

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Mehernosh Choksy ,

I have a similar type of requiremnt like this can u pls suggest me how to do it

Should calculate materials which are not moving from 1 year from plants & I should show the value of that

Report format should be like this

Jan 07 Feb07

Non Moving items 50 10.92

I am using the cube 0ic_c03 for this

I should not shoe the nonmoving items material wise but shouls show it for all the material & it sum

In the above example from 1year up to the month of Jan the total no of materials that are not moving are 5 & each of the value is Rs 10 then it shouls show me 10* 5 = 50 its value is 15.90(Sum of all materials)

If the issued qty is 0 for particular material from 1 year then we say it as nonmoving

Kindly suggest me how to work on this

Former Member
0 Kudos

try for precalculated value set

Thanks,

Teja

Former Member
0 Kudos

Hi,

How about keeping that Condition in the First query only.And You have to take replacement path for Material Only,Not on Batch.

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

Hi Anil,

Thanks for the prompt response. Unfortunately I cannot place the replacement path variable on 0MATERIAL because, a single material may have several batches that are both more or less than 12 months old. I only want batches that are more than 12 months old.

Also, the characteristic 0BATCH is compounded on 0MATERIAL hence a single batch number may have multiple materials. The only relevant combination for the second query is where the 0CREATIONDATE of the <b>compounded</b> material and batch is less than 12 months old.

My dilema is how to pass a replacement variable to the second query that takes into account the compounded infoobjects of the characteristic the variable is built on.

Regards,

Mehernosh

Former Member
0 Kudos

Hi,

Even I too expecting proper output with only one REplacement varriable on Batch. Because Batch has Cmpounding with Material.

So If it is not working with Replacement path variable on BATCH alone.

Try with TWO Replacement path variables.One on Material,and another one on Batch.

By the by:

If you have both the reports on a single Datatarget. If so. why do you need second query.

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

Hi Anil,

Thanks for your response. If I do two replacement path variables in the first query, will the second query still maintain the relationship between the material and the batch?

For example, say batch1, material1 has a creation date more than 12 months ago...but (same batch, different material) batch1, material2 has a creation date less than 12 months ago.... In my second query I only need to pull up the key figures for batch1, material1 and not for batch1, material2...

Unforunately as currently structured, these are two different data targets... the batch characteristics is one data target and the inventory infocube (that does not have navigational batch characteristics) is another datatarge...

Regards,

Mehernosh

Former Member
0 Kudos

Hi,

If the target Cube also has the BATCH charactestic with MATERIAL and PLANT Compounding,As per my assumption,one replacement path variable on BATCH should work properly.

If it is not working as mentioned above,I donot think we get solution ,even we go with 2 replacement path variable. Because Replament path variable brings Both Materials to 2nd query.

How about the Below work around.

Some how if you are able manage get MAterial1 only in the first report,by keeping Condition (like <i>no of days Columns</i>>365).Here No of days is the difference between <i>Created date and current date</i>. Here <i>Current date</i> is Formula variable with Customer Exit. In the customer exit you will assign sy-datum to this variable.

With rgds,

Anil Kumar Sharma .P

Message was edited by:

Anil Kumar Sharma

Former Member
0 Kudos

Hi Anil,

Thanks for the suggestion. Assuming I can to that, how do I still maintian the relationship between material1 and batch1 in the second query (i.e. only batch1 with material1) ?

For instance material1 may have other batches (say batch2) that were created less than 12 months ago (i.e material1-batch2 combination) which I do not want to retrieve key figures for in the second query..

Regards,

Mehernosh