Show TOC

Querying the Distribution ModelLocate this document in the navigation structure

Use

You do not have to query the distribution model, it is optional.

Process

The ALE distribution model can be queried using the following function modules:

  • ALE_MODEL_DETERMINE_IF_TO_SEND

    This function module is called with the message type and optionally with the logical receiving system if this is already known in the application.

    A check is made in the ALE distribution model to determine whether a message flow has been maintained for the input parameters.

  • If this is not so, the export parameter idoc_must_be_send is set to initial; otherwise, an "X" is returned.

    If there are filter objects in the distribution model that control this message flow, they are not evaluated. An IDoc must only be created if the function module returns an "X".

  • ALE_MODEL_INFO_GET

    This function module is used for more complex queries made to the ALE distribution model. It is called with the message type to be sent. In return, you get a table containing all the potential recipients of this message type, as well as the associated filter objects. Note that there may be multiple entries for one receiver in the table returned. If there are no entries in the distribution model, the exception no_model_info_found is issued. If an exception is issued, an IDoc does not have to be created. Otherwise an IDoc has to be created. The receiving logical system is specified in the rcvsystem field in a table entry.

The end result, that is, whether the receivers receives an IDoc and what the IDoc looks like, is only determined after all the filter objects for a message flow in the distribution model have been evaluated. This is carried out in the ALE layer.