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

Convert Decimal to text

Former Member
0 Likes
1,045

Hi ,

I have the value 11.11 stored in variable v_dec of type p decimals 2.Now i want to move the data from v_dec to v_text of type CHAR12.While doing so i get * in the front

I tried Unpack and write statements but was not helpful.

Hi ,

I have the value 11.11 stored in variable v_dec of type p decimals 2.Now i want to move the data from v_dec to v_text of type CHAR12.While doing so i get * in the front

I tried Unpack and write statements but was not helpful.

5 REPLIES 5
Read only

Former Member
0 Likes
899

Hi,

Try like below...

data : v1 type p decimals 2 value '11.11',

v2(12) type c.

v2 = v1.

write : v1,

/ v2.

i have tested the above code...but didnt get any *..

Hope it helps!!

Regards,

Pavan

Read only

0 Likes
899

I had implemented the same way .The issue was the target char field was of length 3,hence i got * infront.Anyway thanks Vishnu

Read only

Former Member
0 Likes
899

try CONDENSE <char12 field>. after assigning.

Read only

Former Member
0 Likes
899

try CONDENSE

Read only

Former Member
0 Likes
899

The issue was the target char field was of length 3,hence i got * infront.