cancel
Showing results for 
Search instead for 
Did you mean: 

Display of Alternate Unit of Measure

Former Member
0 Kudos

Hi there,

We try to display alternate unit of measure <b>in BEx</b> by implementing the following Howto Doc:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/how to report data in alternate units of measure

It works fine as long as 0MATERIAL is included <b>in the rows</b> of the report.

In any other case (e.g. 0MATERIAL is a free characteristic or not included in the report at all) this solution won't work and we get the "red x"!

Any suggestions??

Thanx,

Ofer.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ofer,

Virtual Char/KF behave as normal Char/KF in a sense that you create and add them in Infoproviders or Queries just like normal Char/KF. But they do not hold any data/values and their values are determined only at query run time (by writing code in user-exit for virtual kf/char.)

The logic could be something like this (though I'm pretty sure, would need to work on it again 😞

Keep in mind that all this would be performed at query run time:

1. For each record, read material master data.

2. Get quantity, UoM for above record.

2. Get UoM from selection screen variable.

3. Convert and store in virtual KF.

You can search this forum for more information on it. Do let us know if need any more info.

Regards,

Vikrant.

Former Member
0 Kudos

Hi Vikrant, and thanx!

We've checked the Virtual KF option but things are a bit more complecated:

Our "Sold Quantity" KF is a calculated KF which, in turn, summarizes several restricted KF. As such, it can be calculated only <b>after</b> aggregation - "too late" to convert UoM quantities if you don't have the 0material resolution in the report.

So, the best solution we can think of right now is adding a new KF to the infocube and... reload the data.

Any better idea?

Thanks,

Ofer.

Former Member
0 Kudos

Hi Ofer,

Two thoughts:

1. To add a KF in Cube, same as quantity but with constant UoM for all materials. This KF can be used in reporting for any alternate UoM.

Advantage: Good Query performance.

Disadvantage: Space. Moreover what about old data.

2. Virtual KF. I think this can be used.

Advantage: Less space.

Disadvantage: Bad query performance.

Regards,

Vikrant.

Former Member
0 Kudos

Eugene, Vikrant,

1. Using VBA will not work because there are quite a lot of reports to deal with.

2. KF in the cube will not work for historical data.

3. Virtual KF - can you be more specific?

Thanx,

Ofer.

Former Member
0 Kudos

Hi Ofer,

Alternate UoM and conversion factor is connected to a particular material. If you don't have 0MATERIAL in the rows then conversion from one UoM into another one just doesn't happend. In you reports with red 'x' what do you have in rows and columns?

Best regards,

Eugene

Former Member
0 Kudos

Hi Eugene,

Thanks for your response.

In the columns I have "Sold quantity" and in the rows I'd like to have Plant or Employee and so on, but not 0MATERIAL (some of my reports doesn't need the 0MATERIAL resolution). "Sold quantity" should be displayed in different UoM each time.

Any ideas?

Thank you,

Ofer

Former Member
0 Kudos

Hi Ofer,

Do you mean that during different query runs UoM may be chosen different? Or in one query run there are should be different UoMs according to sold materials quantities and units?

Best regards,

Eugene

Former Member
0 Kudos

Eugene,

Each query run can have different UoM chosen: First I want to display quantities in PCE but in another run of the same query in CSE.

Besides, each material has its own convertion factor (from PCE to CSE) - this is why I implemented the Howto paper.

The problem occures when I try to display total quantities per Plant (for example) without having the 0MATERIAL in the rows.

Ofer.

0 Kudos

Hi Ofer,

As Eugene rightly points out, 0MATERIAL is required in the query if you are using the Alt UOM conversion in query runtime. If you wish not to include 0MATERIAL in the query, I can suggest you precalculate it in the cube by having an additional keyfigure and then you can get this in the reports without having 0MATERIAL.

Regards,

Zubin

Former Member
0 Kudos

Hi Ofer,

One straightforward but very bad solution is to execute a query with 0MATERIAL in BEx Analyzer and with using some VBA coding to show in another Excel sheet query results as you wanted. It is suitable if only you have to provide such report. Certainly, performance will suffer.

I don't think that precalculation in the cube is possible because source and target UoMs may change.

Just a thought - never implemented this - to use virtual KF?

Best regards,

Eugene