Poplulate key figure thru the start routine

Hi Experts,
I have update rules for my cube. In the start routine there, if i wrote abap code would it automatically fill the value of key figures in the cube. Can we do that with the ABAP code ?
Or do i have to go to each key figure's routine and then refer to the internal table data in the update rules etc.
If someone has done this before, would you pls walk me thru it.
Thank you,
T

Hi Tia Ismail,
I hope it is wrong to update the cube fields directly in the start routine.
i,e
<i>add DATA_PACKAGE-/bic/zslsgm to /bic/ft_mismets-/bic/Zslsgm.
add DATA_PACKAGE-/bic/zsalesamt to /bic/ft_mismets-/bic/Zsalesamt.
add DATA_PACKAGE-/bic/zinvlines to /bic/ft_mismets-/bic/zinvlines.</i>
The above statements are wrong.
Then start routing you will update the values (from blank to some value) for these fields. And also make 1 to 1 mapping Between these KF of info cube to Fields of Communication structure. i,e
Zslsgm(Info cube KF) <---> Zslsgm(Communication structure field)
Zsalesamt(Info cube KF) <---> Zsalesamt(Communication structure field)
zinvlines (Info cube KF) <---> zinvlines(Communication
structure field)
The code you have to use in Start routine is :
tables: /bic/pzproduct,
/bic/ft_mismets.
DATA ITAB like /bic/pZproduct occurs 0 with header line.
select * from /bic/pzproduct into table itab where /bic/zproductlike 'misc%' and /bic/t_miscper is not null.
Loop at DATA_PACKAGE.
Loop at itab where
/bic/zproduct <> DATA_PACKAGE-/bic/zproduct.
DATA_PACKAGE-/bic/zslsgm = 0.
DATA_PACKAGE--/bic/zinvlines = 0.
DATA_PACKAGE-/bic/zsalesamt  = 0.
Modify DATA_PACKAGE.
endloop.
ENDLOOP.
With rgds,
Anil Kumar Sharma .P
Message was edited by: Anil Kumar Sharma

