Look up InfoObject's attributes in update rule

Hello Gurus!!!
I have an update rule that looks up for an InfoObject's attributes to update some fields of an InfoCube. Is there another way to do this look up than load all InfoObject attributes into an internal table from the start routine? I tried to read the attribute's table directly from the routine but it takes very very long time.
Thanks for your help!!

Hi:
I think you made good progress with Viren's advice.
Your statement looks fine. Now, I think you should play with some settings.
1) Try reading a sebset without too many AND statements. I cannot tell you which ones are important.
Look at it this way, if you get 1 million by htis complex Select, try to get 1.5 mil by simplifying the statement since you don't have memory problems anymore.
If you are reading my Master Data table, why don't you read by KEY, Active Data and just one more FIELD (you pick the field which will give you least values).
E.g.
SELECT * FROM /bic/pzdocument
   INTO TABLE it_document
   FOR ALL ENTRIES IN DATA_PACKAGE
   WHERE
   /bic/zdocument = DATA_PACKAGE-ac_doc_no AND
   objvers = 'A' AND
   item_num = DATA_PACKAGE-item_num.
Another one is that there is a good chance your DATA_PACKAGE-ac_doc_no  is there Multiple times. Now your Select Statement will read the DB table Multiple Times. So, you can do this:
DATA_PACKAGE_1 like DATA_PACKAGE.
DATA_PACKAGE_1 [] =DATA_PACKAGE [].
DELETE ADJACENT DUPLICATES FROM DATA_PACKAGE_1
             COMPARING ac_doc_no.
Then, write your Code.
SELECT * FROM /bic/pzdocument
   INTO TABLE it_document
   FOR ALL ENTRIES IN DATA_PACKAGE_1
   WHERE
   /bic/zdocument = DATA_PACKAGE_1-ac_doc_no AND
   objvers = 'A' AND
   item_num = DATA_PACKAGE_1-item_num.
Its difficult to tell which one is more efficient. Your best bet is to spend soem time on these Codes and get the Statistics. Also, take an ABAPers help if available.
Good luck,
Forget: Its a good time now to play with your Laod Tansfer Settings (do it at the InfoPackage Level so that you don't change others' load)
Go to InfoPackage, Sechduler from Menu, Data Transfer Settings for Max Size, no. of data packets.
Ram C.
Message was edited by:
        Ram Chamarty

