后台运行程序,结果的输出宽度不够怎么办?

来源:互联网 发布:淘宝开店3万元 编辑:程序博客网 时间:2024/04/29 12:41

NOTES:186603有解决方案

Symptom
When you display a spool list in SP01 and when you process it further (for example, sending it to SAPoffice), the width of the list is always set to 255 regardless of how wide it was previously.

This means that the list can only then be edited with the format X_65_255.

Equally, the page length is normally not set so that only explicit page breaks result in a new page.

Other terms
Format, ABAP lists, SP01, 0000000040/spool()

Reason and Prerequisites
Because the actual width of the list is no longer known, the maximum width possible (255) is set so that no text is lost.
For the same reason the page length is not set.

Solution
1. Import all Support Packages mentioned below for your release.
2. Releases 4.6D and earlier: In Table TSPOPTIONS, use Transaction SE16 to create an entry with key REALWIDTH and value X.
Releases 4.6D and higher: Start Transaction SPAD and choose Settings->Spool System->Other. Select SP01: Number of Columns for List Display from Format.

The width of the list to be processed is read from the format used for creating the spool request. If this format is too narrow, the excessive characters are truncated.

3. Releases earlier than 4.6D: In Table TSPOPTIONS, use Transaction SE16 to create an entry with key REALHEIGHT and value X.
Releases >= 4.6D: Start Transaction SPAD and choose Settings->Spool System->Other. Select SP01: Number of Lines for List Display from Format.

The page length is read from the format used for creating the spool request.

4. As of Release 46C, after changing Table TSPOPTIONS, call Transaction SE37, and call the Function Module RSPO_OPTION_FLUSH with NAME=*, otherwise the changes will not take effect. Alternatively, change Table TSPOPTIONS directly using function module RSPO_OPTION_SET.

Caution: In Releases 4.6B and 4.6C, SP01 cannot display more than 255 columns of the list contents when displaying a spool list, even if the aforementioned Support Packages were installed. Due to internal restrictions, this is only possible in Release 4.6D and after.


Example: In Release 4.6B/4.6C, a spool request with 300 columns and format Y_65_300 is created. If a suitable device type supporting the customer-specific format Y_65_300 is used, this request can be printed correctly provided that the 4.6D kernel is installed. With the Support Packages mentioned below and entry "REALWIDTH" in TSPOPTIONS, the actual list width of 300 is set when displaying the spool request in SP01 but the list contents is displayed until column 255 only.


As a workaround for customers who urgently need a display option for wide lists in Releases 4.6B or 4.6C, the ABAP source code for report ZRSPOSHOWLIST is available as an attachment to this note. This report requests entry of a spool request number and then displays the spool list in full width.


CAUTION: If you are using the updated SP01 (or report ZRSPOSHOWLIST) and have created a suitable "wide" spool format for your device type (for example Z_65_375) with which the spool request is created, but you still see "cut-off" lines in SP01 or ZRSPOSHOWLIST display, check the following:
a) What is the actual maximum number of columns written into the spool request by the application program?
b) Does this actual maximum column width exceed the column count I set for the print format?
A simple method to count the columns of a spool list is to display the list using SP01/ZRSPOSHOWLIST and download this (unconverted) into a *.txt file. Now open this file with Windows Notepad, choose a non-proportionally spaced font (for example Courier New) and count the columns in the list.


See also the Support Packages contained in Note 521978.