cancel
Showing results for 
Search instead for 
Did you mean: 

How to Check PI File Server using JAVA Mapping

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Experts,

my requirement is i have to check PI NFS File Server at mapoing level ,whether ABC.Txt file is there or not.

is it possible to check using JAVA Map??

please provide any code snippet and inputs.

many thanks,

Raj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi!

You can make use of ABAP or Java Mapping program where you have to implement the check on the file system. In ABAP you can fire and check the results of operating system commands like "ls -ltr..." (Unix) or "dir..." (Windows).

Regards,

Volker

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Thanks for your replay,actually i have to implement using JAVA Map.

my question is is it possible to read from JAVA Map at mapping level,??

many thanks,

Raj

Former Member
0 Kudos

Hi!

Despite from the interface you have to implement for a Java Mapping Program you normally should be free to do everything you want WITHIN the program (it runs on the PI server!!!!) - including checks on the file system. I'm not sure whether the SAP J2EE Engine Container denies such attempts to access the file system. But on the other hand: why should it do that?

If you do not know how to implement file system checks/access in Java have a look at one of the several Java/J2EE Programmers Forums. One of them can be found on http:// java.sun.com

Regards,

Volker

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

I have written one Java map to check file exist in local directory or not,for time being its working fine.

but i am not sure its posbile to acces SAP PI File server,my requirement is I have to check in File Server Some particular file exist or not,if exists i have to wait my interface to send message to FTP after 10 hours.

any inputs welcome,thanks alot

many thanks,

Raj

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

thanks.i have written java mapping program ..solved

Former Member
0 Kudos

Hi Rajasekhar,

Can you please share some sample code for reading the filename using JAVA code, We have written java code for reading the file name but it's not working.

Here, my requirement is , from external system via MQ series,the request messages is coming to SAP PI ,while giving responce back to external system, i want to place the file in one separate folder(.PS format) using JAVA mapping.

Thanks & Regards

Sarathi J

Former Member
0 Kudos

Hello RajaSekhar,

I have same kind of requirement. Can you please share the JAVA code to read the file from PI application server at mapping level.

Thanks in advance.

Regards,

Lavanya