Application Development 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: 

Storing numbers in char variables.

Former Member
0 Kudos

Hi All

I need to store a number in a character variable

Num = 686 (integer type)

here c1 is the char variable of length 4.

If I give C1 = Num

the value is not stored.

How to store a number in a character variable.

Regards

Renuka.

3 REPLIES 3

Former Member
0 Kudos

resolved by myself

Former Member
0 Kudos

Works fine. run the code below.

REPORT  ztest.
DATA: n TYPE i VALUE '6666',
      c TYPE char4.
c = n.
BREAK-POINT.
write: c , n.

Former Member
0 Kudos

Renuka,

I am getting c1 value as 686...very simple code only..

data: num type I value '686',

c1(4) type c.

c1 = num.

write:/ c1.

O/P 686