Application Development 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 local file in background

Former Member
0 Kudos

hi everyone,

i need to read local file in background,

wich function do i need to use?

thanks,

dana.

3 REPLIES 3

GauthamV
Active Contributor
0 Kudos

hi,

first of all you cannot read files present in presentation server in background.

you can save your files in application server and then read them.

check this.

[https://forums.sdn.sap.com/click.jspa?searchID=19041445&messageID=6426789]

Former Member
0 Kudos

if you are reading in background file needs to be on application server.

you can use following function modules.

CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'

OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE

MESSAGE MSG_TXT.

IF SY-SUBRC NE 0.

WRITE: 'Err', MSG_TXT.

EXIT.

ENDIF.

LOOP AT INT_TAB

*your code

ENDLOOP.

  • Closing the File

CLOSE DATASET FILENAME.

Lakshmant1
Active Contributor
0 Kudos

Hi dana,

Refer the following URL,

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb...

Hope this gives some inputs.

Thanks

Lakshman