Calculate Total for All Values in a Hierarchy Selection

In Fox, I want to calculate the total for multiple cost elements that are selected in a package with a hierarchy restriction. The total of the hierarchy will then be saved into another cost element.
Does anyone have a Fox logic that they would suggest?
Thanks very much!

Found a solution that works....
Basically I want to call all the hierarchy values in as reference data, and restict the package to only the account that I am creating.
Calculation for Total Sales ( Account 0000100000 )
HF000001 is the hierachy variable that contains all account to be totaled.
DATA ACT TYPE  0ACCOUNT.
DATA SUM TYPE F.
DATA COUNT TYPE I.
DATA INDEX TYPE I.
COUNT = VARC('HF000001').
  INDEX = 0.
  DO.
  INDEX = INDEX + 1.
     ACT = VARI('HF000001',INDEX).
      SUM = SUM + .
  IF INDEX = COUNT.
EXIT.
ENDIF.
ENDDO.
= SUM.

Similar Messages

  • Where to look for all value mappings being used in ID

    Hi All,
              Where to look for all value mappings being used in ID?
    XIer

    Hi,
    Let me re-frame it, Do u want to know where all the value mappings(created in ID) is used in Mapping Program of IR, isn't it?
    If yes, then it's not possible( as far as  I know).
    raj.

  • Need to run the report for All Values when Null is passed in parameter

    Hi All,
    In my BIP report, I am using a parameter :asset with Type as Text, which means user will type the values for the parameter in the text box.
    Now, this parameter can take multiple comma separated values. I have a requirement to run the report for All Values when user doesn't enter any value in the parameter text box and if user enters any value(s) then the report will run for those values . The way, I tried to handle that in the query using couple of ways was :
    IMP : My Database is SQL Server
    where
    (table.asset = isnull((:asset), table.asset) or table.asset in (:asset))
    Now this works fine when I give a single asset number but when I give multiple values separated by comma like 123, 345 in the text box, then the statement fails saying 'encountered ,'
    I also tried simply
    table.asset in isnull((:asset),table.asset) -- but this doesn't work as it doesn't allow me to use in operater while using isnull and if i will use = operater then it won't work in case of multiple values
    Any suggestions on how can I handle this? Any help would be highly appreciated.
    Thanks,
    Ronny

    thanks for replying, but i tried this option too, it did not work for me, neither isnull nor coalesce. I mean, the solution work for single value but when i pass multiple values then separated by a comma then it doesn't work and shows me an error like "Incorrect Syntax ','". I am using SQL server as DB and bip is 10.1.3.4.1
    also please share the SR number, so i can also check the same.
    can there be any other work around to this?
    thanks,
    ronny

  • Running-report-for-all-values

    Hi ,
    Based on this link i have implemented this logic....
    http://bischool.wordpress.com/2009/08/26/avoid-running-report-for-all-values-on-dashboard-when-using-multi-select-prompt/
    But for the intermediate report its taking more time to run...nearly 4min...is there any way to reduce it.
    Thanks

    hi User,
    Quick question
    Why you are giving (-1) value's as per the doc we can give any value which has to give no results? Have u tried to give some other value ?
    Next,Do u have left outer joins between those tables? If yes you should face the same problem with the main report because the filters to be same as intermediate report am i right ?
    First tune-up the rpd and get the main report query ,run-it over DB
    Due to huge data and the join taking more time....is there way any thing to add to reduce the time??Huge data ?? Intermediate report will not get any results i think it will not take more time to give a message,but due to join conditions only it is taking long time to run
    Note :Before getting value from DB it will check the where condition( joins)
    Thanks,
    Saichand Varanasi

  • OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS

    Dear all,
    10.2.0.4 on solaris..
    below is the trace file content.. Do I have to increase the SGA size considering this ?
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      0      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        0      0.00       0.00          0          0          0           0
    Misses in library cache during parse: 0
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       93      0.01       0.01          0          0         10           0
    Execute   1337      0.54       0.62          0          0         18           0
    Fetch     5302   1498.35    2743.11   13049277  188386516          0        6631
    total     6732   1498.90    2743.76   13049277  188386516         28        6631
    Misses in library cache during parse: 21
    Misses in library cache during execute: 55
       18  user  SQL statements in session.
    1119  internal SQL statements in session.
    1137  SQL statements in session.Please advise
    Kai

    The bulk o the "Recursive Statements" load probably comes from the "18 user SQL statements in session".
    Those are SQLs likely inside a PLSQL block / procedure.
    Also, it seems that tracing was enabled after the PLSQL procedure began running (abd stopped before it completed ?)
    Hemant K Chitale
    (aka "hkchital" in forums)
    http://hemantoracledba.blogspot.com

  • Getting control totals for all the objects

    Hi All,
    1. I want to get the control totals for all the tables along with table names in Oracle
    the below I google and found, but I am not aware of xml in Oracle, I tested this on small scott db it works fine
    select
    table_name,
    to_number(
    extractvalue(
    xmltype(
    dbms_xmlgen.getxml('select count(*) c from '||table_name)
    ),'/ROWSET/ROW/C')) count
    from user_tables order by 1is the above query correct?
    2. I want all the view name
    This I can get it from user_views ( but I want for entire database excluding system views and only user created views)
    select view_name from user_objects3. I want all the sporc name( including the ones in the package and stand alone)
    I am not sure how to get this.

    Be aware of the statement "Some columns in these views contain statistics that are generated by the DBMS_STATS package or ANALYZE statement."
    See this page specially "Columns marked with an asterisk (*) are populated only if you collect statistics on the table with the ANALYZE statement or the DBMS_STATS package."
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10820/statviews_2117.htm#REFRN20286
    If your statistic is not updated, it can give you totally wrong impression.

  • 2 for all entries in a single select

    Hi all,
            I need to do 2 for all entries in a single select statement.Is there a way out?

    Hi,
    No you cant use two FOR ALL ENTRIES at a same time.
    Use either of following:-
    1. Only JOINS
    2. One JOIN and one FOR ALL ENTRIES.
    3. Use multiple queries to fill multiple internal table and then read these internal table to form a final internal table.
    Hope this solves your problem.
    Regards,
    Tarun

  • Query to display data monthwise and calculate total for first 12 months

    Hi All,
    I have a query that displays forecast data monthwise.
    This has been achieved by adding 0CALMONTH on top of key figure structure.
    Eg: -
                            APR 2011   MAY 2011    JUNE 2011   ....... NOV 2013
                            Forecast      Forecast       Forecast             Forecast
    PRODUCT 1      10                15                    20                         25 
    Now there is a requirement to include new column that displays total of first 12 months data only.
    How can I achieve this without repeating the total value for every value of 0CALMONTH?
    Eg: -
                            APR 2011   MAY 2011    JUNE 2011   .......  MAR 2011    TOTAL of     APR 2012  .......       NOV 2013
                            Forecast      Forecast       Forecast             Forecast        12 months    Forecast                   Forecast
    PRODUCT 1      10                15                    20                         25               300              10                              30
    Any inputs will be appreciated.
    Thanks & Regards
    Manisha

    Hi,
    As far as i understand your requirement is to make a new keyfigure which has to be total of 12 months and that keyfigure should not get splitted based on calmonth which you have kept above the key figure structure in columns.
    I dont think it will be possible to achieve it that way.You need to make a fixed structure which will dispaly data for say next 12 months or whatever your user requirement is and you need to make a seperate  keyfigure with month offsets and then you can make  a seperate total keyfigure(of 12 months).
    With the help of text variable type replacement path you can get the seperate month names for all your forecasted keyfigures.
    I had the same requirement but my user wanted to see the next six months data only so i made it with the help of month offsets.
    If you get any other work around to achieve your requirement then please do share the solution with us.
    Hope it helps.
    Regards,
    AL
    Edited by: AL1112 on Sep 6, 2011 9:34 AM

  • Help needed in SD VC Assigning Object Dep. for all values at the 1 time

    Dear, Gurus
    I am successful in achieving pricing in VC the long way example: If Characteristic is Car_Color and values Blue, Red. I assign
    $self.Z_CarPrice=u2019Redu2019 and it works. Z_CarPrice is basically the variant condition linkage with tables SDCOM and VKOND.
    My question is how can I achieve the above by assigning it to the header so that it automatically enters the code $self into all values without me having to go into it 1 by 1 and assigning the codes? Or what is the best way in achieving the results?
    If I have 3 characteristics ex: Car_Model, Car_Color, Car_Size? 100's of values?     4th characteristic is Z_CarPrice inside this I have entered all the Values from the 3 characteristics.
    Thanks in Advance

    Hi,
    Try these steps and hope will definitely resolve your issue
    Create one variant table VT_BASE_PRICE with combinations of the char Z_COLOR,Z_MODEL and Z_SIZE as key fields
    Table Structure
    Z_Color               
    Z_Model
    Z_Size
    Z_Car_Price
    Table Contents    
    Z_Color          Z_Model                         Z_Size          Z_Car_Price
    RED          Honda          Big          BP_RED_HONDA_BIG
    RED          Honda          Small          BP_RED_HONDA_SML
    Maintain the table values with all possible combinations and for each combination enter a unique key under Z_car_Price column. Remember the variant key length Max is 26  and you can use any unique value which should give a meaning by looking at
    Once maintained the table write a dependency
    Table VT_BASE_PRICE
    (Z_COLOR = Z_COLOR,
    Z_MODEL = Z_MODEL,
    Z_SIZE = Z_SIZE,
    Z_CAR_PRICE = $self.Z_CAR_PRICE)
    Thus for each combination no need to write the code to infer the variant key. It will automatically choose from table as per configuration values entered.For each variant key you need to maintain price in condition records for condition type.
    Regards,
    Brahmaji D

  • Schedule a Webi XIR2 report to run for all values of the prompt ...

    Hi there,
    Any ideea about if it's possible to schedule a Web Intelligence XIR2 report to automatically run for all  150 different prompt values in the LOV (and have 150 different instances)?
    BOXIR2, Java deployment.
    Many thanks.

    You'd be scheduling the document 150 different times, each for one value of the LOV.
    You'd use the ReportEngine (REBean) SDK to read the LOV values, then use the Enterprise SDK to schedule.
    Here's a bit of code that illustrates how to schedule a Webi doc a single time with specified prompts.  You'd do something similar, but iterate the prompt setting and scheduling:
        IInfoStore iStore  = (IInfoStore) eSession.getService("InfoStore");
        ReportEngine reportEngine =  ((ReportEngines) eSession.getService("ReportEngines"))
                                        .getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
        IInfoObjects objs = iStore.query("Select TOP 1 * From CI_INFOOBJECTS Where "
                                          + " SI_KIND='Webi' And SI_INSTANCE=0 "
                                          + " And SI_NAME = '" + reportName + "'");
        //============================================================================
        // Open Webi document, then get and set Prompts collection
        //============================================================================
        IWebi            webi    = (IWebi) objs.get(0);
        DocumentInstance di      = reportEngine.openDocument(webi.getID());
        Prompts          prompts = di.getPrompts();
        for(int i = 0, m = prompts.getCount() ; i < m ; i++) {
            Prompt prompt = prompts.getItem(i);
            String name   = prompt.getName();
            if("Enter value(s) for State:".equals(name)) {
                Lov lov = prompt.getLOV();
                lov.refresh();
                Values values = lov.getAllValues();
                prompt.enterValues(new ValueFromLov[] { values.getValueFromLov(0),
                                                        values.getValueFromLov(1)});
            } else if ("Enter Shop Id:".equals(name)) {
                prompt.enterValues(new String[] { "261" });
        //===========================================================================
        // Copy prompts over to InfoObject
        //===========================================================================
        PromptsUtil.populateWebiPrompts(prompts, webi);
        //===========================================================================
        // Schedule Webi report to run once now
        //===========================================================================
        webi.getWebiFormatOptions().setFormat(IWebiFormatOptions.CeWebiFormat.Webi);
        ISchedulingInfo schedInfo = webi.getSchedulingInfo();
        schedInfo.setRightNow(true);
        schedInfo.setType(CeScheduleType.ONCE);
        iStore.schedule(objs);
    Sincerely,
    Ted Ueda

  • How to calculate total for field for particular day. in smart forms

    hi,
             pls help in this problem,
    how to calculate cumulative totals for the particular field in samrtforms

    Hi ,
    Either you can calculate the sum in driver program with
    Loop at where Condition .
    Sum the required field .
    endloop .
    Then pass it to smartforms
    Or
    Double Click on table node .
    In the conditions tab give the required condition .
    select calculation tab.
    In operation select Total , in field name give the name of the field you want to sum
    and in targer field name specify the name of the field that should contain the result .
    To convert the total in to words use the function module in program lines
    CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
    EXPORTING
    amt_in_num = w_total
    IMPORTING
    AMT_IN_WORDS = w_total_words
    EXCEPTIONS
    DATA_TYPE_MISMATCH = 1
    OTHERS = 2
    Regards

  • Calculate Interest for all items

    Dear All ,
    I am using the transaction FINT(Item Interest Calculation Program) to calculate the interest . Now , i want to define a new interest indicator to calculate the interest for all items (not only for open items ?
    Is there any way for it ?
    Best Regards
    Dash

    Do you mean FINTAP? Do you guys you retainage (split payments)?  Thanks so much!

  • I have 3 guest lists names. How do I create a total for each list and a fourth total for all of them combined?

    I am getting married and I want to stay organized. I have a spread sheet for my guest list. It is 3 columns/lists (my family, his family, and friends). How do I make a running total of each list and a fourth total of all of them combined?
    Thanks so much!!!!

    If I understand your problem you want to keep a list for the bride, the groom and friends as well as a total of all guests.
    The total is the easiest.  If you have the other three numbers then you can use the function SUM() to add those three together.
    The rest of the problem is solved by assumeing:
    1) the lists are in columns
    2) the header does not count in the total
    taking the difference of the total rows and the blank rows minus 1 will give you the total guest names in the a column.
    The contents of cell:
    C2 =ROWS(Bride)-COUNTBLANK(Bride)-1
    C3=ROWS(Groom)-COUNTBLANK(Groom)-1
    C4=ROWS(Friends)-COUNTBLANK(Friends)-1
    C5=SUM(G2:G4)

  • How to set locking for all values of a char other than using query

    Hi Friends,
    any suggestions?  I like to explicitly lock all possible values of a particular characteristic in a cube without using a filter.
    thanks!!
    Cran
    Edited by: Cranberry CranCran on Jan 31, 2008 4:48 PM

    If you dont restrict the characteristic using any value in the filter, then all values will be locked.

  • Total for net value

    Hi,
    How can i make the total of net value auart.
    i hve tried in this way...Can someone suggest me the suitable way.
    sort itab by auart.
    loop at itab.
    at end of auart.
    sum.
    write : /5 itab-vbeln, 15 itab-posnr,25 itab-auart ,
    30 itab-matnr,35 itab-zmeng,40 itab-zieme
    , 45 itab-netwr,50 itab-waerk.
    endat.
    endloop.

    Your Internal table  should in sorted  way of fields  arranged  .
    data : Begin of  Itab occurs 0,
    vbeln,
    auart ,
    posnr,
    matnr,
    zmeng,
    zieme
    netwr,
    waerk
    end of itab .
    Reward points  if it is usefull..
    Girisih

Maybe you are looking for

  • Synchronize a folder

    Hi, I have to do this job: I have a folder, with the same name, on my iMac and on my MacBook; I work on my MacBook away from home, when I come back and I connect to AirPort network I would like that iMac download that folder from MacBook (or MacBook

  • Odd messages

    A message recently appearred on my iphone in the text box (ie the one you write in to send a text) I did not write this message and no one else had access to my phone , so has anyone any ideas how it got there ? I have and I phone 4gs and the message

  • Problem with align element.

    Hi everybody, i have a problem with align element on my page. I explain: i have used into a panel page a panel group to align my element horizontal, but when i set the vertical-align on top, the element are align in middle. Now is...... text text tex

  • CiscoWorks RME 4.1.1 - CRIN0014 Error

    Hello, Not sure when this started, but I noticed the following error when trying to go to the report generator in RME: CRIN0014: Operation failed while connecting to JRM. Make sure jrm and/or CTMJrmWrapper services are running. I went and made sure a

  • White along the silhouette layer

    Hello, i'm making a indie game and the problem I seem to be having is that around one of the layers, it always seems to place a white border along the sides of the painting. I always set this layer as a transparent layer. If this was a regular drawin