cancel
Showing results for 
Search instead for 
Did you mean: 

Can a program save files to local in background?

Former Member
0 Kudos

Hi,

Some of our reports ran very slowly due to a great deal of data, so I wrote a function which can save the report to local, when I execute it directly, it works very good, and I can find the file where I specified. But if I execute in background, I can find nothing. Why? Is there any way to realize this function?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Jia,

I think you can't download to Local file in background.

But here a solution for your problem.

First download your data to Application Server, run in background.

Here the sample code for that:


DATA: Server_Path(30) VALUE '/usr/sap/tmp/mytemp2.txt'.

OPEN DATASET Server_Path FOR OUTPUT IN LEGACY TEXT MODE.
LOOP AT IT_DATA.
  TRANSFER IT_DATA TO Server_Path.
ENDLOOP.
CLOSE DATASET Server_Path.

note: IT_DATA is your Internal Table Data.

Second, you can download your Data from Application Server to Local.

You can use TCODE: CG3Y for that.

I hope it help you.

Regards,

Former Member
0 Kudos

Dear Jatra Riwayanto ,

Thanks for your advise, but I'm afraid it's hard to put into active.For example some data is not allowed to shown to all users, but unfortunately, it's impossible to authorize user to download these report.

And in another hand, I don't think so many report on the app server is a good condition.

Thanks

Best regards

Former Member
0 Kudos

but u can't put file in presentation server in background.

Former Member
0 Kudos

Dear All,

Maybe I should explain what I want.

There're some huge reports on my R3 system. And at the end of year, FI users will run the reports all together, which makes the system very slow. So we suggests them running the reports in back ground. Then a new problem occurs.Becouse our reports have more than 500 cols, the tables can't be displayed completely when I use t-code sm37 to query. Only 255 cols can be displayed. Then I considered to save the reports to local file. But it failed again.

In my opinion reports should run on BW, but now is there any solution for the problem? Can SAP display reports executed in background more than 255 cols?

Thanks a lot

Former Member
0 Kudos

If you go to spool request in SM37 and press button next to display (it is 7th button, written as '@OL@'), it will show you entire output.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jai,

Write the Program to show all the details in the output report, and run the report in the background, after comeletion of the report, press the log for that session, then it will show the output, from that you need to download manuvally.

or else, you will have a spool no, from that you download that to a PDF or a local file

Regards

Sudheer

Former Member
0 Kudos

Hi all,

I can find nothing as Sanjay and Sudheer said. Are you talking about ECC5.0? My system is R3 4.71.

Regards