2012 Feb 16 3:31 PM
I need to provide data to an external entity on a regular basis. They require this data to be in either fixed length/flat file or a delimited text file, not Excel.
I am using standard SAP transactions, e.g. F.21, to provide the data I need. If I run the report interactively and choose List > Export > Spreadsheet, I can output the data using the MHTML format into Excel and from there do a "Save As" into the desired format.
However, I would like to schedule this job and download without manual intervention. Is there a standard program / function / transaction that can be used in this case?
2012 Feb 16 7:36 PM
I'm not sure if there is any program which does the same steps what you do to generate the file.
But, you can create a report and submit the program behind F.21 with option EXPORTING LIST TO MEMORY. Get this list after Submit using the FM LIST_FROM_MEMORY. You can then cleans the output and save this to the file.
DATA list_tab TYPE TABLE OF abaplist.
SUBMIT report EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
Regards,
Naimesh Patel