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: 

Executing EPS_GET_DIRECTORY_LISTING in background

Former Member
0 Kudos

Hi,

I am using the function module EPS_GET_DIRECTORY_LISTING in my batch program to get the file names from the given directory. It works fine, when it is executed online. But if it is executed in background mode, it sometimes returns sy-subrc = 17 (READ DIRECTORY FAILED) and sometimes it is successful.

There is no pattern in returning this kind of result. It seems to be completely random.

I thought of using another function module RZL_READ_DIR_LOCAL. But it behaves the same way.

Could any of you help me to get a solution?

Thanks,

Vasanth

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Vasanth

As FM: EPS_GET_DIRECTORY_LISTING is RFC enabled, there shouldnt be any problem with the FM.

Please check on the following:

1. Does your path of your directory change all the time???

2. One reason can be Network load...

I somehow strongly beleive this is due to a wrong directory name.

Maybe you can try by giving the output(display) of the path when there is a failure.

This might give some clue.

Kind Regards

Eswar

5 REPLIES 5

Former Member
0 Kudos

Hi Vasanth

As FM: EPS_GET_DIRECTORY_LISTING is RFC enabled, there shouldnt be any problem with the FM.

Please check on the following:

1. Does your path of your directory change all the time???

2. One reason can be Network load...

I somehow strongly beleive this is due to a wrong directory name.

Maybe you can try by giving the output(display) of the path when there is a failure.

This might give some clue.

Kind Regards

Eswar

Former Member
0 Kudos

Hi,

I think it is the problem with the directory name that you are providing. the directory names must and should always be in small letters. try providing the same with small letters only.

regards,

Mahesh

Former Member
0 Kudos

Hi Eswar,

I tried giving the way you suggested. The path doesn't change at all. I keep executing from SM36 with the same variant. So there is no room for giving wrong file path. One time it works and the next time it doesn't. But evertime the file path is displayed properly.

Please advise.

Thanks,

Vasanth

Former Member
0 Kudos

Hi Vasanth,

I am Brasilian and not speak english very well.

I am using this FM to get list of files in directory and no have problems. For execution in background, I am informing the DNS dir.

Exemplo. "
SERVER\DIR\" and no "C:\".

[],

Marcus Farias

0 Kudos

Hi Guys,

I need help, I trying to use this C_DIR_READ_NEXT in background but the list of directory return empty, but in foreground return with itens. This function execute in background or only in foreground ?

Thanks,

Marcelo Costa