2011 Apr 12 8:45 AM
Friends,
I have a Transaction(Report program) that I need to call at runtime and output the result into a file(CSV) on AL11.
I am exploring the following options:
1. Submit Report and export to Spool
>> Challenge here is the data in the spool is difficult to read and strucure into an output file
2. Submit Report and Output to list in memory
>> Challenge here is the data to read from memory is in RAW format and I am not sure how to extract Raw information into an internal table.
Can you suggest me other alternative whereby which I could easily extract the data from a report onto a flat file.
Your inputs would be greatly appreciated.
Thanks,
sa
Edited by: Sh on Apr 12, 2011 9:52 AM
Friends,
I have a Transaction(Report program) that I need to call at runtime and output the result into a file(CSV) on AL11.
I am exploring the following options:
1. Submit Report and export to Spool
>> Challenge here is the data in the spool is difficult to read and strucure into an output file
2. Submit Report and Output to list in memory
>> Challenge here is the data to read from memory is in RAW format and I am not sure how to extract Raw information into an internal table.
Can you suggest me other alternative whereby which I could easily extract the data from a report onto a flat file.
Your inputs would be greatly appreciated.
Thanks,
sa
Edited by: Sh on Apr 12, 2011 9:52 AM
2011 Apr 12 9:23 AM
Hi Sa,
The Report you are calling, is a Z one? If so, you can add one line to it exporting Internal Table to Memory.
Regards,
Ernesto.
2011 Apr 12 9:30 AM
Thanks for the reply.
The Transaction I am trying to output is SAP Transation (Report R*** using a variant). I am running it using a variant and trying to output the contents into a file.
Can you provide details as to how this can be acheived.
Thanks,
sa
2011 Apr 12 9:25 AM
HI Sh,
You might try out this code by [Bharadwaj p|http://wiki.sdn.sap.com/wiki/display/ABAP/CSV+file].
Best regards,
JP
2011 Apr 12 11:55 AM
try to use following FM
CALL FUNCTION 'SPAD_COPY_FILES_LOCAL'
2011 Apr 12 3:33 PM
By not giving the report name, you're not helping your issue. The better your question, the better your answer.
Many SAP standard reports have subroutines that gather the data, especially those that use ALV. You could easily use an implicit enhancement to push the data to memory, as Ernesto has already suggested, and capture it in your calling program. This method is MUCH easier to work with than trying to mess around with parsing spool data.
2011 Apr 13 11:04 PM
The Report is not a Z Report. It is RKEB0601.
I know where the data is captured in an internal table before the ALV display is called. BUt there is no way for me to export this to Memory as this is a Standard program.
The requirement is to get the output of this report in a flat file.
Any assitance on this will be greatly appreciated.
Thanks,
sa
2011 Apr 14 8:36 AM
Hi Sh,
I'd suggest you copy RKEB0601 into a Z program and then export the list you need into memory and in your actual program call the Z program.
Submit ZRKEB0601. In here do not show ALV but export Internal Table to Memory.
When the control returns to calling program, import from memory the internal table and then create output file.
Regards,
Ernesto.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |