sitfra_ brfplus_theapiway
TRANSCRIPT
![Page 1: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/1.jpg)
BRFplus – The API Way
![Page 2: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/2.jpg)
21/03/2015SAP Inside Track Frankfurt 2
Contents
1. The Business Scenario
2. Solution Options
3. The API Way
4. Summary
![Page 3: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/3.jpg)
21/03/2015SAP Inside Track Frankfurt 3
• Policy Management of Industry Insurances
• Focus: Insurance for transportation of goods
• Processes are a little bit different compared to the individual insurance ☺
• Most important question: How is the premium calculated per transport?
The Business Scenario
Image courtesy of ddpavumba at FreeDigitalPhotos.net
![Page 4: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/4.jpg)
21/03/2015SAP Inside Track Frankfurt 4
• Premium rate is individually negotiated between the insurer and the insured
• Premium depends on several parameters like:− value of the transported good− weight of the transported good− packing of the transported good− …
• For each combination of the parameters a premium is defined
• What do we finally have within the individual contracts?
� A table consisting of condition columns and a result column … a decision table
� Whenever a transport is reported the table gets evaluated and the calculated premium gets collected
The Business Scenario – Premium Calculation
![Page 5: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/5.jpg)
21/03/2015SAP Inside Track Frankfurt 5
Questions
• How do we get the contract individual decision tables into our policy management system?
• How do we get the table evaluated within the reporting process on a policy?
The Business Scenario – Premium Calculation
![Page 6: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/6.jpg)
21/03/2015SAP Inside Track Frankfurt 6
Contents
1. The Business Scenario
2. Solution Options
3. The API Way
4. Summary
![Page 7: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/7.jpg)
21/03/2015SAP Inside Track Frankfurt 7
• Use an application table where the values are stored (including relational operators)
• ABAP coding to evaluated the table and get the right result (hopefully)
Drawbacks
• Coding is Z-coding (or partner coding)� bug fixing!
• Functional features (e. g. check for completeness of table, Excel export/import) have to be implemented� effort and bug fixing
� Let’s see if we find a better approach
Approach One – “Classical” ABAP
![Page 8: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/8.jpg)
21/03/2015SAP Inside Track Frankfurt 8
Correct: BRFplus as the ABAP based business rule management system offers the framework including decision tables !
Approach Two – BRFplus
Image courtesy of stockimages at FreeDigitalPhotos.net
Isn’t there a tool that can help us with decision tables …
![Page 9: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/9.jpg)
21/03/2015SAP Inside Track Frankfurt 9
What does BRFplus offer in detail?
• Modeling environment to create, change, delete and display BRFplus objects
• Functions (decision services) that evaluate rules based on some input and deliver a result
• Decision table object consisting of condition and result columns incl.− Check for gaps− Check for overlap− Excel ex-/import− Simulation options− Optimization option for the table contents − …
• Tracing e. g. in order to satisfy reporting requirements
Approach Two – BRFplus
![Page 10: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/10.jpg)
21/03/2015SAP Inside Track Frankfurt 10
Unfortunately … yes: Storage and transportation of BRFplus objects
Approach Two – BRFplus
Image courtesy of stockimages at FreeDigitalPhotos.net
Are there any drawbacks … ?
![Page 11: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/11.jpg)
21/03/2015SAP Inside Track Frankfurt 11
How are BRFplus objects stored and transported?
• System storage – storage in S-tables and transport via workbench requests
• Customizing storage – storage in C-table and transport via customizing requests
Transport is a no go!
� We need master data to store the contract individual data
Approach Two – BRFplus
![Page 12: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/12.jpg)
21/03/2015SAP Inside Track Frankfurt 12
How are BRFplus objects created?
• Via the BRFplus workbench
• Several modeling steps have to be done in order to have such a contract individual BRFplus function
But we just want to enter the decision table data!
� It is not intended to create the BRFplus function from scratch every time
Approach Two – BRFplus
![Page 13: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/13.jpg)
21/03/2015SAP Inside Track Frankfurt 13
But there is a way out:
• Storage type: Master Data � No transport
• Usage of the BRFplus API to handle the creation process
Approach Two – BRFplus
Image courtesy of chanpipat at FreeDigitalPhotos.net
![Page 14: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/14.jpg)
21/03/2015SAP Inside Track Frankfurt 14
Contents
1. The Business Scenario
2. Solution Options
3. The API Way
4. Summary
![Page 15: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/15.jpg)
21/03/2015SAP Inside Track Frankfurt 15
• The complete BRFplus is covered by an API
• The API allows the creation, update and deletion of every BRFplus objects
• In addition there is also a query object for selection of BRFplus objects
• There are several toolkits that simplify the handling of BRFplus objects
• How do we use this to solve the requirement?− Whenever a new contract for transport insurance is created a new BRFplus application
is created in background (type master data)
− The application contains a function and an empty decision table
− The decision table can then be filled with values using a custom transaction
The API Way
![Page 16: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/16.jpg)
21/03/2015SAP Inside Track Frankfurt 16
Step 0 – Creation of ReUse Application (precondition)
• All Data objects that are in use to define the decision table columns are stored in one central S-type application � reused in every master data application
The API Way
![Page 17: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/17.jpg)
21/03/2015SAP Inside Track Frankfurt 17
Step 1 – Creation of the application
The API Way
![Page 18: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/18.jpg)
21/03/2015SAP Inside Track Frankfurt 18
Step 2a – Fetching of reusable data elements
The API Way
![Page 19: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/19.jpg)
21/03/2015SAP Inside Track Frankfurt 19
Step 2b – Creation of the empty decision table
The API Way
![Page 20: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/20.jpg)
21/03/2015SAP Inside Track Frankfurt 20
Step 2b – Creation of the empty decision table
The API Way
![Page 21: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/21.jpg)
21/03/2015SAP Inside Track Frankfurt 21
Step 3 – Creation of the function and linking decision table
The API Way
![Page 22: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/22.jpg)
21/03/2015SAP Inside Track Frankfurt 22
The API Way – System Demo
![Page 23: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/23.jpg)
21/03/2015SAP Inside Track Frankfurt 23
Question: If the user enters the BRFplus workbench he can change anything in the BRFplus, right?
Answer: Maybe ☺ - we created an application exit class that ensures that only the decision table can be changed and contains additional authority checks
Question: What about the call of the function in the backend?
Answer: The call is generic. The UUID of the function is stored in the contract
The API Way – Further Aspects
![Page 24: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/24.jpg)
21/03/2015SAP Inside Track Frankfurt 24
Contents
1. The Business Scenario
2. Solution Options
3. The API Way
4. Summary
![Page 25: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/25.jpg)
21/03/2015SAP Inside Track Frankfurt 25
• BRFplus is far more than just the BRFplus workbench
• BRFplus offers a full blown API in order to create, modify, delete and query each and every BRFplus object
• The BRFplus API is designed fully object oriented and is very intuitive to use
• Several functionalities are extracted into toolkits/service functionalities in order to decrease the implementation effort
• BRFplus is very flexible with respect to customer specific adoptions
• Do not forget about the BRFplus storage type master data ☺
Summary
![Page 26: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/26.jpg)
21/03/2015SAP Inside Track Frankfurt 26
Questions?
Image courtesy of Master isolated images at FreeDigitalPhotos.net
![Page 27: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/27.jpg)
Thank you for your attention.
21/03/2015SAP Inside Track Frankfurt 27
Dr. Christian Lechner
Business Unit Development
[email protected]@lechnerc77
http://scn.sap.com/people/christian.lechner
www.msg-systems.com
![Page 28: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/28.jpg)
21/03/2015SAP Inside Track Frankfurt 28
• Overview on API: BRFplus - Business Rule Management for ABAP Applicationsby Thomas Albrecht, Carsten Ziegler (SAP PRESS; 2010)
• Blog posts on API usage (SCN):− http://scn.sap.com/community/brm/blog/2014/10/23/handling-of-applications-with-the-brf-
api-part-1− http://scn.sap.com/community/brm/blog/2014/10/26/handling-of-applications-with-the-brf-
api-part-2
• Document on query aspect of API (SCN):http://scn.sap.com/docs/DOC-4585
Appendix
![Page 29: sitFRA_ BRFplus_TheAPIWay](https://reader034.vdocuments.us/reader034/viewer/2022042817/55a7c3d21a28ab34128b4760/html5/thumbnails/29.jpg)
21/03/2015SAP Inside Track Frankfurt 29
Step 0 – Creation of the custom transaction (precondition)
• A custom transaction is created in order to call the BRFplus workbench and target it to one specific BRFplus object S
Custom Transaction