Skip to Content
Technical Articles

BRF+ Settings for purchase orders

BRF Plus Settings for Purchase orders

ABOUT

Business Rule Framework plus (BRFplus) provides a comprehensive application programming interface (API) and user interface (UI) for defining and processing business rules. It allows you to model rules in an intuitive way and to reuse these rules in different applications.

 

USE

BRFplus is an SAP NetWeaver-based business rules framework that integrates with ABAP to make decisions based on the business rules defined within the framework. Using transaction codes BRF+ or BRFPLUS, you can add “n” number of rules and logic as reusable enhancements to the standard BRFplus framework. This step can be done via database lookups, decision trees, decision tables, Boolean logic, and formulas in a user-friendly way and with minimal effort. BRFplus then processes the defined rules and produces the derived output, which is passed to SAP ERP Central Component (SAP ECC) through a function that you create in BRFplus.

BRF plus is also used in output management to

  • Issue business documents in response to certain business events
  • External communication such as printouts, faxes, and e-mails with a print preview option
  • Alerts
  • Workflow

Prerequisites

  • bgRFC configuration has been set up and prefixes for OM_QBGRFC_INBOUND_DEST (Define Inbound Dest.) are not modified (default value: OM_QUEUE)
  • Storage system and category has been maintained (KPRO)
  • BRFplus is active and usable
  • Adobe Document Services are available (only when using Adobe Forms)

 

Steps for configuring BRF+

  1. Storage repository settings.
  2. Import of BRF Plus application
  3. Activation of object type.
  4. Assign Output channel
  5. Define determination of Form master template
  6. Business Rules for output determination

 

BgRFC settings

Create RFC destination

Go to transaction code SALE

Select following menu path IDoc Interface / Application Link Enabling (ALE) à Communication à Create RFC Connections

Select ABAP connections and select create

Enter RFC destination name and other data as shown below.

 

In Logon and security TAB enter client which is same as current client user name and password and save.

Start transaction SBGRFCCONF.

  • Go to tab Define Supervisor Dest.
  • Choose Change.
  • Choose Create.
  • In the dialog box Create RFC Destination for Supervisor, enter a Destination name.(The one created in previous step) as shown in screen shot below.
  • Mark the checkbox Create User.
  • Enter a User Name and a password.

  • Save your settings.

 

Storage system and repository.

(As per SAP note 2279725)

In transaction code OAC0, Check repository SOMU_DB exist in system or not if it does not exist

Go to transaction code SE11

Create database table SFORM_A_STORAGE of the type A.

Description:
SOMU Content Repository table

Fields:
MANDT (data element MANDT)
RELID (INDX_RELID)
PHIO_ID (SDOK_PHID)
SRTF2 (INDX_SRTF2)
PH_CLASS (SDOK_PHCL)
CLUSTR (INDX_CLSTR)
CLUSTD (SDOK_DATAX)

Flag first four fields (MANDT, RELID, PHIO_ID, SRTF2) as key fields and activate.

Class APPL1
Size category 4

Now go to

SAP Menu : SPRO > Cross-Application Components > Document Management > General Data > Settings for Storage Systems > Maintain Storage System

OR transaction Code: OAC0

Create new entry SOMU_DB with following data

Storage type: SAP System Database
Storage subtype: Normal
Version: 0047
Content table: SFORM_A_STORAGE

Save the content

 

Now Go to transaction OACT and assign the content repository thus created to category SOMU

Save the content.

 

Import of BRF Plus application

Download relevant application file from SAP note – 2248229 – SAP S/4HANA output management – BRFplus files. Save these in your local system drive.

Go to transaction BRF+ or BRFPLUS

BRF Plus workbench is displayed

Click on personalize button on right top corner

 

 

Select the expert mode as shown below

 

SAVE the settings.

 

Click on tools button and then select XML import as shown in screen shot below

 

Specify the XML file location saved in earlier step in the popup and other parameters like customizing request and workbench request number.

 

Select standard radio button and click on upload XML button on top.

Application is uploaded as shown below

 

Object type activation

In output control application is represented by object type and in this object we activate the object

In this case application object is Purchase_order

This is activated in following path.

 

