Convert key figure model into account model

Hi experts,
I'm trying to extract data from table GLPCP, which is based on the account model, i.e. every month in the table is represented by a column:
PC - ACC - AMTJAN - AMTFEB - AMTMAR etc
123  1000  100      120      110
Whereas in BW the data should look like this (key figure model):
PC - ACC - PER - AMT
123  1000  01    100
123  1000  02    120
123  1000  03    110
What would be the most elegant way to do this?
I think I would have to do the conversion in the Start Routine of the Transfer Rules?
As I'm a hopeless case when it comes to ABAP, any code examples would be highly appreciated!
Thanks in advance.
Gerrit

Hi Martin,
You can use result table functinality in routines of update rules.
Assuming 0COSTELMNT and 0AMOUNT are the target fields
in your cube, value1, value2, value3 represent fields
form flat file/commstructure code for 0AMOUNT could be like this :
RESULT_TABLE-Amount = COMM_STRUCTURE-Value1.
RESULT_TABLE-COSTELMNT = 'training fee'.
append RESULT_TABLE.
RESULT_TABLE-Amount = COMM_STRUCTURE-Value2.
RESULT_TABLE-COSTELMNT = 'salary'.
append RESULT_TABLE.
RESULT_TABLE-Amount = COMM_STRUCTURE-Value3.
RESULT_TABLE-COSTELMNT = 'comp'.
append RESULT_TABLE.
So you generate 3 records for Infoprovider from one out of commstructure.
Regards
Joe

