‎2008 Feb 22 7:00 AM
Hi,
i have to read a file from either the presentation server or application server.For that i also need to create an error file at the application server.i have used this piece of code:
OPEN DATASET lv_errfile FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc <> 0.
MESSAGE i002 .
LEAVE LIST-PROCESSING.
ENDIF.
LOOP AT t_err INTO wa_err.
TRANSFER wa_err TO lv_errfile.
ENDLOOP.
CLOSE DATASET lv_errfile.
IF sy-subrc <> 0.
MESSAGE i001.
ENDIF.
where lv_errfile contains the path sy-repid and extension .err i.e. concatenate lv_path sy-repid .err.
how can i do the same if the file is coming from the presentation server
plz help.
urgent help required.
<REMOVED BY MODERATOR>
thanks in advance,
anand.
Edited by: Alvaro Tejada Galindo on Feb 22, 2008 5:16 PM
‎2008 Feb 22 7:10 AM
Hi,
To read data from the presentation server:
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = t_data.
Alternatively you can also use GUI_UPLOAD function module.
To download error file to pres. server use GUI_DOWNLOAD
Hope this helps,
Harikrishna.