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: 

Create/Read File

Former Member
0 Kudos
59

Hello all.

I am creating/reading files using GUI_DOWNLOAD/GUI_UPLOAD.

These functions use the frontend point of view to create/read the file.

I need a function that uses the servers point of view. Is there any?

Besides that i also need a function that runs executable files at the server. I tried cl_gui_frontend_services=>execute but i believe this uses the frontend point of view.

Thank you in advance

Nuno Silva

1 ACCEPTED SOLUTION

Former Member
0 Kudos
33

OPEN DATASET, CLOSE DATASET, READ DATSET and TRANSFER can be used in ABAP to access files at the server level.

Likewise, you can use transaction SM69 to create external commands then execute using FM SXPG_COMMAND_EXECUTE.

4 REPLIES 4

Former Member
0 Kudos
34

OPEN DATASET, CLOSE DATASET, READ DATSET and TRANSFER can be used in ABAP to access files at the server level.

Likewise, you can use transaction SM69 to create external commands then execute using FM SXPG_COMMAND_EXECUTE.

0 Kudos
33

Hello.

Thank you for your answers.

About SXPG_COMMAND_EXECUTE do you know where can i get an example for a command creation and execution?

Thank you

Nuno Silva

Former Member
0 Kudos
33

if you want to transfer the files to the application server other then your own then you would have to use the function SXPG_COMMAND_EXECUTE.

This function module is used if you want to trasnsfer files from one application server to another.

If you want to just transfer the files to application server (your own application server) then you would have to use

Open dataset (DSN-filename)

then you will have to

Loop at internal table.

Transfer into filename

endloop.

This will transfer whatever you want into the application server

CLOSE DATASET.

These are the two ways to do it.

Reward Points if useful