Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

what badi multiple use and filter dep ?

Former Member
0 Kudos

what badi multiple use and filter dep ? and how to use multiple implemetation in the same application ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

In the previous concepts (user exits & customer exits) once the component is used we cannot reuse them. So for implementing number of implimentations for a particular badi we have an option multiple in use when defining badi in se18.

If we chech that (multiple in use) we can impliment number of times.

Filter dependent BAdi:-

If the Add-in has to be executed under certain conditions, then the adapter class ensures that only certain implementations will be executed. 

Enter a filter type when defining your enhancement (a country or industry sector, for example).

All methods created in the enhancement's interface have filter value 'FLT_VAL' as their import parameter.

The application program provides the filter value to the enhancement method. The method then selects the active implementation for that value.

To define a filter-dependent Business Add-In, first create a normal Business Add-In and select the Filter checkbox.

Filter types are data elements and must fulfill the following criteria:

The data element's domain may contain a maximum of 30 characters and must be of type Character.

The data element must Either have a search help with a search help parameter of the same type as the data element.

The element's domain must have a value table containing a column with the same type as the data element.

The filter value is declared using parameter flt_val and is preset in the list of parameters.

Please reward points if helpful.

4 REPLIES 4

Former Member
0 Kudos

Hi,

1.When check box is in multple use then we can implement n of implementations for that particuler BADI.

2.Suppose the check box is in Filter-dependent,you can create based on the condition.

u can enter Ur document Types as filters for which types only u want the BADI to be processed. If u want all the Types to be entered and as the BADI is Filter Dependent , u have to enter all the Document types. Now the BADI is triggered only for the Documents containgin that Document type u entered in the filter only.

Refer this:

http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm

and

http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm

Regards

Kiran

former_member186099
Contributor
0 Kudos

Hi,

Example for filter dependent BADI is BDCP_BEFORE_WRITE

and for multiple use is CUSTOMER_ADD_DATA.

Multiple Use:

Every time a BADI is implemented in SE19, a new class is created for the implemented BADI. If a BADI Definition is flagged for multiple use, it means that you can create as many implementations of that BADI as you would like. For example if you had two different actions that need to be carried out, you could implement each action in a separate implementation. If the BADI is not set up for multiple use, both actions would have to be implemented in the same SE19 implementation.

Filters:

Filters are used to attach some type of criteria to the execution of a BADI. It would be similar to putting a hardcoded "if" statement in your code.

For example, see BADI Definition BDCP_BEFORE_WRITE. This BADI is set up for muletiple use and filters. It is used to do some checking before change pointers are written for a particular ALE Message Type. The Filter value can be set in your implementation to only be carried out for that message type. If a BADI is set up to have a filter value, this must be populated in your implementation.

Hope this helps,

Regards,

Prasanna

Former Member
0 Kudos

Hi Gurminder,

Multiple Use means Multiple Usability for BADI Definitions

Multiple use for BADI definitions means that there can be several active BADI implementations. When there is a call, they are all called up - however, in an unpredictable sequence.

If you have multiple-use BADI definitions, the sequence must not play any role therefore. A typical example is the execution of checks before a save.

Filter Dependency

Filter dependence for BADI definitions means that each interface method automatically has an importing parameter FLT_VAL assigned ot it. This parameter must be filled with a filter value as current parameter when it is called.

A BADI definition should be marked as filter-dependent whenever the characteristic of the BADI implementation should match the characteristics of the filter type - that is, whenever the implementation of different filter values should be different or should only exist at all for certain filter values.

Typical filter types are line of industry or country.

Hope this helps you.

Thanks and Regards,

Maddineni Bharath.

Former Member
0 Kudos

Hi,

In the previous concepts (user exits & customer exits) once the component is used we cannot reuse them. So for implementing number of implimentations for a particular badi we have an option multiple in use when defining badi in se18.

If we chech that (multiple in use) we can impliment number of times.

Filter dependent BAdi:-

If the Add-in has to be executed under certain conditions, then the adapter class ensures that only certain implementations will be executed. 

Enter a filter type when defining your enhancement (a country or industry sector, for example).

All methods created in the enhancement's interface have filter value 'FLT_VAL' as their import parameter.

The application program provides the filter value to the enhancement method. The method then selects the active implementation for that value.

To define a filter-dependent Business Add-In, first create a normal Business Add-In and select the Filter checkbox.

Filter types are data elements and must fulfill the following criteria:

The data element's domain may contain a maximum of 30 characters and must be of type Character.

The data element must Either have a search help with a search help parameter of the same type as the data element.

The element's domain must have a value table containing a column with the same type as the data element.

The filter value is declared using parameter flt_val and is preset in the list of parameters.

Please reward points if helpful.