on 07-01-2019 2:29 PM
Hello,
We're working on a BRF+ implementation and one of the requirements is to transform or map an input parameter prior to passing it as a value for looking up results from a decision table.
Example, a decision table based on the higher level product type. Let's say a tennisball, a football and a basketball all have the higher level product type "Ball". In our decision table we would have a record for US + BALL and then some fields as a result for that combination. But we can only pass "tennisball",.. as values when calling the decision table function.
When I create a function for the decision table I was expecting to be able to do some initializations to transform the values, similar to the "event" type functions that include a ruleset. But this doesn't seem to be possible for a "Functional mode" function.
I've tried creating a second function that would first alter my input parameters and then call the function that is linked to the decision table, but this was a dead end. (don't find a way to call the decision table function from my other function)
Is there a way to change the input parameters of a function call to a decision table? Or can this only be done in ABAP, prior to calling the BRF+ function?
Thanks in advance,
Erik
Hello Patrick,
In your solution, do you use a second function to actually call the decision table or is all controlled from within the event function (Z_DETERMINE_COLLECTION_VALUES in your case)?
In the meantime, I solved it differently:
Thanks for your help though. Being new into on BRF+ I missed the insight of passing the results of two different expressions via the context.
Erik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Patrick,
Thanks for the quick reply! What you suggest is what I initially tried to do to solve this. But I got stuck...
If I create the event mode function module, keeping the same example, passing country + product type as the input parameters. I can change the product type as per my requirements using the options available in the ruleset.
But then, how do I call the decision table from there and how will we be able to call that function from ABAP/Webservice?
Erik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is what I would do.
1. Create an element called 'Product Type' (In my example that is what 'DFKKCMS' is)
2. Add the 'Product Type' as a Variable in the Ruleset (you can see this in the lower left of the pic)
3. Create a Decision Table that initializes the 'Product Type' (you can see this in the lower right of the pic)
4. Then use 'Product Type' as an input to a subsequent Decision table.
5. You can add your result (the value you want to pass back) as Context in the Function. You do that under "Signature: Add Existing Data Object (or Add New Data Object).
6. Click Create Code Template, and it will give you a template to use for ABAP.
Hi Erik,
I would just use Event mode and utilize a ruleset to process the data before the decision table. You can still have a Result Data Object or multiple Context parameters that you can return. That way you can use some type of expression (case statement, decision tree, etc.) to initialize the variable. Hope that helps! Let me know if you have any follow up questions!
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.