Transaction /EDGE/FC_SPRO -> Configuration Folder "Transformations".
...
It is assumed that the XSD of the XML to be transformed has been previously imported into a WSDL and then into the ABAP instance as an ABAP proxy. The procedure is as follows:
- Import the XML definition, i.e. the XSD, as a WSDL to the SAP system, so that the necessary proxies are created as if a service were being published. This activity is only performed once and must be transported to each environment. The idea is that the ABAP Framework generates a class and an interface with a method, where the only parameter to the method is the XML definition itself. In this way standard tools would be used to deserialise the XML and put it into a simpler ABAP structure.
The proxy created generates an ABAP input structure for the method; this structure is used to traverse the XML and to configure the mapping.
For clarity, the proxy created for electronic invoicing in Costa Rica is shown below, where several operations were created in the WSDL, each with an XML that would be used in the process of both issuing and receiving:
For the reception case where the XML transformation is used, the following structure was generated:
...
- Transform.
Transformation code. - Name of transform.
Description or name of the transformation.. - Root node of the XML document
XML usually starts from a root or parent node. If this is the case for the transformation that needs to be built, the name of the root node must be indicated here. For example, for Colombia the root node was INVOICE, however for Costa Rica there is no root node, since the most external element of the XML is the message itself; therefore, no root node was indicated.. - Nodo ítemitem
Corresponds to the node with occurrence of 0..n or 1..n and that in ABAp is represented by an internal table, which contains the lines, details or items of the invoice.
If to reach the item node it is necessary to navigate between other structures; these must be separated with a hyphen.
...