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: 

regarding padding

Former Member
0 Kudos

experts,

can we padd up spaces to a value which is less than its

declared length ,if so ,how.

ex : val type char10.

val = 'ABCDE'.

if i use strlen ( val ) it should return me 10.

how to solve the above problem.

thanks in advance.

7 REPLIES 7

former_member188685
Active Contributor
0 Kudos
REPORT  ZTEST_LENGTH.

data: str(10).
data: len type i.
str = 'ABC'.

describe field str LENGTH len IN CHARACTER MODE.

write len.

0 Kudos

hi babu,

if we take your example,

when we use

write 😕 str = 'ABC'.

a list gets generated, now when i click on ABC ,

all the value ie of length 10 should be highlighted together.

how to do that.

thanks in advance.

0 Kudos

Hi,

Check this.

DATA: var1(10) TYPE c VALUE 'ABC'.

WRITE:/1 var1.

SHIFT var1 RIGHT DELETING TRAILING space.

WRITE:/1 var1.

Thanks,

Vinod.

0 Kudos

this is how it will show..

write:/ str right-justified.

0 Kudos

should not delete the values in turn should be padded

0 Kudos

hi babu,

if i use

write:/ str right-justified

str gets printed right side,that's not the case.

ABC should be left alligned along with the spaces

concatenated to the right . and when i place the cursor

the total length of the field should be highlighted.

thanks in advance.

Former Member
0 Kudos

Use

CONVERSION_EXIT_ALPHA_INPUT

and then check whether you are getting the correct value..