cancel
Showing results for 
Search instead for 
Did you mean: 

Read files from PI Server using Java Mapping

Former Member
0 Kudos

Hi Experts,

I have a requirement of reading the files from SAP PI Server folders via Java Mapping. Can you please guide me how this can be achieved. I presume the piece of java code getClass.getResourceAsStream() works for only imported archives.

Regards,

N. Jayanth Kumar.

Accepted Solutions (1)

Accepted Solutions (1)

praveen_sutra
Active Contributor
0 Kudos

hi Jayanth,

PFB the link where i have done similar thing from a ftp location.

http://scn.sap.com/docs/DOC-45677

I am sure with minor changes in code  you will be able to read it from PI shared location also.

Please let me know if you need any specific help.

thanks and regards,

Praveen T

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

Thanks for your replies which are very much Helpful. I have resolved the issue, by using FileInputStream as the PI Mapping reads from the OS Folders directly.

Regards,

N. Jayanth Kumar.

former_member192851
Active Participant
0 Kudos

From Java in PI you work with PI folders like with other folders on local machine. You just need path to folder on PI server.

http://stackoverflow.com/questions/1844688/read-all-files-in-a-folder

Former Member
0 Kudos

Hi,

Few minutes ago, i see this "Send File to Two Different Locations using Adapter Module  -2013-07", it's for a module, but you can probably reuse java code....

else why you do not use a sender File Adapter to pick-up this file on PI server, and then use Java mapping for what you have to do? does that means this file is not your source file, but another file like a file which contains some properties, or 'custo' data...

regards.

Mickael