0% found this document useful (0 votes)
25 views24 pages

Bcs - Validations

Uploaded by

Prasanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views24 pages

Bcs - Validations

Uploaded by

Prasanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

STRATEGIC ENTERPRISE MANAGEMENT

ASAP “How to…” Paper

Applicable SEM-BCS Releases: 4.0


May 2005
HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

Table of Contents
HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS...................................................................... 1

1 GENERAL DESCRIPTION..................................................................................................................... 1

1.1 Purpose.............................................................................................................................................................. 1

1.2 Integration ................................................................................................ ........................................................ 1

1.3 Features............................................................................................................................................................. 1
1.3.1 Validation of reported financial data, standardized financial data, and consolidated data ......................... 1
1.3.2 Validation of additional financial data ....................................................................................................... 2
1.3.3 Consequences of separate validation tasks ................................................................................................. 3
1.3.4 Example................................................................................................................................ ...................... 3
1.3.5 Validation prior to transaction data changes .............................................................................................. 3
1.3.6 Example................................................................................................................................ ...................... 3

2 CUSTOMIZING INTERFACE FOR VALIDATION ................................................................................. 4

2.1 Definition........................................................................................................................................................... 4

2.2 Method settings ................................................................................................................................................ 4

2.3 Elements of validation method ................................................................ ........................................................ 4


2.3.1 Structure of validation hierarchy ................................................................................................................ 5
2.3.2 Copying................................................................................................................................ ...................... 5
2.3.3 Drag&Drop ................................................................................................................................................ 5
2.3.4 Validation rules ................................ .......................................................................................................... 6
2.3.5 Messages .................................................................................................................................................... 6

2.4 Validation rule .................................................................................................................................................. 6


2.4.1 Formula (1)................................................................ ................................................................................. 7
2.4.2 Selection conditions and key figures (2) .................................................................................................... 7
2.4.3 Functions (3) .............................................................................................................................................. 8
2.4.4 Buttons (4)................................................................................................................................................ 11

3 EXECUTION OF THE VALIDATIONS ................................................................................................. 12

3.1 Validation log.................................................................................................................................................. 13


3.1.1 Evaluation Details ................................................................................................................................ .... 14

4 ADVANCED TOPICS........................................................................................................................... 15

4.1 Special handling of cons unit/group restrictions ......................................................................................... 15

4.2 Message variables........................................................................................................................................... 16


4.2.1 Validation of aggregated data lines .......................................................................................................... 16
4.2.2 Val. of separate data lines and val. of data header ................................................................................... 17
HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

4.3 Group-by logic................................................................................................................................................ 17

4.4 Function ‘Condition’................................................................ ...................................................................... 19


4.4.1 ‘Condition’ for the validation of aggregated data lines ............................................................................ 19
4.4.2 ‘Condition’ for the validation of separate data lines................................................................................. 19

4.5 BW Aggregates ................................................................ ............................................................................... 20

4.6 Reusable validation rules................................ ............................................................................................... 20

1998 SAP AMERICA, INC. AND SAP AG TABLE OF CONTENTS


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

1 General description

1.1 Purpose
You use this component to ensure the consistency of the following data:
• Reported financial data
• Standardized financial data
• Consolidated data
• Additional financial data

1.2 Integration
You apply validation within the consolidation process as follows:
• As a separate consolidation task:
o Before any consolidation entries are posted you need to ensure that the reported
financial data (and additional financial data if applicable) you have collected is
consistent.
o After posting standardizing entries, you need to check the consistency of the
standardized financial data.
o After posting the consolidation entries, you can check that the consolidated data is
consistent.
• As part of the consistency check on data to be posted. This validation takes place in addition
to the predefined breakdown and consistency checks:
o You can define a validation method (and assign it to a document type) for validation of
a document header prior to posting. This applies both to manual and automatic
document types.
o You can define a validation method (and assign it to a document type) in order to
validate separate document lines and aggregated document lines prior to posting of
both manual and automatic document types.
o Before any totals data are posted, checks of a dedicated validation method (assigned
to a version combination) are applied on separate data lines to be posted. This
applies to reported, standardized and consolidated financial data.

1.3 Features

1.3.1 Validation of reported financial data, standardized financial data, and consolidated data

Validation of this data uses check expressions, which you can define in customizing. To do this, you
establish selection conditions (usually with items and subassignments), which you then use in a
formula. Then the system tests whether the check expression is true or false for a given data set.
You can also perform multilevel checks: First, as a precondition the data is tested with a Boolean
expression you have defined. Depending on whether the result of this check expression is true or
false, the system does following:
o Perform subordinate checks defined for the true/false subnode
o Display messages, which were defined by the customer for the true/false subnode

2002 SAP AG AND SAP AMERICA, INC. 1


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

1.3.2 Validation of additional financial data

Validation of additional financial data uses check expressions that are predefined and fixed in the
system. The predefined fixed messages can be output as either error messages or warning
messages.

