BAdI for TMS Object Filter

Functional Scope 

If the predefined filters for complex customer-specific scenarios are not sufficient, additional checks can be made using a customer-specific implementation of the BAdI /GAL/SH_TMS_OBJECT_FILTER. Possible scenarios include identifying customer exits or BAdI implementations as critical objects. The BAdI /GAL/SH_TMS_OBJECT_FILTER allows multiple implementations, which are separated by a free definable filter ID.

The methods "CHECK_OBJECTS", for checking object entries, and "CHECK_KEYS", for checking table keys, are intended for the customer-specific checks on the contents of a transport request. If a condition has occurred for customer-specific checks on the object list, an exception of type /GAL/CX_TMS_OBJ_FILTER must be thrown. Alternatively, several exceptions can be thrown collectively using the exception /GAL/CX_AGGREGATE_EXCEPTION.

The table below shows the definition of method CHECK_OBJECTS.

Parameter

Parameter type

Data type

Description

RULE_SET_ID

Importing

TYPE STRING

The parameter contains the filter ID of the BAdI Implementation

OBJECTS

Importing

TYPE TR_OBJECTS

The object list of a transport request with line type E071

/GAL/CX_TMS_OBJ_FILTER

Exception


General exception of the TMS object filter

/GAL/CX_AGGREGATE_EXCEPTION

Exception

Aggregated exception

The table below shows the definition of method CHECK_KEYS.

Parameter

Parameter type

Data type

Description

RULE_SET_ID

Importing

TYPE STRING

The parameter contains the filter ID of the BAdI Implementation

KEYS

Importing

TYPE TRLEYS

Table keys of a transport request with line type E071K

/GAL/CX_TMS_OBJ_FILTER

Exception


General exception of the TMS object filter

/GAL/CX_AGGREGATE_EXCEPTION

Exception

Aggregated exception

Procedure for Implementation 

You must first create an implementation using transaction SE19 for the Enhancement Spot /GAL/SH_TMS_OBJECT_FILTER. Define a filter ID, for example "CRITICAL", and implement the required customer-specific checks using the methods CHECK_OBJECTS and CHECK_KEYS.

Once the Enhancement Spot has been implemented it must be deployed to all relevant systems. A new rule of the type "BAdI Implementation" needs to be created in the corresponding TMS object filter. The filter value specified for the BAdI implementation must be entered as BAdI Filter ID. As an option, the selection of "Show BAdI-Exceptions as message" can be checked and a message type assigned. If this option is enabled, each exception thrown in the customer-specific implementation is displayed as a message in the Repository Browser.

In the above example of a blacklist, objects that lead to an exception in the customer-specific implementation of the Enhancement Spot /GAL/SH_TMS_OBJECT_FILTER with filter ID "CRITICAL" are blocked by the object filter, all others allowed. Additionally, exceptions thrown are displayed as warnings in the message window of the Repository Browser.