Problem
I need to put some values into Z-table with unit, which are not in SAP standard(micron).
EDIT : I'm talking about 'μm' itself, not it's meaning - I made table which have 'unit' field, which are putting 'μm' inside that field, and 'value' field, which are int which have it's thickness - like, 30.
So I can use it to Report - like showing, 'this specific material have 30μm thickness'.
Question
I got that data from PI - which are sending that values from legacy system (might be unicode-based). I have to put that data, using ABAP, to my Z-table.
Do I safe to set field type, Char length 2(like um, not μm)?
How can I do comparision logic for special values [ex) If f1 = 'μm'.]
Any help will be appreciated!
The answer of the right length is answered in the documentation of Built-In Character-Like Types.
Regarding UCS-2:
Since
μis present in the UC2-charset (00B5 MICRO SIGN), it will occupy one character in ABAP and can be stored and compared as such.You might be able to change the character representation of a database table, but as soon as ABAP reads from it, it will be converted to UCS-2.
Reading a UTF-8 File with the content
μmworks just fineMore information regarding encoding via RFC can be found in Conversions in Accordance with the SAP Standard - Communication Using Remote Function Calls.