Investment and Equity data


Within the validation of reported financial data, it is possible to carry out a validation of additional
financial data for consolidation of investments. Changes in investments and changes in investee
equity are checked against the corresponding entries in the totals database.

What is selected?
• For each consolidation unit, the cumulative year-to-date values of the period of execution are
checked.
• The investments are checked for every combination of item, subassignment and partner (if
the item has a partner breakdown). The investee equity is checked for every combination of
item and sub-item. Thus, for the validation a summation of additional financial data is carried
out aggregating over consolidation of investments activities and consolidation of investments
activity numbers.
• On the totals database, reported financial data and standardizing entries are taken into
account, thus postings of the posting levels space, 00, 01 and 10.

What is checked?
• If one of the additional financial data records found through the above procedure differs from
the corresponding entry in the totals database (or if such a record does not exist), a
corresponding validation message specifying the differing values is issued.
• If totals records for a subassignment exist for an item posted in the additional financial data,
to which no account assignment was carried out in the additional financial data, a warning
message is issued.
• The entry of reported financial data is not required for those consolidation units which are only
included with the accounting techniques equity method or mutual stock method. Therefore a
validation of additional financial data is generally not useful in these cases and should not be
executed at all.
• During the validation of the additional financial data for the changes in investee equity, the
system checks additionally vice versa whether entries exist in the reported equity data which
correspond to the entries in the totals database.

The system therefore checks all equity financial statement items, defined in C/I customizing for
“equity” (tab strip “statistical equity”), which are
• either not defined in the C/I location of values for equity or
• defined in the C/I location of values for equity, with flag “read additionally consolidation
postings” being set. (00-10 AFD, 20-30 Totals)

Namely, for equity reported items defined in C/I location of values no AFD is maintained, if flag “read
additionally consolidation postings” is empty.

• The Equity Holding Adjustments (EHA) additional financial data are also checked, if they have
a corresponding entry in equity data. This check is performed only then, when the equity
holding adjustment data is read from its own AFD.

2002 SAP AG AND SAP AMERICA, INC. 2


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

• For investment data there is also new feature, which checks the activities 14, 15 (write-up and
write-down of investment), if only book value without any percentage share is entered in the
totals database.

Inventory Data
Within the validation, it is possible to carry out a validation of additional financial data for inter-unit
profit elimination in inventory. Inventory data is checked against the corresponding entries in the totals
database.

If the inventory item has no partner breakdown, the inventory data entered for each partner is
summed up before the comparison of all partners. If this total differs from the value in the totals
database, an error message is issued. Instead, only a warning message should be issued since in
addition to the financial statement item in the totals database values for group-externals might have
been entered, which consequently take consciously a variance of the values into account. (The
warning message disappears if the difference is entered in inventory data for the default partner unit
'External'.)

If the inventory item has a partner breakdown and if inventory data is entered in it for certain partner
inventory data, the rule would be that exactly these partners are also to be managed in the totals
database. If further totals data is found on the same financial statement item with other partners, a
corresponding warning message should be issued.

1.3.3 Consequences of separate validation tasks

Whether the system executes subsequent tasks depends on the type of messages displayed.
The validation is performed prior to the subsequent tasks to ensure that only valid data can be posted.

1.3.4 Example

You can check the reported and the standardized financial data of a given period to see if the
following expressions are true:
o Total assets = equity + total liabilities
o Net profit = appropriation of retained earnings
o Retained earnings on balance sheet = annual net income on income statement

1.3.5 Validation prior to transaction data changes

You can define check expressions, which are evaluated already prior writing transaction data (on all
posting levels). Whether the system writes any transaction data changes depends on the type of
messages displayed. This kind of validation is processed as a custom-defined breakdown check (in
addition to the standard consistency check of the SEM-BCS).

1.3.6 Example

You can check that manual documents of a specific document type are posted only with allowed
combinations FS-Item / Movement Type.

2002 SAP AG AND SAP AMERICA, INC. 3


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

2 Customizing Interface for Validation

2.1 Definition
A central environment for defining validation tasks and methods, plus assignment of validation
methods to document types and version combinations.

2.2 Method settings


When you create a new validation method, you have to select ‘Data Stream Type’ and ‘Validation
Type’.
You can use the validation function to validate following data stream types:
o Totals
o Documents
There are following types of validation:
o Validation of a data header
o Validation of separate data lines
o Validation of aggregated data lines
Following combinations of Data Stream Type / Validation Type are allowed:

Data Validation Type Assignment Purpose


Stream of Method
Type to

Totals Validation of Validation Validation task


aggregated data Task
lines

Totals Validation of Version Validation of all transaction data


separate data Combination changes in the Totals InfoCube
lines s

Documents Validation of a Document Validation of characteristics, which


data header Type are fixed in the document

Documents Validation of Document Validation of characteristic and key


separate data Type figures of every single document line
lines

Documents Validation of Document Validation of aggregated document


aggregated data Type lines
lines