Similar Messages

  • SAP Note 0407563: Key Figure Model versus Account Model in BW

    I am reviewing a document on Key Figure Model versus Account Model in BW.
    There are a number of references to "SAP Note 0407563", can anyone with access to this note post it here for me to review. Sometimes some otf there links prompt for password.
    Thanks in advance.

    Hi,
    <b>SAP Note 0407563</b>
    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.
    Regards-
    Siddhu
    Message was edited by: sidhartha

  • Account Model and Key Figure Model

    Hi,
    please can anyone give me an explanation with example for Account Model and Key Figure Model
    Thank you,
    sam

    Hi Sam,
    Please see here:
    keyfigure based model and account based model
    Hope this helps...

  • What makes this a Key Figure Model (and not Account Model in BW) ?

    I am reviewing a document on Key Figure Model versus Account Model in BW.
    this example is said to be "Key Figure" Model
    Customer     Revenue     Deductions     COGS
    A            100 DM      390 DM         50 DM
    What makes this a Key Figure Model (and not Account Model in BW)

    Hi Amanda,
    Consider the simplified a company income statement:
    Sales
    COGS
    -- Gross profits
    Selling and Administrative expense
    Deperication expense
    -- Operating profit
    Interest expense
    -- Earnings before taxes
    Taxes
    -- Earnings after taxes
    Each of this lines is represented in BW as a key figure (lines with '--' represented as calculated KFs).
    Different persons or companies may use their own details of income statement. For example, someone want to see instead of one line "Selling and Administrative expense" two - separatly selling and administrative expenses, or even break down of these expenses by category. In the KF model every new introducted line should be represented by a new KF.
    In the Account Model every line is represented by one KF only. Let name it as 'Amount'. Another characteristic is telling us what kind of amount it is. Imagine that you have accounting trial balance that lists accounts, starting and ending balances, and debit and credit turnovers for each account.
    An accountant will tell you that a credit turnover in account #XXXX represent the company revenue (sales), a debit turnover in account #YYYY - cost of goods sold etc.
    Simplified inflow of transactional data will consist of:
    Account Amount
    XXXX    -12345
    YYYY    8765
    etc.
    In this model (assuming that you load data for all accounts) you can easily change the scheme of calculations and their presentations (groupping, regroupping etc.) in reports without creating new KFs.
    In your example you provide a KF model because every distinct type of amounts is represented by its own KF.
    Best regards,
    Eugene
    Message was edited by: Eugene Khusainov
    Message was edited by: Eugene Khusainov

  • Transaction file to convert ket figure model toaccount model

    I am trying to create a transaction file to convert ket figure model to account model, here it is:
    *MAPPING
    C_CATEGORY = 0VERSION
    ENTITY = 0COMP_CODE
    RPTCURRENCY = 0CURTYPE
    TIME = 0FISCPER
    AMOUNT = 0BALANCE
    C_DATASRC = *NEWCOL(INPUT)
    FLOW = *NEWCOL(F_NONE)
    PROFITCENTER = 0PROFIT_CTR
    INTCO = *NEWCOL(I_NONE)
    CCTR = 0COSTCENTER
    C_ACCT = *MKEY(0key10 | *NEWCOL(cost) | | 0key20 | *NEWCOL(variance))
    where 0key10, 0key20 are the two key figure in my BI cube  and cost, variance are the two base members in account dimension.
    whey I tried to validate the t file, I receive the error message" Unknown mapping formula *MKEY"
    Anybody know how to fix this?
    Edited by: Jianbai on Mar 8, 2011 6:59 PM

    I delete the AMOUNT = 0BALANCE  and validate it again,, this time I receiv the following message:
    "=MKEY(COL(43 )|NEWCOL(cost)||COL(50 )|NEWC is not a valid command or column =MKEY(COL(43 )|NEWCOL(cost)||COL(50 )|NEWC does not exist in source"

  • Converted key figures not populating

    Hi Experts,
    The query run shows up the converted key figures but the APD is not populating the same, i tried moving the key figures that are not populating in the query around, and it seemed to work in quality, why it is not populating in APD in the production system?

    Hi,
    The infobject has been defined with datatype "DATE" only. It has also been mapped from datasource to infocube correctly as these key figures are populating correctly for some of the sales documents in the report. It is not like that for all the sales documents the key figures are not converting properly.
    Some Sales documents are not converting into the date fields but for some conversion happens properly in the BEx report. This is the issue.
    Please guide accordingly.
    Many thanks,
    Anamika

  • Converting key figures from rows to column using DSO and start routine

    Hi SDNer:
    I need some help to convert key figures from rows to column.
    The source is DSO 1 and I am thinking about writing ABAP in the start routine to do the conversion. The target is DSO2.
    Below is the  more detail information with example. Basically, for each record in DSO 1 I need to create 3 records (because there are 3 KF's) and output to DSO2.
    I would really appreciate some help on this.Thank you.
    Tony
    DSO 1 data format (SOURCE)
    Period   ID   KF1  KF2  KF3
    200702 100  300  200   750
    Output to DSO 2 (TARGET)
    Period   ID    KF  LABEL
    200702 100  300  KF1
    200702 100  200  KF2
    200702 100  750  KF3

    This is the code in BI 7.0.
    u need to put a field "Label" in DSO1. u dont need to populate this in DSO1 but it helps the code to populate the field in DSO2.
    DATA: wa_result TYPE _ty_s_sc_1,
    t_result TYPE STANDARD TABLE OF _ty_s_sc_1.
    DATA:counter(2) TYPE n.
    LOOP AT SOURCE_PACKAGE INTO wa_result.
    counter =0.
    while counter < 3 .
    wa_result- Period = wa_result-Period.
    wa_result- ID = wa_result-ID.
    if counter  = 0.
    wa_result- KF1 = wa_result-KF1.
    wa_result- Label = 'KF1'.
    elseif counter = 1.
    wa_result- KF1 = wa_result-KF2.
    wa_result- Label = 'KF2'.
    else.
    wa_result- KF1 = wa_result-KF3.
    wa_result- Label = 'KF3'.
    endif.
    APPEND wa_result TO t_result.
    counter = counter+1.
    endwhile.
    endloop.
    CLEAR: SOURCE_PACKAGE,wa_result.
    LOOP AT t_result INTO wa_result.
    APPEND wa_result TO SOURCE_PACKAGE.
    ENDLOOP.

  • How to transfer from key figure model into account model?

    Hello,buddies:
       If I have a datasource wich upload from FLAT FILE contains only key figures and I know every key figure's meaning,then I want to transfer it into account model.
       For example,I have data like this
      training fee salary   compensation
        20000          5000         5678
       then I want to transfer this to:
      training fee 20000
      salary       5000
      comp         5678
      because the source contains no cost element,and the target contain elements.
       How can I do this?

    Hi Martin,
    You can use result table functinality in routines of update rules.
    Assuming 0COSTELMNT and 0AMOUNT are the target fields
    in your cube, value1, value2, value3 represent fields
    form flat file/commstructure code for 0AMOUNT could be like this :
    RESULT_TABLE-Amount = COMM_STRUCTURE-Value1.
    RESULT_TABLE-COSTELMNT = 'training fee'.
    append RESULT_TABLE.
    RESULT_TABLE-Amount = COMM_STRUCTURE-Value2.
    RESULT_TABLE-COSTELMNT = 'salary'.
    append RESULT_TABLE.
    RESULT_TABLE-Amount = COMM_STRUCTURE-Value3.
    RESULT_TABLE-COSTELMNT = 'comp'.
    append RESULT_TABLE.
    So you generate 3 records for Infoprovider from one out of commstructure.
    Regards
    Joe

  • Updating textfield with DEL key not taking into account

    I have a decimal field which accepts only numerals...
    after modifying the value in the field and pressing an OK button...the new value is reflected in a table...
    but if i modify the same field value using the "delete" key and press OK...the new value is not taken into account....
    but the same works with "backspace" key...
    So do i need to set anything to respond to del key...
    Thanks

    Also i am not able to put the code here as it is a huge applicationI did not ask for your entire application. I asked for
    demo code means code that we can compile and execute, but it only contains the code relevant to your problem
    Here is an example:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DemoCode extends JFrame
         JTextField textField;
         public DemoCode()
              textField = new JTextField();
              getContentPane().add(textField, BorderLayout.NORTH);
              JButton button = new JButton("Update Database");
              button.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        System.out.println(textField.getText());
                        textField.setText("");
                        textField.requestFocusInWindow();
              getContentPane().add(button, BorderLayout.SOUTH);
         public static void main(String[] args)
              JFrame frame = new DemoCode();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    }If you can't create a simple demo then you don't understand your problem and if you don't understand your problem then how are we supposed to?
    custom field So you probably have a coding problem and we have no idea what your code looks like
    that accepts only decimal values and why are you not using JFormattedTextField?
    And this problem is not seen if i modify the custom field using any other key say like "Backspace".Again this problem doesn't make sense since the character should be removed from the text field before the OK button is pressed.

  • New Restringed key figure

    Hi experts!
    We would like to ask if it is possible to create a new calculated key figure within an BEX report in this way.
    If the key figure is between a range of two key figures calculated, we would like to make it have a value in letters.
    For example, we have the KF 1 with value and the KF 2.
         We would like to have two new key figures having into account KF1.
              If the difference of Key figure is +/- 1, we would like to see a value (ideally in text)
              If the difference of that key figure is supeior to 1, we would like to see other value (ideally in text)
         The the idea is: ¡
              KF3 =>If the value of KF1 is between +2 / -2 over KF2 ==> Value "OK"
                        KF 1 = 10
                        KF 2 = 10,5
                        Range (-1,+1)
                        As result => KF3 with value " OK"
              KF4 => If the value of KF1 is superior +2 / -2 over KF2 ==> Value " NO OK"
                   For example:
                        KF 1 = 10
                        KF 2 = 14
                        Range (-1,+1)
                        As result => KF4 with value "NO OK"
    In case that text is not possible, do you see any other alternative?
    Thank you very much in advance for your help!!

    Hi DieGasse,
    create two restricted KF with the above logic which you have mentioned.
    and then follow the below procedure
    1) click on the exception button in the tool bar
    2) you will get separate tab 'exceptions' .
    Rclick on the area, and click 'create exception'.
    3)Rclick edit --> New
    4)select Good(green)/average(yellow)/bad(red) and the values.
    5)in the definition tab of your exceptions, select your keyfigures
    6)save and activate the same
    let me know if you need more help in this.
    BR
    adlin

  • About value type and key figure type

    Hello Gurus,
              please explan the different usage of about value type and key figure type.  what is the typical values for both infoobjects ?
    Many thanks,
    Frank

    Hi,
    0METYPE is a key figure-specific info object usually used to define semantics of the individual business key figures in BW (for example, actual, commitment, plan, target values).
    Its a bi specific field which is filled from extract structure field named MEASTYPE table COSR
    Refer to OSS Note 523742 for how it is filled and the following link for additiona information.
    http://help.sap.com/saphelp_nw70/helpdata/en/91/ddd52b9ef30645a338e28aae443807/frameset.htm
    Note 523742 - BCT-CO: BW key figure model and R/3 tables for trans. data
    This note provides information on the key figure model in the area of BW Content CO-OM. It also gives an overview of the DataSources for transaction data and the corresponding source tables and value fields in the R/3 System.
    The key figure model for currency fields in the area of CO-OM contents affects the following info object of type key figure:
    0AMOUNT Amount
    The key figure itself does have any business semantics.
    The semantics of the individual business key figures in BW (for example, actual, commitment, plan, target values) is determined using combinations of values for the following key figure-specific info objects (see also the account model in SEM-BPS, note 407563):
    0METYPE Key figure type
    0VTYPE Value type for reporting
    --> 0VTDETL Details of the value type
    --> 0VTSTAT Statistics indicator for the value type.
    For example, using transaction SE16, the possible characteristics of the values of this InfoObject can be taken from the above-mentioned master data tables in R/3.
    The business key figures on the InfoCubes of the standard BW content were defined as restricted key figures using this semantics of the key-figure-specific characteristics.
    The conversion of the R/3 transaction data in the BW key figure model is carried out in the extractors using the ROMI_GET_VTYPE_AND_DETAIL function module. It primarily happens using the specified conversion tables.
    The following dependencies exist for the source tables of the DataSources:
    COSP_VTYPE for COSS, COSP, COVP,
    COSB_VTYPE for COSB,
    BPXX_VTYPE for BPGE, BPJA, BPEE
    If an R/3 source record cannot be converted using these tables, it may not be extracted to BW.The application log of the R/3 DataSource transaction RSA3 contains entries for the unconverted values after the test run.(The log function for the CO-OM DataSources was considerably improved by the correction for note 523655).
    The application log for the extraction runs from BW can be evaluated using transaction SLG1 (Object: RSAP, object information: RSAP_INFO)
    Furthermore, the semantics of a key figure are still determined by the time characteristics and the following key-figure-specific info objects:
    0CURTYPE Currency type (for more information, see note 517909),
    0DB_CR_IND Debit/credit indicator (for more information, see note 065075),
    0VERSION CO version
    -Vikram

  • BW Architecture - SURVEY - key figures data model vs account data model

    Hi SAP Gurus,
    Between the keys figures data model, and the account data model which one do you implement/prefer and for which reason ?
    Thanks,
    Greg
    Edited by: Greg C. on Jun 4, 2009 5:56 PM

    I once found the note 407563 on this subject. It gives the advantages and disadvantages from the point of view of data modelling and from the technical point of view.
    It's a BPS note, but manly valid in a BW context.
    Regards,
    Fred

  • Model multiple key figures of BI cube to BPC

    Hi Experts,Probably a good way of having multiple Key figure values from BI to BPC is to convert it into a account based model (create a dimension and have the key figures as dimension members).I have this scenraio where we are using COPA (costing based) for BPC mgmt consol.This costing based COPA cube in BI has around 120 Key figures.Pls advice on the best way to medel this scnerio in BPC where i would probably need most of those Kf's.I am also looking at how i could reduce separate transformation files/mappings from BI to BPC also on the same..
    Many thanks
    savvvy

    Hi ,
    Thank you Pravin and Ajay for your valuable suggestions and time.what i would like to clarify is on the transformations.Let us say i have my BI cube as costing based itself and this i need to map to BPC dimension.
    BI structure- char1 ,char 2,char 3 ,KF1(value field 1),KF2(value field 2),KF3(valuefield3),KF4....
    In BPC ,lets say we have  a separate dimension (i guess this should be of account type or probably user defined one)  which would have dimension members as KF1,KF2,KF3,KF4....
    Now how would i do the mapping/transformations from BI to BPC? would i need to have 4different transformation files (assuming i have 4 KF's in my BI cube) for each KF & char combination and thus to load data also many times.
    How to achieve modelling side of this situation.any suggestions on this would be greatly appreciated.
    many thanks
    savvvy

  • Modelling a non-cumulative key figure.

    Hi All,
       I have a requirement like given below. I feel a non-cumulative key fig serves my purpose. But i m not geting exactly how to model it.Pls give u r suggestions onnhow to do it?
       i got chars C1,T1 and key figures K1,K2.
    C1 IS A CUSTOM CHAR.
    T1 IS A 0CALDAY TIME CHAR.
    K1 IS A CUMULATIVE KEYFIG( NORMAL KEYFIG).
    K2 IS ALSO NORMAL KEYFIG. ITS VALUE IS CONSTATNT FOR ENTIRE MONTH.
    e.g Data.
    C1   T1   K1   K2 ( constant value for jan).  K3
    X1   Y1   10    100                                  100-10=90.
    X2   Y1   30    100                                   90-30=60.
    X3   Y2   20    100                                   60-20 = 40.
    C1   T1   K1   K2 ( constant value for FEB).  K3
    X1   Y1   10    200                                  200-10=190.
    X2   Y1   30    200                                  190-30=160.
    X3   Y2   20    200                                  160-20 =140.
    According to above logic i need to derive K3.
    My plan is that make k3 as non-cumulative w.r.t K2.
    my doubts r
    1)  How to laod that initial value ( 100,200).
    2)  As Initial value changes for each month, how to model this? i.e for january it is 100. so for january my initial value is 100. then for February it is 200. so for feb my initial value is 200. How to model these?
    3) Is this approach is correct or is there any other way to do this?
    Points will be assigned to useful answers.
    Thanks in advance.
    Regards,
    Ramana.

    Hi Gurus,
       I m waiting Egerly for u r replies.
    Regards,
    Ramana.

  • How to model a non key figure numeric field

    I am new to SAP BI, so please acceopt my apologies if I am asking a very basic question.
    I have some numeric fields which are attributes of master data. These fields are not key figures and will not be aggregated. How can I model this in BI? I have to keep them as numeric fields because they may be used in some calculations at reporting.
    Thanks!

    You can display them as display attribute along with your main infoobject in query.
    or
    Model it using replacement formula variable by using attribute value as in this [Help|http://help.sap.com/saphelp_nw04s/helpdata/en/03/6ba03cc24efd1de10000000a114084/content.htm] doc.
    Hope this helps.

Maybe you are looking for