This blog written to explain the usage and customisation of the BRFPLUS exclusively for Solution Manager Functionalities. In general we all are very aware of the BRFPLUS (Business Rule Framework), the flexibility offered in creating complex conditions and expressions. Myself being a Solution Manager consultant, write this blog explaining the extent to which this BRFPLUS can be customised and used for satisfying many complex requirements from the customers.
Special thanks to Mr. Prince Devassy who was the technical consultant from the CRM domain who has helped me throughout this process. Kindly ignore if this is already familiar with you, also please do suggest me if there are any better options to achieve these requirements.
I am always open and grateful to all your comments and opinions about this.
The Customizations which we have performed so far in our project are as below,
1. Detecting the Category ID automatically based on the SAP components.
2. Detecting the Message processor automatically based on the SAP components.
3. Changing the Support teams based on user status.
Since we are already familiar in using the standard BRFPLUS, I am not explaining on the creation of BRFPLUS applications in this Blog. You can however refer to the below link which is a standard document explaining you the creation of the BRFPLUS application.
In the above link, the function used is SUPPORT_TEAM from the application SOLMAN (Function ID = 0050568E6E9A02EE83DBBBE309521748).
We have to take a copy of this function into our own application in order to reduce the changes we will make in the code.
For the above requirements, the result should be = CATEGORY ID, MESSAGE PROCESSOR & SUPPORT TEAM based on the SAP COMPONENTS irrespective of the conditions on which it is going to be evaluated.Hence in the Function which we have copied from SUPPORT_TEAM, we have to adjust the signature.
Below I have pasted the screenshot of the signature standard function – SUPPORT_TEAM.
Here you could see in the above screenshot, in the INPUT you have CATEGORY till REPORTER COUNTRY and in the OUTPUT you only have SUPPORT_TEAM
After taking a copy of this we have to edit this. In my case I have removed Category ID from the CONTEXT and added in the RESULT field. In the result, it is possible to have only One element. (Ex: Support Team is one element, Category ID is one element. We can have either of them and never both.). So for this, we need to create a STRUCTURE which will contain the three elements(CATEGORY ID, MESSAGE PROCESSOR and SUPPORT_TEAM) in my case. So when I assign this STRUCTURE (Single Element) in the RESULT, it will give me the output for CATEGORY ID, MESSAGE PROCESSOR and SUPPORT_TEAM.
I have attached the SIGNATURE of my function which I have customised.
And in the above screenshot, you could see I have customised the output to the STRUCTURE I have created and removed CATEGORY from the input.
Please find below the GENERATED STRUCTURE containing the elements CATEGORY, MESSAGE PROCESSOR and SUPPORT TEAM. Thus now by mapping this structure, I will be getting these 3 elements in the output.
By standard, we are delivered with components like CATEGORY and SUPPORT_TEAM. You could find them from the application SOLMAN. In case you have to create a New component like in my case MESSAGE PROCESSOR, you have to create them as a DATA OBJECT with DDIC BINDING. DDIC BINDING will help you in mapping what the element corresponds to. Please find below the screenshots to create an Element as DATA OBJECT and the DDIC BINDING for MESSAGE PROCESSOR.
Once the SIGNATURE for the function is done, we then need to create DECISION TABLE in the EXPRESSION and then followed by RULESET. This is already discussed in the standard document in the link I have shared on top. I’ll just show you the sample DECISION TABLE of my EXPRESSION.
After this, the RULESET has to be created, with which work in the BRFPLUS is completed. Since we have two support teams in our Requirement I have created two BRFPLUS applications. Now we have to map the BRFPLUS to the ACTION DEFINITION in SPPFCADM transaction.
In the ZMIN_STD we have an action definition ZMIN_STD_FIND_PARTNER_FDT. Edit it and maintain the Function ID of your own function alone.
The application ID parameter need not be set.
Since my 3rd requirement is like when the user status is “IN PROCESS WITH B” = B support team has to be detected and in all other user status A support team should be detected. I have mapped the FUNCTION ID of BRFPLUS for A support team in the parameter and hardcoded the BRFPLUS function ID of the B support team in the code with “IF” condition for the user status.
If done till this, functional part is over. Now the CRM technical consultant has to edit the below. In general when FDT action is processed the class CL_IM_AI_SDK_TEAM_DETERM is called in the implementation. The method inside this class is coded in such a way that if the FUNCTION ID parameter is given, take that and process the corresponding BRFPLUS and give SUPPORT_TEAM as the output.
If FUNCTION ID is not given in the parameter, process the function SUPPORT_TEAM from application SOLMAN (Function ID = 0050568E6E9A02EE83DBBBE309521748) and give SUPPORT TEAM as output.
So if we need our Generated Structure to be given as output, the CRM Technical consultant has to take a Z copy of the class mentioned above and edit the code of the METHOD inside it as per the requirements to detect the Category ID, Message Processor in my case. Otherwise, only SUPPORT TEAM will be detected in the CRM transaction (ITSM Ticket for example) even though your BRFPLUS is working fine and giving the desired results.
Also I again request you to share your opinions and also your suggestions if any better options are available.