2010 Mar 19 12:42 PM
Hello Experts,
I want to develop a program which downloads and decompress files from content server to our local desktop. Is there any FM or BAPIs to do this as my program should be generic and i can download files related all modules in SAP.
Please help me.
thank you
srinivas
2010 Mar 22 12:25 PM
Hi,
You can download file from application server as per the below menthod.
1. First get the file name (cg_file) using FM 'FILE_GET_NAME'.
2. Collect all the records into an internal table using below code:
OPEN DATASET cg_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc = 0.
WHILE f_fin = '0'.
READ DATASET cg_file INTO str.
IF sy-subrc NE 0.
f_fin = '1'.
ELSE.
IF NOT str IS INITIAL.
lt_str = str.
APPEND lt_str.
ENDIF.
ENDIF.
ENDWHILE.
Regards,
Ni3