Monday, 18 January 2021

BRF+ Settings for purchase orders

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.

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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.

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

Select the expert mode as shown below

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

SAVE the settings.

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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.

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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 a Cross-Application Components à Output Control à Define output type

Transaction Code : SPRO

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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.

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

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

SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Preparation

No comments:

Post a Comment