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

regarding padding

Former Member
0 Likes
784

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
Read only

Former Member
0 Likes
758
REPORT  ZTEST_LENGTH.

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

describe field str LENGTH len IN CHARACTER MODE.

write len.
Read only

0 Likes
758

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.

Read only

0 Likes
758

Hi,

Check this.

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

WRITE:/1 var1.

SHIFT var1 RIGHT DELETING TRAILING space.

WRITE:/1 var1.

Thanks,

Vinod.

Read only

0 Likes
758

this is how it will show..

write:/ str right-justified.

Read only

0 Likes
758

should not delete the values in turn should be padded

Read only

0 Likes
758

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.

Read only

Former Member
0 Likes
758

Use

CONVERSION_EXIT_ALPHA_INPUT

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