Page tree
Skip to end of metadata
Go to start of metadata

This Wiki describes the following:

  • Overview of  SAP NetWeaver Process Integration ( PI )
  • Overview of  Adapter Modules
  • Sample use case 

This also describes about the custom adapter modules in PI 7.1 and the sample use case for developing the same.

Even though we found lot of online materials for development of custom modules for adapters, I couldn’t find the way of usage in real time. Hence I have shared this information based on my project learning.

It doesn’t contain any step by step for deployment or development.

It describes the adapter module code fragments and how it is getting adapted to real time usage. It is for the Intermediate PI Consultants.

Overview of SAP NetWeaver Process Integration (PI)

                SAP NetWeaver is an open application and integration platform that permits integration of ESA (Enterprise Service Architecture).

PI is positioned within the SAP NetWeaver as Process Integration Layer.

In simple terms PI enables you to connect systems from different vendors (SAP or non-SAP) in different programming languages to each other’s centrally and implement cross-system processes.

PI is an integration technology and platform for

  • SAP and non-SAP Applications
  • A2A and B2B Communications
  • For Business Process Management (BPM)
  • Based on Industry and web service standard

Overview of Adapter modules

  • Adapter  modules are stateless EJB
  • Each adapter we can define the generic modules in the module processor
  • Customer specific modules can be added to default module chain and it can be parameterized.
  • Sequence of modules matters!

Use cases of Adapter modules

  • Changing the encoding
  • Encryption and decryption
  • Creating or merging the additional attachment
  • Converting the payload [ which are not covered in the standards  ]

Adapter module processes

 

                                                                         Figure 1: Adapter module processes

Sample Use case

 Our requirement is to validate the file content before send the message to PI. If content is invalid then don’t send the message to PI .

Adapter module code fragment

process is the method of the class ModuleData to manipulate the PI data Payload.

Here I would like to categorize the important aspects of the process method’s code fragment as follows

  • Getting the Payload
  • Usage of Audit Log
  • Handling custom functions

 


Please refer the referencessection for complete step by step guide to deploy the Adapter module in J2EE Adapter Engine

How to use in Integration Directory [Configuration]

 1.    Create a sender communication channel


                                                                Figure 2: File sender Communication Channel 

a.    Go to module tab and give your JNDI name which you have given during deployment of your adapter module as first process sequence 1. Because before sending the message to IS we need to validate the file content

                                                                                Figure 3: Module prioritization

b.   Process sequence 2 as MessageTransformBean to structure the content from payload to PI understandable format .Please refers MessageTransformBean for more info.

c.    Rest of process sequences except standard CallSapAdapterare for synchronous which are not relevant to this topic.

d.    Go to module configuration parameter(Which will act like runtime parameters for  Adapter module) and provide the inputs as follows. Here I have shown parameters for our custom module (process sequence 1 ) only.

ModuleKey

ParameterName

ParameterValue

1

ArchiveFilePath

/home/piuser/cap/dev/errorarchive

1

FilePath

/home/piuser/cap/dev/

1

msgType

MT_TEST_SOURCE_REQ

1

namespace

http://test.com/test/RESULT/SYNC

                                Table1: Module Parameters

Challenges

If you face the issue like , once you have raised to exception if validation fails from module then there may be chance for adapter polling freeze .Which will restrict the further polling for sender adapter until unless the earlier exception is cleared .

Solution: SAP has released the notes for most of the Service packs .Our issue will be resolved once we apply the same.

References

[1]      How To... Create Modules for the JEE Adapter Engine

          http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa?QuickLink=index&overridelayout=true

[2]      Adding Modules to the Module Processor

          http://help.sap.com/saphelp_nwpi71/helpdata/EN/cd/5af7c0c994e24fb0d0088443513de2/content.htm

  • No labels