2.3 Elements of validation method


In a validation hierarchy, which is the main part of a validation method, you can create validation rules
(for example, Total Assets = Equity and Total Liabilities).
Under the ‘true’ and/or ‘false’ result node you can create:
o Further validation rules
o Messages

2002 SAP AG AND SAP AMERICA, INC. 4


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

The system tests validation rules at lower levels of the validation hierarchy depending on the result of
the super ordinate validation rule. In other words, the validation rule at a higher level serves as a
prerequisite for the rules at the lower levels.
You can create up to nine levels of validation rules in a validation method.

2.3.1 Structure of validation hierarchy

You can create any number of validation rules directly below the method (validation method is the root
of the hierarchy). Below each validation rule you will find a predefined ‘true’ and a ‘false’ node. These
represent the possible results of the evaluation of the rule. You can create any number of validation
rules and custom messages below the ‘true’ and/or ‘false’ node. You can change the description of
any method and validation rule.
Example of a validation hierarchy:

In the example above ‘Validation rule A’ and ‘Validation rule B’ will be evaluated only if the result of the
validation rule ‘Precondition’ will be False. Usually the structure of a validation method is flat, with
custom error messages below the ‘false’ nodes:

2.3.2 Copying

You can copy validation methods, validation rules and messages. After copying a method you have to
enter a new unique name of up to five characters.

2.3.3 Drag&Drop

You can move the elements of the validation hierarchy (rules and messages) using Drag&Drop. You
cannot move any element into another validation method. You have to obey following restrictions of
the hierarchy structure:
o Validation method cannot be moved
o There can be only validation rules directly below the validation method
o There can be only the predefined ‘true’ and ‘false’ node below each validation rule

2002 SAP AG AND SAP AMERICA, INC. 5


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

o Messages are leaves of the hierarchy (neither message nor validation rule can be placed
below a message)

2.3.4 Validation rules

A validation rule consists of a set of selection conditions, one formula and optionally a list of group-by
fields. You can combine predefined validation functions, standard functions and operators into a
formula. For validation rules of type ‘Validation of aggregated data lines’ you can define group-by
fields. Description of a validation rule and the customizing screen will follow later. The same applies
for the group-by logic.

2.3.5 Messages

You can create custom messages below the ‘true’ and ‘false’ nodes of a validation hierarchy. You
have to fill the message ID, number and type:

You can use the button ‘Message Maintenance’ to navigate into transaction SE91.
Up to four message variables can be used in the messages (this topic will be explained later).

2.4 Validation rule


As already stated, a list of selection conditions, one formula and a list of group-by fields make up an
independent customizing entity called validation rule. Selection conditions represent restrictions,
according to which data is selected. Selection conditions are used as parameters of predefined
validation functions. Validation functions can be combined using arithmetic and Boolean operators into
a formula with Boolean result type (True or False). The formula is evaluated during validation. When
the group-by field list is filled, then the evaluation is done per group-by field value(s) found in the
selected data.
Selection conditions, formula and group-by fields can be maintained on one screen:

2002 SAP AG AND SAP AMERICA, INC. 6


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

You should use self-explanatory medium texts of the validation rules, they are displayed in the
execution log of a validation task.

2.4.1 Formula (1)

In section (1) you create a formula from selection conditions (2), predefined functions (3) and
operators (4). Formula elements are entered by double-clicking on a selection condition, function or by
clicking on an operator button. The selected element is placed to the position, where the cursor is
placed.
Example (the above displayed formula):
1. Double-click on the function VAL_YTD in the list of functions (3), cursor is automatically
placed between the brackets.
2. Double-click on the selection condition ‘Assets’ in the area (2).
3. Place cursor behind the closing bracket. Click on the operator ‘+’.
4. Repeat steps 1 and 2 for VAL_YTD( Liabilities&Equity ).
5. Place cursor behind the closing bracket. Click on the operator ‘=’.
6. Click on the button ‘Number’ in the area (4). Enter zero.

2.4.2 Selection conditions and key figures (2)

Selection conditions are used as parameters of the predefined aggregation application functions
(explained in the section ‘Functions’). You can create, display, edit, copy and delete a selection
condition using the icon in the menu of the list (2), or using the context menu. You should use self-
explanatory descriptions of selection conditions, they are displayed in the execution log of a validation
task. Please be aware that double-clicking on a selection condition doesn’t display/edit the selection
condition, but places it into the formula. This behavior differs from the usual customizing pattern.
Selections used in the formula cannot be deleted. All characteristics of the validated data stream can
be restricted in a selection condition. A separate documentation paper explains customizing of
complex selections.

2002 SAP AG AND SAP AMERICA, INC. 7


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

Validation rules of validation type ‘Validation of data header’ and ‘Validation of separate data lines’
contain (in addition to the selection conditions) the key figures of the validated data stream:

Key figures can be included into the formula using comparison and Boolean operators. They can also
be used as an argument of the mathematical function ABS.

