BAdI Part 7: Using Filter-Dependent BAdIs
Preview · a free account unlocks the full lesson
Implement filter-dependent BAdIs correctly: filter characteristics and values, comparison operators and value ranges in new BAdIs, FLT VAL in classic BAdIs, overlapping filters, one implementation for several org units vs one per unit, and testing filter behaviour.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 3 walked through designing a filter for your own BAdI; this lesson covers implementing SAP's or a colleague's BAdIs that already come with filters built in. A filter-dependent BAdI chooses between implementations based on some value, such as country, company code, or document type.
For new-style BAdIs, filter conditions are maintained per implementation directly in SE19 — for example BUKRS = 1000, or LAND1 CP 'D*'. For classic BAdIs, filter values are assigned to the implementation itself, and the caller passes FLT_VAL into each method behind the scenes.
One real hazard: overlapping filter conditions in a single-use BAdI cause an activation error, while in a multiple-use BAdI, overlapping conditions simply mean both implementations run.
Filters exist because different countries, companies, or document types often need genuinely different logic, and filters let that logic stay separated without a tangle of IF blocks — with the added benefit that each implementation can be owned by a different team entirely.
For new BAdI filters, the BAdI's definition lists filter characteristics — their name, type, and which operators are allowed. In SE19, each implementation gets its own filter combination, for instance BUKRS = '1000' OR BUKRS = '1100'. At runtime, GET BADI ... FILTERS bukrs = lv_bukrs selects whichever implementations have a matching condition. Within one combination, several characteristics combine with AND; across combinations, it's OR.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Related SAP topics
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.