Você está na página 1de 35

1

Daniel Chang
PC 10.0 Process
Control – Continuous
Monitoring Framework

Continuous Monitoring Framework –


BRF+
Take-Over Document
Date: Nov 22, 2011
Location: Palo Alto
Continuous Monitoring Framework – BRF+

Content:

1 Specification of functionality ........................................................................................ 3


1.1 Business Logic............................................................................................... Error! Bookmark not defined.

1.2 Examples ........................................................................................................ Error! Bookmark not defined.

2 Design of functionality ....................................................... Error! Bookmark not defined.


2.1 Flow logic........................................................................................................ Error! Bookmark not defined.

2.2 Technical information .................................................................................... Error! Bookmark not defined.


2.2.1 List of transaction codes .......................................................................... Error! Bookmark not defined.
2.2.2 List of WebDynpro applications/components/views ................................ Error! Bookmark not defined.
2.2.3 List of ABAP programs: class, interface, reports, includes ..................... Error! Bookmark not defined.
2.2.4 List of function groups and modules ....................................................... Error! Bookmark not defined.
2.2.5 Important methods .................................................................................. Error! Bookmark not defined.
2.2.6 List of database tables ............................................................................ Error! Bookmark not defined.
2.2.7 List of notes and customer-specific corrections ...................................... Error! Bookmark not defined.
2.2.8 List of help-programs............................................................................... Error! Bookmark not defined.

2.3 Important hints ............................................................................................... Error! Bookmark not defined.

3 Other sources of information and links............................ Error! Bookmark not defined.

Take-Over Document Page 2


Continuous Monitoring Framework – BRF+

2 Specification of functionality
2.1 Business Logic
Describe the function from the business perspective in your own wording. The focus is mainly on the end
user perspective.

GRC 10 uses BRF+, the standard Netweaver rule engine, to let users define additional filters and
calculations. You can configure very powerful processing using this rule engine, and our goal was to make it
easy to configure relatively simple rules (calculate an average of two fields, say, or compare two dates), and
yet provide a path to configure more complex rules if that is your need.

BRFplus information center:


http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/90754865-f283-2b10-6d9f-b10f3c28c3a0

BRFplus is used in Configurable Business rule, BI Query, SAP Query and Event.

BRFplus functions in PC10.0 Business Rules:


 Additional Filter
 Field Value Calculation
 Pattern
 Currency Conversion
 Grouping/Aggregation
 Send Notification
 Trigger AM Job

Take-Over Document Page 3


Continuous Monitoring Framework – BRF+

2.2 Examples
Specify system access and global parameters, which you usually use for testing the program. This should
also contain the example data, customizing data and also the data, which is posted to the system.
Description

2.2.1 Additional Filter

„Additional Filter‟ is opitional


„Additional Filter‟ is used to get qualified data based on user entry in BRFplus formula
st
„Additional Filter‟ will be always placed in the 1 BRFplus function.

Take-Over Document Page 4


Continuous Monitoring Framework – BRF+

Select BRFplus object name (Field Name) to be compared with another BRFplus object names or use
existing formula button to create additional formula to check against BRFplus object names. You can create
complex Additional Filter logics using existing BRFplus object names and formula buttons as long as long as
there is no error found when click button „Check Syntax‟.
Click button „Check Syntax‟ to make sure no errors found in formula entry.
During Business Rule execution time, if the data does not match the additional filter condition, then this
record will be ignored.

2.2.2 Field Value Calculation

Take-Over Document Page 5


Continuous Monitoring Framework – BRF+

„Field Value Calculation‟ is used to assign value to specific „Calculated Field‟. The value can come from
single BRFplus object name or multi BRFplus object name with operation (i.e +, -, ..) or use formula button
to create more complex value.
For a “calculated field” deficiency (above), this tab lets you define the calculation necessary to compute its
value.
The “Calculations” tab (or corresponding wizard step when creating the rule) allows three types of
calculations: A Field Value calculation, a currency conversion, or grouping and aggregation (see screenshot
below).

Take-Over Document Page 6


Continuous Monitoring Framework – BRF+

2.2.3 Pattern

