Sie sind auf Seite 1von 18

BFC How To Guide

Data in BFC (DB)

BFC HTG : DATA IN BFC (V1.0)

TABLE OF CONTENT
PURPOSE ......................................................................................................................................................... 3

DATA LEVELS IN BFC ..................................................................................................................................... 4


PACKAGE DATA .............................................................................................................................................. 5
PRE-CONSOLIDATED DATA .......................................................................................................................... 7

CONSOLIDATED DATA ................................................................................................................................... 8


DATA IN TABLES ........................................................................................................................................... 10

DIMENSIONAL ANALYSIS ............................................................................................................................ 13

BFC HTG : DATA IN BFC (V1.0)

PURPOSE
This document describes how data is stored in the BFC database.

BFC HTG : DATA IN BFC (V1.0)

DATA LEVELS IN BFC


There are 3 main data levels in BFC
Package data
Pre-consolidated data (an integrated package that will be included in a consolidation)
Consolidated data
At DB level, these correspond to
ct_pkXXXX (package data)
ct_pcXXXX (pre-consolidated data)
ct_coXXXX (consolidated data)
The XXXX is a 4-digit number, which can be obtained from the following tables
ct_pkref (package data)
ct_pcref (pre-consolidated data)
ct_coref (consolidated data)

BFC HTG : DATA IN BFC (V1.0)

PACKAGE DATA
A package is always linked to a category and data entry period
For example, the packages below belong to {A 2009.12}

At DB level, BFC does not use the 2009.12, but this converted.
You can use:
C:\Program Files\SAP BusinessObjects\Financial Consolidation\period.exe to convert

So, 2009.12 is converted to 28672000


Note: you can also use SQL
DECLARE @period char(7)
SELECT @period = '2008.01'
SELECT (convert(int,LEFT(@period,CHARINDEX('.',@period)-1))1900)*262144+convert(int,RIGHT(@period,LEN(@period)-CHARINDEX('.',@period)))* 8192
The table ct_pkref has the following fields

Thephase is the category code. Use select * from ct_phase to see all categories
So, if you want to determine what table holds the package data for {A 2009.12}

BFC HTG : DATA IN BFC (V1.0)

select * from ct_pkref where updper=28672000


and phase in (select id from ct_phase where name='A')

This should (always!) only result in 1 unique record


The ID column provides the XXXX we are looking for. With an ID=2, the table that holds the package data is
ct_pk0002
Note: the XXXX is always 4 digits, so if ID=2, XXXX=0002; ID=45, XXXX=0045 etc.

BFC HTG : DATA IN BFC (V1.0)

PRE-CONSOLIDATED DATA
The table ct_pcref has the same fields as ct_pkref, so use the same queries as package data (replace
ct_pkref with ct_pcref)
Note 1: ct_pcXXXX is created at the moment that the first package is integrated

Note 2: Do not make the following assumption. If package data is in ct_pk0020, the corresponding preconsolidated data is in ct_pc0020 !!
This may be the case in our test DBs (as we often only use 1 category, but this is rarely the case in a client
DB)

BFC HTG : DATA IN BFC (V1.0)

CONSOLIDATED DATA
A consolidation is defined by 5 dimensions

This is also reflected in ct_coref

The following SQL can be used:


SELECT *
FROM ct_coref
WHERE phase = (select id from ct_phase where name='A')
AND scope = (select id from ct_scope_code where name='GROUP-A-T-')
AND variant = (select id from ct_variant where name='1')
AND curncy = (select id from ct_curncy where name='USD')
AND updper=28672000

Again, only 1 record can be returned. The consolidated data for this particular consolidation will be in
ct_co0002

BFC HTG : DATA IN BFC (V1.0)

You can also use the following SQL


/* Package */
select p.id, a.name as 'category',
ltrim(str(1900+(p.updper&536608768)/262144)) + '.' +
right('00'+ltrim(str((p.updper&253952)/8192)),2) as 'period'
from ct_pkref p, ct_phase a
where a.id=p.phase
/* Pre-consolidated */
select p.id, a.name as 'category',
ltrim(str(1900+(p.updper&536608768)/262144)) + '.' +
right('00'+ltrim(str((p.updper&253952)/8192)),2) as 'period'
from ct_pcref p, ct_phase a
where a.id=p.phase
/* Consolidated */
select p.id, a.name as 'category',
ltrim(str(1900+(p.updper&536608768)/262144)) + '.' +
right('00'+ltrim(str((p.updper&253952)/8192)),2) as 'period',
b.name as 'scope',
c.name as 'variant',
d.name as 'currency'
from ct_coref p, ct_phase a, ct_scope_code b, ct_variant c, ct_curncy d
where a.id=p.phase and
p.scope = b.id and
p.variant=c.id and
p.curncy = d.id
This will show the data in the tables, with the dimension name
For example:

