05-10-2011 10:09 AM
Dear Experts
I am using FM 'EPS_GET_DIRECTORY_LISTING ' to get the list of files in application server directory. The FM worked very well for a few days. However, from last week it is throwing an expection "READ_DIRECTORY_FAILED" although there ain't any changes to source code of the program or parameter changes to the system.
Also, the FM works fine when the program is executed in foreground.However, it throws an exception when scheduled as a BG job.
Also,the program runs very well(both in foreground & background) in the developement system.
What could be the possible reasons for this?
Is it something related to time zone of the systems? My clients DEV system is set to time zone "INDIA" while PRD is det to time zone "CET". Could this be the reason?
Regards,
Rupesh
05-10-2011 1:02 PM
Hi,
do you have several servers for your production system? Maybe one of them has no rights or connection to this directory! If you have several servers, then please try to start your report on all of them! Any differences?
Regards,
Klaus
05-10-2011 11:24 AM
Hi Rupesh,
have a look in FORM check_ftp_authority. Maybe this is the problem.
Regards, Uwe
05-10-2011 12:34 PM
05-10-2011 12:56 PM
Check the length of your directory name in production. Did it change? Is it too long for the FM interface parameters?
You're using the older version of this FM, with limitations in length of directory name and file name. You might want to convert to EPS2_GET_DIRECTORY_LISTING, which will handle longer directory names( up to 200 characters, if I remember correctly) and longer filenames.
05-10-2011 1:02 PM
Hi,
do you have several servers for your production system? Maybe one of them has no rights or connection to this directory! If you have several servers, then please try to start your report on all of them! Any differences?
Regards,
Klaus
05-11-2011 5:09 AM
Good Morning
Yes, I have 3 servers on my production system. Also, the application directory is accessible on one of them.
Now, how do I take this forward. I mean what steps I need to follow so that the BG job runs successfully on the production system.
Regards,
Rupesh Mhatre
05-11-2011 5:45 AM
Hi Rupesh,
make sure that your program runs fine ion the right server in background mode.
If you define a background job in SM36, please fill out Exec. Target and choose the right server!
If you are working with
SUBMIT report ... VIA JOB ...
then change logic from
CALL FUNCTION JOB_OPEN
SUBMIT report VIA JOB
CALL FUNCTION JOB_CLODE
to
CALL FUNCTION JOB_OPEN
CALL FUNCTION JOB_SUBMIT
CALL FUNCTION JOB_CLODE
where you can pass parameter EXTPGM_SYSTEM for selecting the right server!
Regards,
Klaus
Edited by: Klaus Babl on May 11, 2011 6:52 AM
Edited by: Klaus Babl on May 11, 2011 6:56 AM
05-11-2011 6:29 AM
Thanks Klaus.
Your solution worked great and I managed to run the job successfully in background mode.
Regards,
Rupesh Mhatre