cancel
Showing results for 
Search instead for 
Did you mean: 

Display spool output i.e a single row in a single line

Former Member
0 Kudos

hello All,

I have report that outputs many columns is single row , when run in the background.

The problem that I am facing that the the single row of columns is wrapped into second line when certain limit of chararcters is reached. That is the single row of data is placed into two lines.

While running the job in the background I choose the LOCL or LP01 printer with format X_65_255.

Also note that I have other SAP systems but in that systems when I use the same procedure(printer and format also the same) for the same report the outputf for single row is not warpped into 2 lines but appears in the same line.

Please provide your input. Points will be rewrded for helpful answers

regards

Sachin

Accepted Solutions (1)

Accepted Solutions (1)

former_member181962
Active Contributor
0 Kudos

Use a layout that ha s more width.

If no such layout exist, create one in SPAD transaction.

Regards,

Ravi kanth talagana

Former Member
0 Kudos

Hello Ravi,

Can you please guide me on this, as this i have no idea about SPAD and how do i create the format?

Additonally the format mentioned X_65_255 earlier is standard provided by SAP and is avialable in both types of system where the output is in single line or just wrpas aorund. There I htink there must be soem setting behind this?

regrads

Sachin

former_member181962
Active Contributor
0 Kudos

Check this thread:

Regards,

Ravi

Former Member
0 Kudos

Hello ravi,

Thanks for the link, very helpful.

The link aslo talks about BASIS setting for graphical display of spol that can be done to display the spool output in single

line .

Could you please let me know of this becasue in all the other systems we haven't any setting done as susggeted in the link as I have checked this.

Regards

Sachin

Answers (1)

Answers (1)

Former Member
0 Kudos

How wide is your report output? Is it more that 255 characters?

Former Member
0 Kudos

Hello Ken,

The spool width is greater than 255 characters. But please also note that I am using the same format x_65_255 and the same printer LP01 in the dirferrent 4 production systems but the output is in single line except in the one prodcution system in whcih this issue is observed.

Thanks for your reply.

regards

Sachin

Former Member
0 Kudos

Are all production servers the same version of R3/ERP including patches? Which version are they 4.6c or later?

Sorry to keep asking you questions but it would help to understand your issue and help resolve it.

Former Member
0 Kudos

Hello Ken,

For one system in the issue is observed the BASIS relaease is 640. Here there is not s/w componenet as SAP_APPL as it is SRM

The problem is not exeprienced in system

1)with relaese 4.7 for s/w component SAP_APPL for logistics and accounting. therfore 4.7

2) other ssytem is s/w component for SAP_APPL is 500 for logistics and accounting.

SAP ERP Central Component 5.0

3. system 4.6 c

4) ssytem 4.6 c

Another thing I noticed here form th reply i have justgo t from the end user that in system the data is wrappin around

. previosuly it was not wraping. It is stange ! I have seen ealier it was not happening and all of sudden it has started wrappping around.

regards

Sachin

Former Member
0 Kudos

Hello Ken,

I have analysed the problem again, I see that in the certain column the length of the content is variable.

In case the totsl length of every row in spool output is less than 255 characters the output is in one line of the spool requests ,

but in case if a single row of spool output is greater than 255

the output warps on to the second line for each row of the the spool requests.

Therfore the issue has definite way of producting it.

Can you please let me as how to produce that output in single line rather than 2 rows. have you been able to achieve this when you created the YSPOOL o/p devce with new foramt of 1000 rows?

I require this format becuse it becomes easier to download the data in excel sheet for analysis.

Regards

Sachin

Former Member
0 Kudos

Note that this solution is for downloading wide formats only - not printing...

Here is what I did:

To create format Y_1024_1023 (New name!)

1) Transaction SPAD

2) Click "Full Administration" button

3) Click on "Device Types" tab

4) Click "Display" button next to "Format Types" field

5) Place cursor on X_65_255

6) Click in menu Format --> Create using template (F5)

7) Change Number of rows to 1023 (if set to 65, you will have more pages and hence more headers)

9) Change Number of Columns to 1023 (as wide as can be displayed in SP01)

8)Give new name to format e.g. Y_1023_1023

To create spool device YSPOOL:

1) Transaction SPAD

