/
Step - Transform XML to ABAP structures.
Step - Transform XML to ABAP structures.
Class: /EDGE/CL_FC_XML_TRANSFOR_STEP
Type: Concrete class, can be used directly in the configuration.
Scope: Input transformation, i.e., this step allows transforming the XML file representing the electronic invoice into a simpler ABAP structure.
Prerequisites:
- Import the XML definition (XSD) as a WSDL into the SAP system to create the necessary proxies as if publishing a service. This activity is a one-time task and must be transported to each environment. The ABAP Framework generates a class and an interface with a method where the XML definition is the only parameter. This enables the use of standard tools to deserialize the XML and place it into a simpler ABAP structure.
- The XML file must have been archived using ArchiveLink with reference to the Business Object of the process.
- The following fields in the electronic invoice table (/EDGE/FC_TB901) must be filled with the corresponding XML file data: IN_XML_AR_OB, IN_XML_OBJID, IN_XML_SAPOB, and IN_XML_ARDID.
- The parameter INTERFACE in the business unit's parameters must be configured. Refer to "Configuration of parameters or constants for the business unit". The value should correspond to the interface imported through the WSDL, simulating the service with the XSD of the XML to be transformed.
- The parameter METHOD in the business unt's parameters must be configured. Refer to "Configuration of parameters or constants for the business unit". The value should correspond to the method of the interface imported through the WSDL, simulating the service with the XSD of the XML to be transformed.
- The business object must have the transformation configured. Refer to "Specific configuration for each process/business unit".
- The transformation configured in "Configuration of input XML transformations" must comply with the rules stated there.
- The transformation is based on having header and detail data.
Post-conditions:
- If the transformation is executed successfully, a properties structure will be added to the context of the process instance, allowing retrieval in another step of the process instance.
- The return structure is divided into two parts: one for the header and one for the detail.
- The header structure can be obtained as follows:
The detail or items structure can be obtained as follows:
- The final state is calculated as follows:
If the transformation result does NOT generate an exception, the system checks if the process was in an error state and if no final state is assigned in the configuration. In this case, the state configured in the parameter STATUS_OK_AFTER_ERROR_TRANS is assigned as the final state. If this parameter is not configured, the initial state of the business object is assigned as the final state.
In any other case, the determined state is returned based on the functional logic configured for the states of this step.
Avvale 2024