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: 

Function module EPS_GET_DIRECTORY_LISTING not in background

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member195402
Active Contributor

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

7 REPLIES 7

UweFetzer_se38
Active Contributor
0 Kudos

Hi Rupesh,

have a look in FORM check_ftp_authority. Maybe this is the problem.

Regards, Uwe

former_member226519
Active Contributor
0 Kudos

I use ISU_M_GET_FILES_OF_DIR and it works fine.

Former Member
0 Kudos

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.

former_member195402
Active Contributor

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

0 Kudos

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

0 Kudos

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

0 Kudos

Thanks Klaus.

Your solution worked great and I managed to run the job successfully in background mode.

Regards,

Rupesh Mhatre