cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing a file in Imported Archive from Adapter module

Former Member
0 Kudos

Hi,

I am designing a module for File/FTP and Mail adapters. Is it possible to retrieve data from a CSV or TXT file uploaded in the Imported Archive from the Java code in the module? If this is possible, do I use the same approach as accessing the CSV data from the mapping using a UDF? If this is not possible, can you suggest other ways were I can access a CSV or TXT configuration file from an adapter module?

I would like to avoid using Module key, Parameter name and Parameter value as I would like to make the adapter module generic and the data I will be reading might be too much to be specified in this location. However, I would use the Module key, Parameter name and Parameter value to specify the CSV or TXT filename which the adapter module will be using.

Thanks in advance for any help that you can provide.

Regards,

Elbert

Accepted Solutions (0)

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

You may use your data in property file format and store that file on PI server.

/people/sap.user72/blog/2006/06/07/property-file-a-smart-use-in-xi-context

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek,

Thanks for your response but my CSV or TXT file would be updated regularly by the developer. Furthermore, the developer would not have access to the directory system to constantly access and modify the file. Thus, I was thinking it would be better to upload the file as an Imported Archive.

By your answer, does it mean that the function module cannot access a file when it is uploaded to the Imported Archive?

Regards,

Elbert

prateek
Active Contributor
0 Kudos

Imported archives are part of mapping flow and adapter modules are more part of routing. Therefore I don't think imported archive could be made accessible anywhere outside mapping.

but my CSV or TXT file would be updated regularly by the developer.

So were you planning to import this file again and again under imported archive? This doesn't seems to be a good solution when you think about changin Design part in Production environment. It would be better to give access to certain folder to developer to put the file there and access it using some code. You may refer this

/people/sundararamaprasad.subbaraman/blog/2005/12/09/making-csv-file-lookup-possible-in-sap-xi

Regards,

Prateek

Former Member
0 Kudos

Thanks Prateek! I will consider your advice in my design. Points has been awarded.