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

Directory contents

Former Member
0 Likes
567

Hi All

How do I read the contents of a directory on the server periodically to check arrival of new files. Appreciate if any of you can share the approach for the same.

Thanks

Karen

1 ACCEPTED SOLUTION
Read only

brad_bohn
Active Contributor
0 Likes
528

There are probably several server-based functions discussed on this forum somewhere, but a common (older) way of doing it is to mimic AL11 functionality by calling the kernel functions directly (used in RSWATCH0). You'll need to convert the MTIME field (seconds since 1970) to a date/time last modified). Search for a function (I'm sure there's one on here somewhere); other wise, just wrap the AL11 code in a function of your own.

Hi All

How do I read the contents of a directory on the server periodically to check arrival of new files. Appreciate if any of you can share the approach for the same.

Thanks

Karen

2 REPLIES 2
Read only

brad_bohn
Active Contributor
0 Likes
529

There are probably several server-based functions discussed on this forum somewhere, but a common (older) way of doing it is to mimic AL11 functionality by calling the kernel functions directly (used in RSWATCH0). You'll need to convert the MTIME field (seconds since 1970) to a date/time last modified). Search for a function (I'm sure there's one on here somewhere); other wise, just wrap the AL11 code in a function of your own.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
528

Hello Karen,

I think you can achieve this using user-defined events(SM62).

Also you need the help of BASIS guys, please refer to this [link|http://www.sapfans.com/sapfans/sapfaq/robert.htm] for further details.

BR,

Suhas