10-23-2007 9:18 AM
10-23-2007 9:20 AM
Siva,
data: temp1(40) type c,
temp2 type p.
temp1 = '123456789.0987'.
move tem1 to temp2.
write:/ temp2.
K.Kiran.
10-23-2007 9:20 AM
Hi
assign it straight away after defineing the variables/fields
say v_char = 100
if you move that to P type
v_pchar = v_char
become 100.00 if it is 2 decimals
Regards
anji
10-23-2007 9:23 AM
The char field is like 1,000
i need to move it to tyoe p
this is a quan field
10-23-2007 9:25 AM
Hi siva,
REPLACE ALL OCCURANCES OF ','.
Then use condense
and then move the field.
Regards,
Atish
10-23-2007 9:21 AM
Hi Siva,
How is type P field defined. It should be long enough to hold the data of 18 char.
You can direclty use
field1 = field2.
Regards,
Atish
10-23-2007 9:22 AM
You can directly move the character field to type P.
Data: f1(18) type c,
f2(18) type p decimals n. "Specify no. of decimal points
While moving the data make sure that it contains only numbers and decimal point. remove all the commas if there are any.
10-23-2007 9:22 AM
Hi..
You can use the PACK statement.
Eg:
DATA: V_CHAR(10) VALUE '1234.56'.
DATA : V_PACK TYPE P DECIMALS 2.
PACK V_CHAR TO V_PACK.
WRITE:/ V_PACK.
reward if helpful.
11-12-2007 8:53 AM