BRF+ Business Use Case
Today, I will discuss an application that is fully integrated with the SAP ECC system using BRFplus (Business Rules Framework+). In this article, I will provide an example of applications of SAP BRF ECC Integrations Examples by showcasing a business case from one of my previous clients.
BRF+ considers rules to be displayed in a natural manner that gives more prominent adaptability and perceivability to the Business clients who are not designers with preparing in ABAP. It resembles providing more specialized capacity to the Business clients.
Kindly Note: to utilize BRF+ with your SAP ECC framework, your framework should be on SAP NetWeaver 7.02 SP6 or above.
T-Code is BRF+ or BRFplus
In your SAP ECC session, input either of the above transaction codes, and you will be able to access the BRF+ workbench. In the workbench, you can create all the necessary elements required for BRF, which can be applied to various applications of SAP BRF ECC integrations examples.
Business Case – Material extension for new materials
There is a current custom bunch program which stretches out all materials to all capacity type. Be that as it may, not all materials require all capacity types. The ABAP rationale to represent the custom business rules expected to stretch out the material to the suitable stockpiling type is intricate and hard to change when each new material credits are presented as a feature of the expansion standards.
BRF+ can deal with the business rules in a choice table where it is versatile and straightforward to the business expert making refreshes per business needs.
Application
This is where each of the parts connected with your application dwells. for example Parts: (Information Components, Capabilities, Rulesets, Articulations, and so forth)
A) Define Data Elements: In BRFplus, the utilitarian expert making the BRFplus capability can make new information components excluded from the SAP ECC framework or Tie your information components to be utilized in the BRFplus capability through the DDIC component (Information Word reference) from SAP. Around here situation, I will utilize information components from the DDIC.
Data Elements:
Storage Type
General Thing Class Gathering
Capacity Class
Dangerous Material Number
B) Define Decision Table: The choice table is one of the most valuable highlights in BRFplus. It considers the business rules to be kept up with in a table where the business client can undoubtedly import and commodity by means of succeed when changes are expected because of business needs.
Decision Table:
TechName: DT_STORCLS_STORTYP DescName: STRTYP by STRCLS storage type (Output) by storage class (Input)
C) Define Structure and Tables: Structures should be made to stockpiling BRF+ capability process results for additional handling. Tables should be characterized when there are one-to-many (contribution to yield) connections.
for example Around here situation, there exist different capacity classes that have various sorts as well as the other way around.
D) Define Ruleset: A ruleset is a progression of rationale executed everytime the BRF+ capability is called. In each ruleset, each standard can be designed with a legitimacy period. This gives the business examiner (power client) a method for terminating rules without going through a whole improvement lifecycle as with conventional ABAP advancement. Likewise, in the event that the standard is required again sometime in the future, the business examiner (power client) could execute the progressions to mean business requests in an opportune style. I won’t cover this component in this article in view of the focal point of this article.
for example Around here situation, we have 2 standards which are executed in a succession inside the ruleset.
Rule 1: For any material where the overall thing class isn’t clear except for general thing classifications between ZBN2 to ZBN6, update the outcomes structure with capacity types in the wake of handling the first choice table in the figure underneath (Capacity Type by Thing class).
Rule 2: On the off chance that the material is a risky material (demonstrated by the unsafe material isn’t beginning or in ABAP STOFF Isn’t Starting.), update the outcomes structure with capacity types subsequent to handling the second choice table in the figure beneath (Capacity Type by capacity class).
E) Define Function: The capability is where the ruleset houses the grouping of rules executed. This is the BRF+ capability that an ABAP application would call to recover results. The person string in the ID field is the BRF+ capability ID the ABAP program will approach.
F) Connect BRF+ function to ECC ABAP backend: See ABAP Report Below
ABAPer would be keen on the underneath code.
*&---------------------------------------------------------------------* REPORT ZEXT_STORAGE_TYPES. *&---------------------------------------------------------------------* TYPES: BEGIN OF ty_result, sto_type TYPE string, END OF ty_result. PARAMETERS: p_gicgrp TYPE string, p_lagkl TYPE string, p_stoff TYPE string. DATA: "lo_admin_data TYPE REF TO if_fdt_admin_data, lo_function TYPE REF TO if_fdt_function, lo_context TYPE REF TO if_fdt_context, lo_result TYPE REF TO if_fdt_result, lx_fdt TYPE REF TO cx_fdt, ls_genitmcgrp TYPE if_fdt_types=>element_text, ls_lvs_lagkl TYPE if_fdt_types=>element_text, ls_stoff TYPE if_fdt_types=>element_text, result_ref TYPE REF TO data, it_result TYPE TABLE OF ty_result, wa_result TYPE ty_result. FIELD-SYMBOLS: <d_ref> TYPE ANY TABLE, <ls_message> TYPE if_fdt_types=>s_message. " Setting default selection values START-OF-SELECTION. if p_gicgrp IS INITIAL. ls_genitmcgrp = 'ZNOR'. else. ls_genitmcgrp = p_gicgrp. ENDIF. if p_lagkl IS INITIAL. ls_lvs_lagkl = 'AERO'. else. ls_lvs_lagkl = p_lagkl. ENDIF. if p_stoff IS INITIAL. ls_stoff = 'X'. else. ls_stoff = p_stoff. ENDIF. TRY . " Get BRFplus function using the function ID from FT_MATNR_EXTENSION " from BRF+ frontend lo_function = cl_fdt_factory=>if_fdt_factory~get_instance( )->get_function( iv_id = '005056A54A7C1EE5A2B06E9B9926520A' ). " Set the BRFplus function context ( input variables ) lo_context = lo_function->get_process_context( ). lo_context->set_value( iv_name = 'GENITMCGRP' ia_value = ls_genitmcgrp ). lo_context->set_value( iv_name = 'LVS_LAGKL' ia_value = ls_lvs_lagkl ). lo_context->set_value( iv_name = 'STOFF' ia_value = ls_stoff ). " Process the BRFplus function lo_function->process( EXPORTING io_context = lo_context IMPORTING eo_result = lo_result ). "bind to our structure CREATE DATA result_ref TYPE STANDARD TABLE OF ty_result. lo_result->get_value( IMPORTING er_value = result_ref ). ASSIGN result_ref->* TO <d_ref>. LOOP AT <d_ref> INTO wa_result. append wa_result to it_result. write wa_result-sto_type. ENDLOOP. SORT it_result by sto_type. DELETE ADJACENT DUPLICATES FROM it_result. write / . write 'After de-dupe'. write /. LOOP AT it_result INTO wa_result. write wa_result-sto_type. ENDLOOP. "write ls_cond_out. CATCH cx_fdt INTO lx_fdt. "lo_message. LOOP AT lx_fdt->mt_message ASSIGNING <ls_message>. WRITE: <ls_message>-text. ENDLOOP. ENDTRY.
Note: In the occasion, copies happen, we might have to eliminate the copied values in the table
- The copy expulsion can be carried out by a straightforward ABAP capability utilizing SORT and Erase Contiguous Copies
- Involving conventional sorts for the strategy boundaries settles on for productive methodology decisions from BRF+
Example of BRF+ function for material extension execution:
In light of Decision table entries:
LVS_LAGKL | LGTYP |
AERO | 120 |
AERO | 220 |
CORAI | 140 |
CORAI | 240 |
CORAO | 140 |
CORAO | 240 |
CORBI | 140 |
CORBI | 240 |
CORBO | 140 |
CORBO | 240 |
FL | 130 |
FL | 230 |
FLAO | 130 |
FLAO | 230 |
FLBO | 130 |
FLBO | 230 |
FLG | 190 |
FLG | 290 |
FLGMP | 120 |
FLGMP | 220 |
FLS | 130 |
FLS | 230 |
NFG | 160 |
NFG | 260 |
OGNFG | 160 |
OGNFG | 260 |
OTHER | 100 |
OTHER | 120 |
OTHER | 130 |
OTHER | 140 |
OTHER | 150 |
OTHER | 160 |
OTHER | 170 |
OTHER | 180 |
OTHER | 190 |
OTHER | 200 |
OTHER | 220 |
OTHER | 230 |
OTHER | 240 |
OTHER | 250 |
OTHER | 260 |
OTHER | 270 |
OTHER | 280 |
OTHER | 290 |
OTHER | 300 |
OTHER | 350 |
OTHER | 360 |
OTHER | 400 |
OTHER | 410 |
OTHER | 420 |
OXAI | 150 |
OXAI | 250 |
OXAI | 350 |
OXAI | 410 |
OXAO | 150 |
OXAO | 250 |
OXAO | 350 |
OXBI | 150 |
OXBI | 250 |
OXBI | 410 |
OXBO | 150 |
OXBO | 250 |
OXBO | 410 |
URCAI | 180 |
URCAI | 280 |
URCAO | 180 |
URCAO | 280 |
URCBI | 180 |
URCBI | 280 |
URCBO | 180 |
URCBO | 280 |
WRAI | 170 |
WRAI | 270 |
WRAO | 170 |
WRAO | 270 |
WRBI | 170 |
WRBI | 270 |
WRBO | 170 |
WRBO | 270 |
Summary of series of events in creating a BRF+ function for ABAP Applications
This is the very thing that all working in BRF need to be aware and follow.
- Find/Make another application organizer in your BRF+ workbench
- Recognize/Characterize Information Components
- Make Choice Table(s)
- Allocate Information Components to Choice Table(s)
- Make Designs and Tables for Handling depending on the situation
- On the off chance that Designs and Tables are made, dole out the proper information components to them separately
- Make ruleset for capability process
- Make rules inside the ruleset
- Allot Tables, Designs, and Choice Tables for each standard handled as proper
- Make BRF+ Capability
- Relegate Ruleset to BRF+ Capability
- Make ABAP program to call BRF+ Capability
I trust I haven’t overwhelmed you with too much information. My intention was to share a real project scenario where we implemented the Business Rule Framework. When there are exceptions in the usual process, instead of handling them in complex ABAP programs, it’s a better approach to use Rule Sets and Functions in BRF+. This aligns with applications of SAP BRF ECC integrations examples, showcasing how BRF+ can simplify business logic handling.
YOU MAY BE INTERESTED IN
GOS in Workflows and Approvals
(RPA) Robotic Process Automation Tools: A Comprehensive Guide