Application Development and Automation 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: 
Read only

Check directory existence

Former Member
0 Likes
1,162

Hi all ABAP experts.

I'm trying to check the existence of a directory on the server (ERP 4.6c) to write a file before the abap processing.

I need a function to replace the sencence:

call 'C_DIR_READ_START'

id 'DIR'

field p_pth_se.

because it does not work well running on batch.

The field p_pth_se is a parameter on the selection screen.

Do you have any alternative?

Thanks in advance.

Jordi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
692

Hi Jordi

Please use the FM SUBST_GET_FILE_LIST by passing the application file path. If it returns entries into FILE_LIST table then it's a valid directory path.

Regards

Ranganath

Hi all ABAP experts.

I'm trying to check the existence of a directory on the server (ERP 4.6c) to write a file before the abap processing.

I need a function to replace the sencence:

call 'C_DIR_READ_START'

id 'DIR'

field p_pth_se.

because it does not work well running on batch.

The field p_pth_se is a parameter on the selection screen.

Do you have any alternative?

Thanks in advance.

Jordi

3 REPLIES 3
Read only

Former Member
0 Likes
693

Hi Jordi

Please use the FM SUBST_GET_FILE_LIST by passing the application file path. If it returns entries into FILE_LIST table then it's a valid directory path.

Regards

Ranganath

Read only

Former Member
0 Likes
692

I tryed the FM SUBST_GET_FILE_LIST but it throws an ACCESS_ERROR exception

I've also tryed FM RZL_READ_DIR_LOCAL without luck.

Jordi

Read only

0 Likes
692

Hi Jordi

Please make sure you are passing the directory path in the right case, as if your application server is UNIX then it's case sensitive.

Even the FM mentioned by you is working for me, but please take care of case sensitive letters. Thanks for sharing it ...

Regards

Ranganath