2.4.3 Functions (3)

In validation rules of validation type ‘Validation of aggregated data lines’ you can select from following
categories of functions (listed according to options of the dropdown list box ‘Show me’):
o Mathematical functions
o ABS – absolute value
o Basic functions
o Arithmetic operators: multiplication, addition, subtraction, division
o Comparison operators: less than, less than or equal to, greater than, greater than or
equal to, equals, not equal to
o Boolean operators: and, or, not, implication, equivalence
o Application functions can be divided into two categories:
o Functions, which aggregate key figures of selected data records (aggregation
functions)
o Other application functions (Condition, Constant)

In validation rules of validation type ‘Validation of data header’ and ‘Validation of separate data lines’
the application functions are restricted to only one function ‘Condition’.

Boolean operator ‘Implication’, denoted ‘==>’, has following truth table:


nd
1st argument 2 argument Result

True True True

True False False

False True True

False False True

Boolean operator ‘Equivalence’, denoted ‘<=>’, has following truth table:


nd
1st argument 2 argument Result

True True True

True False False

2002 SAP AG AND SAP AMERICA, INC. 8


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

False True False

False False True

Aggregation functions
Aggregation functions have at least one parameter: selection condition. This parameter restricts the
data to be selected. The result type is value with currency (for example 100 USD) or quantity (for
example 100 KG). The name of the function tells us which key figure will be aggregated, whether data
is selected cumulatively or periodically and whether data of prior fiscal years/periods shall be selected:

Function name Explanation


element

LC, TC, GC, QU Aggregate values in local/transaction/group currency or quantity.

VAL Key figure to be aggregated is derived from the setting ‘Currency’


of the validation task, to which the method is assigned:
• ‘Local Currency’ aggregate values in local currency
• ‘Group Currency’ aggregate values in group currency
VAL-functions are sometimes called generic validation functions.
Methods, which are not assigned to a validation task (but to a
version combination or to a document type), cannot use these
generic functions.

PER, YTD Select data from current posting period (PER) or from posting
period 0 up to (incl.) current posting period (YTD). YTD-functions
cannot be customized with selection conditions containing
restriction on posting period.

P ‘P_’ in the beginning of the name of a function means, that data


from prior fiscal years and/or posting periods will be selected.

Examples:
• LC_YTD( Selection A ) … select cumulative data according to ‘Selection A’ and aggregate
value in local currency
• QU_PER( Selection B ) … select periodic data according to ‘Selection B’ and aggregate
quantity
A separate chapter describes special handling of restrictions of consolidation units in the aggregation
validation functions.

Prior fiscal year / posting period comparison


Functions with names starting with ‘P_’ can be used for comparison of transaction data in two different
time intervals. These functions have three parameters:
Selection condition
Number of posting periods (NP)
Number of fiscal years (NY)
The fiscal year and posting period, from which data will be selected are calculated as follows (CY =
current fiscal year, CP = current posting period, NP = number of posting periods in a fiscal year, RY =
resulting fiscal year, RP = resulting posting period):

2002 SAP AG AND SAP AMERICA, INC. 9


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

1. RY = CY – ABS( NY ) + ( CP – ABS( NP ) – 1 ) / NP
2. RP = ( CP + ( NP – ABS( NP ) MOD NP ) ) ) MOD NP
3. If RP = 0 then RP = NP
Examples:
• P_LC_PER( Selection A, 1, 0 ), current posting period 003/2005 … select periodic data
according to ‘Selection A’ from prior posting period (002/2005) and aggregate value in local
currency
• P_GC_YTD( Selection A, 0, 1 ), current posting period 003/2005 … select cumulative data
according to ‘Selection A’ from prior fiscal year (000-003/2004) and aggregate value in group
currency
• P_GC_PER( Selection B, 0, 1 ), current posting period 003/2005, Selection B containing
restriction on posting period 000-012 … select cumulative data according to ‘Selection A’ from
prior fiscal year (000-012/2004) and aggregate value in group currency
Number of posting periods and number of fiscal years can be entered using the button ‘Constant’ in
the button area (4).
Example – entering function P_LC_PER( Assets, 1, 0 )
1. Double-click on the function P_LC_PER in the list of functions (3), cursor is automatically
placed to the position of the first parameter.
2. Double-click on the selection condition ‘Assets’ in the area (2).
3. Place cursor to the position of the second parameter. Press button ‘Constant’ in the button
area (4). Enter 1.
4. Place cursor to the position of the third parameter. Press button ‘Constant’ in the button area
(4). Enter 0.

Function ‘Condition’
This function has one parameter selection condition. The result type is Boolean (True or False). It has
different functionality based on the validation type:
• ‘Validation of aggregated data lines’: Check if the execution parameters of the validation task
match with the selection. Only characteristics with following roles are checked:
o Group Currency Key
o Version
o Posting Level
o Fiscal Year
o Posting Period
o Consolidation Unit (for validation of reported or standardized financial data)
o Consolidation Group (for validation of consolidated financial data)
• ‘Validation of data header’ or ‘Validation of separate data lines’: Check if the validated data
row fits to the selection.
A separate chapter will describe several useful examples for both kinds of ‘Conditions’.

