05-09-2006 2:16 PM
05-09-2006 2:20 PM
Hello Rani,
You can multiply your number.
Data: num type p decimals 3.
num = 3,111.
num = num * 1000.
write num.
you should have 3111.
Hope this helps,
Gabriel
05-09-2006 2:21 PM
Write this number into character field and then you can remove the , and . from the character fields using REPLACE command.
Regards
Aman
05-09-2006 2:25 PM
chk out this program
REPORT ychatest.
DATA mqty TYPE p DECIMALS <b>3</b> VALUE '1234.45'.
DATA : x TYPE i,
chspec(30).
MOVE mqty TO chspec.
CONDENSE chspec.
x = STRLEN( chspec ) .
IF x LE 3.
chspec = ''.
ELSEIF x = 4.
chspec = '_,___'.
ELSEIF x = 5.
chspec = '__,___'.
ELSEIF x = 6.
chspec = '_,__,___'.
ELSEIF x = 7.
chspec = '_,__,___'.
ENDIF.
WRITE: mqty USING EDIT MASK chspec.
reward pts if helpful
Message was edited by: Sekhar
Message was edited by: Sekhar
05-09-2006 2:28 PM
Hi rani,
Just define one character variable and move your field value to that character variable.
data:v_field(10) type c.
MOVE your work area field TO v_field.
Cheers,
Bujji.
05-09-2006 2:39 PM
Hi Rani,
I did not find any fm for your functinality.
However you can acheive the same by running the following code :
data : a type string,
b type string,
c type string,
DELIMITER(1) VALUE ','.
a = '3,111' .
split a at DELIMITER into b c.
a = ''.
concatenate b c into a.
write a.
Regards,
Kunal.
05-09-2006 3:01 PM
hi,
try:
parameters qty type bseg-menge default '3.111'.
data i type i.
data z type i.
describe field qty decimals i.
z = qty * 10 ** i.
Andreas
05-09-2006 3:24 PM
copy into character string and replace the delimiter with space and condense.
finally shift into nummeric value if further it is used for amy manipulations.
05-09-2006 3:44 PM
Rani,
Its very simple. Just need to write variable into another as follows..
Write var1 to var2 no-grouping.
thats it!!
Cheers,
Nilesh