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

Type N

Former Member
0 Likes
1,502

Hi,

I have a field A(5) type n which I am using to store 5 digit numeric values.

As per requirement, in certain cases i have to set A to 'XXXXX'. But in these cases i get the value of A as '00000' in my output. Is there some way around? Or Is it best for me to declare A as type c.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,433

Better U declare as Type C ...

By default type N has value 0 ..

5 REPLIES 5
Read only

Former Member
0 Likes
1,434

Better U declare as Type C ...

By default type N has value 0 ..

Read only

Former Member
0 Likes
1,433

Type N cannot contain alphabetic characters, use type C

Read only

Former Member
0 Likes
1,433

hi,

Change the declaration to type CHAR ..


data : v_char(5).

Regards,

Santosh

Read only

Former Member
0 Likes
1,433

hi check this..

data: num(5) type n .

write: num .

it will ge used for the numbers only .

use this ..

data:char(5) type c value '1',

output(20) type c .

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = char

IMPORTING

OUTPUT = OUTPUT.

write:/ output .

Read only

Former Member
0 Likes
1,433

Hi Suker,

Its better you declare it as character C(5).

Hope this helps you.

Regards,

Chandra Sekhar