10-30-2010 12:53 PM
Hi All,
I need to read few files from a folder in the server and upload the data in the file using a BDC. This process has to happen in the background as I am going to schedule the program. I had used the function module "EPS_GET_DIRECTORY_LISTING" to list the file names, it is working properly but when I schedule the program this function module does not work, the jobs gets finished in 0 secs. I am suspecting that it is not running in back ground. Can any one suggest me the function module which runs in background to read the files or an alternate method.
Ajeetha
11-02-2010 7:44 AM
This FM is working properly in background mode. Please post your code.
10-30-2010 1:44 PM
Reading file from presentation server will not work in background. You can put your files in application server first and then process the files from here.,
11-02-2010 7:15 AM
Dear Sandheep,
The file is in the Application server, I need to read the files in a scheduled manner. This can happen only when I run the program in background, the function module which I used to read the directory of the folder does not run in background, this is what my issue is.
Ajeetha
11-02-2010 7:44 AM
This FM is working properly in background mode. Please post your code.
11-02-2010 8:58 AM
Thanks for the reply.
Sorry, this function module is working properly, why I assumed it is not working is that the background job got completed in 0 secs which made me feel that the function module is not working. Also I am subsequently copying the file to another folder and deleting it from the source folder, actually thiese two functionalities are not working in background. which added to my conclusion that all the function modules are not working in background. I am using two methods to copy and delete files, they are
CL_GUI_FRONTEND_SERVICES=>FILE_COPY,
CL_GUI_FRONTEND_SERVICES=>FILE_DELETE.
as these are not working in background, now I need to replace them with a method or function module which will run in background.
As I have mentioned earlier, my main objective is to upload the data in the file using a bdc. If I am not able to delete the file in the source folder, then duplicate upload will happen which I have to avoid. So, if someone could help me to find a way to delete the file will be of great help to me.
Ajeetha
11-02-2010 10:04 AM
Hi Ajeetha,
as the name says:
CL_GUI_FRONTEND_SERVICES=>
is for the frontend GUI. GUI stands for graphical user interface. In background, there is no interaction with a user. There is no SAPGUI, there is no frontend.
Background processing runs on the SAP server. Here you have to work with DATASETs - open, close, delete. Enter these keywords in editor and press F1 or use google or SDN.
Regards,
Clemens
11-02-2010 10:31 AM
You cannot be using the frontend methods to read from the application server. They read from the presentation server (i.e. your pc's file system).
11-02-2010 11:24 AM
Thank you all for the reply, I issue is resolved, I used Open dataset and transfer to copy the files and function module EPS_DELETE_FILE to delete the files, both are working in back ground.
Ajeetha