cancel
Showing results for 
Search instead for 
Did you mean: 

Howto persist information in a pi module

markus_schalk
Participant
0 Kudos

Hello experts,

is it possible and advisable to persist information in a local enterprise bean used in pi adapter module chain?

If yes, please give me information on how to do it. Code examples are appreciated.

Thanks in advance!

Kind regards,

Markus

Accepted Solutions (0)

Answers (6)

Answers (6)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Markus,

                 you can read from/ write to files from within  adpter module code. The files will recide under folders of PI server.

Regards

Anupam

Former Member
0 Kudos

Hi Markus, I have not tried this, but perhaps your modules can read/write to an adapter variable as explained in this blog by Jin:

http://scn.sap.com/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapt...

rajasekhar_reddy14
Active Contributor
0 Kudos

I did this kind of requirement but not using adapter module,as per my experience implemnting through adapter module not a right idea,

1)Suppose your receiver is SOAP and you want store the message in Oracle table, this case your adapter module should support sending data to Data base .

you need to maintian the sequence also in Adapte module chain.

This is bit tedious activity that why add one more JDBC receiver adapter  and insert data.

I dont recommend file storage domain.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Another approach is use file as a storage media. You can easily do File lookup using UDF during mapping.  You might want to check this wiki about file lookup using UDF. This is very simple approach.

https://wiki.sdn.sap.com/wiki/display/XI/File+Lookup+in+UDF

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>is it possible and advisable to persist information in a local enterprise bean used in pi adapter module chain?

I don't think so - why not

a) store the data in some jdbc table and populate it with an normal PI adapter

as a second receiver in your flow ?

b) - just read the data in the module

Regards,

Michal Krawczyk

iaki_vila
Active Contributor
0 Kudos

Hi Markus,

In this wiki you have an example of a module implementation with access to the payload:

http://wiki.sdn.sap.com/wiki/display/NWTech/Custom+Adapter+Module+Development+-+SAP+PI+7.1

Another example:

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

For the persistence you could use a Z table in the abap stuck, or create a table in the java stuck (i never try this option and i cant assure you the problems that you can find) http://scn.sap.com/docs/DOC-1222

Regards.