/
Step - Transform ABAP structures to XML.
Step - Transform ABAP structures to XML.
Class: /EDGE/CL_FC_ABAP_XML_TRAN_STEP
Type: abstract class, cannot be used directly in the configuration. It can only be used as a super class of another class where an abstract method is implemented.
Scope: output transformation, i.e. this step allows transforming an ABAP structure to an XML.
Preconditions:
- Importing the XML definition, that is, the XSD, as a WSDL into the SAP system in a way that creates the necessary proxies as if a service were being published. This activity is a one-time setup and must be transported to each environment. The idea is for the ABAP Framework to generate a class and an interface with a method where the XML definition is passed as the only parameter. This will allow the use of standard tools to serialize the ABAP structure into XML.
- In the context of this step, the name of the interface containing the XML definition (generated in the first step) must be provided. It should be passed in the following parameter: pc_context->data where name = /edge/cl_fc_constants=>input_param_interf_abap_to_xml. If not provided, it is recommended to re-implement the EXECUTE_STEP method by adding this parameter to the context. You can refer to the class /EDGE/CL_FC_CRVJL_STEP_XML_TRA where the EXECUTE_STEP method was re-implemented, and the required parameter was added. Finally, a call to the superclass should be made as follows: pe_success = super->execute_step( CHANGING pc_context = pc_context ).
- In the context of this step, the name of the method in the interface containing the XML definition (generated in the first step) must be provided. It should be passed in the following parameter: pc_context->data where name = /edge/cl_fc_constants=>input_param_method_abap_to_xml. If not provided, it is recommended to re-implement the EXECUTE_STEP method by adding this parameter to the context. You can refer to the class /EDGE/CL_FC_CRVJL_STEP_XML_TRA where the EXECUTE_STEP method was re-implemented, and the required parameter was added. Finally, a call to the superclass should be made as follows: pe_success = super->execute_step( CHANGING pc_context = pc_context ).
- The subclass must implement the following method:
- CHANGE_XML: If it is necessary to modify the generated XML, this method can be used for that purpose. In case there is no need to modify it, then the implementation remains empty.
Post-conditions:
- At the end, store the XML in STRING format and XSTRING format in the context of the process.
Both are stored in pc_context → data.
For the XML in STRING format, store it as name = /edge/cl_fc_constants=>input_param_xml_abap_to_xml.
For the XML in XSTRING format, store it as name = /edge/cl_fc_constants=>input_param_xxml_abap_to_xml.
Avvale 2024