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_XML_TRANSFOR_STEP

TipoType: clase concreta, se puede utilizar directamente en la configuración.

Alcance: transformación de entrada, es decir, este paso permite transformar el archivo XML que representa la factura electrónica a una estructura ABAP más simple.

Precondiciones:

...

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) deben estar llenos con los datos correspondientes al fichero XML: INmust be filled with the corresponding XML file data: IN_XML_AR_OB,  ININ_XML_OBJID,  ININ_XML_SAPOB y IN, and IN_XML_ARDID.

  • Debe estar configurado el parámetro INTERFACE en los parámetros del intérprete. Ver "Configuración de parámetros o constantes para el intérprete". El valor que debe tener es el correspondiente a la interfaz que se importó mediante el WSDL donde se simuló el servicio con el XSD del XML que se pretende transformar.
    Debe estar configurado el parámetro METHOD en los parámetros del intérprete. Ver "Configuración de parámetros o constantes para el intérprete". El valor que debe tener es el correspondiente aal método de la interfaz que se importó mediante el WSDL donde se simuló el servicio con el XSD del XML que se pretende transformarThe parameter INTERFACE in the business object's parameters must be configured. Refer to "Configuration of Parameters or Constants for the Business Object". 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 object's parameters must be configured. Refer to "Configuration of Parameters or Constants for the Business Object". 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.

  • Que el intérprete tenga configurado la transformación. Ver "Configuración específica para cada proceso/intérprete".The business object must have the transformation configured.
    La transformación configurada en "Configuración de las transformaciones XML de entrada" cumpla con las reglas enunciadas allí.
  • La transformación se basa en que siempre hay unos datos de cabecera y otros de detalle o ítems.

Post-condiciones:

  • Si la transformación se ejecuta de forma satisfactoria, se adicionará una estructura tipo properties en el contexto de la instancia del proceso; de forma tal que se pueda obtener en otro paso de la instancia del proceso.
    La estructura de retorno se divide en dos: una estructura para la cabecera y otra para el detalle.
    La estructura de cabecera se puede obtener de la siguiente forma:
    Image Removed
    La estructura de detalle o ítems se puede obtener de la siguiente forma:
    Image Removed
    El estado final se calcula de la siguiente forma:
    Si el resultado de la transformación NO genera excepción, entonces se valida si el proceso estaba en error y en la configuración no tiene asignado un estado final, entonces se asigna como estado final lo que está configurado en el parámetro STATUSRefer to "Specific Configuration for Each Process/Business Object".

  • 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:
    Image Added

  • The detail or items structure can be obtained as follows:

    Image Added


  • 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 , si este parámetro no está configurado, entonces se asigna el estado inicial del intérprete.
    En cualquier otro caso se retorna el estado que se determine según la lógica configurada a nivel funcional para los estados de este pasois 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.