Update rules explained

Can someone give me an example for each of the different Update types Addition, maximum, minimum and No update?
Can you give an example of a key figure for each different method? I assume most key figures would use the Addition type because you want to aggregate data for a specific combination of a number of characteristics. Where would we use the other three options?
thanks

Regarding Info cubes, based on the aggregation type u choose for the Key figure ,
the new values are updated in the Info cube.The aggregation type like Addition, Minimum and Maixmum determines how ur key figures are going to be updated if the primary keys are same.If u r not choosing anything, automatically Addition is selected. If u choose No update means the key figures are not updated ,no records are written in the InfoCube with the first data transfer, or that data records that already exist, will remain in place with subsequent transfers.
Regarding Infoobejcts , only the Overwrite option is available , so only new values are going to be updated.
Regarding ODS, we have Overwrite, Minimum, Maximum. Baseed on the aggregation type u choose the key figure values are going to be updated in to the ODS. Overwrite determines the delta capability for example take sales doc no and quantity as 1 and 10 during the first load. in the second if u r loading 1 and 15, then in ODS first load values are going to be overwritten by the second load process.hope this helps.

Similar Messages

  • Start Routine in Update Rule

    I want to replace all '# ' values showing up in a report with  space. For this I plan to write a Start Routine in the Update Rules which should scan all the data coming in into the cube and replace all  null or '' with space.
    What is the best way to write this routine. It should check all data in all the fields of the data load coming in.
    Thanks

    Hi,
         The space is shown as # in the BW Reports, to confirm check the value in the cube for this field, so
          you need to change that to some other character like X or Y or explain your end users that SAP
          designates a space as # and it will be displayed that way in the reports.
    Regards,
    Raj

  • Error while copy of Update Rules from ODS 0SD_O03 to InfoCube 0SD_C13

    Hi all,
    I work on a NW04s SPS9 System I would like to simply copy Update Rules (from an ODS to an InfoCube) from the BCT to the 1:1 Z-Copies of these Objects.
    To do so, I copied the InfoProviders 0SD_O03 and 0SD_C13 to Z-Versions. In SAP BCT the InfoCube is updated from the ODS. The ODS itself is updated from InfoSource.
    After successfully copying the two InfoProviders as next step I tried to copy the Update Rules from the Content version Objects to the Z-Version Objects to link them.
    Similar to copying update rules in 3.5 I tried
    - right click on "ZSD_C13"
    - choose Additional Functions - Create Update Rules"
    - choose DataSource: ODS Object "ZSD_O03"
    - choose Copy from: InfoCube "0SD_C13"
    This result in the error "0SD_C13 is not suitable as a template for copying update rules".
    Some hints that might help:
    1. The very same error occurs if I try to copy the Update Rules from 0SD_O03 to 0SD_C13.
    2. I also tried to copy both Update Rules (to C12 & C13) on a BW 3.5 system where it worked fine: The update rules from both Z-ODSs to both Z-Cubes were copied correctly 1:1 and without any errors.
    3. In the NW04s System I was able to copy the Update Rules from the InfoSource 2LIS_11_VAITM to 0SD_O01 (as well as from 2LIS_11_VAHDR to ODS 0SD_O03). So I only cannot copy Update Rules from ODSs to InfoCubes while it is possible to copy Update Rules from InfoSources to ODSs.
    4. During copy of 0SD_O03 the system warned: "InfoObject 0FISCVARNT needs to be in key for DataStore object ZSD_O03". No matter whether I move this IO to the keys of the Z-ODS, the Update Rules copy does not work.
    - This warning does not show up on BW3.5 when I copy the very same ODS. Can anyone explain this?
    - This warning is not displayed during the copy of ODS 0SD_O01, just for 0SD_O03.
    5. Obviously during a preceding test I actually must have been able to copy the Update Rules for another copy of 0SD_C13 (as I can see the Update Rules in the SAPGUI). I stopped this first test as I was not able to do the Update Rules copy for 0SD_C12.
    Yet as of today I cannot copy Update Rules this for both cubes 0SD_C13 as well as 0SD_C12. So yesterday there was no error on copying the Update Rules to InfoCube ZSD_C13, but today there is. To my knowledge nothing has been changed in the System Setup / Customizing in the mean time.
    6. For both cubes ZSD_C13 as well as ZSD_C12 it is possible to copy Update Rules that map from the BCT ODS to the Z-InfoCbes. So I can copy Update Rules from 0SD_O03 to ZSD_C13 and from 0SD_O01 to ZSD_C12. This would point in the direction that the copied ODSes are the source of this behavior?
    I am not sure whether this is a special NW04s behavior and how to use it correctly so the Update Rules can be copied.
    Please could you help on how to copy these Update Rules in NW04s or share your experience if you had similar?
    Thanks a lot,
    Werner

    Hi Vinod,
    Check the update rules for the original cube. Are they active? It appears that they contain a formula...check this too.
    Hope this helps...

  • Update rule problem - while data load

    Hi friends,
    I got the following error while doing initialisation for 2lis_02_sgr.
    "ABORT was set in the customer routine 9998
    Error 1 in the update "
    In the forum i searched for this error and this error is something related to the start routine in my update rule.
    But i dont know whats wrong with my routine.
    Im giving the start routine below,pls go through this and give me your suggestions..
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    <i>TABLES /bic/AZMM_PUR100 .
    DATA:  T_PUR1 LIKE /bic/AZMM_PUR100 OCCURS 0 WITH HEADER LINE.</i>
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CS2LIS_02_SGR.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    if abort is not equal zero, the update process will be canceled
      CLEAR: T_PUR1[] ,
             T_PUR1,
             ABORT.
      SELECT * INTO TABLE T_PUR1 FROM /bic/AZMM_PUR100.
      IF SY-SUBRC EQ 0.
        SORT T_PUR1 BY DOC_DATE
                       DOC_ITEM
                        DOC_NUM.
      ELSE.
        MONITOR-msgid = sy-msgid.
        MONITOR-msgty = sy-msgty.
        MONITOR-msgno = sy-msgno.
        MONITOR-msgv1 = sy-msgv1.
        MONITOR-msgv2 = sy-msgv2.
        MONITOR-msgv3 = sy-msgv3.
        MONITOR-msgv4 = sy-msgv4.
        append MONITOR.
      if abort is not equal zero, the update process will be canceled
             ABORT = 1.
      ENDIF.
       ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Thanks & Regards
    Ragu

    thanks gimmo and a.h.p,
    i have done the correction as you said,pls verify that.
    And also kindly explain me what is the reason for this start routine,what exactly it does???
    CLEAR: T_PUR1[] ,
             T_PUR1,
             ABORT.
      SELECT * INTO TABLE T_PUR1 FROM /bic/AZMM_PUR100.
      IF SY-SUBRC EQ 0.
        SORT T_PUR1 BY DOC_DATE
                       DOC_ITEM
                        DOC_NUM.
    abort = 0.    (  added  abort = 0 as per your suggestion )
      ELSE.
        MONITOR-msgid = sy-msgid.
        MONITOR-msgty = sy-msgty.
        MONITOR-msgno = sy-msgno.
        MONITOR-msgv1 = sy-msgv1.
        MONITOR-msgv2 = sy-msgv2.
        MONITOR-msgv3 = sy-msgv3.
        MONITOR-msgv4 = sy-msgv4.
        append MONITOR.
      if abort is not equal zero, the update process will be canceled
             ABORT = 1.
    exit. ( added exit as per your suggestion )
      ENDIF.
       ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Thanks & Regards
    ragu

  • Database access in update rules

    Hi all,
          I am planning to write an ABAP routine for a update rule. Now I want to know whether I can find out some data from some tables. These data are a part of my master data.
          Let me explain; I have a field in the communication structure called BookID and two dimensions in the cube called BookID and AuthorName. Now both these dimensions are characteristic infoobjects with some master data already uploaded.
          I have to write a update rule routine, where I'll fetch the AuthorName from the BookID. AuthorName is an attribute of BookID.
          Can you tell me if this is possible? If yes, then which are the database tables I need to look at? Also, some code examples will really help.
          If it's not possible, please suggest some way to do it. Currently I have AuthorName as "Master data attrib. of" BookID. But still it doesn't update the records. New records are being created with only BookID. No AuthorName.
          Please help.
    Thanks,
    Satyajit.

    hi,
    are you going to update AuthorName in master data BookID or AuthorName in the cube ? do the AuthorName set as 'navigational' attribute of BookID ?
    Both are possible for update.
    Master data has 3 tables (beside other table) : text, attribute and hierarhy.
    For master data that's not time-dependent, attribute are stored in /bi0/p[infoobject name] - without 0, e.g infoobject 0customer has /bi0/pcustomer table for attribute. for our own created infoobject it's stored in /biC/p[infoobject name], e.g ZCUSTOMER has /bic/pZcustomer table.
    For update in infocube, if you didn't set it as navigational attribute, you may use Update Method 'Master data attrib. of'.
    sample code :
    data : it_data_package like DATA_PACKAGE occurs 0 with header line,
           begin of it_authorname occurs 0,
              /bic/zbookid like /bic/pzbookid-/bic/zbookid,
           end of it_authorname,
           l_tabix like sy-tabix.
    tables : /bic/pzbookid.
    select /bic/zbookid
    from /bic/pzbookid
    into corresponding fields of table it_authorname
    for all entries in data_package
    where /bic/zbookid = data_package-/bic/zauthorname.
    loop at DATA_PACKAGE.
    endloop.

  • Unit calculation at routine in update rule

    Hello,
    Can anybody explain me how to calculate unit in update rule routine.
    In update rule routine how to access infocube keyfigure like we access communication structure as comm_structure.
    Is there any sample code?
    Please help me out.
    Thanks,
    Regards,
    Steve

    Hi,
    You can find out the no of routines with standard Update rules.
    one of them is :
    <i>for 'Net weight in kilograms' 2LIS_13_VDITM-->0SD_C03</i>
    IF COMM_STRUCTURE-UNIT_OF_WT NE 'KG'.
        WEIGHT = COMM_STRUCTURE-GRS_WGT_DL.
        CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
             EXPORTING
                  INPUT                = COMM_STRUCTURE-GRS_WGT_DL
                  UNIT_IN              = COMM_STRUCTURE-UNIT_OF_WT
                  UNIT_OUT             = 'KG'
             IMPORTING
                  OUTPUT               = WEIGHT
             EXCEPTIONS
                  CONVERSION_NOT_FOUND = 1
                  DIVISION_BY_ZERO     = 2
                  INPUT_INVALID        = 3
                  OUTPUT_INVALID       = 4
                  OVERFLOW             = 5
                  TYPE_INVALID         = 6
                  UNITS_MISSING        = 7
                  UNIT_IN_NOT_FOUND    = 8
                  UNIT_OUT_NOT_FOUND   = 9
                  OTHERS               = 10.
        IF SY-SUBRC NE 0.
          CLEAR MONITOR.
          MONITOR-msgno = '009'.
          MONITOR-msgid = 'SDBW'.
          MONITOR-msgty = c_msgty_e.
          MONITOR-msgv1 = COMM_STRUCTURE-UNIT_OF_WT.
          append MONITOR.
          RETURNCODE = 4.
          WEIGHT = 0.
        ELSE.
          RESULT = WEIGHT.
          RETURNCODE = 0.
        ENDIF.
      ELSE.
        RESULT = COMM_STRUCTURE-GRS_WGT_DL.
        RETURNCODE = 0.
      ENDIF.
    With rgds,
    Anil Kumar Sharma .P

  • 2lis_02_itm records being removed with update rules

    I am using the 2lis_02_itm datasource to populate ODS 0PUR_O01. However, when I extract data into the PSA it removes all but 1 record in the update rules. The PSA contains 2000 records, but the ODS only 1. I have enabled the "STANDARD" setting for scetors in R3 and activated BW and NDI in BF11 as well. I then deleted and filled the purchasing setup tables. Is there someting else I have to do?
    Can someone explain how to determine why the update rules are removing all the records?
    Best regards,
    Kevin

    Kristian,
    Key field are Document number and Itme number. Both fields have variable data in the PSA, so I think I'm okay there. I don't see STORNO or RECORDMODE in the PSA. In the transfer rules, the description for RECORDMODE is "update mode", but I don't see this field header in the PSA.
    Any other suggestions?
    Thanks..

  • Order of update rules execution of multiple key figures

    Can anyone explain the order in which update rules execute if I have 10 key figures and defined one update routine for each key figure?

    Hello GKR
    This is applicable for yupdate rule as well as transfer rule
    start routine executes first ( update rule/transfer routine)
    In update rule the rule which u have defined first, executes first...same in transfer rule..the rule which u define first in transfer rule window executes first...
    Thanks
    Tripple k

  • 0valstckval - not in update rules

    I inserted 0VALSTCKVAL in a communication structure / transfer structure; however, when I link this to an infocube (also containing this InfoObject) then 0VALSTCKVAL is not present in the update rules. Can anyone explain me why not?

    Hi,
    0VALSTCKVAL is a non-cumulative Key figure. The non cumulative is not stored in the provider; it is always calculated as
    NONCUM = INFLOW - OUTFLOW
    The latest know value is always know by the system (the so-called "marker"); which is the overall sum of inflow - outflow (by all combination of chars posted in your cube).
    Bye
    Dinesh

  • Help needed on update rules Coding

    Hi BW Gurus.
    Please help me out.
    I am working on BI 7.0
    This is my scenario.I need to take a project cost report.
    There are some projects in cProjects and some projects in R/3 (Project System).
    Each project in cProjects is linked with one or more projects in R/3.
    They are linked by means of GUID.Now I need to pull out a report from a infocube(Z infocube) which has information both from R/3 and cProjects.I built a Z infocube.
    Here comes my problem.
    I need to write update rule for the requirement explained below.
    For all the projects(in cProjects) I need to find its GUID from the table-DPR_PROJECT . These GUIDs are contained in this table under the field name GUID.
    The same GUID numbers I can find it in another table-DPR_OBJLINK under the field PROJECT_GUID. For this PROJECT_GUID numbers, I need to identify the corresponding EXTERNAL_ID(this field is in the table-DPR_OBJLINK) of the projects(These projects are R/3 projects). These EXTERNAL_ID values has to be pulled out in the report.
    I am using the extractor 0CO_OM_WBS_1.
    Please help me out with the update rule code.
    Please help me out as soon as possible.
    Its really urgent my dear friends
    Thanks in Advance,
    Have a nice day
    Regards,
    Sam Mathew

    Hi Raogovind,
    For which state are you customising this Professional Tax? Professional Tax wage type is /422.
    The system determines the professional tax payable by an employee, based on the following factors:
    Professional tax basis u2013 Comprises those salary components on which a professional tax is applicable. The salary components to be included for calculating the professional tax basis depend on the state. The different components are:
    Basic pay
    Dearness allowance
    Medical reimbursement perquisite
    Housing
    Profits in lieu of salary
    Other remuneration that an employee receives regularly
    Bonus
    It is depending on the combination of the Personnel Area, Personnel sub area and the professional tax grouping of the employee, that the system identifies factors such as the:
    Components of the professional tax basis.
    Method and the frequency of calculating and deducting professional tax.
    Hope this information helps you solve the issue.
    Edited by: chandra.saphr on Aug 6, 2009 7:10 AM

  • Help with an Update rule

    Hello,
    I'm trying to write an update rule to transfer some data from one cube to another. I'll try to explain as much as i can :).
    I have an info object FACID (contains the facility ID for XYZ facilities), which has various attributes including one called ZR profit center (ZRPC). This is in both cubes.
    1. I need to only transfer records from cube 1 to cube 2 where the ZRPC has a value.
    2. I need to convert the FACID record to ZRPC record.
    3. I also need to import a Statistical Key Figure (SKF) for those concerned records.
    Cube one:
    FACID         ZRPC       SKF
    1000            4000         PD1
    1234            4456         PD2
    5678            5688         PD3
    4562                            PD4
    3457                            PD5
    2467            4566         PD6
    Cube two:
    FACID        SKF
    4000          PD1
    4456          PD2
    5688          PD3
    4566          PD6
    I hope that makes sense. I need help in the the ABAP program, since I don't have the requisite knowledge to write a complicated program.
    Sam
    PS: Ok, Ok... Who am I kidding.I don't have the knowledge to write even a simple ABAP program. :):)

    Hi,
    [code]
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line -
    TABLES: ...             " << This u can define in the TOP include
    Global table. referred to in update routines.
    DATA: ...
    $$ end of global - insert your declaration only before this line -
    FORM compute_data_field
    TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
    USING COMM_STRUCTURE LIKE /BIC/CSDB_VW_KHAT_SHIFT_HOURS
    RECORD_NO LIKE SY-TABIX
    RECORD_ALL LIKE SY-TABIX
    SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
    CHANGING RESULT LIKE /BIC/AHCA_O00500-PROFIT_CTR
    RETURNCODE LIKE SY-SUBRC "Do not use!
    ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line -
    fill the internal table "MONITOR", to make monitor entries
    select * from CI_C001 into table i_CI_C001 where zrpc ne space.
    select * from RI_C001 into table i_RI_C001 for all entries in i_CI_C001
    where ZFACID eq i_CI_C001-zrpc.
    loop at i_CI_001.
    read table i_RI_C001 with key ZFACID = i_CI_C001-zrpc.
    if sy-subrc eq 0.
    update RI_C001 set skf = i_CI_C001-skf.
    endif.
    endloop.
    commit work.
    if sy-subrc ne 0                           " <<  Inserted this code
      rollback.                                   " <<           "
    endif                                           " <<           "
    if abort is not equal zero, the update process will be canceled
    ABORT = 0.
    $$ end of routine - insert your code only before this line -
    ENDFORM.
    [/code]
    aRs

  • Code in update rule

    Hi Guru's
    Can anyone explain in detail the meaning of the code blow in update rule.
    <b>tmpwk TYPE /bic/cs8ismactp-calweek,
    botwk TYPE /bic/cs8ismactp-calweek,
          first_rec VALUE 'T',
          var_maxline TYPE i,
          var_country(2) TYPE c,
          ret_code TYPE i,
          out_value TYPE /bic/cs8ismactp-/bic/g_pivpri.</b>
    Thanks in Advance
    Regards
    K Kumar

    Hi Sam,
    the code is below
    <b>result value of the routine
      IF COMM_STRUCTURE-/BIC/G_NOFAC = COMM_STRUCTURE-/BIC/G_RENOF.
        RESULT = 1.
      ELSE.
        RESULT = 0.
      ENDIF.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.</b>
    Regards
    Venkat

  • Help need on Update rules

    Hi BW Gurus.
    Please help me out.
    I am working on BI 7.0
    This is my scenario.I need to take a project cost report.
    There are some projects in cProjects and some projects in R/3 (Project System).
    Each project in cProjects is linked with one or more projects in R/3.
    They are linked by means of GUID.Now I need to pull out a report from a infocube(Z infocube) which has information both from R/3 and cProjects.I built a Z infocube.
    Here comes my problem.
    I need to write update rule for the requirement explained below.
    For all the projects(in cProjects) I need to find its GUID from the table-DPR_PROJECT . These GUIDs are contained in this table under the field name GUID.
    The same GUID numbers I can find it in another table-DPR_OBJLINK under the field PROJECT_GUID. For this PROJECT_GUID  numbers, I need to identify the corresponding EXTERNAL_ID(this field is in the table-DPR_OBJLINK) of the projects(These projects are R/3 projects). These EXTERNAL_ID values has to be pulled out in the report.
    I am using the extractor 0CO_OM_WBS_1.
    I am not sure if I am giving enough information with my question.
    Please help me out with the update rule code.
    Thanks in Advance,
    Have a nice day
    Regards,
    Sam Mathew

    try this one:
    tables  /BI0/MROUTE.
    if COMM_STRUCTURE-route is initial.
    RESULT = 0.
    else.
    SELECT single * from /BI0/MROUTE
    where route = COMM_STRUCTURE-ROUTE and
      OBJVERS = 'A'.
    if sy-subrc = 0.
    RESULT = /BI0/MROUTE-/BIC/ZLEADDAYS.
    endif.
    ENDIF.
    Hope it helps!
    Bye,
    Roberto

  • Copying of Update Rules

    Hi,
    I need to copy the update rules. Let me explain the requirement:
    The standard business content in SD provides the update rules from InfoSource 2LIS_12_VCHDR to InfoCube 0SD_C03.
    We have created an ODS (ZSD_O01) on the InfoSource 2LIS_12_VCHDR, with the one-to-one field mapping in the update rules.
    As a result, the update rules from ODS ZSD_O01 to InfoCube 0SD_C03 are exactly identical to the Business Content Update rules between the InfoSource 2LIS_12_VCHDR and InfoCube 0SD_C03.
    Can I copy (All) the update rules "between the InfoSource 2LIS_12_VCHDR and InfoCube 0SD_C03" and paste them for the update rules "from ODS ZSD_O01 to InfoCube 0SD_C03" ??.
    If you right-click on any individual update rule line (Go to Change Update rules), you see two options: 1. Copy Rule (F6), 2. Copy Update Rules (Ctrl + F12). What is the purpose of these two?
    Regards,
    Milind

    Hi,
    I hope update rules can be copied only if they are based on same Datasource.
    For example if you want to copy update rules for Cube1 to cube2 it can be done only if these two cubes are based on same ODS or Infosouce.
    Also check some of the similar thread..
    Copy update rules from one InfoSource to another one
    Copy Update Rules
    Regards,
    Prema

  • [Update Rules]: How do we use monitoring ?

    Dear All,
    In update rules in the routine particularly, i see there internal table monitoring .. What's that ?? And how can i use it ?
    Could you give me the sample please ??
    Many thanks.
    Niel.

    Hi Niel,
    The following link should explain your question. Monitor is used to pass user defined error messages to the monitor screen.
    http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/frameset.htm
    Let me know if this helps.
    Cheers,
    Praveen.

Maybe you are looking for