Execute Settlement Step
The abstract class CL_ISU_EDM_SETTLSTEP implements the framework of a settlement step. This ensures that all the steps in the settlement step run in the same way.
To start each settlement step, call the Start method. Processing is only continued if a log can be generated for the settlement document. In the log, the processing status of the settlement step is automatically updated. The abstract step Commit Work determines when processing is complete.
The abstract settlement step ensures that all the profiles and values that were defined as parameters of the settlement procedure are saved on the database (in correspondence with the parameter definition) and- together with the other results of the settlement step- are stored in a container for further processing. Only error-free results parameters of a settlement step are written to the database.
If existing profile values are changed, a new version is generated when the profile parameters are saved. The current version number is stored in the settlement document.
A results parameter or interim result of the settlement procedure can only be calculated by one settlement step. This ensures that in every settlement step the system checks whether the results for calculation are already contained in the transferred container. If this is the case, the system diagnoses an error and terminates processing of the settlement step.
The specific profiles and values processed/used by the settlement step must have been transferred in a container or must be defined as results parameters of the settlement procedure. The results parameters are filtered from the container. This is a standard function of the abstract class. The filter settings are based on the parameter definition (table EEDMSETTLSTEPPA) and are applied before the derived Process method is called. Only parameters that belong to the settlement unit that was called with the settlement step are transferred to the step.
If a result parameter is not transferred in the container, the abstract settlement step attempts to determine the parameter using the definition of the settlement procedure parameters.
For each procedure the system determines which parameters are persistently saved. All parameters that are defined as input or output parameters have to be allocated to an EDM profile. This is achieved via allocation to points of delivery with a role that was defined for the settlement procedure. The settlement procedure can then only be successfully completed if all the profiles for input parameters and results can be determined at runtime.
Settlement parameters that are defined as interim results can be saved if they have to be restarted after an error in the settlement run or are required for the log. In this case, you must also allocated EDM profiles with defined roles in accordance with the parameter definition.
The allocation of parameters calculated by settlement steps to the EDM profiles that are to be updated occurs at runtime and is carried out using the CL_ISU_EDM_SETTLPROCESS class. The parameters of the settlement procedure are identified by the parameter name and group according to the usage types (PARUSAGE) listed below . The usage type of the settlement parameters define where the input or result profiles are saved.
· Parameters that are specified for a settlement procedure (for example energy feeding curve, customer group load shape and so on) are- together with the role defined in the settlement procedure- allocated to the technical point of delivery of the selection variant.
· Parameters that are specified for a grid (for example load shape of intervals customers for each settlement unit in a given grid) are- together with the role defined in the settlement procedure- allocated to the virtual point of delivery of the grid. Partial results for a grid that is calculated for each settlement unit can be distinguished by the settings in the role (role context).
If the evaluation of the role is not sufficient, the parameter determination function also takes into account the context of a profile allocation. The context is optional and contains the following information:
· Settlement Procedure
· Settlement Unit
· Utility grid
When you define the settlement parameter, specify which context fields you want to be evaluated.
If a profile cannot be determined (or if more than one profile is determined), the system terminates parameter determination and displays an error message.
The system only re-calculated the settlement step if last run of the step (for the same settlement document) was terminated due to error, or if it was not possible to determine all the result parameters from the last error-free run. This is the case if, for example, a profile results parameter of the settlement step was not defined as a parameter of the settlement procedure.