Take-Over Document Page 7


Continuous Monitoring Framework – BRF+

Select View to analysis

Select fields to analysis

Take-Over Document Page 8


Continuous Monitoring Framework – BRF+

Enter decision table contents to analyzie deficiency

Take-Over Document Page 9


Continuous Monitoring Framework – BRF+

Take-Over Document Page 10


Continuous Monitoring Framework – BRF+

3 Design of functionality
3.1 Flow logic
Describe the main logical flow in the program to help with analysis of the code, especially parts which have
been error prone in the past.

3.2 Technical information

BRFplus information center:


http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/90754865-f283-2b10-6d9f-b10f3c28c3a0
BRFplus is used in Configurable Business rule, BI Query, SAP Query and Event.
BRFplus application name for Business Rule: GRFN_AM_RUNTIME
BRFplus functions and related components (Data Element, Expression, Function..) will be automatically
generated from Web Dynpro GRFN_AM_UIBB_BRFP_INT methods using AMF and BRFplus standard APIs
and is ready to be used.
User could configure more complex Additional Filter and Field Value Calculation in BRF+ formula only. But, it
is not recommended and should avoid to modify value in BRF+ directly if it is possible. Modify the rest of
BRF+ components (i.e Input, Output structure, Rule, Loop, Expression.....) are not allowed and will cause the
Busines Rule out of sync between BR BRF+ components and BRF+ workbench components and cannot be
executed.

Take-Over Document Page 11


Continuous Monitoring Framework – BRF+

 BRFplus ABAP Types

The elementary internal BRFplus ABAP types can be found via the interface IF_FDT_TYPES:
ELEMENT_BOOLEAN
ELEMENT_CURRENCY (component of ELEMENT_AMOUNT)
ELEMENT_NUMBER
ELEMENT_TEXT
ELEMENT_UNIT (component of ELEMENT_QUANTITY)
ELEMENT_AMOUNT
ELEMENT_QUANTITY
ELEMENT_TIMEPOINT

Take-Over Document Page 12


Continuous Monitoring Framework – BRF+

Take-Over Document Page 13


Continuous Monitoring Framework – BRF+

Syntax Description Type Declaration Syntax Example Values

TEXT Data lv_text_elt TYPE lv_text_elt = ‘Sample Text’


if_fdt_types=>element_text

NUMBER Data lv_num_elt TYPE


lv_num_elt = 1234
if_fdt_types=>element_number

BOOLEAN Data lv_bool_elt TYPE


lv_bool_elt = ‘X’ (ABAP_TRUE)
if_fdt_types=>element_boolean

AMOUNT Data ls_amount_elt TYPE


ls_amount_elt‐number = 1000
if_fdt_types=>element_amount
ls_amount_elt‐currency = ‘USD’
=> 1000 USD
QUANTITY Data ls_quantity_elt TYPE
ls_quantity_elt‐number = 100
if_fdt_types=>element_quantit
y ls_amount_elt‐unit = ‘cgm’
=> 100 centigram

TIMEPOINT Data ls_timept_elt TYPE


ls_ timept_elt‐date =
if_fdt_types=>element_timepoi
‘20081224’
nt
=> 24th of Dec 2008.

The following table Element Type Max Length Max Number Only Positive Timepoint
describes which element of Decimals Values Type
type is created according to
the supplied DDIC type:
DDIC Type
Char Text 1-255 n/a n/a n/a
String Text 255 n/a n/a n/a
Numc Text 1-255 n/a n/a n/a
Int1 Number 1-3 0 Yes n/a
Int, int4 Number 10 0 No n/a
Int2 Number 5 0 No n/a
Packed Number 1-31 10 No n/a
Float Number 16 10 No n/a
Decfloat16 Number 16 10 No n/a
Decfloat34 Number 31 10 No n/a
Date Timepoint n/a n/a n/a Date
Time Timepoint n/a n/a n/a Time
Timestamp (!) Timepoint n/a n/a n/a UTC
Timestamp

Take-Over Document Page 14


Continuous Monitoring Framework – BRF+

 BRFPlus Object Types used in Business Rule – Automatically generated