Function ‘Constant’
This function has three parameters:
o Value
o Currency Key
o Exchange Rate Indicator
The result type is value with currency (for example 100 USD). This function translates the value into
the local, transaction or group currency:

Function Functionality

2002 SAP AG AND SAP AMERICA, INC. 10


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

CONST_LC Translate value into the local currency of the currently executed
consolidation unit

CONST_TC Translate into the currently processed transaction currency (further details
will be explained in the chapter on group-by logic)

CONST_GC Translate into group currency

CONST Target currency depends on the setting ‘Currency’ of the validation task, to
which the method is assigned:
• ‘Local Currency’ translate into local currency of the currently
executed consolidation unit
• ‘Group Currency’ translate into group currency
Methods, which are not assigned to a validation task (but to a version
combination or to a document type), cannot use this generic function

Example:
CONST_LC( 100, USD, 1) means translate 100 USD into the currency of the currently executed
consolidation unit, using spot rate.

2.4.4 Buttons (4)

The button area contains following buttons:


o Arithmetic and Boolean operators: This section contains often used operators.
o String: This button can be used instead of button ‘Constant’ in order to enter the parameter
‘Currency Key’ for the function CONST, however button ‘Constant’ is preferable.
o Number: This button should be used to enter values without currency (for example the
parameter ‘Value’ of the function CONST).
o Constant: This button should be used to enter all typed parameters of the predefined
application functions (for example parameter ‘Exchange Rate Indicator’ of the function
CONST)
o Comment: This button can be used to place comments into the formula. Predefined
comments ‘&1’, ‘&2’, ‘&3’, ‘&4’ can be used in order to fill message variables. This feature will
be explained in a separate chapter.
o Group: This button serves for entering characteristics and/or attributes for the group-by logic.
This advanced topic will be explained in a separate chapter.

Button ‘Number’ vs. ‘Constant’


You can use both buttons to enter number parameters, however each of them has its advantages and
disadvantages.
o Entering parameters:
o When you use the button ‘Constant’, a popup appears with a description of the
parameter:

2002 SAP AG AND SAP AMERICA, INC. 11


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

o On the other hand when you use the button ‘Number’, the popup doesn’t give any hint
about which parameter you are entering:

o Entering value for comparison: If you want to compare a result of a function with the value
zero, you have to use the button ‘Number’ to enter zero. If you want to use another
comparison value, you have to use the function CONST* (CONST, CONST_LC, CONST_GC
or CONST_TC) so that the value can be translated into the correct currency.

Button ‘Group’
You can enter any characteristic and any selection attribute as a group-by field (the group-by logic will
be explained in a separate chapter). The icon on the button indicates whether any group-by field is
entered:
Group-by field list contains at least one field or attribute
Group-by field list is empty

3 Execution of the validations


Validation methods can be assigned to validation tasks, version combinations or to document types
(see chapter ‘Method Settings’).

Methods of validation type ‘Validation of aggregated data lines’ for data stream type ‘Totals’ are to be
assigned to a validation task. Validation task produces a detailed evaluation log, which will be
described later.

Methods of validation type ‘Validation of separate data lines’ for data stream type ‘Totals’ are to be
assigned to version combinations. When you do so, transaction data changes in the Totals InfoCube
will be checked (using this validation method) prior to saving the data changes into the InfoCube.
When the validation method produces at least one error message, no transaction data changes will be
saved. Validations of separate data lines don’t produce any detailed validation log, the only means to
inform the user about the evaluation results are custom messages. These messages can use up to
four variables, so that the error or warning message is specific enough and the user can react
appropriately.

Methods for the data stream type ‘Documents’ are to be assigned to document types. All transaction
data changes for the document type will be checked using the assigned validation methods. Each of
the three validation types have its own special usage:

Validation type Usage

Val. of data header Custom breakdown check for characteristics fixed in the
document; this type of validation is done once per
document. Custom breakdown checks can be done using
the function ‘Condition’.

2002 SAP AG AND SAP AMERICA, INC. 12


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

Val. of separate data lines Custom breakdown checks for each document line of the
validated document. Characteristics and key figures can be
checked. Custom breakdown checks can be done using the
function ‘Condition’, key figures can be compared with each
other or with constants (using function ‘Constant’).

Val. of aggr. data lines Validation using aggregation application functions (like
VAL_YTD, LC_PER, …), where the source data are all
document lines of the document.

Validation methods assigned to document types don’t produce any detailed validation log, the only
output are custom messages. These should be detailed enough, for example with help of message
variables. When at least one of the assigned methods produces at least one error message, no
documents of the document type are posted.

3.1 Validation log


