Monday, November 4, 2013

ABAP File Operations : Desktop and Server

Sometimes, we need to get a file from the presentation server or the application server. Usually, we need to fork the code in order to be able to use one or the other. Here, I'll show a simple class to make this task a lot easier. All the usual file/directory operations, are called the same way. The only distinction is a flag to indicate that the file should be considered in the desktop or in the server.
The class only has static methods, to use it, you just need to call any of the public methods.
This is the beggining, in the future I'll try to allow FTP, network shares, among others and consider to create a instanciable class to deal with connection, autentication, etc.

1 - Create the following Class

2 - Create the following Methods:



3 - Use the following parameters for each method:
























4 - Insert the appropriate code in each method:


No comments:

Post a Comment