You can create BRFplus functions that the system can evaluate during outlier detection and event generation. You should use this procedure if you want to define complex BRFplus expressions and use them in outlier detection or future event creation.
You have created a BRFplus application where you can save the expressions and functions you create. For more information, see the BRFplus documentation in SAP Library for SAP Supply Chain Management (SAP SCM) on SAP Help Portal at http://help.sap.com/scm702, under .
To use this function, you must activate the business function SCM-APO-FCS, Events and Outliers, Causals, ABC/XYZ Classification
(SCM_APO_FORECASTING_1
). For more information, see SCM-APO-FCS,
Events and Outliers, Causals, ABC/XYZ Classification.
The following procedure describes the technical details of creating BRF plus expressions and functions, and using them in outlier detection and event generation. For more information about how to use the BRFplus framework, see the BRFplus documentation in SAP Library for SAP Supply Chain Management (SAP SCM) at http://help.sap.com, under .
Run the FDT_WORKBENCH
transaction.
Create an expression and assign it to your application.
Make sure that the expression contains rules that can be evaluated as occurrences (dates) of an event type.
Create a function with the following signature:
Context: add data object IV_DATE
to the context
Result data object: add data object RV_VALID
as result data object
The above data objects are available in the /SAPAPO/DP_EVENT_MANAGEMENT
BRFplus application and are globally accessible.
Assign your expression as top expression to your function.
Save and activate the expression and the function.
On the SAP Easy Access
screen, under , create an event type with the definition BRFplus Function
.
Assign the BRFplus unction you created to the event type and specify the duration, periods before, periods after.
Save the event type.
If you want to consider the event type in the automatic outlier detection, then you must assign the event type to an event catalog, and assign the event catalog to an outlier detection profile. Fore more information, see Demand
Planning Worklist and the documentation for the Customizing activity Configure Outlier Detection and Event Catalog Assignments
). When the system evaluates the function during automatic outlier detection, it supplies each date of a date range where an outlier was
found. The system interprets the result as valid in case the BRFplus function returns a valid value, otherwise, as not valid.
Note
If you change the context of the function after you have assigned it to an event type of BRFplus Function
, the system ignores the function during automatic outlier detection.
Expression type: Formula
Expression:
Result: RV_VALID
Formula: IF(DT_GET_CURRENT_DATE()>IV_DATE,1=1,1=0)
Function:
Top expression: the formula
Signature:
Context: IV_DATE
Result Data Object: RV_VALID
Expression type: Decision table
Expression:
Table settings:
Result data object: RV_VALID
Columns:
IV_DATE
RV_VALID
Table data (direct value input) for date:
Set RV_VALID
as return value for each line using the navigation to details option in the context menu.
Example lines in table:
If IV_DATE
is between 01.01.2010 and 01.03.2010 then RV_VALID
is true, otherwise RV_VALID
is false.
If IV_DATE
is greater than 01.06.2010 then RV_VALID
is true, otherwise RV_VALID
is false.
Function:
Top expression: the decision table expression
Signature:
Context: IV_DATE
Result data object: RV_VALID