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

How to search file in application server using pattern

Former Member
0 Likes
3,380

Hi all,

I want to search file in application server.

Suppose there is file named abc20090808.dat.

Is there is any function module to search the file?

it should return back the file names starting with abc, if the import parameter is abc*

Regards,

Nikhil

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
1,915

Hello Nikhil,

If you want to search for the file in a specific folder, then you can use the FM: EPS_GET_DIRECTORY_LISTING.

In this FM, pass the directory path (Application Server path) to the param DIR_NAME & in the param FILE_MASK pass the patter e.g., abc*

Hope i am clear.

BR,

Suhas

8 REPLIES 8
Read only

Former Member
0 Likes
1,915

Hi Nikhil,

use this FM

F4_DXFILENAME_TOPRECURSION

Hope this will help you.

Regards,

Vijay

Read only

0 Likes
1,915

I am not looking for F4 help. want to get the details in internal table

Read only

Former Member
0 Likes
1,915

hello,

Have a look

You can use this function module /SAPDMC/LSM_F4_SERVER_FILE for F4 help for application server file and then you can use the function module TEXT_CONVERT_XLS_TO_SAP to read data into internal table.

regards,

shweta

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
1,916

Hello Nikhil,

If you want to search for the file in a specific folder, then you can use the FM: EPS_GET_DIRECTORY_LISTING.

In this FM, pass the directory path (Application Server path) to the param DIR_NAME & in the param FILE_MASK pass the patter e.g., abc*

Hope i am clear.

BR,

Suhas

Read only

Former Member
0 Likes
1,915

Hi nikhil,

We can use this FM - SUBST_GET_FILE_LIST

U will get information in INTERNAL TABLE.

No dialog box for F4.

You can give pattern also.

regards,

amit m.

Read only

Former Member
0 Likes
1,915

Solved

Read only

0 Likes
1,915

Hi,

I have a similar requirement, could you let me know how you solved the issue.

Thanks,

Bala

Read only

0 Likes
1,915

Hi, balakrishna.thatikonda

Please don't ask questions in comments to Former Members in a thread that's more than 12 years old. No one will see your question or comment.

The correct approach is to ask a new question, as you did here: https://answers.sap.com/questions/13556834/how-to-read-a-file-from-application-server-based-o.html.

Please see https://community.sap.com/resources/questions-and-answers for best practices on asking question on SAP Community.

Kind regards,

--Jerry

Moderation Lead

Make sure to subscribe to What's New!