Hi
I am creating a BRF+ application to define and process rules that will filter customer and material objects that will be sent to another system via an interface. The main rule/filter for both customers and materials is that they should only be sent if they have sales data defined for certain sales areas. The list of applicable sales areas are the same for both the customer and material objects so I would like to have a single decision table that stores the sales areas and avoid double maintenance.
In order to allow for future enhancements to the rules within BRF+ without having to change any code, I am passing the whole sales data structures for both objects (KNVV for customer and MVKE for material) into their respective functions and so I have created equivalent BRF+ data objects that are bound to the data dictionary structures. The result of binding the BRF+ structures to the data dictionary structures is that BRF+ will automatically create BRF+ data elements for each field in KNVV and MVKE. Even though the sales area key fields (VKORG, VTWEG and SPART) are identical in both structures, separate data elements will still be created... so I end up with 2 VKORG data elements, 2 VTWEGs, etc. in my BRF+ application.
When I create the decision table that defines the valid sales areas for the interface I must choose one each of the existing VKORG, VTWEG and SPART data elements to use in the condition columns however, when I choose the sales area data elements that belong to the KNVV structure then the decision table does not work for the MVKE structure (as the data elements don't match) and vice versa if I use the MVKE data elements in the decision table definition.
My question is:
Is there a way to define the decision table so that it doesn't care which structure is being passed to it but just compares the VKORG, VTWEG and SPART fields it finds in either structure?
OR
Will I have to remove my binding of the KNVV and MVKE structures and instead create them manually, making sure I use the same VKORG, VTWEG and SPART data elements in both of the structures and in the decision table? (This seems like a lot of extra work and removes all benefits of ddic binding!)
Thanks!
Glen