Transacción /EDGE/FC_SPRO → Carpeta de configuración "Determinación automática intérprete".
Esta configuración es útil en los casos en que dependiendo de ciertas variables iniciales se deba iniciar un intérprete u otro. Es decir, si se tienen varios intérpretes para un escenario similar, por ejemplo, varios para recepción de facturas (uno para facturas, otro para notas crédito y otro para notas débito); entonces en este caso se puede utilizar esta determinación para que no se tenga que dejar "quemado" por código (hard code) por cuál intérprete se deba ir el proceso. Otro ejemplo podría ser para la emisión, donde solo se requiere que el intérprete que va a ejecutar la emisión de facturas de SD se instancie para un grupo de clases de documentos o para cualquier otro grupo dependiendo de un campo de una tabla que esté en el contexto del inicio del proceso. Un ejemplo concreto podría ser: que el intérprete de facturas corresponde solo a las clases de documentos XX, YY, ZZ, el de notas crédito a las clases de documentos AA, BB, CC, y el de notas débito a las clases de documentos DD, EE, FF.
Igualmente se puede indicar que solo se inicie cierto intérprete si viene de una transacción en particular.
Se pueden definir N determinaciones automáticas de intérpretes, incluso se puede definir varias para el mismo intérprete, sin embargo, el sistema tomará la primera que de como resultado verdadero.
Unida a esta configuración se hace necesario configurar la clase para el inicio externo de los proceso en los parámetros generales del b+ Core Framework. Igualmente, se debe configurar allí la clase Transaction /EDGE/FC_SPRO → Configuration Folder "Automatic Business Object Determination."
This configuration is useful in cases where, depending on certain initial variables, one business object or another must be started. For example, if you have multiple business objects for a similar scenario, such as multiple business objects for receiving invoices (one for invoices, another for credit notes, and another for debit notes), you can use this determination to avoid hard-coding which business object the process should follow. Another example could be for issuing, where you only need the business object for SD invoice issuance to be instantiated for a group of document classes or any other group based on a field in a table that is in the context of the process start. A concrete example could be that the invoice business object corresponds only to document classes XX, YY, ZZ, the credit note business object to document classes AA, BB, CC, and the debit note business object to document classes DD, EE, FF.
You can also indicate that a certain business object should only be initiated if it comes from a particular transaction.
You can define N automatic business object determinations, and you can even define several for the same business object. However, the system will use the first one that results in true.
In addition to this configuration, it is necessary to configure the class for the external start of processes in the general parameters of the b+ Core Framework. Similarly, the class /EDGE/CL_FC_START_PROCESS_EXT , la cual contiene toda la lógica que se va a describir a continuación.A continuación se definen los campos que comprenden la configuración de una determinación automáticamust be configured there, which contains all the logic described below.
The following fields define the configuration of an automatic determination:
- ID.Det.Int
Identificación única de la determinación del intérpreteUnique identifier of the Business Object determination. - Nombre de la determinación
Nombre de la determinación del intérpreteBusiness Object determination name. - Id. Intérp
Intérprete que será asignado en caso que esta determinación de como resultado verdaderoBusiness Object that will be assigned if this determination results in true. - Sec,Deter.
Secuencia para ejecución de la determinación. Este campo le indica al sistema el orden por el cual debe ejecutar las determinación. El sistema se detiene cuando alguna retornar verdadero o cuando al final ninguna retornó verdadero.
Tipo Dete.
Indica el tipo de lógica que se va a utilizar para la determinación del intérprete. Existen cuatro tipos de lógica que se pueden asignar:C → por Clase:
Indica que la lógica de la determinación se realiza a través de una clase que implementa la interfaz Sequence for the execution of the determination. This field indicates the order in which the determinations should be executed. The system stops when one of them returns true or when none of them returns true in the end. - Tipo Dete.
Indicates the type of logic to be used for the Business Object determination. There are four types of logic that can be assigned:- C → by Class:
Indicates that the determination logic is performed through a class that implements the interface /EDGE/IF_FC_DETERMINE_INTERPRE. - T → por Tabla/Estructura campo:
Indica que la lógica de la determinación se realiza a través de las configuraciones que se ingresan en las opciones que están dentro de esta carpeta; las cuales corresponden a verificar si en el contexto del inicio del proceso hay una tabla interna o estructura con el nombre configurado y cuyo campo o campos tienen algún valor de los que se configuran aquí. - X → por Esquema XML:
Indica que si el XML que se envía en el inicio del proceso por su contexto corresponde a un esquema definido en una clase/método (luego de importar un proxy), entonces se debe asignar el intérprete correspondiente. Y → mixto por Tabla/Estructura campo y Clase:
Corresponde a la determinación usando en primera instancia el tipo T y si ésta da como resultado verdadero, se procede a verificar por el tipo C; si al final ambas dan como resultado verdadero, el resultado final de la determinación será verdadero, en caso contrario será falso.
Clase que implementa la lógica de la determinación. Solo se utiliza si se ha marcado como tipo de determinación C o Y. Tiene que implementar la interfaz- by Table/Field Structure:
Indicates that the determination logic is performed through configurations entered in the options within this folder; which correspond to checking if there is an internal table or structure in the context of the process start with the configured name, and if its field(s) have any of the values configured here. - X → by XML Schema:
Indicates that if the XML sent at the start of the process, through its context, corresponds to a schema defined in a class/method (after importing a proxy), then the corresponding Business Object should be assigned. - Y → Mixed by Table/Field Structure and Class:
Corresponds to the determination using the T type first, and if it results in true, then it proceeds to check with the C type; if both of them result in true, the final determination result will be true; otherwise, it will be false.
- C → by Class:
- Clase ABAP:
Class that implements the determination logic. It is only used if the determination type is marked as C or Y. It must implement the interface /EDGE/IF_FC_DETERMINE_INTERPRE. - Tipo de documento externo:
Solo se utiliza si se ha marcado como tipo de determinación X. Se indica el tipo de documento externo configurado en el intérprete en "Configuración de tipos de documentos externos", el cual corresponde al XML que se va a validar contra el esquema XSD para verificar si es el que se requiere para el inicio del intérprete. El esquema XSD se define en los próximos dos campos.
Se recomienda revisar el capítulo "Configuración de las transformaciones XML de entrada" donde se explica de forma detallada como importar el esquema XSD a ABAP.It is only used if the determination type is marked as X. It indicates the external document type configured in the interpreter under "Configuration of External Document Types", which corresponds to the XML that will be validated against the XSD schema to verify if it is the one required for starting the interpreter. The XSD schema is defined in the next two fields.
It is recommended to review the chapter "Configuration of Input XML Transformations", where importing the XSD schema into ABAP is explained in detail - Interfaz definición del XML:
Solo se utiliza si se ha marcado como tipo de determinación X.
Se recomienda revisar el capítulo "Configuración de las transformaciones XML de entrada" donde se explica de forma detallada como importar el esquema XSD a ABAP.
Este campo corresponde al nombre de la interfaz que se importó a ABAP y que contiene la definición del XML.It is only used if the determination type is marked as X.
It is recommended to review the chapter "Configuration of Input XML Transformations", where importing the XSD schema into ABAP is explained in detail.
This field corresponds to the name of the interface that was imported into ABAP and contains the XML definition - Método con la definición del XML:
Solo se utiliza si se ha marcado como tipo de determinación X.
Se recomienda revisar el capítulo "Configuración de las transformaciones XML de entrada" donde se explica de forma detallada como importar el esquema XSD a ABAP.
Este campo corresponde al nombre del método de la interfaz que se importó a ABAP y que contiene la definición del XML.
Los únicos tipos de determinación donde se utiliza configuración funcional adicional para el procedimiento de determinación son para los tipos: T y Y. Donde básicamente se utilizan referencias a tablas internas o estructuras, y sus campos para verificar si cumple con las condiciones para asignar o instanciar el intérprete.
Esta configuración funcional se explica en los dos próximos capítulos:
...
- It is only used if the determination type is marked as X.
It is recommended to review the chapter "Configuration of Input XML Transformations", where importing the XSD schema into ABAP is explained in detail.
This field corresponds to the name of the method in the interface that was imported into ABAP and contains the XML definition.
The only determination types that require additional functional configuration for the determination procedure are T and Y. In these cases, references to internal tables or structures, and their fields, are used to verify if the conditions are met to assign or instantiate the interpreter.
This functional configuration is explained in the next two chapters:
Example of functional configuration for an automatic determination: