07-13-2006 6:06 AM
Hi,
I have created a structure coping a table, but I need all fields to be char, have couple of fields as CURR which have length 13 and decimals 2. what should be the lenght when I convert it to CHAR.
example: length 15 = 13+2.
can i use same data type if for multiple field?
Please let me know, will award points
thanks in advance.
mr
07-13-2006 6:08 AM
You will have to use a char type of length 16.
16 = 1321(for decimal point).
07-13-2006 6:10 AM
Hi Raj,
Yes you can use move CURR data type field to CHAR with length = 15 (13+2). You can use same data type for other fields as well.
Cheers,
Vikram
07-13-2006 6:27 AM
Hi Raj,
Whenever you have such requirements(Convertin CURR to CHAR) for Table/Structure Fields,go to the domain of the corresponding field and check the output Length. Then give this length for the CHAR.
Consider KBETR which CURR field.
If you go into the Domain of this Data Element you will find the following Info:
<b>Data type CURR</b> Currency field, stored as DEC
No. characters 11
Decimal places 2
<b> Output length 16</b>
So my CHAR must be of length 16.
Regards,
Arun Sambargi.
07-13-2006 7:20 AM
Hi,
you can select outpulen from view dd03m
example
select ouputlen from dd03m into lgth
where tabname = 'BSEG'
and fieldname = 'WRBTR'
..
-> result: lgth = 16
A.
07-13-2006 7:38 AM
Hi,
In your example better go to the data element-->Domain and check for the output length.
This should be the length of your CHAR field.
Regs,
Venkat Ramanan
07-13-2006 7:46 AM
Hi,
You can use the FM HRCM_AMOUNT_TO_STRING_CONVERT to convert it from amount to string format.
Regards
vijay