Similar Messages

  • Can routine replace "master data attribute of" update rule for performance?

    Hi all,
    We are working on CRM-BW data modeling, We have to look up agent master data for agent level and position for each transaction data. So now we are using "Master data attribute of" update rule. Can we use routine instead of "Master data Attribute of" ? Will it improve the loading performance? Since we have to load 1 lack transaction records , where as we have 20,000 agent details in agent master data.My understanding is, for each record in data package the system has to go to master data table and bring the agent details & store in cubes. Say one agent created 10 transactions, then this option "master data attribute of" will read the agent master data 10 times even though we are going to pull same details for all 10 transactions from master data. if we use routine, we can pull the agent details& storing in internal table removing all duplicates and in update routine we can read the internal table.
    Will this way improve performance?
    let me know if you need further info?
    Thanks in advance.
    Arun Thangaraj

    Hi,
    your thinking is absolutely right!
    I don't recommend to use the standard attribute derivation since it will perform a SELECT to the database for EACH record.
    Better implement a sorted table in your start routine; fill it with SELECT <fields> FROM <master_data_table> FOR ALL ENTRIES OF datapak WHERE OBJVERS = 'A' etc...
    In your routine perform a READ itab ... BINARY SEARCH.... I believe that you won't be able to go faster...
    hope this helps...
    Olivier.

  • Navigation attributes in Updates Rules.

    Hi,
    I´d like to know if it is possible to use a navigation attribute of one InfoCube in the update rule of other InfoCube. For example, i am trying to consolidate some date using the 0Customer attibute 0City, but when i create a new update rule to my InfoCube the only object avaible is 0Customer, its navigation attribute (0City) is unavaible in the Update rule.
    Thanks.

    Hi Luiz,
    check the "Master Data Attribute of" update method in the help link below and see if it does what you need:
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a64e0e07211d2acb80000e829fbfe/frameset.htm

  • Master data Attribute of ( Update rule)

    Hi SDN,
    I Just want to know the procedure to create update method of Master data Attribute of . coild any one tell me step by step
    Regards
    sujan

    3.     Creation of data targets
    •     In left panel select info provider
    •     Select created info area and right click to select Insert Characteristics as info provider
    •     Select required info object ( Ex : Employee ID)
    •     Under that info object select attributes
    •     Right click on attributes and select create transformation.
    •     In source of transformation , select object type( data  source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    •     Activate created transformation
    •     Create Data transfer process (DTP) by right clicking the master data attributes
    •     In extraction tab specify extraction mode ( full)
    •     In update tab specify error handling ( request green)
    •     Activate DTP and in execute tab click execute button to load data in data targets.
    cheers
    John

  • Update rules activation giving dump

    Hello
    I have inserted three new characteristics in already created cube and tried to activate the update rules but it started giving dump error.
    To get back to original conditions, I have deleted newly inserted infoobjects but while activating update rules it is still giving dump error.
    Can any one help with this issue?
    there is no syntax error.

    Hi abhishek,
    First delete the contents of the cube , and then delete the inserted characteristic. Now, you will be able to delete the new characteristics.
    Regards,
    Krishna.

  • Update rule for ODS problem

    Hi experts,
    I have a ODS which is created on another ODS. The unerlying ODS had one infoobject and later on it was removed. The problem occurs when creating the udpate rules for the top ODS. The deleted infoobject comes in the update rules of the ODS as grey but I think it shouldnt be there .

    Hey, in the Update Rules, you have 2 sections.
    1) Source ODS InfoObjects
    2) Taget ODS InfoObjects
    If you want, remoe the InfoObject from both the ODS.
    Also, activate the Source ODS again and also Activate the Update Rules too.
    Uday-Ram Chamarthy

  • How to look up master data in update rule

    Hi Friends,
    I want to Fill a characteristic of an info cube using the attribute value in a master data in Update rule.
    Eg: I want to fill a field in cube 0PM_C01 that is got from Master data 0PM_ORDER. I have to do this in upate rule. Can anyone help me.
    Joe

    Eugene, Atlaj
    Your answers were very useful.
    Eugene as you said,
    I read the link you mentioned and I can use code
    like this
    DATA: mat LIKE /BI0/PMATERIAL-MATERIAL.
    SELECT SINGLE MATERIAL FROM /BI0/PMATERIAL INTO mat
    WHERE EANUPC = COMM_STRUCTURE-EANUPC AND OBJVERS = 'A'.
    IF SY-SUBRC = 0.
    RESULT = mat.
    RETURNCODE = 0.
    ELSE.
    RETURNCODE = 8.
    ENDIF.
    But for each record of comm structure the selection quer y will touch the Data base. As Atlaj said, can I fill the internal table in the start routine and look it up in the update rules. I think the performance willbe increased. Could you give me code sample or link?
    Thanks in ADV
    Joe

  • Using "Master Data Attribute of" in the Update Rule

    Hi,
    In my update rule of, i want to replace the master data attribute of my characteristic instead of using its source characteristic. For example. <i>InfoObject ZSTORECODE</i> has an attribute <i>ZSTORENAME</i>. My objective is to use the Store Name instead of a Store Code.
    I initially thought of using <i>"Master Data Attribute of"</i> in the update rules. However, I always end of with having an error of <i>"No Values."
    </i>
    Hope you guys can help me with this!
    Thanks,
    Raomon

    DATA: V_NSTC_SN2,
    V_KFC_COSTC LIKE RSGENERAL-CHAVL.
    V_KFC_COSTC = DATA_PACKAGE-KFC_COSTC.
    CALL FUNCTION 'RSAU_READ_MASTER_DATA'
        EXPORTING
          I_IOBJNM                      = 'KFC_COSTC'
          I_CHAVL                       = V_KFC_COSTC
    *   I_T_CHAVL                     =
    *   I_DATE                        =
    *   I_FLG_WHOLE_TABLE             =
          I_ATTRNM                      = 'NSTC_SN2'
      IMPORTING
    *   E_STRUCTURE                   =
    *   E_TABLE                       =
          E_ATTRVAL                     = V_NSTC_SN2
        EXCEPTIONS
          READ_ERROR                    = 1
          NO_SUCH_ATTRIBUTE             = 2
          WRONG_IMPORT_PARAMETERS       = 3
          CHAVL_NOT_FOUND               = 4
          OTHERS                        = 5
    RESULT = V_NSTC_SN2.
    Another Example Code:
    index on infoObject

  • Update rule on master data attribute

    Hi
    In my cube, I have a master data object  0COMP_CODE, which has attribute 0COMPANY.
    Additionally, in the same cube, there's:
    Master data object 0CUST_GROUP, which has attribute ZBUSPART
    Master data object 0CO_AREA, which also has attribute ZBUSPART
    I need to fill a characteristic ZTAXCODE (not a master data object) in the cube, with the following logic:
    If 0COMPANY is between 1 and 30, populate ZTAXCODE with value of ZBUSPART from 0CUST_GROUP
    If 0COMPANY is between 31-9999999, populate ZTAXCODE with value of ZBUS_PART from 0CO_AREA
    I guess this will have to be done in the update rule.  Right now I have 0COMP_CODE in the communication structure. How should the code be written to populate ZTAXCODE, with value of ZBUSPART, based on the value of the attribute of 0COMP_CODE - 0COMPANY?
    Any help with getting me started here would be appreciated...
    Thanks
    Marty

    In the start routine.
    First, for all data package select company code, cust_group and zbuspart from cust_group and store it in the internal table.
    Second for all data package select company code, co_area and zbuspart  from co_area and store it in the second internal table.
    Third for all data package select company and company code from comp_code and store it in the third internal table.
    Now in the update rule routine.
    read the third table and get the company for the company code and if the value which comes from this company is between 31 and 9999999 then read from second internal table otherwise read from the first internal table and update the result.
    hope that is clear.
    thanks.
    Wond

  • Update rule from attribute

    Hi, my problem may be simple to solve, but I dont know too much ABAP so need some help.
    I want to populate Cost Center in my cube by mapping it to Responsible Cost Center (attribute of Order Number).
    How can I do that?
    Thanks,
    Frank

    Hi Frank,
    Insert Cost Center in Communication Structure and then in Start Routine of Update Rules insert this code (substitute definition with the IO code, cut off '0'):
    data: begin of t_costcent occurs 0,
    costcenter like /BI0/Pcostcenter-costcenter,
    responsible like /BI0/Pcostcenter-responsible,
    end of t_costcent.
    select * into corresponding fields of table t_costcent
    from /BI0/Pcostcenter where  objvers = 'A'.
    loop at DATA_PACKAGE.
    read table t_costcent with key
    responsible = DATA_PACKAGE-responsible
    if sy-subrc = 0.
    DATA_PACKAGE-costcenter = t_costcent-costcenter.
    modify DATA_PACKAGE.
    endif.
    endloop.
    Ciao.
    Riccardo.

  • How to use Master Data Attribute of in Update Rule's Formula

    Hi experts.
    In update rule, there is an option to use <b>Master Data Attribute of</b>. However, due to user requirement, I need to use that in <b>Formula</b> instead.
    <b>Field to update:</b>
    Profit Center
    <b>Logic:</b>
    If Cost Center is empty
    Then Profit Center
    Else
    Master Data Attribute of Cost Center
    I use the following formula at the moment but it is not 100% correct.
    <b>IF( Cost Center = '', Profit Center, Cost Center )</b>
    Appreciate if anyone could help me out.
    Thanks!

    Hi,
    The easier thing to do will be to use a Update Routine.
    Logic will be as follows :-
    If Cost center iss initial.
    Result = Profit Center
    else.
    result = Cost center.
    endif.
    Regards
    SM

  • Attribute or routine first in update rule

    Hi
    In my update rules if i populate a characteristics from master data (Ex: 0MATL_GRP from 0MATERIAL) and write a routine to populate other keyfigure based on the attribute. Will it work when i execute the infopackage.
    My requirement is after populating the 0MATL_GRP only, the key figure should be calculated based on the 0MATL_GRP.
    Hope i am clear.
    Regards
    Annie

    Hi
    Thanks for the replies:
    PB: <b>One more way is..just add 0MAT_GRP in the ODS and in the update rules; select the update method as "Master Data Attr. of" - 0MATERIAL (0MAT_GRP is an attribute of 0MATERIAL), so no need to populate in the start routine.</b>
    Now if i add 0MAT_GRP in ods and in the update rules; select the update method as "Master Data Attr. of" - 0MATERIAL (0MAT_GRP is an attribute of 0MATERIAL)
    And in INCENTIVE keyfigure if i write a routine based on 0MAT_GRP and execute the infopackage, will my requirement be met.
    Condition is: After populating the 0MAT_GRP only my kf routine should run.
    So will execute infopackage will 0MAT_GRP is an attribute of 0MATERIAL) run <b>first?</b> or routine in kf
    Regards
    Annie

  • Problem with routine and it's infoobject (update rules)

    In Metadata Repository my comm structure doesn't have an infoobject that is there in Adm. Workbench. That infoobject was included in a routine in update rules for other infoobject that was removed from the cube. In Metadata Repository the routine is still present in update rules, but not in Adm. Workbench. That makes me unable to remove it from the comm structure and of course delete the object.
    How can I remove this routine? How can I make changes in Metadata?
    BD - TRules - URules - Cube
    A(numc) - A(numc) - B[routine converting A(numc to date)] - B

    Jerry,
    I had two objects:
    ZDWIP_AUX is in comm structure and datasources
    ZDWIP_REM is in Cube and Update Rules (the routine mentioned ZDWIP_AUX)
    I deleted ZDWIP_REM from the cube and from catalogue.
    Automatically removed in update rules.
    ZDWIP_AUX is unmovable from comm structure and can't be deleted because it says that is in use by a routine that I can't see.
    By recreating IObject do you mean, recreate all the scenario and remove in a different, like first the clean the recreated routine?!

  • Update rules of  infoobject ( Infopackage flexible)

    Hello, my name is Arkaitz. I have a problem with a update rules of one infoobject. The <b>infopackage is flexible</b>. I use this routine but not charge the new record created.
    $$ begin of routine - insert your code only below this line        -
    DATA: l_s_datapak_line type TRANSFER_STRUCTURE,
           l_s_errorlog TYPE rssm_s_errorlog_int.
      data: i_tabla type table of TRANSFER_STRUCTURE with header line.
      data: i_record type i.
      loop at datapak into l_s_datapak_line.
          move-corresponding l_s_datapak_line to i_tabla.
          append i_tabla.
          clear i_tabla.
        if l_s_datapak_line-fikrs = 'JCYL'.
          move-corresponding l_s_datapak_line to i_tabla.
          i_tabla-fikrs = 'CONS'.
          append i_tabla.
          clear i_tabla.
        endif.
      endloop.
      refresh datapak.
      loop at i_tabla.
        move-corresponding i_tabla to l_s_datapak_line.
        append l_s_datapak_line to datapak.
      endloop.
    abort <> 0 means skip whole data package !!!
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -

    In start routine simple write:
    delete data_package where 0REASON_REJ is not initial.
    This will remove from load all rejected orders.
    Hope it helps.
    Regards

  • Master data attributes declaration in update rules

    Hi Everyone,
    can any one tell me, How do we use attributes of master data in update rules..need syntax for using attributes of customer.... like comm_structure-/bic/......etc
    post code is attribute of customer, How do I use it in update rule
    thanks
    Siri

    Hi!
    if you have customer as attribute in your Infosource and Postcode as acharecteristic in your data target then you just need to select ther 3rd type of update rule "MAster data attribute of" and specifxy 0Cusotomer beside
    with regards
    ashwin

