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

Write I type with length

Former Member
0 Likes
535

DATA: NUMBER TYPE I VALUE '1234567',

TEXT(10) VALUE 'ABCDEFGHIJ'.

break-point.

WRITE: (5) NUMBER,

(6) TEXT.

what is result?

and why?

Thanks for all you kindly reply!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
482

The output is

*4567 ABCDEF

The reason is

First you are displaying Integer. Fir integers, values are printed right justified and the field length is 11. As we are displaying only 5 characters, it display *4567, * for truncated value.

For character it displays left justified, and as 6 character length is specified, it displays ABCDEF.

See this for more detail -

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e2335c111d1829f0000e829fbfe/frameset.htm

2 REPLIES 2
Read only

Former Member
0 Likes
483

The output is

*4567 ABCDEF

The reason is

First you are displaying Integer. Fir integers, values are printed right justified and the field length is 11. As we are displaying only 5 characters, it display *4567, * for truncated value.

For character it displays left justified, and as 6 character length is specified, it displays ABCDEF.

See this for more detail -

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e2335c111d1829f0000e829fbfe/frameset.htm

Read only

0 Likes
482

Thank you, sir!