Saturday, April 4, 2015

BADI using Filters

In BADI's filters give you a chance to call specific implementation based on filter value.Actually it is available whenever you have multiple implementations for one BADI definition.

suppose you created one two BADI implementations for ME_PO_PROCESS_CUST definitions..you check the filter option in SE18 and give on what field you want to do filetr...give that field data element or structure.then automatically all of the methods in your BADI implementation gets one import parameter which is FLT_VALUE.within the code you write for different values different code in both implementations.within the transaction if you give that one of field value that perticular BADI implementation will be triggered.

Suppose if you did implementation1 with filter VBELN...whenever you write the code within methods , you have to give some value for FLT_VAL which is automatically obtianed in your all methods...so you have to pass some value.
if you pass some value like FLT_VAL = '1000090000' in first implementation method with some logic.

If you pass another value in FLT_VAL = '1000090001' of seconmd implementation method with some other logic.

Ok..now if you enter VA03 tcode enter vbeln value...if you enter 1000090000 it trigger the first method..if you enter 1000080001 it triggers the second method based on filter value.

No comments: