Transaction /EDGE/FC_SPRO → Configuration Folder "Automatic business unit determination".
This configuration is useful in cases where, depending on certain initial variables, one business unit or another must be started. For example, if you have multiple business objects for a similar scenario, such as multiple business units 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 unit the process should follow. Another example could be for issuing, where you only need the business unit 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 unit 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 unit should only be initiated if it comes from a particular transaction.
You can define N automatic business units determinations, and you can even define several for the same business unit. 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 must be configured there, which contains all the logic described below.
The following fields define the configuration of an automatic determination:
- ID.Det.BU
Unique identifier of the business unit determination. - Name of determination
Business Unit determination name. - BU ID
Business Object that will be assigned if this determination results in true. - Sec,Deter.
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. - Dete type.
Indicates the type of logic to be used for the business unit 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 → 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 unit 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:
- ABAP Class:
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. - External document type:
It is only used if the determination type is marked as X. It indicates the external document type configured in the business unit 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 business unit. 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 - XML interface definition:
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 - Method with XML definition:
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 business unit.
This functional configuration is explained in the next two chapters:
Example of functional configuration for an automatic determination: