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

Reading file in pattern from Application server

Former Member
0 Likes
1,006

Hello Experts,

I want to search file from Application server.

I have certain pattern for the file. eg. OEDERS_.DAT or ORDERS_OPEN..

How can I search the file for pattern from the application server?

Ex.

Suppose my file name is ORDER_SENT.DAT, this file should be returned.

Suppose my file name is ORDER+SENT.DAT, this file should be returned with error.

Regards,

RH

7 REPLIES 7
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
911

Hello,

You can use the FM: EPS_GET_DIRECTORY_LISTING.

Here you have the parameter FILE_MASK, where you can provide the pattern for e.g., .DAT or ORDERS.

Can you please explain this:

Suppose my file name is ORDER_SENT.DAT, this file should be returned.

Suppose my file name is ORDER+SENT.DAT, this file should be returned with error.

BR,

Suhas

Read only

Former Member
0 Likes
911

Yes.

Means Valid file found application server (Pattern matches), return the contents of file otherwise return error.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
911

And what will be the "Input Pattern" you will be providing ?

Read only

Former Member
0 Likes
911

Path

Read only

Former Member
0 Likes
911

The FM EPS_GET_DIRECTORY_LISTING is not resulting result properly.

I have below files on server.

AMODPROT.PC1

AMODPROT.PC6

CMODACT.PC1

CMODACT.PC6

IMODPROT.PC1

IMODPROT.PC6

N070703.PC2

SAPRUPGM.PC6

TMS_TEST.PC1

TMS_TEST.PC2

TMS_TEST.PC6

UMODPROT.PC6

I use *.PC6 in mask parameter of FM EPS_GET_DIRECTORY_LISTING , And it returned 0 files, where as there are 6 files.

Did I missed anything in mask parameter?

Regards,

RH

Read only

Former Member
0 Likes
911

Thanks. found Ans

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
911

Hello,

Can you please share your solution here? That will be helpful for others who might face the same problem.

BR,

Suhas