abapdirectory-listing

Get the contents of a Application Server directory


I need to get a listing of a server-side directory inside SAP. How do I achieve this in ABAP? Are there any built-in SAP functions I can call?

Ideally I want a function which I can pass a path as input, and which will return a list of filenames in an internal table.


Solution

  • After reading the answers of Chris Carrthers and tomdemuyt I would say:

    1. Use RZL_READ_DIR_LOCAL if you need simple list of filenames.

    2. EPS_GET_DIRECTORY_LISTING is more powerfull - it can also list subdirectories.