2) Click on "Device/Servers" tab (first tab!)

3) Click 'Display" button next to Output Devices field

4) Click "Create" button (Shift-F1)

5) Give output device long name (e.g.YSPOOL) and short name (e.g.YSPO)

6) Device attributes tab --> Device type = ASCIIPRI (Some generic ASCII printer) - I actually used a ZU_ASCII created in our system but ASCIIPRI should also work.

7) Access method tab --> Host printer = some value (e.g. outfile2)

😎 Save

Now assign Y_1024_1023 to Device type:

1) Transaction SPAD

2) Click on Device types tab

3) Enter "ASCIIPRI" in "Device types" field and click display button

4) Click on "Formats" button (F6)

5) Click on "Create' button (Shift-F1)

6) In popup, type Y_1023_1023 (or use drop-down to choose from)

7) Save

Per OSS Note 186603 --> Call SPAD and choose Settings -> Spool System -> Other. Select 'SP01: Number of Lines for List Display from Format'. You may have to clear cache via SPAD->Goto->Cache control -->Click "Reset Cache Settings".

Now, when you schedule your background job, choose YSPOOL as your output device and choose the format as Y_1024_1023. The spool generated from this job will be 1023 columns wide and 1024 lines long (less headers!). Note that opening such a large spool (long & wide) will consume lots of app server memory so exit out as soon as download to presentation server is complete.

Former Member
0 Kudos

Hello Ken,

I have done exactly as you have told me, but the data still wraps around.

I created the format, new device and the device excalty as told by you.

I have set SP01 : number of lines for list display from format

& also SP01 : no. of row of lines for list display from format

.

first time I didn't set SP01 the no. of rows, and in second run i did, but it still didn't work.

Did it your work for you when the length of the Spool row is greater that 255? Can you still help.

regards

Sachin

Former Member
0 Kudos

Hello Ken,

Using your procedure the number of lines has increased as suggested by you, but the data still wraps around

Regards

Sachin

Former Member
0 Kudos

1) Did you clear the cache? Can you check table TSPOPTIONS and tell me the value of REALWIDTH? \

2) Did you use the YSPO as the output type?

3) In your program, do you have any mention of line size like in the IS_PRINT parameter of the ALV function module?

Edited by: Ken Sanghvi on Apr 19, 2008 5:04 PM

Former Member
0 Kudos

Hello Ken,

Following are the value in the table TSOPTIONS

ACTIVATIONCNT 0000000000 0000000000 eccps_EDQ_00

LASTACTIVATION 20080421083943

LASTRESCAN 20080421082143

LPRINT_NUM 0000062907

REALHEIGHT X

REALWIDTH X

REDIRCNT 0000000000

RESCANCNT 0000000017 0000000017 eccps_EDQ_00

RSDSSPTI_SCAN 2008042108453000

TRANSPORT ACTIVE

UPDDEV DONE

UPGRADE_VERSION 46C

please note that I checked the checkboxes (as reported in earlier mail)

SPO1 : No of columns for list format from the format.

SP01: No of lines for the list foramt from the format.

The current version i am testing in the transaction SPAD, i use goto->cache control , i get the folling options

Global system(radio button) Local server(radio button)

Output Device (input field with button besides it)

Device type (input field with button besides it)

Code Page (input fieldwith button besides it)

Server Name(input fieldwith button besides it)

Logical OMS(input fieldwith button besides it)

Real OMS(input field with button besides it)

Text pool(button besides it) Spool settings(button besides it)

Can you guide me as how to user it

Thanks

Regards

Sachin

Former Member
0 Kudos

Hello Ken,

I it is not workign for me.

I used the output type as YSPOOL along with the new foramt y_1023_1023.

Secondly I am using the virsa tool for running the reports as backgorund job, therfore it is a standard report provided by the SAP VIRSA TOOL.

Therefore it should use the default print parameters.

regards

Sachin

Former Member
0 Kudos

I think it is the reset button for Spool settings.

Former Member
0 Kudos

Can you also please reply back on question 3 above?

Former Member
0 Kudos

Hello Ken,

The end user is using the SAP VIRSA tool(security and authorisations tool) for generating the report.

