As BADI’s have different interfaces, no of calls not transparent, context of call not clear also BADI’s calls are difficult to place properly in validation process (BAdI stands for Business Add-In. These are like user exits but are implemented using ABAP Objects. BADIs can be implemented in every stage of the systems),
But with BORF(Business Object rules framework) Business logic is written and extended for use in SRM for validation by creating Rules that contain additional Business logic and then registering these rules to events.
One time integration of extensions into ‚standard‘ business logic‘
Defined scopes for processing of extension business logic
Modeling of business object in object oriented hierarchical approach
All business data easily accessible through defined interface
Defined processing of business logic (sorted sequence)
Processing of business logic only
Fast processing of business logic
Open for supporting tools (e.g. rule debugger)
Scenarios -Where to use BORF
1. User Action:Create/change/save/activate/close (e. G Procurement document)
2. At the time of Check/Release we need to check the correctness of the data for all of the above fields. For registering a check on those fields, register a check rule on those fields.
3. Design a new change rule using BORF to check the fields mentioned in above chapter.
Rule Execution Scope
1.Open-New document to be processed or displayed. This event includes both creation of a brand-new object as well as opening a persistent object. If a change version is to be generated, then this event re-builds the whole object hierarchy for this change version.
2.Change: SRM objects are to be changed. This event does an auto-population of attributes as well as auto-generation or auto-deletion of sub-items. During this event no validation are to be carried out
3.Check: The previously changed sub-part of the complex object hierarchy is going to be validated. Errors are sent back to the SRM system.
4.Check_final: Final validation before posting. This event is useful for complex validations to be carried out once per transactions. Parameter of this event indicates whether the document is posted actively or is to be put on hold.
5.Close-Close Object Hierarchy.
6.Save: Save event. Parameters of this event indicate whether it is a final release or the document is going on hold.
7.Activate-Copy change version to active version.
Process of Rules Registration is
1. Register to Scope (Change, Check, Final Check, Save)
2. Register to component change (on Header, Item, Dependent Objects like Accounting) Redefine a method of that interface
3. Add your own Business Logic in that method.