Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to download a file on to application server using interactive reports

how to download a file on to application server using interactive reports

Former Member
Former Member replied

Hi,

DATA: wl_ex_fileopen TYPE REF TO cx_sy_file_open_mode."Exception

OPEN DATASET pw_file FOR <b>OUTPUT</b> IN TEXT MODE ENCODING DEFAULT.

if sy-subrc = 0.

*--Transfering data to application server

LOOP AT pt_dtl ASSIGNING <l_dtl>.

*--Transfering the header information to the file

TRY.

<b> TRANSFER <l_dtl> TO pw_file</b>. "Complete file path on app server

CATCH cx_sy_file_open_mode INTO wl_ex_fileopen.

IF wl_ex_fileopen IS NOT INITIAL.

*-- Error occured while writting to the file

MESSAGE e019 WITH text-004 pw_file .

ENDIF.

ENDTRY.

endloop.

<b>CLOSE DATASET pw_file.</b>

endif.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question