The validation log, produced by validation tasks has following structure:
Consolidation unit or group Errors Warnings Result
- Validation rule Hierarchy level Errors Warnings Result
- Evaluation details
- Messages resulting from evaluation of a validation rule
- Other messages for the consolidation unit or group

Example:

The column ‘Hierarchy Level’ tell us on which validation hierarchy level the validation rule is placed.
For example the validation rules, which hang directly below the method, have hierarchy level 1. Their
subordinate validation rules have the hierarchy level 2 and so on.

2002 SAP AG AND SAP AMERICA, INC. 13


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

The number of errors and warnings produced by all validation rules is summed up and added to the
number of errors and warnings from the validation of additional financial data. This sum is displayed
as number of errors/warnings on the consolidation unit/group level.

Be aware, that the result of a validation formula (True or False) per se doesn’t directly influence the
result icon. The messages, ‘triggered’ by the result of the evaluation, influence the result:

Number of Warnings Number of Errors Result

0 0 OK (green)

>0 0 OK with warnings (yellow)

Any >0 Error (red)

In our example the result of the validation rule ‘Segmented Sales’ is ‘False’. In the method
customizing there is custom warning message ‘Segmented Sales not equal…’ below the node ‘False’
of this validation rule. As a consequence this warning message is ‘triggered’.

If you execute the validation task with the checkbox ‘Checks with errors only’ with a tick (on the
selection screen), the validation log will contain only validation rules, which produce errors or
warnings. This can improve the performance of the validation task.

3.1.1 Evaluation Details

The sub list with evaluation details has following structure:


Function or Operator Result
- Parameter name Parameter value
Parameter of a function or operator can be another function or operator and so on.

Example for validation rule VAL_PER( Segmented Sales ) = VAL_PER( Non-segmented Sales ) :

The evaluation of the formula begins with the operator ‘Equals’ (=). It has two operands: ‘Period Value’
(VAL_PER) with parameter ‘Segmented Sales’ and another function ‘Period Value’ (VAL_PER) with
parameter ‘Non-segmented Sales’. The result of the operator ‘Equals’ is ‘False’.
The general rules for reading the evaluation detail log are:
1. Functions and operators are in the left column, their results on the same line in the right
column.
2. The parameters of the functions or operators (which can again be functions or operators as in
our example) are displayed as breakdown; the values of the parameters are on the same line
as the names of the parameters.
Only nine levels of the resulting evaluation hierarchy can be displayed from technical reasons. This
means that evaluation details of very complex formulas cannot be displayed completely.

2002 SAP AG AND SAP AMERICA, INC. 14


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

4 Advanced topics
This section contains following topics:
o Special handling of cons unit/group restrictions
o Message variables
o Group-by logic
o Function ‘Condition’
o BW Aggregates
o Reusable validation rules

4.1 Special handling of cons unit/group restrictions


It is possible to restrict cons unit and cons group characteristics in the selection conditions of the
validation rules. When a selection condition doesn’t contain any restriction on cons unit and the
validation rule is used in a method/task for validation of reported or standardized financial data, then
transaction data of the currently processed cons unit are read and processed. The same applies for
the cons group in case of validation of consolidated financial data.

Example:
The usual validation rule VAL_YTD( Assets ) + VAL_YTD( Equity&Liabilities ) = 0, where the selection
conditions ‘Assets’ and ‘Equity&Liabilities’ contain only restriction of the FS-Item, will be applied to
every executed cons unit (or cons unit combination, in case of a matrix organization).

You can restrict the cons unit/group characteristics and thus overrule the standard logic.

Example:
VAL_YTD( Assets ) + VAL_YTD( Equity&Liabilities ) = 0, where the selection conditions ‘Assets’ and
‘Equity&Liabilities’ contain in addition to the FS-Item also restriction of the profit center (one of two
characteristics with the role consolidation unit):

The validation task will be processed per cons unit combination, but data will always be selected and
aggregated for all profit centers.

You should keep in mind that a restriction of a cons unit characteristic doesn’t change the way
validation task is executed, it means even though you have restricted a cons unit in a selection, all
validation rules will be evaluated for all cons units (or cons unit combinations). You can achieve a
certain performance gain and a more comprehensible validation log using appropriate method
assignment in the validation task.

Example:

2002 SAP AG AND SAP AMERICA, INC. 15


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

In the last example it would have been enough to process the validation rule only once per company
(the other characteristics with the role consolidation unit) and not once per cons unit combination. You
can achieve it in the following steps:
• Put all cross cons unit validation rules (like the one described above) into one validation
method, let’s name it VAL1A.
• Put all ‘normal’ validation rules (without any cons unit restriction) into another method, name it
for example VAL1B.
• In the maintenance of the validation task assign method VAL1A to one dedicated profit center
(let’s name it OTHER), which creates a valid combination with all companies.
• Assign method VAL1B to all profit centers.
As a result the cross cons unit validation rules will be processed only once per company and the result
of the evaluation of these validation rules in the validation log will appear only once per company.

4.2 Message variables