BFC HTG : DATA IN BFC (V1.0)

DATA IN TABLES
The following are the dimensions of BFC (the orange ones are system dimensions and are always present)

At package and pre-consolidated level, the following dimensions are mandatory:


CA, DP, PE, RU, AC, FL, AU, CU (GO + TO, set by system)
For consolidated:
CA, DP, PE, RU, AC, FL, AU, CU, SC, VA, CC (GO + TO, set by system)
This means, you should never have a record where one of these dimensions is not present (value 0 or
NULL)

10

BFC HTG : DATA IN BFC (V1.0)

If you have the input schedule below:


With Information on data, you can see the individual values for each dimension

To see this row of data in the DB


Using the already described procedure, we determine that the data is in ct_pk0002
As CA and DP were used to come to this, these 2 columns are NOT in this table .
The other dimensions can be determined as follows:
RU from ct_entity.
Note: on the UI, packages are represented as separate for each unit, but data is stored in the same
table for all RUs
PE. Period is determined with the same algorithm as DP.
Note: in a single period category, DP=PE
FL from ct_flow
AU from ct_nature
CU from ct_curncy
AC from ct_account
select * from ct_pk0002
where entity in (select id from ct_entity where name='GBFF002-T-')
and accnt in (select id from ct_account where name='A1210')
and flow in (select id from ct_flow where name = 'F99')
and nature in (select id from ct_nature where name='0PCK01')
and curncy in (select id from ct_curncy where name='GBP')
and period=28672000

11

BFC HTG : DATA IN BFC (V1.0)

The same can be used for pre-consolidated and consolidated data


Note: with ct_coXXXX the dimensions SC, VA and CC are already used in ct_coref, so these are not used in
ct_coXXXX tables

12

BFC HTG : DATA IN BFC (V1.0)

DIMENSIONAL ANALYSIS
You might need to analyze an amount by breaking it down e.g. when reconciling accounts or breaking down
sales by product. To do so, you must associate analysis dimensions with indicators.
You can define DA on 2 standard dimensions (Partner and Share) and all custom dimensions.
For example, create a DA on partner, and ACCOUNT1 (on all flows) is broken down by this.

The DA has a mode, which determines what happens with the non-analyzed amount
In this case, we select post breakdown to higher level

13

BFC HTG : DATA IN BFC (V1.0)

This means that the system has created a (automatic) formula, and that for ACCOUNT1 the amount will be
the sum of the Partners.

What does this mean for data?


The input of data now needs to be done at partner level

As you can see, the total (600) is automatically calculated (and user cannot input this amount)

14

BFC HTG : DATA IN BFC (V1.0)

At DB level, this is what is present

The column partner is now used. However, there is still a record for the total amount (the non-analyzed
sum).
Note: this is not an OLAP database, so the system does not calculate this roll-up at execution time of a
report. The total row is stored in the DB

15

BFC HTG : DATA IN BFC (V1.0)

This can lead to some unexpected results


Using this report definition:

The result would be:

16

BFC HTG : DATA IN BFC (V1.0)

The last amount (1200) can be confusing, but this is caused by the total row that is in the DB
The SQL used would be:
select amount from ct_pk0004 where accnt=1488 and partner=0
select sum(amount) from ct_pk0004 where accnt=1488 and partner<>0
select sum(amount) from ct_pk0004 where accnt=1488 and partner=0
select sum(amount) from ct_pk0004 where accnt=1488 and (partner<>0 or partner=0)
This last statement will select all 4 rows, leading to the 1200

17

www.sap.com

2016 SAP AG. All rights reserved.


SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP
BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP
products and services mentioned herein as well as their respective
logos are trademarks or registered trademarks of SAP AG in Germany
and other countries.
Business Objects and the Business Objects logo, BusinessObjects,
Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and
other Business Objects products and services mentioned herein as
well as their respective logos are trademarks or registered trademarks
of Business Objects Software Ltd. Business Objects is an SAP
company.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL
Anywhere, and other Sybase products and services mentioned herein
as well as their respective logos are trademarks or registered
trademarks of Sybase Inc. Sybase is an SAP company.
Crossgate, m@gic EDDY, B2B 360, and B2B 360 Services are
registered trademarks of Crossgate AG in Germany and other
countries. Crossgate is an SAP company.
All other product and service names mentioned are the trademarks of
their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials
are provided by SAP AG and its affiliated companies ("SAP Group")
for informational purposes only, without representation or warranty of
any kind, and SAP Group shall not be liable for errors or omissions
with respect to the materials. The only warranties for SAP Group
products and services are those that are set forth in the express
warranty statements accompanying such products and services, if
any. Nothing herein should be construed as constituting an additional
warranty.

Das könnte Ihnen auch gefallen