Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error file in application server

Former Member
0 Likes
332

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

1 REPLY 1
Read only

Former Member
0 Likes
317

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.