It is possible to use up to four message variables in the custom messages in order to provide the user
with as specific information about a data inconsistence as possible. You have to do two things in order
to have message variables filled:
1. You have to create and use custom messages with variables. Example of such a message:
‘Assets (&1) don’t equal equity plus liabilities (&2); Difference: &3’.
2. You have to tell the system what shall be filled into the messages.

As you see message variables in the short text of a message are named &1, &2, &3 and &4. Message
variables can be used also in the long text of a message (you can find more details in the
documentation for the transaction SE91).

The way to tell the system how to fill the variables depends on the validation type.

4.2.1 Validation of aggregated data lines

The information about the message variables is maintained in the formula of a validation rule.
You have to place comments &1, &2, &3 or &4 directly behind functions whose results should be filled
into the message variables.

Example:
Usual formula for the balance sheet:
VAL_YTD( Assets ) + VAL_YTD( Equity&Liabilities ) = 0
The resulting message for the ‘False’ case could look as follows:
Assets (&1) don’t equal equity plus liabilities (&2); Difference: &3
A modified formula, which allows filling the variables &1, &2 and &3:

The resulting message after execution of the validation task could look as follows:
Assets (900 USD) don’t equal equity plus liabilities (600- USD); Difference: 300 USD

The customizing steps for entering the comments &1 - &4 are as follows:

2002 SAP AG AND SAP AMERICA, INC. 16


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

1. Place cursor to the position in the formula, where you want to insert a comment.
2. Press button ‘Comment’.
3. Enter for example &1.

4.2.2 Val. of separate data lines and val. of data header

You have to enter characteristics, attributes or key figures to be filled into the variables &1 - &4 in the
maintenance of a message:

In this example the variable &1 will be filled with the ‘Allocation Company’, variable &2 will be filled with
FS-Item, variable &3 will be filled with the attribute ‘Breakdown Category’ of the FS-Item and the
variable &4 will be filled with the value in group currency.
The resulting message could look as follows:
Allocation Comp. C1000 filled for Item 1200100 (BDC S200); Value 450 USD

4.3 Group-by logic


Group-by logic can be used only for the validation type ‘Validation of aggregated data lines’. The
purpose of the group-by logic is to validate that a formula (customized in a validation rule) returns the
result ‘True’ for all occurrences of the group-by fields in the selected data.

Example:
LC_YTD ( FS-Item A ) > LC_YTD ( FS-Item B ) …group by Land
Suppose there are following data records in the Totals InfoCube:

Land FS-Item Value in


LC

FR A 700

FR B 900

LU A 500

IT B 0

IT C 200

The formula “LC_YTD ( Item A ) > LC_YTD ( Item B )” will be evaluated per occurrence of group-by
fields, which appear in the selected data:

2002 SAP AG AND SAP AMERICA, INC. 17


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

Land Item A Land Item B Result

FR 700 > FR 900 False

LU 500 > LU 0 True

IT 0 > IT 0 Ignored

The overall result of the validation rule will be ‘False’, because at least for one occurrence of the
group-by fields the result is ‘False’. If we would not use the group-by logic (empty list of the group-by
fields in the maintenance of the validation rule), the result would be ‘True’:

Item A Item B Result

1.200 > 900 True

You can group by any number of characteristics and selection attributes. The result and the evaluation
hierarchy in the validation log is be displayed per occurrence of the group-by fields in the selected
data.

Example:
Here the group-by field is the selection attribute ‘breakdown category’ (‘BDC’) of the FS-Item, the
result of the formula is ‘True’ for the breakdown category ‘0010’ and ‘False’ for the breakdown
category ‘6000’. The overall result of the validation rule is thus ‘False’.

When no data is selected at all, or all data contain zero in the key figures, the result is per definition
‘True’ and no detail sub-list in the validation log is displayed.

Message variables are filled as described in the chapter ‘Message variables’. Message variable &4 is
always filled with the concatenated values of the processed group-by fields.

If you execute the task with the checkbox “Checks with errors only” with a tick (on the selection
screen), the detail sub-list will show only those group-by field occurrences, which produce the result
‘False’. This can improve the performance of the validation task.

Please be aware, that group-by validations generate a performance penalty. The rule of thumb here is
as follows: Each group-by field occurrence in the selected data is equivalent (regarding performance)
to one non-group-by validation check.

2002 SAP AG AND SAP AMERICA, INC. 18


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

4.4 Function ‘Condition’


Let’s repeat shortly the usage of the function ‘Condition’ (dependent on the validation type):
• ‘Validation of aggregated data lines’: Check execution parameters against the selection
condition.
• ‘Validation of data header’ or ‘Validation of separate data lines’: Check if the validated data
row fits to the selection.

4.4.1 ‘Condition’ for the validation of aggregated data lines

You can restrict characteristics with following roles:


