1

The FM EPS2_GET_DIRECTORY_LISTING has a parameter file_mask which I guess that it should act as a pattern. I need to read from the AS the files containing a word but the file_mask is working faultly. For example if I pass "*ZIP" it returns a file named '.TXT'. Is there a proper way to use that parameter?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Codrin Strîmbei
  • 125
  • 7
  • 22

2 Answers2

2

The parameters are described in SAP note 1860206 which I will not quote here because I'm not sure about the copyright status. However, wildcards generally do not work as expected in this case - your best bet is to read without the parameter and filter the table afterwards.

vwegert
  • 18,371
  • 3
  • 37
  • 55
0

I had similar problem but due to poor(eg. * wildcard can be used only at the and of the file mask string :/ ) implementation of standard FILE_MASK-based filtering feature in EPS2_GET_DIRECTORY_LISTING I ended up with the solution where I read entire directory content and then process it with regular expressions to find matching files/directories.

st4hoo
  • 2,196
  • 17
  • 25
  • Yes, and also wildcard* is working, so using * at the end. The best matching method I found was by using: DELETE itab WHERE NOT filename CP pattern. – Codrin Strîmbei Aug 29 '17 at 07:51