Similar Messages

  • How to write the start routine in the transformations ?

    Hi Experts,
    I am working on BI 7, As I want to write a start routine in transformations of 0FIGL_O02 DSO, to allow the GL accounts with cost center data. Already there is a delete statement please find.
    *DELETE SOURCE_PACKAGE where BAL_FLAG = 'X'. I had made comment to allow the G/L accounts. since I have some GL Accounts which does'nt have the cost center data, so in this case I have to write a ABAP code to allow this G/L accounts with cost center data.
    So Let me know if anyone can help me how to write the ABAP code in the start routine.
    Thanks
    sekhar

    Hi Experts,
    I am working on BI 7, As I want to write a start routine in transformations of 0FIGL_O02 DSO, to allow the GL accounts with cost center data. Already there is a delete statement please find.
    *DELETE SOURCE_PACKAGE where BAL_FLAG = 'X'. I had made comment to allow the G/L accounts. since I have some GL Accounts which does'nt have the cost center data, so in this case I have to write a ABAP code to allow this G/L accounts with cost center data.
    So Let me know if anyone can help me how to write the ABAP code in the start routine.
    Thanks
    sekhar

  • The field "SOURCE_PACKAGE" is unknown IN THE START ROUTINE?

    Hi all,
    i am trying to create a start routine in the DTP FROM THE CUBE TO THE OPEN HUB.
    But when i check the syntax : it throws me an error message stating.
    The field "SOURCE_PACKAGE" is unknown IN THE START ROUTINE?
    how come the source package is unknow in the start routine can anyone pls advise  me on this!!
    DATA: l_tabix TYPE sy-tabix, wa_source_package TYPE tys_sc_1.
    LOOP AT SOURCE_PACKAGE INTO wa_source_package.
    l_tabix = sy-tabix.
    IF wa_source_package-SALES EMP EQ ' '.
    DELETE SOURCE_PACKAGE
    WHERE SALESEMP EQ ' '.
    INDEX l_tabix.
    ENDIF.
    ENDLOOP.

    Hi Pooja,
    I think that the error comes from the delete statement.
    As you already said, the SOURCE_PACKAGE is from BI7.0. That means that the LOOP AT statement cannot be wrong (although I prefer field-symbols)
    I would restate you code like below:
    DATA: l_tabix TYPE sy-tabix,
          wa_source_package TYPE _ty_s_sc_1.
    LOOP AT SOURCE_PACKAGE ASSIGNING <source_fields>.     "<source_fields> is declared as line from source_package
    * l_tabix = sy-tabix.
      IF <source_fields>-SALES_EMP IS INITIAL.
        DELETE <source_fields> FROM SOURCE_PACKAGE.
    * If this line does not work, try to add TABLE after the FROM-statement
    *WHERE SALESEMP EQ ' '.
    *INDEX l_tabix.
      ENDIF.
    ENDLOOP.
    Hopefully this will help.
    Alternatively you can try a single statement, because it is not necessary to do a loop.
    DELETE SOURCE_PACKAGE WHERE sales_emp IS INITIAL.
    Good luck!
    Steven Groot
    Edited by: S. Groot on Aug 11, 2010 7:50 AM

  • BW7.3 SOURCE_PACKAGE and DATA_PACKAGE are incompatible in the Start Routine

    Hi Gurus,
    a face a strange behavior with BW7.3 and the Inventory Cube 0IC_C03:
    the standard scenario works well when I activate the cube and its transformations ..bx, bf and um. Then I have modified the InfoCube 0IC_C03 and added some field like 0customer or 0doc_number etc. I also added the fields to the InfoSource 2LIS_03_BF_TR and everything was as usual.
    Then I wanted to activate the transformation TRCS 2LIS_03_BF_TR -> CUBE 0IC_C03 when I had the error
    "E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter "SOURCE_PACKAGE" is incompatible with the formal parameter "DATA_PACKAGE".
    I already tried to copy and paste the structure of tys_SC_1 to tys_SC_1_full but whenever I activate the transformation my changes are dropped while the error remains. I assume, that the problem is due the compilation process.
    Any hints to solve the problem? Thank you in advance.

    Hi Cemal,
    When we do the modifications at times the field structures inside the start routine are not update so that updation is required to be done manually. Copy the field list of structure (inside the start routine)  tys_SC_1 (this is gryed out i.e. change disabled) and paste the same structure to tys_SC_1_full & tys_TG_1_full.
    Check the routine and save it.
    Hopefully it will solve your problem.
    Regards,
    Dipika

  • Business Process: Final Demand Plan Key Figure in the past for APO DP

    Hello APO process experts,
    I have a BPX question for APO DP process owners, consultants or gurus:
    1.- Have you ever seen in any SAP APO customer, that in their APO DP planning books, they chose or designed to update the Final Demand Plan key Figure in the past closed historical buckets with the Actual Sales?
    Meaning that that in the Past closed historical Buckets, Actual Sales and Final Demand Plan, look exactily the same.
    Meaning that they create a dynamic Final Demand Plan key figure so to speak, yet they did not choose to create a key figure that also keeps the Final Demand Plan as originally entered.
    2.- Would you think that doing the above, without keeping any keyfigure in the planning book that actually shows what the Final Demand Plan was in the Past, is a good practice?
         The Demand Planner could still retreive the Final Demand Plan from BI reports, yet, dynamically they could never really see it in the planning book.
    3.- Do you think the above dynamic key figure would bias the Demand Planner's behaviour to manipulate the future open Final Demand Plan buckets to enter volumes in order sum to a monthly total, independently of what were the over and underachievements in the past (since they are not really visible to him) ?
    I would really like your feedback,
    thanks in advance!
    JD Loera

    Hello Thanks for your feedback.
    I agree with your point, and I hope that i still get more feedback from other Business Process Experts.
    I am trying to build a case for my client, to challenge the decision of their initial design as this practice is going to hurt the Demand Management process, if what they intend to achieve is a true "unconstrained demand plan"
    Much appreciated
    JD Loera

  • Alot has installed itself as my home page. How do I restore Firefox/Google as my home page? I have gone thru the suggested routines but unable to restore firefox/google.

    I recently inadvertently downloaded firefox updates, which have now installed alot as my home page. I am now unable to regain firefox/google as my home page. This I am not happy with. How do I do I get back my firefox/google home page? I have gone thru the suggested routines to no avail! Any bright sparks out there with any suggestions?

    See http://www.alot.com/faq#q9

  • Added new key figure in the report

    Experts,
    I have added new key figure in the report .If i display this key figure value in the report it is populating correct value with ERROR(example 22.5 ERROR).The report is on the multiprovider .i have check the value for this in multiprovider it is populating correctly .There is no calculation in the report for this .While extracting in to report i am getting this. Help me to resolve this issue.
    Thanks
    Murali

    Hi,
    I have already created a formula like NODIM(Key field).that only i am using .
    and mapping I did in this way. I went to multiprovider and I have selected this key figure and right click and select (assign) then I have click on create proposal for all infoobjects option.
    Please suggest any thing need to do.
    I am sorry .I did not understand the lonterm solution suggested by you .what is UOM .Please tell me how to map.can you pls tell me clearly please
    Thanks
    Murali

  • New Formula as a Key Figure in the New Selection

    Hi,
    In the Cell Editor, is it possible to include the New Formula as the Key Figure in the New Selection?
    Please find below the Cell Editor. I have just given the sample of my requirement.
    Column A                                         Column B
    A1) Net Sales ( Cell Reference)             B1)
    A2)                                             B2) Inventories ( Cell Reference)
    A3)                                             B3) Inventory Days ( New Formula)
    A4)                                             B4)
    My Requirement is in the Cell B4 I want to create a New Selection in which the Key Figure should be the Inventory Days ie the cell B3.
    Is it possible to include and if so how.
    Thanks,
    Rajesh Janardanan

    Hi,
    Yes you can change this display by following path in tcode :spro
    Goto >SPRO>SAP Reference IMG>SAP Netweaver>Business Intelligence>Settings for reporting and analysis>General settings for reporting and analysis--> Set alternative currency display(table RSRCURRDISP).
    Flag = A     After value
    Flag = B     Before value
    hope it helps..
    regards,
    Raju

  • (BW) Run the Start Routine Only Once

    I understand that for every data package from ODS to Cube, the start routine is run.  But I need to run it only once.  Is there anyway to achieve this in ABAP?

    I once had that same requirement, but in a datasource in R3. I'm not sure if the same solution would work in BW, though. I used a memory id to keep the variable value between packets:
    DATA: ... n_globalvar TYPE n ...
    then I added...
    IMPORT n_globalvar FROM MEMORY ID 'ZMEMID01'.
    ...at the start of the routine to retrieve to the variable the value from the memory id.
    At the end of the code, I exported the variable back to the same memory id...
    EXPORT n_globalvar to MEMORY ID 'ZMEMID01'.

  • How to identify which key figure will the numeric pointer for deltas?

    Hi All,
    I have created a numeric pointer for generic extraction ? but how to identify which key figure will the numeric pointer will use for deltas ?
    how to identify the key figures which is suitable for numeric pointer. And the generic extraction is based upon the copa table?
    Can anyone suggest me how the numeric pointer works and how to identify deltas are carried out at numeric pointer?
    Thanks
    Pooja

    Pooja,
    If you are using a generic extractor which is based on COPA table, then numeric pointer may not be the suggested delta extraction mechanism. 
    A time stamp would be the better one to use.  In a time stamp, you can give a lower limit value of 300 seconds.. so that it will try to fetch the missed records.
    Moreover, a delta would be based on a character, preferably a time char.
    In your requirement, try to figure out the character on whichdeltas will be based.
    Sasi

  • Diff between the Start routine and Update rules?

    Hi Gurus
    Diff between the Start routine and Update rules?
    Thanks in advance
    Raj

    Hi,
    Routines are like conditions or business rules that could be applied to filter the data while entering the BW system or could be used to apply certain conditions on the info objects itself.Update rule level you manipulate your data and  write your start routine.
    There are 4 types of routines
    1. Start routine- Could be used at two levels (transfer rule level and the Update rule level)
    This Start routine written at the transfer rule level helps filter the necessary data coming from the source system.
    For Example: If you decide to extract data that contain only quantity greater than 500 , then you could specify the Start rouitne to achieve this.
    The Start routine at the Update rule level provides similar functionality but at this point it helps direct specific data to 
    different data targets.  For Example: If there 3 data targets being fed from the Infosource, you may want to apply some condition to each data target, like send year 2000 data ti Data target1, 2001 to data target 2 and so on.  This can be achieved by using Start routine at the Update rule level
    2. Transfer Routine: This feature is available at the transfer rule levels
    While performing the transfer rules operation, there are 4 features available to the developers to create business rules on top pf the Infoobjects.
    1. You could do a one to one mappping of the Infoobject
    2. Provide a constant value
    3. Include a formula
    4. Write an ABAP routine.
    These 4 options refers to the transfer routine
    3. Update Routine:
    The limitations of just having 4 options in the transfer routine is overcome at the update rule level. There are various other 
    sophisticated features avaialable apart from the 4 options mentioned above. These business rules could be specified pertaining to each data target.
    4. Conversion Routine: It provides functionality to do Currency and unit conversion.
    Regards.

  • Query Designer - Key Figures on the Rows

    Hi experts,
    I inserted in a query the key figures into the rows.
    I would like to see on the report the "KEY" of these key figures and not the "TEXT", but I can't find a way to do that.
    Can anyone help me?
    TIA
    c.

    Hi,
    I developed the couple of reports but iam able to see the text in char and can u tell me where is  the option to see key and text for keyfigure.if not is not theere explanin little bit and busines requirement
    would like to see on the report the "KEY" of these key figures and not the "TEXT", but I can't find a way to do that.

  • Not able to debug the start routine

    Dear All,
    I am facing a weired situation.
    I have a transformation(DSO -> Cube) with start routine. I am able to debug the routine in Development System.
    I transported the routine to Production System successfuly, but i am not able to debug the start routine there. I have all the necessary authorisations(SAP_ALL, SAP_NEW)
    I am perplexed. Never seen such issue before.
    Can someone help me here?
    Regards,
    Avinash.
    Edited by: Avinash Kumar on Nov 5, 2008 11:16 AM

    Dear Jerry,
    Thanks for writing.
    I followed the instruction, but it didn't work.
    Can there be any technical reason for data package to be empty, even if the source has data(Note: There is no filter in DTP)?
    Also, i just checked with other start routines...I am not able to debugg there also. System is not entering the debug mode.
    Here, the patch level is: 0010. Can this be the villain?
    Please advise.
    Regards,
    Avinash.
    Edited by: Avinash Kumar on Nov 6, 2008 4:26 AM
    Edited by: Avinash Kumar on Nov 6, 2008 4:51 AM

  • Problems in using a calculated key figure in the Clustering Model

    We have a problem in using a calculated key figure in the clustering model. With the limitation of the standard, in the Field tab, each calculated key figure cannot be selected from the selection screen directly. According to the SAP help, we have to use a dummy infoobject for a calculated key figure.
    Are there any other ways to use a calculated key figure without using a dummy infoojbect?

    Hi,
    Make use of aggragation property of the keyfigure, for summing the values of that KF.
    Regards,
    Rajkandula

  • What is the logic behind the start routine

    Dear One's,
    Kindly take a moment and explain the logic behind this start routine written in update rules of ODS.
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    $$ 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/CST_T07_O006.
    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.
    DATA: ITAB_/BIC/AT07_O00600 TYPE SORTED TABLE OF /BIC/AT07_O00600
          WITH HEADER LINE
          WITH UNIQUE DEFAULT KEY INITIAL SIZE 0,
          DATA_PACKAGE_NEW TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
          WITH HEADER LINE
          WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    sort the datapackage based on lead number and lead program definition
    SORT DATA_PACKAGE BY /BIC/TLDNR /BIC/TLDPRGFTE.
    from the resources ODS read all lead values based on the values those
    SELECT * FROM /BIC/AT07_O00600 INTO TABLE
             ITAB_/BIC/AT07_O00600
             FOR ALL ENTRIES IN DATA_PACKAGE
             WHERE /BIC/TLDNR = DATA_PACKAGE-/BIC/TLDNR.
    FIELD-SYMBOLS: <LS_DATA_PACKAGE> TYPE DATA_PACKAGE_STRUCTURE.
    FIELD-SYMBOLS: <LS_/BIC/AT07_O00600> TYPE /BIC/AT07_O00600.
    loop at internal table of ODS to check if there are lead program defin
    from the source which mean the values of lead program definition in OD
    values of lead program definition in datapackage.
       LOOP AT ITAB_/BIC/AT07_O00600 ASSIGNING <LS_/bic/at07_o00600>.
         READ TABLE DATA_PACKAGE
          TRANSPORTING NO FIELDS
          WITH KEY
          /BIC/TLDNR = <LS_/bic/at07_o00600>-/BIC/TLDNR
          /BIC/TLDPRGFTE = <LS_/bic/at07_o00600>-/BIC/TLDPRGFTE
          BINARY SEARCH.
          IF SY-SUBRC <> 0.
    new lines with zero values are inserted because there are no correspon
    DATA_PACKAGE_NEW-/BIC/TLDNR = <LS_/BIC/AT07_O00600>-/BIC/TLDNR.
    DATA_PACKAGE_NEW-/BIC/TLDPRGFTE = <LS_/BIC/AT07_O00600>-/BIC/TLDPRGFTE.
      DATA_PACKAGE_NEW-/BIC/TLDFTE = 0.
      APPEND DATA_PACKAGE_NEW.
         ENDIF.
      ENDLOOP.
    append the new records which are created for the leads in the datapack
      APPEND LINES OF DATA_PACKAGE_NEW TO DATA_PACKAGE.
    reset the sorting of the datapackage back to its original state
      SORT DATA_PACKAGE.
    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.
    Thanks in advance

    hi,
    it's retrieve data from table /BIC/AT07_O00600
    and add to data package, so your records will be more than from source
    hope this helps.

Maybe you are looking for