cancel
Showing results for 
Search instead for 
Did you mean: 

keyfigure based model and account based model

Former Member
0 Kudos

Can anyone explain briefly(if possible with example) the differences between keyfigure based model and account based model.How can we decide which one is better fit to model the infocube.

Any help will be appreciated.

Many Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Asha,

Refer to SAP Note 407563 for a comparison on the two, with example. It also gives advantages/disadvantages of both from a modelling and technical perspective.

Hope it helps

Former Member
0 Kudos

Anurag,

I do not have access to refer to SAP Note 407563 . if possible could u please post it.

Thanks

Former Member
0 Kudos

Asha,

SAP Note 407563

Symptom

You would like to design a data model for SEM-BPS and you are not sure, whether to use the key figure or the account model.

You are looking for proposals for data modelling.

Additional key words

bps0, key figure, characteristic, model, data modelling, consultation

Cause and prerequisites

In the following you find a simple example by means of which the terms key figure and account model are defined.

In the example we want to assign several key figures (for example revenues) to a characteristic (for example customer), whose units (for example currency DM) are identical.A modeling option, which is called key figure model, contains all key figures in one data record.

Customer Revenue_1 Revenue_2 Revenue_3

A 10 DM 30 DM 50 DM

In the account model, on the other hand, an additional characteristic is added, which separates the revenue types.

Customer Type Revenue

A 1 10 DM

A 2 30 DM

A 3 50 DM

Advantages and disadvantages from the point of view of data modelling

You can easily add an additional revenue type in the account model, because you do not have to change the data structure.In the key figure model, on the other hand, you must add an additional key figure to the structure.It actually depends on the frequency of these changes occurring.

A data record that is to be changed by a processor, is exclusively locked by SEM-BPS for this processor.A lock that only concerns individual key figures of a data record is not possible.As a consequence the different revenue types can be changed simultaneously by different processors in the account model, wheras in the key figure model one processor automatically locks all key figures exclusively for his own use.

If you use a planning function in the account or key figure model, a different Customizing is required in general. Consequently, a conversion of the data model leads to a change of Customizing in general.

Advantages and disadvantages from the technical point of view

The transaction data is stored in the BW.Analyses have shown that the read time basically depends on the number and not on the size of the data records.In the above example you can see that by changing the key figure and account model the number of records increases by factor 3, which means that you must expect longer read times.When determining the factor you must take into account that normally not all key figures are used in every record in the key figure model.As a consequence only those records are created when changing to the account model, for which the key figures are not equal to zero.

Example:

So if in the above example the key figure Revenue_1 is not used, only two records are generated and consequently the value of the factor is also reduced to 2.

After the transaction data has been read from the BW, it is stored in the application server's memory.The amount of memory required depends, among other things, on the number and on the length of the records.The length can be influenced by the data model you choose:in the key figure model the records are longer than in the account model and therefore consume more memory for each record. Therefore, the key figure or account model will require less memory depending on the relationship between record length and number of records.

When the data model is changed, also the planning functions must be revised.Depending on the type of calculation there might be advantages for one of the models.

Example and rules of thumb

The following example contains 30 key figures, which were mapped to 3 key figures and one additional characteristic with a maximum of 10 characteristic values when you changed to the account model.In both models a price calculation between three key figures each was executed.Consider the specifications in the table as relative specifications:For the number of data records you for example find a and a*10.This means that in the second case the number of data records is larger by factor 10 than in the first case.The determination of the relationships is based on 5000 data records in the key figure model.

Example: all key figures are used (100%)

measured size Key figure model Account model

Number data records a a*10

Read time l l*10

Price calculation t t*9

Data record length d*4 d

Memory requirement m m*3

Example: Key figures are partially used (20%)

measured size Key figure model Account model

Number data records a a*2

Read time l l*2

Price calculation t t*2

Data record length d*4 d

Memory requirement m m*0,8

How are the sizes determined?

Read the related notes for details on the use of the statistics.

1. a: In the statistics of SEM-BPS or BW this value is stored when you execute a planning function. The method has the name 0-DB1.

2. l: The above statistical record also contains the execution time.

3. t: In the statistics of SEM-BPS a record is stored for the planning function.The overall runtime of the planning function contains the database time. Therefore the database time must be subtracted from the runtime of the planning function to determine t.

4. d: The data record length corresponds to the data structure length (ABAP length), which is generated for every area.The name is made up as follows:

Prefix: /1SEM/_YS_DATA_

Client: mmm

Name of the area: gggggggg

The client must always be specified with three digits, the area only in its actual length.The name for an area called 'MYAREA' which is in client 001 is for example /1SEM/_YS_DATA_001MYAREA.When you determine the length, note that there is the dictionary and the ABAP length (Transaction SE11 => Extras => Structure width => ABAP length) and that the total of the two structures contained must be determined.In the structure stated above, for example /1SEM/_YS_CHAS_001MYAREA and /1SEM/_YS_KYFS_001MYAREA are contained.The total is the length you are looking for.

5. m: After executing the planning function, start Transaction STAD and find the appropriate statistical record for the dialog step, in which you have executed the planning function.The record contains a memory specification, which is the desired value for s.

Solution

Bear in mind that the values from the example are not generally valid, but were determined from a specific example.We recommend that you determine the parameters (both the values of the variables and of the relationships) for your specific case and to use it as the basis for discussion.You should not choose too few data records, because the fixed memory consumers predominate otherwise.

Source code corrections

-Doodle

Answers (1)

Answers (1)

Former Member
0 Kudos

Asha,

Keyfigure oriented data model has a varialble(column) for each key figure.

This approach keeps number of records small but length of records grows considerably and may generate empty cells

Account(characteristic) based data model has a variable foreach type of keyfigure

(amount,qty etc).This model is expanded with a dimension for the type of keyfigure.

Here the no: of records grow considerably but length of records remain short

Keyfigure based:

Customer, City, Bill Amount, Invoice Amount,

Roger, AU, 100,110

Mike, PR, 200,220

Account based:

Customer, City, KF Type, Amount

Roger, AU, Bill, 100

Roger, AU, invoice, 110

Mike, PR,Bill,200

Mike, PR,invoice,220

Also the decision to which model has to be chosen is more based on data storage

aspects of the data targets rather than on business

Key figure based is better when you have keyfigure columns filled for the most of the cells

Account based is better when you have more empty cells for keyfigures

We use both the above models based on what and how we store the data in data targets

-Doodle