10-10-2008 5:49 AM
Hello All,
I have to Convert Character field to a Quantity field.
Ex:
G_F_CHAR = '123456,789'.
Here G_F_CHAR is a character type and length is 10.
I want this value into G_F_QUAN ( like G_F_QUAN = 123456,789), where G_F_QUAN is a quantity field with 3 decmals.
Is there any function module to convert like this.
Thanks in advance.
Best Regards,
Sasidhar Reddy Matli.
10-10-2008 6:40 AM
Hi Sasidhar,
Use the following code.
data : g_f_char(10) type c,
g_f_quan type resb-bdmng,
g_f_temp(8) type p.
g_f_char = '123456789'.
g_f_temp = g_f_char.
g_f_quan = g_f_temp.
WRITE : g_f_char,
/ g_f_quan.
Regards
Alok Vishnoi
10-10-2008 5:53 AM
10-10-2008 6:12 AM
Hi,
Remove all the ',' from the character string... Then have a variable of type p , decimals 3...
assign this g_f_char to that variable....
should solve your issue...
regards,
madan..
10-10-2008 6:40 AM
Hi Sasidhar,
Use the following code.
data : g_f_char(10) type c,
g_f_quan type resb-bdmng,
g_f_temp(8) type p.
g_f_char = '123456789'.
g_f_temp = g_f_char.
g_f_quan = g_f_temp.
WRITE : g_f_char,
/ g_f_quan.
Regards
Alok Vishnoi
10-10-2008 9:41 AM