Versiones comparadas

Clave

  • Se ha añadido esta línea.
  • Se ha eliminado esta línea.
  • El formato se ha cambiado.

ClaseClass:   /EDGE/CL_FC_ABAP_XML_TRAN_STEP

TipoType: clase abstracta, no se puede utilizar directamente en la configuración. Solo se puede utilizar como super clase de otra clase donde se implemente un método abstracto.

Alcance: transformación de salida, es decir, este paso permite transformar una estructura ABAP a un XML.

Precondiciones:

...

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>input_param_interf_abap_to_xml. En caso de no venir, se recomienda reimplementar el método EXECUTE_STEP, adicionándo este parámetro al contexto. Se puede verificar la clase 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 donde se reimplementó el método where the EXECUTE_STEP y se adicionó el parámetro requerido. Al final se debe hacer un llamado al super de la siguiente forma:  pe_success super->execute_stepCHANGING pc_context pc_context ). 
    En el contexto del paso debe venir el nombre del método de la interfaz que contiene la definición del XML, es decir, la que se generó en el primer paso. Debe venir en el siguiente parámetro:  pc_context->data donde  name =  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>input_param_method_abap_to_xml. En caso de no venir, se recomienda reimplementar el método EXECUTE_STEP, adicionándo este parámetro al contexto. Se puede verificar la clase 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 donde se reimplementó el método where the EXECUTE_STEP y se adicionó el parámetro requerido. Al final se debe hacer un llamado al super de la siguiente forma:  pe_success super->execute_stepCHANGING pc_context pc_context ). 
    La subclase debe implementar el siguiente métodomethod 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: si se requiere modificar el XML generado, en este método se puede hacer dicho proceso. En caso de no requerir modificarlo, entonces se deja vacía la implementaciónIf 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-condiciones:

...

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. 
    Para el caso del XML en formato XSTRING queda como  name For the XML in XSTRING format, store it as name = /edge/cl_fc_constants=>input_param_xxml_abap_to_xml.