07-25-2007 5:25 PM
Hi friends,
i was create a executable program .. it was executing fine.. imagine.. my program is just fetching the data from MARA table based on some conditions.. every thing is fine.. and i'm getting the output also..
but i want to save this output in a separate file.. that means.. what can i do.. my program is executing background... so, i want to save this out put in a file... so, can any one plz provide me the coding steps...
i dont know coding.. I'm learning ABAP... so, can you plz provide the exact coding..for storing these data into separate file from spool..
help ful answers will be rewarded
Thanks
Babu
07-25-2007 5:52 PM
HI,
You have a standard program to download the spool to a document.
go to se38 and execute thie program RSTXPDFT5 by giving the spool number
Thanks
Mahesh
07-25-2007 5:52 PM
HI,
You have a standard program to download the spool to a document.
go to se38 and execute thie program RSTXPDFT5 by giving the spool number
Thanks
Mahesh
07-25-2007 8:29 PM
hi
if you want the o/p data in the seperate file in-addition to the spool
call FM : 'GUI_DOWNLOAD'
pass file name as
w_localfile = 'C:\fite.txt'
itab
= the final o/p table
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = w_localfile
filetype = 'ASC'
write_field_separator = 'X'
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.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
thanks & regards
vinsee