on 05-11-2006 9:16 AM
Hi all,
My infoobject 0OPR_ACTWRK uses 0PROC_UNIT for units. It holds data in days and in hours. When I load it to a cube, I want to convert all values to working hours.
I figured out that I have to use an update routine in my update rules. A lot of forum threads about unit conversion mention the function module UNIT_CONVERSION_SIMPLE. Can I use this function for my problem? Or should I use a different function module?
This will be my first ABAP code, so can anyone help me and tell me what I have to fill in exactle in the routine format below?
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
result value of the routine
RESULT = .
result value of the unit
UNIT = .
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
Thanks in advance!
Regards, Pieter
Dear Peters,
1) You have to give us the 'KeyFigure' name in the cube where you want to update as working hours..
2) Basiaclly U have to folow the following steps..
a) Go to Update rules in change mode.
b) Click on the Required 'Keyfigure'.
c) Select the 'Formula' ( U need not have Routine for this one really.. looks like atleast.. )
d)On the editor Use left side charactristics by double clicking and use right side to build the formula..
Regards,
Hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vikash and Hiri,
The paper you refer to doesnt help me, and neither the suggestion for using a formula in the update rules (as far as I can see). I could use a formula if the data is always in days and I wanted to convert is always to hours. But the problem is that the data is sometimes in days, sometimes in hours. I think I need some simple function like this, but I don't know how to ABAP it:
if unit = days then result = pldwrk * 8
else pldwrk = pldwrk
Any suggestions?
Regards, Pieter
Dear Pieter,
I am not infront of the system..
the following surely will give error.. :).. so post back here.. so that me or someone else will reply you..
So let us start witht he following coding in the 'Start routine'.
LOOP AT DATA_PACKAGE.
IF DATA_PACKAGE-UNIT= 'DAY'.
DATA_PACKAGE-opr_pldwrk = DATA_PACKAGE-opr_pldwrk * 8.
ELSE.
Do nothing.
ENDIF.
MODIFY DATA_PACKAGE.
ENDLOOP.
Regards,
Hari
Message was edited by: Hari Kiran Y
Message was edited by: Hari Kiran Y
Hi Pieter,
Not sure whether you have see this -
https://websmp101.sap-ag.de/~sapdownload/011000358700000488512003E/Howto_alternate_uom5.pdf
regards
Vikash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.