Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Value Conversion

Former Member
0 Likes
608

Hi Experts,

I have one query. I have one value as 20,090,629,000,000.

I wanted to convert it as 20090629000000.

Can anybody suggest me how to do that?

Thanks,

Neha

4 REPLIES 4
Read only

Former Member
0 Likes
544

Hi Neha,

Declare one variable with string type or char type.

move your value in that variable.

you will be able to output it without coma.

Hope this suggestion will help you to solve your problem.

Regards,

Vijay

Read only

Former Member
0 Likes
544

Hi,

What is the type of the first variable, is it integer?

then symplly define a new variable of type char (use desired legth)

and pass that value to char type variable.

e.g.

PARAMETERS: lv_comma TYPE I.

DATA: lv_char(20) TYPE C.

lv_char = lv_comma.

WRITE: lv_comma, lv_char.

here if on selection screen i provide value '2.222.333'

it will give output like 2222333.

Regards,

Raj Gupta

Read only

Former Member
0 Likes
544

Hi,

Use in this way

DATA: v_1(20) type c VALUE '29,999,889,777,000'.

REPLACE ALL OCCURRENCES OF ',' IN v_1 WITH ''.

*CONDENSE v_1.

WRITE / v_1.

Just check this output.

Read only

Former Member
0 Likes
544

pass it to a string value

data : s1 TYPE int4 VALUE '346346',
      s2 type string.
s2 = s1.
WRITE : s1,'|', s2.

Edited by: soumya prakash mishra on Aug 21, 2009 4:36 PM