Reducing Interfaces Use

The purpose of BAPI and ALE integration is to be able to use ALE business process BAPIs as interfaces.BAPI reductions are particularly necessary in ALE business processes in which master data is replicated asynchronously:

• Part of the BAPI parameter is not required for the receiving system, even though it is declared when the BAPI is called
• Monitor data transferred into non-SAP systems (non R/3 and/or between business partners) (for example, hide fields).

• Certain data cannot be overwritten in the receiving system. BAPI reductions can however be used everywhere where asynchronous BAPI calls can be used. For asynchronous BAPI calls via the BAPI-ALE interface, only the parameters of the BAPI interface relevant for the receiver should be transferred.You can set up BAPI reductions in receiver-dependent filtering in the ALE distribution model. You can create templates for making reductions. Material master data is replicated from a reference system to a sales and distribution system.

As only some of the data on the material is required in the sales and distribution system, a reduction of the BAPI interface, Material.SaveReplica, that contains parameters relevant only to sales and distribution, is specified. You can then specify in the distribution model that with Material.SaveReplica only data relevant to sales and distribution is transferred to the sales and distribution system.

You can filters BAPIs (parameter filtering and reduction), when you maintain the distribution model. Reduction and filter information are part of ALE Customizing data in the distribution model. BAPI filtering must be explicitly activated, when the BAPI-ALE interface is generated.

The reduction of the actual (asynchronous) BAPI call is carried out as a service in the ALE layer. The reduction service retrieves the details of the filter settings from the distribution model at runtime. For a receiver or a list of receivers the application development can query the list of parameters to be filled before the BAPI-ALE interface is called.

This keeps the read-access to the database as low as possible. (Alternatively the call can take place and it does not affect the result of the filtering.) You can only set up one BAPI reduction for each sender and receiver pair.


The basic data of the BAPI reduction is maintained by the BAPI developer after the BAPI has been released and before the BAPI-ALE interface is generated.

If a parameter hierarchy is to be used, this has to be specified beforehand. The BAPI developer must create the BAPI as reducible using relevant parameter types. Mandatory parameters and fields must be specified.

The section Filtering Data has a table listing the prerequisites for using filter services.

Fully Reducible Parameters

Only table parameters of BAPIs can be fully reduced. A fully reduced table is an empty table in the receiving system.To fully reduce a table parameter T1 with a checkbox, the following prerequisites apply:
Table Parameter Structure
T1 Q1

T1X is a checkbox parameter.

Reducing Parameter Fields

Fields are reduced by converting the obligatory check fields of a BAPI and initializing the relevant fields in the data parameter. The checkboxes must be assigned to the data parameters following the naming and structure conventions.The following prerequisites apply for reducing fields of parameter P1:Table Parameter Structure
P1 S1

Structures S1 and S1X must have the same number of fields, whereby the names of the fields in both parameters must be identical and in the same order.If P1 has a FUNCTION field or key fields, the FUNCTION field in S1 and S1X and each of the key fields have the same data element. All other fields of the checkbox use the data element BAPIUPDATE.

To reduce BAPIs:
1. Create a reducible BAPI that satisfies the above prerequisites.
2. Before generating the BAPI-ALE interface, you have to activate data filtering (option Data filtering allowed).

You can set up the filtering in the distribution model in Customizing by choosing Distribution (ALE) → Modeling and Implementing Business Processes → Maintain Distribution Model.
The generated BAPI-ALE interface enables BAPIs to be filtered as a service in outbound processing.

To avoid unncessary accesses to the database, the BAPI parameters required for the receivers can be determined before the BAPI-ALE interface is called. This is optional and will not affect the results of the filtering.

Defining and Assigning Filter Object Types

Filter object types

are already assigned to some BAPIs in your applications for the receiver and data filtering. You can also define your own filter object types and assign them to a BAPI or to a parameter of a BAPI.
Process Flow
To define filter object types for BAPIs, follow the steps below: • Define filter object types From the SAP menu choose Tools → ALE → ALE Development → BAPIs. You can create filter object types in Data filtering or Receiver Determination. Then choose Define filter object type (Transaction BD95, table TBD11).

