Ansicht
Dokumentation

CRMVC_ISX_MSG_DIST - Define Settings for Document Distribution

CRMVC_ISX_MSG_DIST - Define Settings for Document Distribution

TXBHW - Original Tax Base Amount in Local Currency   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Using the settings within this view cluster, you can control the document distribution.
The basic steps to enable the document distribution are the following:

  • definition of document distribution step categories
  • definition of document distribution step types
  • definition of a document distribution schema

The document distribution schema contains document distribution steps that are each linked to a document distribution step type. The document distribution schema must be assigned to the document process type and document item category for which the distribution is to be executed. The schema determination is executed when the document is saved.

Document Distribution Step Category

The document distribution step category is a general categorization of distribution step types. It is used to group a bundle of single distribution steps that must be processed together at a certain status of the document.

An example for a distribution category is contract activation. All steps related to contract activation are linked to one distribution category so that it is possible to implement necessary status changes within the document for the whole distribution category by assigning a suitable implementation class.

The implementation class, which can be assigned to a document distribution step category, is used to control the execution of distribution steps of the corresponding distribution step category. The implementation class must implement interface IF_CRM_ISX_ORDER_MSG_DIST_CAT. The methods of this interface are called at runtime and allow the distribution-category-dependent implementation to react at a dedicated point of time and influence the execution of the distribution steps assigned to the category. It is also possible to influence the determination of the distribution steps.

It is recommended to inherit the implementation class from the abstract base class CL_CRM_ISX_ORDER_MSG_DIST_CAT, which already implements the interface and offers an appropriate class instance constructor that imports necessary data. By redefining the methods in the distribution-category-dependent implementation class, specific coding can be added if needed.

If no implementation class is assigned to the distribution step category, the default implementation class CL_CRM_ISX_ORDER_MD_CAT_DFLT is chosen at runtime.

Document Distribution Step Type

A document distribution step type defines a single distribution step within the document distribution. The distribution step type should describe a single distribution function, for example sending a notification message to one external system.

The document distribution step type must be assigned to a document distribution step category. With this link, the distribution step type becomes part of a group of distribution step types with the same distribution category.

The distribution step type can be defined as an asynchronous (batch) distribution type. This setting prevents the direct execution of the distribution step with this distribution type. The distribution step is registered, and the distribution status is Open. The distribution step is executed with the next batch run (see report Execute Report for Open and Scheduled Document Distribution Steps).

The implementation class at document distribution step type level is used to implement the actual distribution step execution logic. The class must implement interface IF_CRM_ISX_ORDER_MSG_DIST_TYPE. The methods of this interface are called at runtime and allow the distribution-step-type-dependent implementation to react at a dedicated point of time and influence the execution of the distribution step. There are also methods to cancel the execution and to handle changes of the external status triggered from the distribution monitor application.

It is recommended to inherit the implementation class from the abstract base class CL_CRM_ISX_ORDER_MSG_DIST_TYPE, which already implements the interface and offers an appropriate class instance constructor, which imports necessary data. By redefining the methods in the distribution step-type-dependent-implementation class specific coding can be added if needed.

If no implementation class is assigned to the distribution step type, the default implementation class CL_CRM_ISX_ORDER_MD_TYPE_DFLT is chosen at runtime

Document Distribution Schema

The document distribution schema bundles several distribution step types into document distribution schema steps. Each distribution step within a schema can have an individual description (which is visualized in the end user UI) and is linked to a distribution step type. It is possible to define the same distribution step type multiple times within a schema using different distribution step IDs.

Within the distribution schema the execution sequence of the different distribution steps can be defined using the field Step Sequence #Step#. It is also possible to define dependencies between distribution steps using the field #Prerequisite Step#. The distribution step is then executed only if the distribution step(s) with the distribution step sequence defined in #Prerequisite Step# have all been executed completely.

Distribution steps can be marked as inactive to be able to deactivate distribution steps for a certain time period or for testing purposes. If the distribution step is marked as inactive, it is ignored at runtime. If the step is used as a prerequisite step for another distribution step, this step is also ignored.