Take-Over Document Page 15


Continuous Monitoring Framework – BRF+

3.2.1 List of transaction codes


Write down the transaction codes, which are used to run or customize the functionality.
Transaction Code Description

BRF+ BRFplus workbench


GRFN_AMF_FDT_EXPORT Export BRFplus XML for Business Rule
GRFN_AMF_FDT_IMPORT Import BRFplus XML for Business Rule

3.2.2 List of WebDynpro applications/components/views


Specify the list of WebDynpro applications/components/views. Do not forget to add short description of them,
containing the most difficult or problematic parts, etc.
WebDynpro Description

GRFN_AM_UIBB_BRFP_INT BRFplus Integration


V_ADDITIONAL_FILTER Additional Filter and Field Calculation
V_BRFP_FUNC Create Condition, Calculation, and Pattern BRFPlus functions
V_DEF_HANDLERS Select View to retrieve data
V_INPUT_BRFP_DATA Input BRFplus formula data
V_PATTERN Pattern Bisiness Rule

3.2.3 List of ABAP programs: class, interface, reports, includes


Specify the list of ABAP reports and includes. Do not forget to add short description of them, containing the
most difficult or problematic parts, etc.
Program Description

GRFN_AM_FDT_XML_EXPORT Export BRFplus XML for Business Rule


GRFN_AM_FDT_XML_IMPORT Import BRFplus XML for Business Rule

3.2.4 List of function groups and modules


Specify the list of function groups and modules. Please give the details desription for each function modules.

3.2.5 Important methods


Specify details description for each important medthod. And please list the name of the important methods
which are used in the area too.

Class: CL_GRFN_AM_BRFP

ADD_EXCEPT_ATTRS_ELEMENT Add exception list special attribute to context and result

Take-Over Document Page 16


Continuous Monitoring Framework – BRF+

CHECK_ACTION_NAME Check action name follow the standard


CHECK_DT_ACTION_ENTERED Check DT Action entered
CHECK_RULE_DEEP Deep Check Active BRF function, so can be transported
CHECK_SPECIAL_TOKEN check Formula Tokens
CHECK_SYSTEM_NAME_SPACE Check system name space
CONSTRUCTOR CONSTRUCTOR
CONVERT_ABAPTYPE_TO_DDTYPE Convert ABAPTYPE to DDTYPE
CONVERT_INT_TO_EXT Convert internal to external representation
CONVERT_INT_TO_EXT_QUANTITY Convert quantity to external (text) format
CREATE_ACT_CALL_PROCEDURE Create call procedure
CREATE_APPLICATION Create Application - Test only !!!
CREATE_CALC_DEF_RULE_EXP Create calculation deficiency Rule expression
CREATE_CALL_PROCEDURE Create call procedure
CREATE_CONSTANT Creat constant timepoint
CREATE_DATA_OBJECTS Create data objects - used to create 1st BR function
CREATE_DATA_OBJECTS_AGAIN Create data objects - except for the 1st BR function
CREATE_DDIC_STRUCTURE Create contxet parameter using DDIC definition
CREATE_DT_EXPRESSION Create decision table expression
CREATE_ELEMENT Create element
CREATE_FORMULA Creat formula with empty formula
CREATE_LOOP_EXPRESSION Create Loop expression
CREATE_RULE_EXPRESSION Create Rule expression
CREATE_TRIGGER_ACT_RULE_EXPR Create EVENT Rule expression
DELETE_RULE Delete BRF function
DEQUEUE_DT_ID Deque Decision Table ID
DEQUEUE_EXPRESSION_ID Deque Expression ID
DEQUEUE_FUNCTION_ID Deque BRFplus Function ID
EXECUTE_RULE Execute Function
GET_APPLICATION Get Application detail - transport...
GET_APPLICATION_DATA Get Application data
GET_APPL_FUNCTION_ID Get ID for specific function and application combination
GET_BR_FIELDS_DT_COLUMNS Get BR fields Decision Tables columns
Get number of decimals for currency (TCURX), default 2 -
GET_CURRENCY_DECIMALS new
GET_DATA_OBJECT_TYPE Get Object and Data Object Type
GET_DECISION_TABLE_COLUMNS Get Decision Tables columns
GET_DECISION_TABLE_DATA Get Decision Table Data - Action ID in Decision table
GET_DECISION_TABLE_ID Get Decision Table Object ID
GET_FIELDS_LIST Get input context elements
GET_FORMULA_ID Get formula Id
GET_ID Get Object ID
GET_INPUT_DATAOBJ_LAYOUT Get function input/output layout
GET_INSTANCE Get Instance
GET_NAME Get Name and related data object information
MODIFY_DECISION_TABLE_COLUMNS Modify Decision Tables columns
RAISE_ERROR Set error message