Maybe you are looking for

  • Cannot delete file on win7 after upgrading to Lion

    After upgrading Lion OS X, I can not delete file on Lion partition from win 7. It always says "This file is too large...". Also, My 2 HFS partition will not show on win 7. How to solve it? I did upgrade BootCamp to 3.3

  • Creating a report with YTD values

    Hello experts , I have a requirement wherein I have to modify a few Cash Spend reports in monthly movements format to Year to Date (YTD) format.I am a bit confused with the terms Monthly movements and Year to Date , can anyone who has some knowledge

  • Problems with a combo box in dynpro

    Hi guys, im creating a combo box in a dynpro, but is not showing anything. the code is the following: AT the screen painter.. MODULE USER_COMMAND_0100.    PROCESS ON VALUE-REQUEST.   FIELD TI_COMBO MODULE create_dropdown_box. *then the module in the

  • Help with app store

    I changed my apple id on the computer but on my phone it shows my old apple id and I don't know how to change it.  On the phone it won't let me log on with the old apple id or the new one.  I just got this phone today and its my first iphone.

  • About XPATH ARRAY expressions

    Invoking "capescience.GlobalWeather" I have to compose 2 services in two different port Type of the same partnerLink. First One to retrieve the local CODE of an Airport, second one to use thise code to invoke Weather Report of the Weather Station of