Function module EPS_GET_DIRECTORY_LISTING not in background
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
Klaus Babl replied
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