Give the filter object type a name and specify a reference to a table field. The reference to a table field is needed to retrieve the documentation from the data element so that customers can get input help when maintaining the distribution model.

For this reason a foreign key must be maintained for the table field. Use the following conventions to name filter object types: - Release 3.0/3.1: Domain name (example: KOKRS for the controlling area) - Release 4.0: Default field name for the data element (example: COMP_CODE for the company code)

For the required data object check whether a name has already been entered in the domain and default field names of the data element. If the fields are empty, a new filter object must be created. Usually the filter object will also appear in the BAPI interface as a field in the transfer structure, for example, bapiachead-comp_code.

If this is the case create the filter object as follows: ALE object type: Field name in BAPI structure, for example, comp_code table name: Name of BAPI structure, for example, bapiachead field name: Field name in the BAPI structure, for example, comp_code

• Defining filter object types to a BAPI From the SAP menu choose Tools → ALE → ALE Development → BAPI Interface. You can assign filter object types to a BAPI in Data filtering or Receiver Determination.

The filter object types allowed for an object method are maintained in each view of Table TBD16. − Receiver Determination. Choose Assign filter object type to BAPI. You can maintain the entries: Object type (from table TOJTB), Method, Filter object type (from table TBD11) Keep in mind that for receiver determination you have to implement a business add-in f to determine values for the filter object type you have defined .

Defining and Assigning Filter Object Types

Choose Assign filter object type to parameter. You can maintain the entries:
Object type (from Table TOJTB), Method, Filter object type (from Table TBD11) Parameter Field name Enter the required data to assign a filter object to an object method for the receiver determination or parameter filtering.

Filtering BAPI Parameters Use

Parameter filtering enables you to manage the number of datasets to be replicated in the BAPI interface using filter objects in the ALE distribution model. The parameters filtered are BAPI table parameters. The lines in the BAPI parameter, that do not match the distribution specifications are filtered out. The filtered table lines are not replicated.

Example: The logical system Q4VCLNT800 is the BAPI server for the BAPI RetailMaterial.Clone. Through the parameter filtering only the plant data of the material plant 001 is to be replicated in this system.


The prerequisite for this filtering is that a Filter Object Type is assigned to the relevant BAPI in your SAP applications. For some BAPIs SAP has already defined and assigned filter object types.You can also define your own filter object types and assign them to a BAPI (Defining Filter Object Types and Assigning Them to a BAPI .You have to define the valid filter object values in the distribution model. For more information see the R/3 Implementation Guide under Distribution (ALE) → Modelling and Implementing Business Processes → Maintain Distribution Model.

Presently, BAPI parameters can only be filtered for distributing master data via BAPIs called asynchronously. For this reason the required ALE Customizing for parameter filtering is only allowed for asynchronous BAPIs with an ALE IDoc interface.

Parameter filtering is allowed for distributing transaction data via asynchronous BAPIs but for the most cases, it has no purpose.BAPI parameter filtering for asynchronous parameters is always optional. To generate the BAPI-IDoc Interface you must select the Activate checkbox. Otherwise no coding can be generated in the BAPI-IDoc interface.

If a BAPI-IDoc interface has been generated without parameter filtering, you can specify no parameter filtering in ALE Customizing afterwards.


Parameters are filtered dynamically at runtime using the current data in the BAPI table parameters and the distribution conditions specified in the ALE distribution model.

• Reads the specified parameter filter objects in the distribution model
• Reads the interface definition of the BAPI
• Reads the table field values of a table entry for the associated filter objects
• Compares the distribution conditions with the filter objects read out and determines the value of the logical expression
• Deletes table entry
• Examines hierarchy-dependent BAPI parameters and, if applicable, deletes dependent table entries
• For synchronous BAPIs: Calls associated function module and forwards the filtered parameters
• For asynchronous BAPIs: Calls the generated BAPI-ALE interface and forwards the filtered parameters.



MySAP CRM System architecture and design

No comments :

Post a Comment