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 Statement meaning

Former Member
0 Likes
353

Hi,

please someone explain me what the below function will do

Cerner value will be 5 or 6 charecter lenght

SHIFT cernr RIGHT DELETING TRAILING space.

OVERLAY cernr WITH '000000000000'.

Thanks,

GAL

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
317

Hi

See the following:

DATA: cernr(6) type c.

cernr = 'ABC'.

SHIFT cernr RIGHT DELETING TRAILING space.

will give the result of

cernr = ' ABC'

So it puts in blanks untill cern has reached it's defined length.

OVERLAY cernr WITH '000000000000'.

will give the result of

cernr = '000ABC'.

So it puts in a number of ' 0' until cern had reached it's defined lenght or for a number of 12 times ' 0' .

Best regards,

Guido Koopmann

1 REPLY 1
Read only

Former Member
0 Likes
318

Hi

See the following:

DATA: cernr(6) type c.

cernr = 'ABC'.

SHIFT cernr RIGHT DELETING TRAILING space.

will give the result of

cernr = ' ABC'

So it puts in blanks untill cern has reached it's defined length.

OVERLAY cernr WITH '000000000000'.

will give the result of

cernr = '000ABC'.

So it puts in a number of ' 0' until cern had reached it's defined lenght or for a number of 12 times ' 0' .

Best regards,

Guido Koopmann