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: 

write statement

Former Member
0 Kudos

Hi

I want to increase the number of characters in a line to maximum.

Ex:WRITE:/4(75) 'Number of files read ',80 variable.

actually this is truncating while creating spool request.

What is the maximum allowed? for write statement?

Thanks

8 REPLIES 8

naimesh_patel
Active Contributor
0 Kudos

It depends on the line size addition of the report statement of your program.

Like:

REPORT LINE-SIZE 1000.

This will allow you to write upto 1000 characters.

Regards,

Naimesh Patel

Former Member
0 Kudos

Hi,

Try specifying the line width in the first line of the program as below,

REPORT <name> LINE-SIZE <width>

Use system variable SY-LINSZ to find the current line width.

*If width is given as 0 then system takes a default line width.

Former Member
0 Kudos

hi,

There is no limit as far as size is concerned.It all depends on the output type of printer and you can also fix the size of line in report by writing this on the first line of your report 'Report ztrial line-size 200.

Reward if useful

Gaurav

Former Member
0 Kudos

Hi MICR,

you can write Report 'name of program' line-size 1000.

because the list is depends on the line size.

Plz reward if useful,

Mahi.

Former Member
0 Kudos

hi MS,

write statement only alows 256 character to be prited in a single line if LINE-SIZE not mentioned in report.

To solve the problem make a internal table of type c(256). and put write statement in loop.

eg

TYPES: BEGIN OF mytable_line,

line(256) TYPE c,

END OF mytable_line.

DATA: gt_mytable TYPE TABLE OF mytable_line,

gs_mytable type table of mytable_line with header line.

loop at gt_mytable into gs_mytable.

write gs_mytable-line.

endloop.

Message was edited by:

Sumesh Nair

0 Kudos

<b>Additional info </b>

<i>Using line-size also there is some limitations</i>

The maximum line width is<b> 1,023 </b>characters.

When the LINE-SIZE is not specified, the line width of the basic list is set to a standard width based on the window width of the current Dynpro, but is at least as wide as a standard size SAP window.

former_member386202
Active Contributor
0 Kudos

Hi,

Do like this

REPORT z_daily_sales

NO STANDARD PAGE HEADING

MESSAGE-ID sabapdocu.

LINE-SIZE 256.

Regards,

prashant

0 Kudos

it was defined for line-lsize. I want to display in the same line. I mean the text and as well as my variable should display in the same line.

how to do this from my example write stmt?

Thanks for all