Applications of SAP BRF+ ECC Integrations Examples

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 figure of BRF+ workbench screen (please pardon the haziness of the image)

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

BRFplus made easy

General Thing Class Gathering

sap workflow and brf+

Capacity Class

sap workflow and brf+

Dangerous Material Number

workflow and brf

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.

BRF+ in SAP Workflow

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).

BRF+ in SAP Workflow

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.

Function in BRF+

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_LAGKLLGTYP
AERO120
AERO220
CORAI140
CORAI240
CORAO140
CORAO240
CORBI140
CORBI240
CORBO140
CORBO240
FL130
FL230
FLAO130
FLAO230
FLBO130
FLBO230
FLG190
FLG290
FLGMP120
FLGMP220
FLS130
FLS230
NFG160
NFG260
OGNFG160
OGNFG260
OTHER100
OTHER120
OTHER130
OTHER140
OTHER150
OTHER160
OTHER170
OTHER180
OTHER190
OTHER200
OTHER220
OTHER230
OTHER240
OTHER250
OTHER260
OTHER270
OTHER280
OTHER290
OTHER300
OTHER350
OTHER360
OTHER400
OTHER410
OTHER420
OXAI150
OXAI250
OXAI350
OXAI410
OXAO150
OXAO250
OXAO350
OXBI150
OXBI250
OXBI410
OXBO150
OXBO250
OXBO410
URCAI180
URCAI280
URCAO180
URCAO280
URCBI180
URCBI280
URCBO180
URCBO280
WRAI170
WRAI270
WRAO170
WRAO270
WRBI170
WRBI270
WRBO170
WRBO270

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.

  1. Find/Make another application organizer in your BRF+ workbench
  2. Recognize/Characterize Information Components
  3. Make Choice Table(s)
  4. Allocate Information Components to Choice Table(s)
  5. Make Designs and Tables for Handling depending on the situation
  6. On the off chance that Designs and Tables are made, dole out the proper information components to them separately
  7. Make ruleset for capability process
  8. Make rules inside the ruleset
  9. Allot Tables, Designs, and Choice Tables for each standard handled as proper
  10. Make BRF+ Capability
  11. Relegate Ruleset to BRF+ Capability
  12. 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

AIF Architecture: Streamlining Workflows

X
WhatsApp WhatsApp us