cancel
Showing results for 
Search instead for 
Did you mean: 

UoM Conversion

p_m8
Participant
0 Kudos

The Actual Work (Key Figure) entered in the R/3 can be in either Mins or Hour. Example:

Workorder... UoM ... Actual Work

10004593.....MIN ... 7.25

10004593.....Hour... 3.5

These transaction is loaded into BW, and store in the Cube as follow also:

Workorder... UoM ... Actual Work

10004593.....MIN ... 7.25

10004593.....Hour... 3.5

When I display this on the query, I have the following on the result:

Workorder... UoM ... Actual Work

10004593.....MIN ... 7.25

10004593.....Hour... 3.5

Question:

How can we convert the UoM from MIN into Hour???

Can this be achieve in Query Designer level or the conversion need to be built in Update Rule, how?

We're on BI7, any new functionality support this? We need it to be converted into Hour so that we can sum the Key Figure and display it as

single record on the result.

I know this can be difficult (not possible?) to achieve but I hope some of you come across this.

Please help, thank you!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Lynn,

I BI7 u can do this in transformation.For ur key figure write a routine which takes as input the source key figure value and the source UoM. Now convert the value to Hr if it is already not in hrs.Now u have the traget key figure value in Hr.

For the unit either u can set the UoM as constant 'HR' or change the key figure to have fixed UoM 'HR'.

Please revert if u need more help.

Regards,

Rathy

p_m8
Participant
0 Kudos

Rathy,

So thankful that you know how.

Exactly the kind of soluation that I am looking for (build in the transformation). I need your help to explain this in detail...

"...For ur key figure write a routine which takes as input the source key figure value and the source UoM"

and how we convert the value into HR?

Are yuo saying if we assigned HR to the Fix UoM field in the Key Figure, than BW will convert all the incoming UoM into what enter Fix UoM automatically???

Thanks, point assigned!!!

Former Member
0 Kudos

Hi Lynn,

No if u fix it as 'HR' still u will have to write a routine to convert it to HR based on what unit u get the input.

So in ur routine u will read the input value and unit and if unit is HR pass it on to target else you make calculations and send the new value to target.

Regards,

Rathy

p_m8
Participant
0 Kudos

Hi Rathty,

That's the problem, exactly how we should write the routine?

Former Member
0 Kudos

Hi Lynn,

In source fields u give ur source value and corresponding UoM.

lets say - ZWRKHOUR and ZWRKUNIT.

in routine...

if ZWRKUNIT not eq 'HR'.

if ZWRKUNIT = 'MIN'.

<<here u write the logic to convert min to hours>>

elseif ZWRKUNIT = 'SEC'.

<<here u write the logic to convert sec to hours>>

endif.

else. <<if it is already hours dont convert>>

result = ZWRKHOUR .

endif.

hope it helps.

Regards,

Rathy

Edited by: Rathy Moorthy on Oct 20, 2008 5:40 AM

p_m8
Participant
0 Kudos

Hi Rathy,

I prefer to use/do it in Transformation:

http://help.sap.com/saphelp_nw04s/helpdata/EN/4f/707242df019c60e10000000a1550b0/frameset.htm

I read but dont really understand how we can do it via Transformation. Do you have experience in this? Exactly how to configure this via Transformation.

Former Member
0 Kudos

Hi Lynn,

The approach i suggested is to be used in transformations.

U create a transformation from 1 data target to another and u can give rule definitions for all fields.

Regards,

Rathy

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

I kept fixed unit in key figure and make sure that in the transformation -->rule details -->make it as currency-->NO CONVERSION. It worked for me.

Thanks,

Rohit

former_member205352
Active Contributor
0 Kudos

I dont know if you would prefer this as you are planning for transformation but you can try this.

Create 4 RKFs with your key figure :

RKF1--UOM -- Sec

RKF2--UOM -- Min

RKF3 --UOM - Hr

RKF4---UOM - Day

Create a CKF for Hr :

(RKF1/3600)(RKF2/60)RKF3+(RKF4*24)

Similarly you can create other key figures using correct multiplier.

Now you have all your converted values.Display or hide appropriately to achive your requirement.

Hope this helps.

Edited by: Praveen G on Oct 20, 2008 4:47 AM

p_m8
Participant
0 Kudos

Rathy,

Thanks, let me try and will let you know if further help needed.

Pravee,

Thanks, I have no problem to convert this at Query Level using your earlier suggestion:

- Create the Convertion Quantity Type, assigned it via query.

The requirement is we need to build this in Transformation.

Hope you all will stay with me until last!

Thanks a lot for your help thus far.

p_m8
Participant
0 Kudos

Rathy,

I failed to achieve that via Transformation.

I have created Conversion Quantity Type in BI called zConvertUoM.

In the Cube, I have InfoObject 0OPR_ACTWRK, which has 0PROC_UNIT assigned in the Unit.

In my DataSource, I have field ISMNW (Actual Work) and ISMNE (Unit).

Now create the Transformation from the Cube to my DataSource.

I linked the field ISMNW from DataSource to InfoObject 0OPR_ACTWRK. I can see that field ISMNE also linked to this InfoObject 0OPR_ACTWRK. The Rule basically created.

I double-click the Rule, I do the following:

Rule Type = Direct Assignment

Unit = from Conversion

Conversion Type = zConvertUoM

Source Unit = ISMNE

When I save, I hits the following:

Rule 32 (target field: 0OPR_ACTWRK): Field ISMNE must be assigned to an InfoObject

Message no. RSTRAN526

Diagnosis

No InfoObject is assigned to field ISMNE. This is mandatory if you want to use the corresponding rule type.

System Response

The rule is invalid.

Procedure

Assign an InfoObject to the field.

What is wrong? What did I missed?

Please help!

Former Member
0 Kudos

Lynn,

You need to assign the source fields (in the Rule Details window) to info objects. You do that in the Source Fields of Rule block in the "IOAssignment" field.

In your case you need to assign ISMNW to 0OPR_ACTWRK and ISMNE to 0PROC_UNIT

John

Former Member
0 Kudos

Hi!

Please help me in my situation:

I use unit conversion in a query and achieve necessary result(For example I see kilograms in grams), but when I try to use unit conversion in "Input ready query" cells for input become unactive. It must be noticed that then I use "currecy translation" in "Input ready query" cells are active for input.

Is it possible to use unit conversion in "Input ready query"?

What is probable source of the problem?

Thanks in advance.

Former Member
0 Kudos

Hi Lynn,

Please go through this link from SAP documentation and see if it helps.

http://help.sap.com/saphelp_nw70/helpdata/EN/43/03731ddc696e97e10000000a11466f/frameset.htm

Regards,

Praveen

p_m8
Participant
0 Kudos

Hi Pravee,

Unfortunately not.

We would need to do the conversion in the Update/Transfer Rule... the incoming UoM can be in Day, Week, MIN but the output must be in HR.

How can we do the conversion in Update/Transfer Rule???

Please help...need to solve this urgently...