cancel
Showing results for 
Search instead for 
Did you mean: 

File Location

Former Member
0 Kudos

Hi All,

how to get the location of any file which is stored in Server means we have files stroed in server i want to access that file in webdynpro.

how to get the location of that file in webdynpro.

Regards

Trilochan

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

By server, do you mean the application server that the SAP application is running on? Also do you just want to know how to read and write files to/from this server or are you wanting to do some sort of file/directory listing?

Former Member
0 Kudos

Hi Thomas,

Thanks for ur reply,

actually i want to access the file from application server,where we have created one folder where all files are stored,now i want to access this folder files and show all files in table and in lead select i want to display the content of that pdf file in interactive form.

Is there any function module by which we can give file location and it will return the file content,I got one function module for the same but it takes files from mimes but my i want to access from application server.

for accessing mime i m using this function module

DATA:

mime_repository TYPE REF TO if_mr_api,

content TYPE xstring,

url TYPE string VALUE '/SAP/BC/WebDynpro/SAP/ZFILE_TRANSFER/Vendor.pdf'.

mime_repository = cl_mime_repository_api=>get_api( ).

CALL METHOD mime_repository->get

EXPORTING

i_url = url

IMPORTING

e_content = content.

wd_context->set_attribute( name = 'PDF_SOURCE' value = content ).

in the same way is there any function module for this or any other way by which i can achieve this.

Regards

Trilochan

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Is there any function module by which we can give file location and it will return the file content

You don't need a function module for this, as there are ABAP Keywords that do this. Look at the DATASET commands in the keyword documentation. OPEN DATASET, TRANSFER TO DATASET, CLOSE DATASET, DELETE DATASET. They can be used read/write/delete from files in the filesystem of the application server.