If the assigned distribution step type of a distribution step is defined as an asynchronous (batch) step, the field Batch is also marked, and the field is disabled. It is not possible to mark a distribution step as synchronous if the corresponding distribution step type is already marked for asynchronous execution. Nevertheless, it is possible to mark a distribution step as asynchronous if its distribution step type is marked for synchronous execution. With this mechanism, distribution steps can be registered for batch processing for certain distribution schemas only.

The distribution schema contains all potential distribution steps for a document item. The assignment to a document item at runtime is determined using the document transaction type and/or document item category. The actual execution of the single distribution steps can be controlled using the distribution category implementation class or the distribution schema implementation class. For example, it is possible to exclude some steps depending on the document state and to reschedule them later when the document state has changed.

The implementation class for the document distribution schema is used to implement logic similar to the distribution step category but for the whole distribution schema. This means it is possible to set a document status that is dependent on all distribution steps, or to influence the distribution in addition to the distribution step type or category implementations.

The class has to implement interface IF_CRM_ISX_ORDER_MSG_DIST_SCH. The methods of this interface are called at runtime and allow the distribution-schema-dependent implementation to react at a dedicated point of time and influence the execution of the distribution steps. It is also possible to control the determination of the distribution steps.

It is recommended to inherit the implementation class from the abstract base class CL_CRM_ISX_ORDER_MSG_DIST_SCH, which already implements the interface and offers an appropriate class instance constructor that imports necessary data. By redefining the methods in the distribution-schema-dependent implementation class specific coding can be added if needed.

If no implementation class is assigned to the distribution schema. the default implementation class CL_CRM_ISX_ORDER_MD_SCH_DFLT is chosen at runtime.

Document Distribution Schema Determination

After defining a distribution schema, its determination at runtime can be controlled using the document process type and/or document item category. If a document is saved, the distribution step registration procedure checks the Customizing settings for each document item and checks if it is relevant for distribution.

For each document item, the header transaction type and item category are retrieved and the Customizing settings are evaluated. If no matching entry is found for the exact combination of transaction type and item category, the entry for the empty process type and the exact item type is retrieved. This means it is possible to define default process-type- independent entries.
The item category has to be maintained for every item category for which a distribution schema is to be determined. It is not possible to define a default distribution schema determination using an initial item category.

For every combination of process type and item category it is possible to assign a distribution schema determination implementation class. With this class, the distribution schema determination can be influenced at runtime.

The class has to implement interface IF_CRM_ISX_ORDER_MSG_DIST_DET.

It is recommended to inherit the implementation class from the abstract base class CL_CRM_ISX_ORDER_MSG_DIST_DET, which already implements the interface and offers an appropriate class instance constructor, which imports necessary data. By redefining the methods in the distribution schema determination implementation class, specific coding can be added if needed. A possible use case for a distribution schema determination implementation class could be the product-specific determination of the distribution schema.

If no implementation class is assigned, the default implementation class CL_CRM_ISX_ORDER_MD_DET_DFLT is chosen at runtime.

The distribution schema assignment allows multiple entries. One of the assigned distribution schemas has to be marked as default if no determination implementation class is defined. The default distribution schema is determined at runtime if no implementation class is defined. If no default distribution schema is chosen, the implementation class has to evaluate the actual distribution schema at runtime.

For each assigned distribution schema, it is now possible to deactivate single steps of the distribution schema or to activate asynchronous (batch) execution for the specific transaction type and item category combination. The same distribution schema can be used for different combinations but can be handled differently depending on the individual assignment settings.

The asynchronous execution can be scheduled using an appointment type of the document item. If an appointment type is assigned to the distribution schema step, this appointment is retrieved at runtime from the document item and the batch report only executes the distribution step if the actual date and time is reached. The determination of the scheduled date and time can also be handled within the distribution-type-dependent implementation class.






Vendor Master (General Section)   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 11852 Date: 20240523 Time: 161530     sap01-206 ( 268 ms )