• Group Currency Key
• Version
• Posting Level
• Fiscal Year
• Posting Period
• Consolidation Unit (for validation of reported or standardized financial data)
• Consolidation Group (for validation of consolidated financial data)
Restrictions of other characteristics will be ignored. Validation rules with the function ‘Condition’ are
suitable for preconditions.

Example:
You can create a set of special validation rules for quarterly validation as follows:
• Create a validation rule, name it for example ‘Quarterly validation’.
• Enter formula CONDITION( Period 3,6,9,12 ), where selection ‘Period 3,6,9,12’ contains
restriction of the characteristic ‘posting period’ with single values 3, 6, 9, 12.
• Hang all validation rules for quarterly validation below the ‘True’ sub-node of the validation
rule ‘Quarterly validation’.

Please be aware that using ‘Condition’ can and should be avoided. All use cases can be covered by
version, time and consolidation unit dependent assignment of methods to the validation task.
However, in some complicated cases version, time and consolidation unit dependent assignment
would lead to rising complexity of the customizing, so that the function ‘Condition’ can become a
preferable solution.

4.4.2 ‘Condition’ for the validation of separate data lines

You can restrict all characteristics of the validated data stream (totals or documents). The function will
check for each validated data line if the characteristics fit to the selection condition.

Example:
Following check is done by the standard breakdown and consistency check:
CONDITION( PL 20 ) ==> CONDITION( Partner filled )
Selection ‘PL 20’:
Posting Level = 20
Selection ‘Partner filled’:
Partner initial

2002 SAP AG AND SAP AMERICA, INC. 19


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

4.5 BW Aggregates
BW aggregates can be utilized for the validation task in order to speed up the reading process and to
minimize the data volume to be read and processed. The idea behind this is as follows: validation
methods usually don’t contain restrictions on all characteristics of the totals InfoCube. Validation
aggregates over all unused characteristics. If some characteristics are not used in a validation method
at all, this aggregation can be done already on the BW side.

If you press the button ‘Characteristics List’ in the maintenance of a validation method, you will receive
a list of characteristics, which must be contained in the BW aggregate so that it can be used when
reading from BW:

This field list contains


• Execution parameters of a validation task
• Characteristics restricted in selection conditions of the validation method
• Group-by fields of the validation method

4.6 Reusable validation rules


You can make a validation rule reusable by entering a technical name. Mark a validation rule in the
validation hierarchy maintenance and select option ‘Rename’ in the context menu:

Enter a new unique technical name. Now you can use this validation rule also in other validation
methods as follows:
o Create a new validation rule
o Select ‘Rename’ in the context menu
o Enter the technical name of the reusable validation rule (F4-help is available)
Please keep in mind, that when you change a reusable validation rule, it will change also in all other
methods where this reusable validation rule is used (validation rule is a separate customizing object,
validation methods just reference them).
Reusable validation rules can be maintained in a separate workbench view ‘Validation Rule’. In this
view the reusable validation rules are listed per ‘Validation Type’ and ‘Data Stream Type’. You can use
this view to create/modify/delete reusable validation rules (you can delete only validation rules, which
are not used in any validation method).

2002 SAP AG AND SAP AMERICA, INC. 20


HOW TO… SET UP AND USE VALIDATIONS IN SEM-BCS

You can use several useful features regarding reusable validation rules (the same rules apply as for
reusable ‘Single Field Selection Conditions’). Following use cases describe the behavior of the
reusable validation rules:
o The validation rule is still unnamed, does not yet contain any definition and you enter the
name of a reusable validation rule (or chooses it via F4). Then this validation rule is loaded
into the screen and the embedding validation method now references this validation rule.
o The validation rule is still unnamed and you enter a name, which has not yet been chosen for
a reusable validation rule. This makes the currently displayed validation rule reusable under
this name and it also makes the embedding method referencing this validation rule.
o The validation rule is still unnamed, validation rule contains some definition and you enter a
name <name> of an already existing reusable validation rule. Then a dialog popup is sent
which asks whether the current validation rule is to be discarded and replaced by the
validation rule “<name>”. If you choose “yes”, the current validation rule will be deleted, the
validation rule <name> will be loaded and the embedding method will be referencing this
validation rule <name>. If you choose “no”, then the name field will be cleared.
o The validation rule is named and you enter a name of another validation rule. Then the current
validation rule is just replaced by the other validation rule and the embedding method now
references this other validation rule. If the definition of old validation rule has been changed
prior to entering the new name, then this change is saved to the old validation rule.
o The validation rule is named and you enter a name for which there is not yet a validation rule.
Then the current validation rule is copied and the copy gets this new name. The embedding
method now references the new validation rule. If the definition of the validation rule has been
changed prior to entering the new name, then this change will be saved to the old validation
rule.
o The validation rule is named and you delete the name. Then the validation rule is copied and
the new validation rule is not reusable. The embedding method now references the new
validation rule. If the definition of the validation rule has been changed prior to entering the
new name, then this change will be saved to the old validation rule (the reusable one).

2002 SAP AG AND SAP AMERICA, INC. 21

You might also like