Splitter in SAP CPI

This blog will explain how to use Splitter in SAP CPI.

What is Splitter:

A Splitter step allows you to break the message into smaller parts, which can be processed independently.

Cloud Platform Integration has 4 types of Splitters:

  1. General Splitter – A splitter that divides a message containing multiple messages into individual messages. This splitter preserves the context of the root nodes with each split message.
  2. PKCS Splitter – Separates the payload from its signature and provides them as split messages.
  3. Iterating Splitter – A splitter that divides a message containing multiple messages into individual messages. This splitter considers only the split entity and does not preserve the context of the root nodes.
  4. IDoc Splitter – Divides a group of IDocs into individual IDocs. It only works if either the sender or the receiver channel is an IDoc channel. Here there is no chance to continue processing in case of an exception.

I will explain each splitter in more details below

General Splitter

A splitter that divides a message containing multiple messages into individual messages. This splitter preserves the context of the root nodes with each split message.

General Splitter in SAP CPI

  • Name – can be any name for the Splitter
  • Expression Type – defines how to split the message. It can have 2 value:
    • XPath – XPath of the node that needs to be split. Is relevant for XML messages.
    • Line Break – each line is a new split message. Split when a new line character is encountered. It works on both XML and non-XML inputs.
  • XPath Expression – XPath of the node that marks each split message.
  • Grouping – How many nodes are clubbed together under 1 split message. If this is blank, each node will form 1 split message.
  • Streaming – Enable this if you want to start splitting before the entire big message is loaded into memory. The system will first divide the message into chunks and starts splitting the chunks into split messages. This is only relevant if the splitter is the first step after the step that fetches data – otherwise, the content would have already loaded in memory.
  • Parallel Processing – check this if you want to process the split messages parallelly. If this is not checked, all split messages shall be processed serially and the order shall be maintained.
  • Stop on Exception – check this if you want to stop processing, the moment a split message encounters an exception. In case Parallel Processing is chosen along with Stop on Exception, then the system will not be able to terminate the threads that are already processing – however, no new threads shall be spawned.

Iterating Splitter

A splitter that divides a message containing multiple messages into individual messages. This splitter considers only the split entity and does not preserve the context of the root nodes.

This variant supports an additional Expression Type Token. This splits the message (which should be an XML) based on the Keyword mentioned as a token.

PKCS Splitter

Separates the payload from its signature and provides them as split messages.

  • Name – can be any name for the Splitter
  • Payload File Name – Name given to the payload part of the message.
  • Signature File Name – Name given to the signature part of the message.
  • Wrap by Content Info – if you want to wrap signature that is stored as a signed data type into a content info type. The result will be a signature wrapped in signed data type which in turn is wrapped in content info type.
  • Payload first – check this to ensure that the payload is the first split message.
  • Base64 Payload – check this if you want to encode the payload before returning it.
  • Base64 Signature – check this if you want to encode the signature before returning it.

IDoc Splitter

Divides a group of IDocs into individual IDocs. It only works if either the sender or the receiver channel is an IDoc channel. Here there is no chance to continue processing in case of an exception.

  • Name – can be any name for the Splitter

 

For more details refer

https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/83e2022f9c014bebab63cb933e625610.html

More CPI Blogs

Aggregator in SAP CPI

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.