Skip to Content
0

Send internal table data to Spool

Mar 14 at 08:02 AM

80

avatar image

Hello All,

We have a FI report which we are using to download the internal table into local desktop in .TXT file with "|" separator using GUI_DOWNLAOD. The internal table has single field called LINE with character 3000.

When we execute this report in background mode we need to write the same internal table into spool(they wont have access to AL11).Please let me know which one is better way to achieve this.

When user download the output from spool and save the file in .TXT into their local desktop we need the file format and everything should be same as GUI_DOWNLAOD.

I tried by simple write statement and some FM as well however nothing has worked out.

sincerely appreciate your feedback and comments on this.

Thanks

Manimaran K

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Matthew Billingham
Mar 14 at 10:41 AM
0

I'd use CL_SALV_TABLE. It produces a nice report in background. If you need more then use full ALV: (Just don't use that execrable FM to do it...)

DATA alv TYPE REF TO CL_SALV_TABLE.
CL_SALV_TABLE=>FACTORY( IMPORTING r_salv_table = alv 
                        CHANGING t_data = my_internal_table ).
alv->display( ).
Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hello Matthew,

I dont want any output to be displayed.

In foreground the report is downloading .TXT file into local desktop. Now when executing in background we need to put the same data into spool. Currently it is displaying upto 255 character only where as internal table line has more than 255.

Thanks

Manimaran K

0

You only use it background. The output automatically diverts to the spool (assuming your background job peinrt parameters are correctly set).

0

Hello Matthew,

Thanks for your response.

Using write statement i could display the internal table data into spool, however the problem is up to 255 character only getting displayed in the spool where as in my internal table has 540 character in a column(only one column i have in my internal table). Now by increasing Line Size of the report and writing from string variable i could get the desired output.

Thanks

Manimaran K

0
Raymond Giuseppi
Mar 14 at 09:11 AM
0

During your WRITE test, did you provide print parameters with a wide enough size (3000?)

Else could you consider some EXPORT of the internal table TO DATABASE, in some Z-INDX type file, and a small report that will IMPORT this data back before calling GUI_DOWNLOAD and DELETE the data.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hello Raymond,

Thanks for your response.

I did not give any print parameters during the write statement, however i have mentioned in the report as follow

"REPORT zsdmcirr MESSAGE-ID zotc LINE-SIZE 1023 LINE-COUNT 65 NO STANDARD PAGE HEADING" but it is allowing upto 255 character only where as the internal table line has around 540 character. When executing background i am selecting output device as LOCL and Formatting set to 'X_65_1024/4''.

On your second option i really dont have any idea on that.

Thanks

Manimaran K

0

"i am selecting output device as LOCL and Formatting set to 'X_65_1024/4'" so you set some print parameters ;-) without your knowledge...

If transactions SP01/SP02 display and download truncated data, check in transaction SPAD, Menu: Settings -> Spool System -> Other. Check box 'SP01: Number of Columns for List Display from Format'. (Or ask basis)

0

Hello Raymond,

Yes you are right i am selecting same format for output device LOCL but still it displayed only 255 character.

So what i understood was in debug mode if we check the wa_out-line in Fast Display view we could see only 255 character, so i guess may be the same has been displayed in the spool as well.

Though it is wired the issue has been resolved by writing from String variable instead of character.

BEGIN OF ty_out,

line(3000) TYPE c,

END OF ty_out,

DATA: it_out TYPE TYPE STANDARD TABLE OF ty_out,

wa_out type ty_out,

lv_string TYPE string.

LOOP AT it_out INTO wa_out.

lv_string = wa_out-line.

WRITE:/ lv_string.

ENDLOOP.

Thanks

Manimaran K

0
Horst Keller
Mar 14 at 01:22 PM
0
Share
10 |10000 characters needed characters left characters exceeded
Jelena Perfiljeva
Mar 14 at 02:56 PM
0

If I may suggest, just have the program email a TXT file to the users when it's done. It'll save you from this headache and save users time. Really, the business users should have no business (no pun intended) digging around spools in SP01. Make the software work for people.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Jelena,

Yes i completely agree with you on this.Let me try to suggest the same to business.

Thanks

Manimaran K

0