Take-Over Document Page 17


Continuous Monitoring Framework – BRF+

RAISE_EXCEPTION Exception
READ_SYSTEM_PARAMS Read System Installation
RETRIEVE_RULE Retrieve function and Formula
RETRIEVE_RULE_NORMAL_MODE Retrieve function and Formula - Normal Mode
SAVE_ACTION Save BRF Action
SAVE_DELETE_RULE Save BRF deleted function
SAVE_DT_CONTENT Save decision table content
SAVE_RULE Save BRF function
SET_AM_NAME Set Table/Structure/Expression name
SET_DECISION_TABLE_DATA Set decision table data
SET_ELEMENT_DATATYPE Set data type
Set new functionm name to generated new version brfplus
SET_NEXT_FUNCTION_NAME func
SET_EVENT_DECISION_RESULT Set the Event decision table result
SET_PATTERN_DECISION_RESULT Set the Pattern decision table result to abap_true
SET_TEXT Set text
SUBSTITUTE_STRINGS Parse string to FDT UUID code - Internal format
SUBSTITUTE_STRINGS_FDTNAME Parse string to FDT Name - External format
UPDATE_RULE Update BRF function and formula
VALIDATE_RULE Validate BRF function

Class: CL_GRFN_BRFP_ADDITIONAL_FILTER Additional Filter Function

IF_GRFN_BRFP~EXECUTE Execute function, this method must be static


IF_GRFN_BRFP~CREATE_FUNCTION Create
IF_GRFN_BRFP~CREATE_FUNCTION_AGAIN Create new function ID due to formula change

Class: CL_GRFN_BRFP_CALC_DEF Calculating Deficiency Function


IF_GRFN_BRFP~EXECUTE Execute function, this method must be static
IF_GRFN_BRFP~CREATE_FUNCTION Create
IF_GRFN_BRFP~CREATE_FUNCTION_AGAIN Create new function ID due to formula change

Class: CL_GRFN_BRFP_PATTERN Pattern Function


IF_GRFN_BRFP~EXECUTE Execute function, this method must be static
IF_GRFN_BRFP~CREATE_FUNCTION Create
IF_GRFN_BRFP~CREATE_FUNCTION_AGAIN Create new function ID due to formula change

Class: CL_GRFN_AM_BRFP_UI_MODE – Set BRFplus UI in Edit Mode

IF_FDT_WD_UI_MODE~GET_CONFIGURATION Returns the configuration


IF_FDT_WD_UI_MODE~GET_DESCRIPTION Returns the description for the mode
IF_FDT_WD_UI_MODE~GET_NAME Returns the name of the mode
IF_FDT_WD_UI_MODE~GET_UI_CONTEXT Returns the UI Context
CONSTRUCTOR CONSTRUCTOR

Class: CL_GRFN_AM_BRFP_UI_MODE _DISPLAY - Set BRFplus UI in Display Mode

Take-Over Document Page 18


Continuous Monitoring Framework – BRF+

IF_FDT_WD_UI_MODE~GET_CONFIGURATION Returns the configuration


IF_FDT_WD_UI_MODE~GET_DESCRIPTION Returns the description for the mode
IF_FDT_WD_UI_MODE~GET_NAME Returns the name of the mode
IF_FDT_WD_UI_MODE~GET_UI_CONTEXT Returns the UI Context
CONSTRUCTOR CONSTRUCTOR

3.2.6 List of database tables


Specify the list of ABAP database table. Do not forget to add short description of them.
ID Description

