0UNIT Conversion
I am using the UNIT_CONVERSION_SIMPLE FM to translate a unit field when it is not equal to 'CS'. The first thing I am checking is to see if the 'unit' coming in is equal to 'CS'. If it is not, then I call the FM to do some conversion. I get an error message saying that "COMM_STRUCUTRE does not have component called 'cases'.
IF COMM_STRUCTURE-CASES NE 'CS'.
WEIGHT = COMM_STRUCTURE-CASES_REV.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = COMM_STRUCTURE-CASES_REV
UNIT_IN = COMM_STRUCTURE-CASES
UNIT_OUT = 'CS'
IMPORTING
OUTPUT = WEIGHT
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
DIVISION_BY_ZERO = 2
INPUT_INVALID = 3
OUTPUT_INVALID = 4
OVERFLOW = 5
TYPE_INVALID = 6
UNITS_MISSING = 7
UNIT_IN_NOT_FOUND = 8
UNIT_OUT_NOT_FOUND = 9
OTHERS = 10.
ENDIF.
How can I check to make sure the unit coming in is NE to 'CS'?
Hi Nyrvole Vincent,
Try to write the same code in start routine(update rules).
Like
Loop at data_package.
IF Data_package-CASES NE 'CS'.
WEIGHT = Data_package-CASES_REV.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = Data_package-CASES_REV
UNIT_IN = Data_package-CASES
UNIT_OUT = 'CS'
IMPORTING
OUTPUT = WEIGHT
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
DIVISION_BY_ZERO = 2
INPUT_INVALID = 3
OUTPUT_INVALID = 4
OVERFLOW = 5
TYPE_INVALID = 6
UNITS_MISSING = 7
UNIT_IN_NOT_FOUND = 8
UNIT_OUT_NOT_FOUND = 9
OTHERS = 10.
ENDIF.
Endloop.
Hope it helps
Srini
Similar Messages
-
Dear Guru,
I have a source key figure of type quantity of fixed UoM ABC.
I could not load this into a data target that is 1:1 field mapping.
Is it anything to do with the unit? Could you advise please? Thanks.
Regards,
SuzieSuzie
As you know 0unit is a standard dimension and system will take care automatically. Please check this thread to know how to convert 0unit
0UNIT conversion
https://websmp108.sap-ag.de/~sapdownload/011000358700000488512003E/Howto_alternate_uom5.pdf
Hope this helps
Thnaks
sat -
NO SID value found for 'PR' in 0UNIT
Hi,
When I run a query on a remote multiprovider , though the SID value exists in the SID table, I get this error message.
I tired all the options of running the SID conversion for 0UNIT in RSRV. Its fine, no errors.
Also ran the consistency check for dimensions of the cube.
I ran thru LISTCUBE for the same selections i made in the query.
Basically the query has a selection on the key figure which has unit as 0BASE_UOM which has restriction on a date field which is a NUMC datatype with 8 characters.
If I remove the date field the query runs fine but no value is retrived and is blank for key figure.
I see data existing for the selections I have made in the query.
Any idea why it happens only when there is a restriction on the date field. Though date is populated and the key figure too.
ThanksCan you try updating Unit tables ?
BI - RSA1 - Source System - RClick on Source System -
Transfer Global Settings - Select Units of Measurement -
Update Tables - Execute. -
UOM Conversion to be used in transformation
Hi Experts,
I am trying to make use of the BI 7.0 UOM conversion feature in one of our InfoCubes where the source quantity which is in Base UOM needs to be converted to cases.
I went through all the steps which are as follows:
1. I have 0BASE_UOM as the base unit of measure for 0MATERIAL
2. A DSO was automatically generated with the name Z_OUOM I gave in 0MATERIAL configuration
3. I created a transformation for this DSO with source as 0MAT_UNIT
4. Created a DTP and loaded the DSO
5. Created a Conversion type with settings 'Dynamic Determination of conversion factor as Using Reference InfoObject = 0MATERIAL
Source Unit of Measure: Unit of Measure from Data Records
6. Target Unit of Measure: Fixed Unit of Measure = 'CS'.
In InfoCube transformation I have the following mapping:
Rule type: Direct Assignment
Target Unit: 0UNIT
Unit: From Conversion
Conversion Type: ZCASES
Source Unit: 0BASE_UOM
Source Fields of Rule:
0MATERIAL
0REQ_QTY
0BASE_UOM
Target Fields of Rule:
ZREQ_QTY
0UNIT
When I load the InfoCube, the quantities are indeed getting converted to cases provided there are conversion factors available for that material in the UOM generated DSO
Here is my question: How can I handle records where the material does not have conversion factors in the UOM generated DSO?
I get an error when loading using a DTP as 'No quantity conversion possible'. There is one record in the source DSO that has a material number with no unit conversions in UOM generated DSO
I am aware there is an option of using routine, but I do not want to use it unless I am sure this method won't workHi Aditi,
There is no way you can check if UOM is present or not in UOM DSO and then do the conversion via using conversion type.
What you can do is write the routine rather than conversion type, to fetch the data from the UOM DSO.
If conversion factor exist then you can convert it simple by multiplying with the value, if not then you can easily skip the record by putting IF condition.
IF factor <> 0.
ENDIF.
Hope this helps.Let me know if you need more info.
Regards,
Viren -
Quantity Conversion : How to map 0MAT_UNIT_ATTR with UOM0MATE ODS
Hi dear BWers,
Can any of you help, about mapping 0MAT_UNIT_ATTR fields to UOM0MATE ODS fields in conversion ?
(UOM0MATE is my generated ODS for conversion factor)
I've mapped them as below, but not sure with which Datasource field to map 0BASE_UOM:
Material (0MATERIAL) ==> Datasource : MATNR Material
Quantity - Counter (0UOMZ1D) ==> Datasource :UMREZ Counter
Quantity -Denominator (0UOMN1D) ==> Datasource :UMREN Denominator
Base Unit of Measure (0BASE_UOM) ==> Datasource :<b> ???</b>
Unit of Measure (0UNIT) ==> Datasource :MEINH Alternative Unit
Regards,
RozzSolved on my own as below:
0Base_Unit exists in master data table of InfoObject 0MATERIAL.
While creating tranformation rule for ODS, 0Base_Unit should be mapped to master data attribute of 0MATERIAL.
So, every item's base unit is loaded not from 0MAT_UNIT_ATTR or similar datasource, but from 0MATERIAL master data.
(Of course I0MATERIAL master data should have been loaded beforehand) -
Unit conversion (days to hours)
Hello,
I have got a question concerning unit conversion in integrated planning.
I created a key figure called "workload" and asigned the UnitInfoObject "0unit". Two input-ready queries are available in order to plan the workload in two different units of measurements. One allows planning in hours and the other in days. Furthermore, I would like to have the planned data only in the unit "hours" available in the InfoCube. This requires a unit conversion in some place for the input-ready query that retrieves workload data in days. I am not sure, if a planning function is the appropriate manner to solve this issue. The conversion factor should be 8 as 1 working day is equal to 8 working days.
Can anybody explain me how to do that? The sap.help.com is not very expressive in respect with this issue!
I found a "HowTo" paper in sdn. Apparently, you have to maintain an InfoObject in order to convert the data. I do not understand why you need an InfoObject as a the conversion is a simple factor (in this case times 8 ).
Thanks in advance!
Mario
Edited by: Mario Di Marzo on Dec 15, 2008 6:44 PMyou can use a FOX formula for that
-
Unit Conversion in BEx BI7.0
Hello all,
Im working with BI7.0 and I have been reading the posts about the quantity conversion and In order to use the unit conversion in BEX (not in transformation), I can apply the sugestion described in
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b7b2aa90-0201-0010-a480-a755eeb82b6f
But what happens with the post in this forum about using transaction RSUOM ..i mean if i use the link solution isnot necessary to use transaction RSUOM? or with BI7 is the "new" solution to use RSUOM ¿?
Can someone please explain a little bit
Thanks in advance for your help.
MVthanks gdmon for your help..
I have already created the underlying DSO and "connected" to the 0MAT_UNIT InfoObject using a transformation. In the transformation rule I have been conected:
MATNR->0MATERIAL,
MEINH->0UNIT,
UMREZ->0UOMZ1D,
UMREN->0UOMN1D
but I still have 0BASE_UOM not assigned ..my question is if is possible not assign the infoObject 0BASE_UOM (initial) or if I have to assign to a R/3 field..but do you know which field can I assign?
thanks in advance for your response...
MV -
Quantity conversions using customer exit.
Dear SDN,
I have created a Query to display the Sales Qty Actual vs Plan.
I am getting the values in different dimensions NM3,M3,GLL...I want to display the Query output in Metric Tons.
In which user exit I have to write the code?
Please provide the code to convert from NM3,M3,GLL..etc to Metric Ton.
Thanks & Regards,
Praveen.KHi Praveen,
I think routine for keyfigures in update rules is the right plyce. Create a routine for required KF and check u2018Unit Calculation in the Routineu2019 (BW 3.5)
sample (Assummung 0QUANTITY is desired KF and 0UNIT contensts allocated UOM) :
* fill the internal table "MONITOR", to make monitor entries
* result value of the routine
CASE COMM_STRUCTURE-UNIT."convert value according to unit
WHEN 'M3'.
RESULT = COMM_STRUCTURE-QUANTITY * 1000 .
WHEN '...'.
RESULT = COMM_STRUCTURE-QUANTITY * x .
ENDCASE.
* result value of the unit
UNIT = 'TON' ."allocate fixed UOM here 'TON'
* 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
x represents factor for conversion from unit provided by comm_structure to 'TON'
For detailed information please take a look on routine info in editor.
Good Luck
Joe -
Hi, this i have already posted but i didnt got helpful suggestions...
plz help me to resolve this...
I am using BW7.0's feature - Quantity Conversion (TCode: RSUOM).
I am Traying to Convert all the Quentity Units to one Unit , I have followed the following Steps.
Steps :-
1) In the BEx Tab page of Characteristic 0MATERIAL, maintained the field "Base Unit of Measure" as 0BASE_UOM
2) In the BEx Tab page of Characteristic 0MATERIAL, maintained the field "Unit of Measure for Char." by click on the New button, it will generate a DataStore Object, which will store information for calculating the conversion factor.
3) I have created Transformation from 0MAT_UNIT_ATTR to Generated DSO
4) The Mapping is
MATNR ---> 0MATERIAL. ( Material )
MEINH ---> 0UNIT ( Unit of Measure )
UMREZ --- >0UOMZ1D ( Counter )
UMREN ---> 0UOMN1D ( Denominator )
MATNR -
> 0BASE_UOM ( This is Lodead through Master Data )
5) Fill in the DataStore generated with data, using the DataSource 0MAT_UNIT_ATTR Using Transfermation and DTP.
6) Data is Loaded Successfully AND the Data is in Active.
7) Then I Created the Quantity Conversion Type through TCode RSUOM ( Eg: ZUOM ),
In the Conversion factor Tab , The Dynemick Determinetion of Convertion Factor Option 3 I have selected with reference to 0MATERIAL InfoObject.
8) In UoM Tab, I have selected radio button
Source : Info Object for Determining the Unit of Measure ( 0MATERIAL and Quantity Attribute 0BASE_UOM )
Target : Fixed Unit of Measure ( CAR )
9) Then in Query Designer , Quantity Key Figure Properties ( Eg: 0QUANT_B ) --- > In Unit
Conversion I have selected Conversion Type ZUOM
When I execute the Query , it is not Converting the Units.
I am Trying to Convery all the units in to CAR ( Cartons )
Eg : 10 Kg = 1CAR
1000 kg = 1 MT
Where I am missing ? what are the Radio Buttons I have to select in RSUOM
Thanks
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bi/define%2bunit%2bof%2bmeasure%2bconversions%2bin%2b0material%2bdefinition
I check this link , i didnot find all the screens..
Regards,
SHAIK
Message was edited by:
shaikHi Shai,
It sometimes show without all the screens, I guess u should refresh.
Anyway,
Try running the query thorugh RSRT with Debug, with a breakpoint on currency/quantity conversion. I would suggest to restrict the test query to show only one record that should be converted so the debugging would be easier.
Anyway, Have fun. -
Updation of missing 0unit field
in my transaction table i have a 0unit column with the list of unit/currency...i have dozen in this list but when i check in the dimensions of the quantity this is missing therefore i get a error which says error in convertion.How can i load dozen into the quantity dimension table to get rid of this error.i get the resilt if i remove dozen from my transction table.but i want to get the result having dozen in my table.help
Hello Harish
Hello Harish
1. Check whether 0UNIT is present in table T006 or not if not then maintain
2. T006 and the /BI0/SUNIT should be in synchro...just chk whether the SID table has entry for unit DOZEN...if not reactivate it from RSD5
3. If above both are fine then check for conversion logic in T006 table..if you have maintained the correct value over there...
Follow the below links for additional help
http://help.sap.com/saphelp_nw2004s/helpdata/en/27/b65c42b4e05542e10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/27/b38c4284a8c353e10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/4f/707242df019c60e10000000a1550b0/content.htm
Thanks
Tripple k -
Error: CONVERSION_EXIT_CUNIT_INPUT and 0Unit
Hello Experts,
1.
I am loading a simple .csv (Excel) file and I get the error:
Error in conversion exit CONVERSION_EXIT_CUNIT_INPUT
Any hints here?
2.
--Somehow I suspect the column for Units (0Unit), with values: Case, Each, Dozen, U.S. pound, can be the culprit. Where in BW can I see the list of approved values in 0Unit to see if these 4 values are in the list?.
Thanks in advance.hi Amanda,
table t006* contains 'master' data for all unit of measurement, characteristic 0unit.
to populate data of any characteristic infoobject that reference to 0unit, the value must exist in the table.
to display the table you can use transaction se16.
for entry/maintain you can use transaction CUNI
or first transfer from r/3 use rsa1->source system->right click r/3 source system->'transfer global setting', mark 'unit of measurements' and choose option 'update table'->execute, after that se16 check if EA and DZ exist or not (also the other 2 values).
as i mentioned, we cannot maintain unit for 'Case, Each, Dozen, U.S. pound'. for unit just have 3 digit.
i do suggest, first correct your .csv file for these values, 'each' with EA and 'dozen' with DZ, don't know code the Unit Of Measurement for 'case' and 'us pound'.
if no standard code for case and us pound, you may define them with transaction CUNI, e.g us pound with USP, remember to change the .csv value with the same.
hope this helps. -
hi all
i just want to know what are the contents allowed in 0unit or 0currency (in all unit char)
basically my problem is i am using 0unitas fixed unit of measure
and i gave cs,dz in unit flatfile
and it is giving and error in conversion exitoutput
i used to use cs,dz in 3.0b it worked
but in upgraded version its giving this error
so i thought let me check the contents of this 0unit and etc
these cs,dz might be changed thats what i thought
thanks in advance
charanhi the content for 0currency are as folllows
X
CURRENCY
SID
CHCKFL
DATAFL
INCFL
X
0
X
X
X
X
ADP
2
X
X
AED
3
X
X
AFA
4
X
X
AFN
5
X
X
ALL
6
X
X
AMD
7
X
X
ANG
8
X
X
AOA
9
X
X
AOK
10
X
X
AON
11
X
X
AOR
12
X
X
ARA
13
X
X
ARS
14
X
X
ATS
15
X
X
AUD
16
X
X
X
X
AUD4
17
X
X
AUD5
18
X
X
AWG
19
X
X
AZM
20
X
X
BAD
21
X
X
BAM
22
X
X
BBD
23
X
X
BDT
24
X
X
BEF
25
X
X
BGL
26
X
X
BGN
27
X
X
BHD
28
X
X
BIF
29
X
X
BMD
30
X
X
BND
31
X
X
BOB
32
X
X
BRC
33
X
X
BRL
34
X
X
BSD
35
X
X
BTN
36
X
X
BWP
37
X
X
BYB
38
X
X
BYR
39
X
X
BZD
40
X
X
CAD
41
X
X
X
X
CDF
42
X
X
CFP
43
X
X
CHF
44
X
X
CLP
45
X
X
CNY
46
X
X
COP
47
X
X
CRC
48
X
X
CUP
49
X
X
CVE
50
X
X
CYP
51
X
X
CZK
52
X
X
DEM
53
X
X
X
X
DEM3
54
X
X
DJF
55
X
X
DKK
56
X
X
DOP
57
X
X
DZD
58
X
X
ECS
59
X
X
ECU
60
X
X
EEK
61
X
X
EGP
62
X
X
ERN
63
X
X
ESP
64
X
X
X
X
ETB
65
X
X
EUR
66
X
X
X
X
EUR3
67
X
X
FIM
68
X
X
FJD
69
X
X
FKP
70
X
X
FRF
71
X
X
GBP
72
X
X
GEK
73
X
X
GEL
74
X
X
GHC
75
X
X
GIP
76
X
X
GMD
77
X
X
GNF
78
X
X
GRD
79
X
X
GTQ
80
X
X
GWP
81
X
X
GYD
82
X
X
HKD
83
X
X
HNL
84
X
X
HRK
85
X
X
HTG
86
X
X
HUF
87
X
X
IDR
88
X
X
IEP
89
X
X
IGPM
90
X
X
ILS
91
X
X
INR
92
X
X
X
X
IQD
93
X
X
X
X
IRR
94
X
X
X
X
ISK
95
X
X
ITL
96
X
X
X
X
JMD
97
X
X
JOD
98
X
X
JPY
99
X
X
X
X
KES
100
X
X
KGS
101
X
X
KHR
102
X
X
KIS
103
X
X
KMF
104
X
X
KPW
105
X
X
KRW
106
X
X
KWD
107
X
X
KYD
108
X
X
KZT
109
X
X
LAK
110
X
X
LBP
111
X
X
LKR
112
X
X
LRD
113
X
X
LSL
114
X
X
LTL
115
X
X
LUF
116
X
X
LVL
117
X
X
LYD
118
X
X
MAD
119
X
X
MDL
120
X
X
MGF
121
X
X
MKD
122
X
X
MMK
123
X
X
MNT
124
X
X
MOP
125
X
X
MRO
126
X
X
MTL
127
X
X
MUR
128
X
X
MVR
129
X
X
MWK
130
X
X
MXN
131
X
X
MXP
132
X
X
MYR
133
X
X
MZM
134
X
X
NAD
135
X
X
NGN
136
X
X
NIC
137
X
X
NIO
138
X
X
NLG
139
X
X
NOK
140
X
X
NPR
141
X
X
NUC
142
X
X
NZD
143
X
X
OMR
144
X
X
PAB
145
X
X
PEI
146
X
X
PEN
147
X
X
PGK
148
X
X
PHP
149
X
X
PKR
150
X
X
PKT
151
X
X
PLN
152
X
X
PLZ
153
X
X
PTE
154
X
X
PYG
155
X
X
QAR
156
X
X
RMB
157
X
X
ROL
158
X
X
RUB
159
X
X
RUR
160
X
X
RWF
161
X
X
SAR
162
X
X
SBD
163
X
X
SCR
164
X
X
SDD
165
X
X
SDP
166
X
X
SEK
167
X
X
SGD
168
X
X
SHP
169
X
X
SIT
170
X
X
SKK
171
X
X
SLL
172
X
X
SOS
173
X
X
SRG
174
X
X
STD
175
X
X
SUR
176
X
X
SVC
177
X
X
SYP
178
X
X
SZL
179
X
X
THB
180
X
X
TJLP
181
X
X
TJR
182
X
X
TJS
183
X
X
TMM
184
X
X
TND
185
X
X
TOP
186
X
X
TPE
187
X
X
TRL
188
X
X
TTD
189
X
X
TWD
190
X
X
TZS
191
X
X
UAH
192
X
X
UAK
193
X
X
UGS
194
X
X
UGX
195
X
X
UNI
196
X
X
USD
197
X
X
X
X
USDN
198
X
X
UYP
199
X
X
UYU
200
X -
Conversion of Characteristic Values to SIDs is taking long time
Hi Experts,
Cube load is taking more than 7 hrs to complete for 6 million records. Max time is at Conversion of Characteristic Values to SIDs. Cube consists of 500 fields. Load is from DSO to Cube. DSO has 10 fileds with no SID flag check for activation. Remaining fields in the CUBE are pouplated looking in to other DSO's. Start and End routines are executing very fast. How to fasten Conversion of Characteristic Values to SIDs step. I need to load 15 million records daily as part of delta. any suggestions.
Thanks
SunilHi Sunil,
Go through the below link, it will be useful
http://aq33.com/business-warehouse/Articles-05269.html
Regards,
Marasa. -
11i to r12 Conversion - help needed
Hi
My client is doing re-implementation of r12 and migrating from 11i to r12. I need help particularly on conversions side. The client is a SaaS company. they are considering to bring open and history transactions and applied/unapplied receipts to r12 AR.
- how to migrate revenue scheduled open/closed invoices from 11i to r12 since rev schedules for a SaaS company is expected to be long terms. and how to make sure that rev schedules are correct upon migration to r12??
- for partially paid invoices how to make sure that the same partially paid amount reflects in r12 upon conversion? can a negative line amount equalling to paid amount be a possible solution??
- upon migration do the closed invoices have to be converted as open and receipts re-applied after migration in r12 or they can be brought in as-is with status closed?
- if customer paid for an invoice using a credit card in 11i and upon migration it came to notice that the credit card is no longer used by the customer so how to re-apply the same receipt in r12 which was applied in 11i using that credit card. do we have to enable it in r12 just for closing the invoice? what could be possibilities?
please anyone if can answer would be very helpful
Thanks
-MSIt depends on the dpi. Usually 72dpi = 72 pixels per inch.
1000/72 = 13,88888 inch
1 inch = 25,4 mm
13,88888 * 25,4 = 352,7777 mm
You do the arithmatic with a calculator.
To do the same with pictures, you can do it in any image editor. Even Preview.app :
!http://www.wyodor.net/_Discussions/PreviewResize.png! -
IMessage beta loose all saved conversations when I open and close a window.
iMessage beta looses all saved conversations when I open and close a window.
Just reporting this bug... Could not find anyother place to do it.
JonathanI thought it was doing that also. But I found that if I start a new chat with someone I was messaging before, then the old messages re-appear in the messages window.
Maybe you are looking for
-
Time Machine fixed Safari for me
Ever since the upgrade to webkit safari has refused to open for me. Kept crashing. I tried all the suggestions posted here but none helped. Then the light dawned for me. I have time machine with b/u's to august. Looking in TM sure enough there was sa
-
Ethernet Controller - Driver not installed - Compaq Presario
Hello, I am new here so be gentle I have just bought second hand a Compaq Presario 6240EA, motherboard is a Compaq 07D0h. In the hardware - device manager, it shows 'Other devices' - Ethernet Controller, with a large yellow question mark and exclamat
-
How do you know when you are using the internet?
If I am using an app that requries internet, and I press the middle button to get out of it am I still using part of my data plan?
-
PROBLEM: Native email client can't open/save attac...
"error downloading attached file..." does anybody know how to solve it??? I need to download attached files Thanks
-
Hello, I have a question regarding the creation of a role. I just want to know if I could create a role for a functional consultant for an specific module (i.e. PM or MM) and I don't know how to create it. The specific role will permit the c