¡Caminando hacia el éxito!

Aprende en Comunidad

Avalados por :

Java Mapping with DOM Parser: A Comprehensive Guide for SAP PI Versions 7.0 and 7.1

  • Creado 01/03/2024
  • Modificado 01/03/2024
  • 19 Vistas
0
Cargando...

Hi all,


I will explain in this blog an easy way to do Java mapping using DOM for any mapping that you need. Today, I use Java mapping for most mappings because Graphic Mappings are limited and sometimes hard to input logic inside a box. I will also explain the project case that I worked on.


Check this out and enjoy it.


What is a Parser?


A parser breaks data into smaller elements according to a set of rules that describe its structure. If the syntax of a data source has been described by grammar rules, a parser can use the grammar to parse the data source, breaking data elements such as an address into smaller elements like house number, street number, city, pin code, etc. The output of the parser is a parse tree, expressing the hierarchical structure of the input data.

What is a DOM Parser?

DOM (Document Object Model) is a platform- and language-neutral interface that provides a standard model of how the objects in an XML object are put together and a standard interface for accessing and manipulating these objects and their inter-relationships.

Why DOM parser?

  1. Converts XML into a tree of objects
  2. It's possible to access any node within the tree randomly
  3. Can insert/delete nodes within the XML document
  4. Implements W3C standards for accessing XML

What's the main difference between DOM and SAX?

DOM loads a whole XML file inside memory, and with SAX, you can just check the node you want.

I will not explain SAX in this blog.


What's the difference between Java mapping SAP PI version 7.0 and 7.1?

In SAP PI 7.0, you must implement the method execute and in SAP PI 7.1, you must implement the transform method.


public void execute(InputStream in, OutputStream out) throws StreamTransformationException {


public void transform(TransformationInput tInp, TransformationOutput tOut) throws StreamTransformationException {

Java Libs and SAP PI Versions:

SAP PI 7.1 lib for Java mapping: aii_map_api.jar

SAP PI 7.0 lib for Java mapping: com.sap.xpi.ib.mapping.lib.jar

Project Case:

The project case involved 5 systems, including a .NET Webservice, SAP PI (Middleware Layer), SAP BO NF-e 10.0 (Application Server - SAP Solution for Electronic invoices to Brazil), SAP ECC 6.0, and the Government Webservice System - SEFAZ.

Pedro Pascal
Se unió el 07/03/2018
Pinterest
Telegram
Linkedin
Whatsapp

Sin respuestas

No hay respuestas para mostrar No hay respuestas para mostrar Se el primero en responder

contacto@primeinstitute.com

(+51) 1641 9379
(+57) 1489 6964

© 2024 Copyright. Todos los derechos reservados.

Desarrollado por Prime Institute

¡Hola! Soy Diana, asesora académica de Prime Institute, indícame en que curso estas interesado, saludos!
Hola ¿Puedo ayudarte?