09-25-2014 5:28 AM
Hi all....
I have some z-reports which are written from ALV and Normal Write form. Some users run this report and download to excel file (System->List->Save->LocalFile). So now I have to schedule this task which is download this report output once a day to common location in Background.
( I cant modify the programs one by one for add download part fro each programs )
So can I do this through SM36 or any otherway ??
( simply Saying : is there anyway to download report output in background Schedule. )
09-25-2014 6:24 AM
Hi Anuradha,
1. First of all, you need to add the functionality to download data from your internal table to excel and then store it in a preferred storage location.
use the function module GUI_DOWNLOAD to do the same.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = file_path
filetype = 'ASC'
TABLES
data_tab = ITAB[]
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
2. Make sure to prefix the current date along with your file name just to avoid reputation of file names.
3. Once all of this is done, create a variant for your program with necessary values if required.
*** Now to schedule the program.
4. Goto sm36 and enter a job name.
5. Next select step and enter your program name and variant name.
After entering check and save.
6. Come out and click on start condition. The below screen appears.
Select date/time. Enter the scheduled start date and time.
Select periodic values, choose daily and then tick periodic job.
7. Enter and save.
09-25-2014 6:30 AM
Hi Pavani,
I cant do this manually to each program, This is so time vesting.
this is the thing I have to in background Schedule ,
1. Run the report and get the output.
2. Download the report output (System->List->Save->LocalFile )
above steps are to be schedule in the background.
09-25-2014 6:52 AM
Understood. The procedure that I Suggested above is a one time activity. Once it is done then the program runs everyday at the scheduled time.
09-25-2014 6:47 AM
Hi Anuradha,
If this can help, write a new report to catch Spools from TSP01 table, for some particular users / time frame in UTC.
Then RSPO_DOWNLOAD _SPOOLJOB.
thanks,
Anil