It is takes quite some time to run in foreground , therefore the the tool aslo allows you to scheduled the reports as background jobs. Ability to scheduled this tool reports as backgorund job is provided by the SAP. I can select the output device and the format while scheduling the job.

I selected the newly created formats. Here therfore the coding is standard provided by SAP for list.

Regards

Sachin

Former Member
0 Kudos

Is the report a Virsa provided report or a custom report written in the customer namespace(starting with Y/Z)? If it is a Virsa provided report that you should contact them with the issue. If it is a custom report, check the program to see if the ALV function module is passed any line-size values.

Former Member
0 Kudos

Hello Ken,

Virsa is a tool whihc is now brought by SAP

check this link out

ht[http://www.sapvirsa.com/|http://www.sapvirsa.com/]

I will try and debug and see if the ALV fucntion module passes any list a parameters.

I have already raised a message with SAP for this?

Can you please tell if you were able to display the spool rows > 255 in single line when you used the custom format

regards

Sachin

Former Member
0 Kudos

I have been able to display a spool up to 1023 columns wide using the new output type and format.

Based on your response, I am assuming that the report you are having an issue with is a Virsa provided report and not a custom developed report. If you would like, check the parameters being passed to the ALV function module in Virsa's report and see if they are passing any line-size parameters. That may be the issue that they will have to fix.

0 Kudos

Hi Patel,

take a look in this note OSS Note 186603.

maybe it can help you.

Alexandre

Former Member
0 Kudos

Hello Alexandre,

Thanks for your concern.

I have raised this issue to SAP.

They have asked me to print via device type SAPWIN and format like X_65_512/2 (note 213382)?

I created a new output device for this , assigned SAPWIN to this device. I have even set the data rquired in the TSOPTION tables.

My problem is not with printing but just getting the display onto the single line fro single spool row. The output warps onto the second line after 255 characters. I need the single row of data to be single line so the end user can take the data into excel sheet. Therfore therfore there will be no need for foramatting once the data is downloaded.

The suggestion of using the above format X_65_512/2 has still not yielded the required results.

Do we need a special printer to support this?

Were you able to output your spool row data in single line when lenght is greater than 255 characters

Regards

Sachin.

Former Member
0 Kudos

You are right, it does not seem to be an output issue but a report programming issue.

Is the report causing you these issues an ALV report or a classic report (using WRITE statements)? Can you also check what the line size is set for this report (in the REPORT statement)?

Former Member
0 Kudos

Hello Ken,,

Can you please let me know urgenlty whether while creating a new format did you make any changes for the page format.

In the earlier mail you had you had asked me to create foramt using template X_65_255, did you make any change the page format?

The reports uses ALV(set_table_for_first_display) for display ing the data. There is not constrain on the line size in the report statement.

regards

Sachin

Former Member
0 Kudos

The only changes I made were the ones listed i.e. to the Number of rows(1024) and Number of columns(1023).

Former Member
0 Kudos

AFAIK, the class CL_GUI_ALV_GRID can only be used in the foreground because it uses a custom container on a screen to host the ALV grid and needs the GUI for displaying it.

Can you check the program to see how it behaves and outputs data when SY-BATCH = 'X'?

Former Member
0 Kudos

Hi Sachin,

I'm facing the exact problem like yours. I have done all the settings that Ken mentioned, but still the single line data split into 2 after exceed 255 characters. My SAP_BASIS is release 6.4.

Have you find out the solution already? did you feedback to OSS that your problem still exists after they ask you to use SAPWIN device type?

Edited by: Yean Nean Yong on May 5, 2008 3:11 PM

Former Member
0 Kudos

Hello Yean,

Where do you excatly face the problem in SAP VIRSA or code devleoped by you?

This problem is more related to SAP BASIS release.

Have you switched ON the following settings

menu option settings->spool settings-> tab option other->

check the option no of columns from the list display from the

columns

menu option ->configuration->spool server-> press execute by selecting the appropiate server used in the output device->

in application bar choose refresh cache->save setting if asked.

Notes 213382 and 186603 are helpful, but for your basis version 186603 is needed, but i have inidcated this as how this has to be done in the new BASIS release.

My probelm realted to VIRSA is not solved in one of the ystem except for the all the system on different SAP BASIS release.

It is strange howerever that it works on release 6.4 sp 20 but not on release 6.4 sp 14.

Let me know if this helps.

regards

Sachin

Former Member
0 Kudos

Hi Sachin,

my problem is not in SAP VIRSA, this problem happens only in ALV list. I have done all the settings you told me. The strange thing is than when I use normal WRITE command, when run in background(using page format Y_65_1000), the spool request can display more than 255 characters, example:

WRITE:/ tmp_struc

the total length of the tmp_struc is 500 characters.

But when I run ALV in background(using page format Y_65_1000), the spool request will auto split into 2 lines after exceed 255 characters, example:

CALL METHOD o_grid->set_table_for_first_display

EXPORTING

is_variant = w_variant

i_save = 'A'

CHANGING

it_outtab = tmp_struc

it_fieldcatalog = i_fieldcat

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4.

Do you have this problem? or I open a new thread for this issue?

Former Member
0 Kudos

Hello Yean,

I didn't try this out. Please raise another thread for the issue, that should help you better. I think this more related to BASIS release and the SP you are on. Which BASIS SP is your SAP on for BASIS release 640? In case it doesn't work please escalate to SAP. Kindly send me the link of the thread opened to help me keep track of your issue.

Regards

Sachin

Former Member
0 Kudos

I am not sure how o_grid->set_table_for_first_display works in a background job because when SY-BATCH = 'X', the grid is considered offline i.e. cannot be used.

Can you please confirm that you are seeing this issue when you execute the program in the background i.e batch job? Check if the program calls REUSE_ALV_LIST_DISPLAY in it when SY-BATCH = 'X'.

Also, is this a custom developed report or a SAP delivered program?

Former Member
0 Kudos

Hi Sachin,

I'm on SAP_BASIS 6.4 service pack 14, I noticed that you mentiond only SP 14 has problem, but SP 20 is ok. Have you found the solution for SP 14?

Hi Ken,

o_grid->set_table_for_first_display can be run in background, you just need to issue the following code before calling set_table_for_first_display

IF cl_gui_alv_grid=>offline( ) IS INITIAL.

CREATE OBJECT o_docking

EXPORTING

ratio = 95

CREATE OBJECT o_grid

EXPORTING

i_parent = o_docking

ELSE.

CREATE OBJECT o_grid

EXPORTING i_parent = o_docking.

ENDIF.

This method is mentioned in many threads in the forum. When using this method, SAP will auto display the ALV in list format in the spool.

I'm try both OO ALV and Function call ALV(REUSE_ALV_LIST_DISPLAY), when run in foreground, the data can be displayed more than 255 characters, problem is when run in background, it will split into 2 lines if exceed 255 characters.

My program is custom developed report.

Former Member
0 Kudos

Hello Yean,

Could you please check SAP notes 971324, 1060311.

On the sytem with BASIS release 640, SP14 i have quite old verison of SAP VIRSA and on the BASIS release 640 SP 20,i have more recent version of VIRSA. Therefore SAP has adviced me to install latest version of VIRSA on BASIS rlease 640 SP14. They suggest it has more to do with the SAP VIRSA tool.

Could please list simplified alv code here?

I will try it from my side.

regards

Sachin

Former Member
0 Kudos

Yean,

Excuse my earlier ignorance

Here is a solution that I tested and worked for me in a background job. The key is to pass the print parameters...


   data: w_print TYPE lvc_s_prnt ,
           w_valid_for_spool_creation(1) type c,
           w_valid(1) type c.


    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        mode                     = 'PARAMSEL'
        no_dialog                = 'X'
      IMPORTING
        out_archive_parameters   = w_print-print_ctrl-arc_params
        out_parameters           = w_print-print_ctrl-pri_params
        valid                    = w_valid
        valid_for_spool_creation = w_valid_for_spool_creation
      EXCEPTIONS
        archive_info_not_found   = 1
        invalid_print_params     = 2
        invalid_archive_params   = 3
        OTHERS                   = 4.
    CREATE OBJECT grid1
           EXPORTING i_parent = custom_container1.

    CALL METHOD grid1->set_table_for_first_display
      EXPORTING
        i_structure_name = 'MARA'
        is_print         = w_print
      CHANGING
        it_outtab        = i_mara[].

Regards

Ken