IMG customization à Cross-Application Components à Output Control à Manage Application Object Type Activation

In the path go to New entry and specify the object type as Purchase order and status as application active as shown in figure below.

Create output type

An output type represents a business document of a single application and defines the output parameters for that document.

In new entry enter object type as Purchase_order and assign it to output type Purchase_order as shown in screenshot below.

The customization for this is done in following customization menu path

IMG customization à Cross-Application Components à Output Control à Define output type

Transaction Code : SPRO

 

Assign Output Channels

In this step output channels selected wrt supported channels by output types. To prevent the end user from selecting output channels that are not applicable for a output type, only those output channels that can actually be used should be displayed in the applications.

The customization for this is done in following customization menu path

IMG customization à Cross-Application Components à Output Control à Define output type

Transaction Code : SPRO

Go to new entries and in application object specify Purchase_order and object type specify Purchase_order and assign following channels Email, IDOC and Print as shown in screen shot below.

 

Define business rules for output determination

Business rules are created and maintained in BRFplus decision tables. These rules are used to determine the output parameters of specific business objects. Each rule comprises several determination steps connected to specific parameters. If you leave a column in the decision table blank, any value is deemed as satisfying the condition.

The customization for this is done in following customization menu path

IMG customization à Cross-Application Components à Output Control à Define business rules for output determination

Transaction Code : OPD

Following screen pops up

 

Rules for Output type

In this step you define for which document type output is to be generated and when it has to be sent.

In drop down for show rules for select Purchase_order and in drop down for determination step select Output type

The screen for Maintain business rules is shown in window below

Go to Edit mode and select create Entry button

 

Make following entries

Document type: As per requirement à NB in case of example shown below

Output type: Purchase_Order

Dispatch type: “1” for immediate output and “2” for scheduled output

Activate the entry by pressing activate button

 

Rules for Receiver

In this step you define for which partner role output has to be generated

In drop down for show rules for select Purchase_order and in drop down for determination steps select receiver

Change the mode to Edit mode

Specify output type as Purchase_order and role as “LF” for vendor.

Activate the entries created

Rules for channel determination

In this step you define channels for which output must be generated

In drop down for show rules for select Purchase_order and in drop down for determination steps select Channel

Change the mode to Edit mode and create three entries

Specify output type as Purchase_order, role as “LF” for vendor and channel as Email, Print and IDOC in three different rows as shown in screen shot below.

Activate the entries created

 

Rules for Printer settings

In this step you define printer wrt output type, partner role and purchase organization for which output must be generated

In drop down for show rules for select Purchase_order and in drop down for determination steps select Printer settings

Change the mode to Edit mode and create three entries

Specify output type as Purchase_order, role as “LF”, purchase organizations for which print must be generated and assign the default printer and no. of copies to be printed

Activate the entries created

 

 

Rules for Email settings

In this step you define Email address wrt output type, partner role

In drop down for show rules for select Purchase_order and in drop down for determination steps select E-mail settings

Change the mode to Edit mode and create three entries

Specify output type as Purchase_order, role as “LF”, and leave all other fields blank if the email address is to be taken from business partner master data.

(* Make sure that email address is maintained in BP master data and in customization of purchasing group)

Activate the entries created

 

Rules for Form Template settings

In this step you define default form template wrt output type, partner role recipient country etc.

In drop down for show rules for select Purchase_order and in drop down for determination steps select Form template settings

Change the mode to Edit mode and create three entries

Specify output type as Purchase_order and specify the standard form “MM_PUR_PURCHASE_ORDER” .

Activate the entries created

 

Conclusion

Congratulations you are through with the settings for generating output for purchase order.

Create purchase order and you get the output from messages TAB

 

Bibliography

1. SAP Press book – BRFplus—Business Rule Management for ABAP Applications

https://www.sap-press.com/brfplus-business-rule-management-for-abap-applications_2106/

2.  BRF  SAP Help portal

https://help.sap.com/viewer/90b9777d9f8f4c6d88c047ced926251c/7.5.5/en-US

 

I hope the content was useful. Please give your comments in comments section.

4 Comments
You must be Logged on to comment or reply to a post.