Entering content frameProcedure documentationDetermining Filter Objects Using Business Add-Ins Locate the document in its SAP Library structure

You will find out how SAP defines business add-ins and how you implement a business add-in to query filter objects you have defined when determining receivers.

Use

This description only applies to receiver determination using business add-ins .

It is only relevant to BAPIs that exist for ALE interfaces and that are to be implemented for the business add-ins.

In the standard system the SAP application provides a range of filter object types for receiver determination. These filter object types are evaluated witth the values assigned by you at runtime (for example, filter object plant 0001, 0002). You can add more values to the default values provided.

If you do however want to use different filter object types for mapping your own business processes to execute the asynchronous BAPI call under enhanced conditions, you have to implement and activate the business add-ins defined by SAP. Business add-ins are places in the source code defined by SAP programmers where you can insert code without having to modify the original object.

To find out which of your SAP applications contain business add-ins refer to the application documentation.

Prerequisites

The following prerequisites must be fulfilled:

Example:

Sender
Receiver
BUSOBJECT.METHOD

Receiver Determination
Filter Group
FILTER
1010

Structuring a Business Add-In in a Form Routine

Receiver determination for a BAPI (BUSOBJECT.METHOD) can be structured by SAP developers in SAP applications using a form routine (for example, BUSOBJECT_METHOD_RECEIVERS):

Interface:

TABLES receivers STRUCTURE bdi_logsys

USING object TYPE swo_objtyp
method TYPE swo_method
parameters LIKE ...
return_info LIKE syst.

 

In this example the parameters parameters contain all the filter object values of the application required for receiver determination. They are application-dependent.

The parameter receivers contains the required receivers (or initial value) as the default value and the determined receivers as the return value.

Definition of variables:

t_filter_object_type TYPE bdi_flttyp_tab
t_filter_object_value TYPE bdi_fobj_tab
receivers_output LIKE bdi_logsys OCCURS 0 WITH HEADER LINE

The following steps are carried out in the code of an SAP application: It involves the same steps as when determining the filter object types defined by SAP, with the additional step (step 3) for determining the filter objects you have defined.

  1. Query filter object type for the BAPI with the function module ALE_BAPI_GET_FILTEROBJECTS:
  2. EXPORTING
    object = busobject
    method = method

    TABLES
    receiver_input = receivers
    filterobjects = t_filter_object_type

    EXCEPTIONS
    error_in_ale_customizing

  3. Assign the current values of the application in parameters parameters to the filter object type provided by SAP in the structure t_filter_object_type.
  4. Call the defined Business Add-In to evaluate the filter object types defined by the customer in the flow logic of the application.
  5. EXPORTING
    object = busobject
    method = method
    parameters = ...
    filterobjtype = t_filter_object_type

    CHANGING
    filterobjvalue = t_filter_object_value

  6. Determine the receivers of the asynchronous BAPI call using the function module ALE_ASYNC_BAPI_GET_RECEIVER.

EXPORTING
object = busobject
method = method

TABLES
receiver_input = receivers
receivers_output = receivers_output
filterobject_values = t_filter_object_value

EXCEPTIONS
error_in_filterobjects
error_in_ale_customizing

receivers[] = receivers_output[]

 

(You can find the program code of this example under Example Programs with Asynchronous BAPI Calls, Receiver Determination with Business Add-In)

Procedure

Implement the object method for the business add-in under the filter object type you have defined.

Result

The receivers of the asynchronous BAPI call have been determined using the defined filter objects.

 

 

 

 

Leaving content frame