Skip to Content
0
May 11, 2011 at 03:35 PM

BEx Query Question

33 Views

Hello Experts:

I am having a brain block and am confused how to approach this problem:

Scenario:

Current Data

Year Month Material Version Status Version Quantity

2011 1 10 40 1 100

2011 1 10 40 2 150

2011 1 10 65 3 175

2011 2 10 40 1 200

2011 2 10 40 2 250

2011 2 10 40 4 300

2011 2 10 65 5 325

Selection screen for the query is Fiscal Year, Material (Optional) & Version Status:

The output of the query should give me

Year Month Material Version Status Version Quantity

2011 1 10 40 2 150

2011 2 10 40 4 300

in other words for every material the query should get the maximum of the Version within the Period and output the corresponding Quantity field.

Can I accomplish this using a Customer-exit variable. I was envisioning a New Field in the cube which will hold a concatenation of YearMonthMaterialVersionStatus&Version.

The Customer exit variable would be of step = 2, and will would concatenate the only the maximum of every version based upon the status and create YearMonthMaterialVersionStatus&Version. This would be restricted in the quantity field.

Will this work? Is there anything else that can be done to accomplish this scenario? Any suggestions please.

Thanks

EmJay