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

ABAP datatype..

Former Member
0 Likes
552

Hello,

I am doing following operation.

temp_buzei = '001'.

i_output-buzei = temp_buzei.

w_buzei = temp_buzei + 1.

w_buzei is defined same as temp_buzei.

I want '002' in w_buzei but I am getting on '2'. How can I get '002' even after addition ?

Regards,

Rajesh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
519
data: temp_buzei(3) type n,
       w_buzei(3) type n.

temp_buzei = '001'.
i_output-buzei = temp_buzei.
w_buzei = temp_buzei + 1.
write w_buzei.
5 REPLIES 5
Read only

Former Member
0 Likes
519

Hi

It depends on how temp_buzei is defined: it should be TYP N of 3 chararcters:

TEM_BUZEI(3) TYPE N.

Max

Read only

Former Member
0 Likes
519

hi,

you can use conversion_exit_alpha_output.

Read only

bpawanchand
Active Contributor
0 Likes
519

Hi

DATA :

w_n1(3) TYPE n VALUE '001',

w_n2(3) TYPE n .

w_n2 = w_n1 + 1.

WRITE :

/ w_n2.

Regards

Pavan

Read only

Former Member
0 Likes
520
data: temp_buzei(3) type n,
       w_buzei(3) type n.

temp_buzei = '001'.
i_output-buzei = temp_buzei.
w_buzei = temp_buzei + 1.
write w_buzei.
Read only

Former Member
0 Likes
519

SHIFT w_buzei right deleting TRAILING space.

TRANSLATE w_buzei USING ' 0'.

Amit.