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: 

Read files starting with TEST* (for example)

Former Member
0 Kudos

Hi all,

Is it possible to read all the files starting with TEST for example from the Unix folder.

Requirement is there will be files starting with TEST present in the default path x.

I need to read all the files starting with TEST from this path. So, basically in the selection screen, can I put the default filename as TEST*.

All these files will have POs(Purchase Orders) which the program needs to update accordingly.

Please assist.

Thanks and regards,

Anishur

4 REPLIES 4

former_member223537
Active Contributor
0 Kudos

Hi,

You can get a list of all the files available in a specific folder.

Refer blog:

/people/kathirvel.balakrishnan2/blog/2006/06/05/sap-php-together-application-server-directory-file-browser

Best regards,

Prashant

amit_khare
Active Contributor
0 Kudos

USE FM RZL_DIR_READ to read all the files from a specific location on UNIX server. It return the data in an internal table.

Now search out all the names required and use OPEN DATASET.

Regards,

Amit

Reward all helpful replies.

0 Kudos

Hi Amit,

Thanks for the response.

I was unable to find the FM RZL_DIR_READ.

However, there is another FM RZL_READ_DIR. But this reads the directories of an application server.

Thanks and regards,

Anishur

Former Member
0 Kudos

Hi,

I had to do the same. Selecting all values from table comparing konzs that start with number 500* .

check the code:


   lv_var = '500'.
   CONCATENATE lv_var '%' INTO h_concern.

   SELECT * INTO TABLE t_lfa1
           FROM        lfa1
           WHERE     konzs LIKE h_concern.

Adibo.