GRFNBRFPATTRS BRFPlus - Exception function attribute fields


GRFNBRFPFUNC BRF Plus Function Type
HRP5350 BRF Plus Function

Take-Over Document Page 19


Continuous Monitoring Framework – BRF+

3.2.7 List of notes and customer-specific corrections


ID Description

1584124 Missing BRF+ fields when create Calculated fields


1586597 Missing BRF+ fields when create Calculated fields
1588564 Re-create BRF+ Application Name & ID
1519164 Create BRF+ application name & ID for Co

Take-Over Document Page 20


Continuous Monitoring Framework – BRF+

Since the BRFplus application name must be unique to import BRFplus


contents from source system to target system, so we need to create same
BRFplus application name and application id in all enviroments first.
Other terms

In case this note was not applied right after installation and the
Business Rule was created, then please use note 1588564 to install PC
10.0 BRF+ Application ID and Name.
Solution
Create Continuous Monitoring application ID for application name
'GRFN_AM_RUNTIME'.
This application id will be used to create BRFplus function in
Continuous Monitoring Business Rule processing.
The BRFplus application name and id must be created in installation
stage.
Please use attached file 'GRFN_AM_RUNTIME_BRF_APPL_ID.xml' to create
Continuous Monitorin BRFplus Application ID.

Take-Over Document Page 21


Continuous Monitoring Framework – BRF+

3.2.8 List of help-programs


Describe the programs, which help you analyze or correct errors. In case the program is a local object please
specify the name and system also.

3.3 Important hints


Give any hints and describe procedures which might be important:
 transaction codes to analyze the functionality or debug the program
 ok-codes to be used in debugger
 other involved persons and contacts for SAP tools, etc.

4 Other sources of information and links


BRFplus information center:
http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/90754865-f283-2b10-6d9f-b10f3c28c3a0

4.1 Transfer BR BRF+ components to target system

1. BRF+ application name and ID must be transfered first in all systems.


Use the attachments of Notes 1588564 or 1519164 to create BR BRF+ Application name and
Application ID in all systems.
The Application name must be GRFN_AM_RUNTIME
The Application ID must be 80E0ED08B0561DEF92B59B6E451DCE60

Take-Over Document Page 22


Continuous Monitoring Framework – BRF+

2. Use the following two programs to transfer the rest of BR BRF+ components to target systems
 Run program GRFN_AM_FDT_XML_EXPORT to export Source systemBRF+ components
 Run program GRFN_AM_FDT_XML_IMPORT to import BRF+ components to target system

4.2 Find Corresponding BR Condition and Calculation functions in


BRF+ workbench

Application name: GRFN_AM_RUNTIME

Take-Over Document Page 23


Continuous Monitoring Framework – BRF+

BRFPlus Object Types used in Business Rule – Automatically generated

Take-Over Document Page 24


Continuous Monitoring Framework – BRF+

Sample BRF+:
Business Rule: BR/90001197

You could find the corresponding BRFplus function in tcode BRF+ by following steps.
(1) Go to tcode BRF+
(2) Click Advance Search button

Enter Object Type: Function


Object Name: BR90001197*
Click search button

Take-Over Document Page 25


Continuous Monitoring Framework – BRF+

This is BRFplus function for Business Rule BR/90001197

Input and Output Structure from Business Rule:

Take-Over Document Page 26


Continuous Monitoring Framework – BRF+

Take-Over Document Page 27


Continuous Monitoring Framework – BRF+

Take-Over Document Page 28


Continuous Monitoring Framework – BRF+

Amount Samples:

Take-Over Document Page 29


Continuous Monitoring Framework – BRF+

Main Expression:

Take-Over Document Page 30


Continuous Monitoring Framework – BRF+

Take-Over Document Page 31


Continuous Monitoring Framework – BRF+

Simulation:

Take-Over Document Page 32


Continuous Monitoring Framework – BRF+

Take-Over Document Page 33


Continuous Monitoring Framework – BRF+

Another sample simulation with Data exist

Take-Over Document Page 34


Continuous Monitoring Framework – BRF+

Take-Over Document Page 35

Você também pode gostar