Calculate YTD value

Hi Guru's
We have requirement ,  have a YTD application  loading data every period to periodic member of a datasource dimension for the accounts.We need to copy those data to YTD  member of a datasource dimension to get the ytd values for the accounts .How can we do it in the script logic.
Account  time  entity periodic 100
Account  time  entity periodic 100
to
Account  time  entity YTD 100
Account  time  entity YTD 200
Thanks
Buggi

You can find several prepackaged script logic functions in the system library. One example function is called accumulate() which is probably the one you need to follow:
*SUB ACCUMULATE(%src_flowacc%, %dst_bsacc%)
// Accumulate periodic values from a flow account into a bs account
// This is a complete commit section
//=========================================================================================
     // must process one period at a time
     *PROCESS_EACH_MEMBER=TIME
     // set the appropriate region to clear
     //(all reporting currencies)
     *CLEAR_DESTINATION
     *DESTINATION TIMEDIM=%TIME_SET%
     // enforce loading the appropriate region
     *XDIM_MEMBERSET TIMEDIM=[TIMEDIM].[%TIME_SET%],strtomember("["+[TIMEDIM].[%TIME_SET%].properties("PRIOR")+"]")
     *XDIM_MEMBERSET ACCOUNTDIM=%src_flowacc%
     *WHEN TIMEDIM.CURRENT
     *IS %TIME_SET%
          *REC(EXPRESSION=(%VALUE%+GET(TIMEDIM=TIMEDIM.PRIOR,ACCOUNTDIM=%dst_bsacc%)), %dst_bsacc%)
     *ENDWHEN
     *COMMIT
*ENDSUB
Hope this helps,
Madis

Similar Messages

  • How to use YTD values in webi

    hi
    normally in bex we can use variable , based on user entry we can calculate YTD values, and we will make structure like in column or rows.
    how to make ytd values in webi and create structures.

    HI,
    this needs to be done using EXIT Variables in the BEx Query.
    Ingo

  • Periodic application, conversion on ytd value

    Hi all,
    I have SAP BPC 7.5.108 MS, I need to do a periodic application,but I would like to do a conversion applied on YTD value.
    Do you know if it's possible in the business rules?
    I know that it's possible, in the Ytd applciation, to apply the conversion on periodic value, would be very nice to do also the conversion applied on YTD values.
    Thanks
    Ciao
    Chiara

    Hi Chiara,
    this is not possible by using the standard rules. However you should be able to achieve it by using an additional element in your flow dimension on which you (with a script) calculate the YTD value. Your conversion rule could then convert this amount and write the result onto the original flow.
    BR,
    Arnold

  • How to calculate YTD and Last year YTD on Date in Bex

    Hi,
    I have a requirement in which I need to show the report as following format.
    I need to show    Year>monthday as Hierarchy. user will drill down on Month to Date.
                 Del Qty              Ord Qty              Del  Qty LY              Del Qty YTD                  Del Qty  L YTD
    Year
    > Drill Down to Months
            Jan
            Feb
            Mar
              ---> 1.03.2010
              ---> 2.03.2010
              ---> 3.03.2010
            Dec
    I have Calday, Calmonth, Calyear all three objects.
    Now my question is how I can achive this? On which i need to create hierarchy?
    and how to calculate the YTD at day level.
    Note:- in the selection calyear is mandatory. User wants to display as per year.   So What infoobject I need to take in selection?
    and the way to calculate YTD on Day (in the case also ,where user doesn't give the date in selection)
    Plz reply asap its uregent !!!
    Thanks in advance,
    Amit

    Hi,
    As per my understanding I think YTD means JAN to current date result. I means say if user enter 062005 then result in YTD should be from 012005 to 062005.
    And to do this you need to write a customer exit variable where LOW field of internal table you will put JAN year and HIGH will contain month year entered by user.
    Hope this will help you.
    Suneel

  • How can I calculate the value of the cell, which depends on other rows?

    Hi, all!
    I have an application with table. In this table i have calculate some fields, that doesn't exists in data class and depends on other row values, e.g. current row number, or sum of previous rows. How can i calculate this values in TableView?
    The problem is that I have no information about the current row number in the cell value factory.
    Example:
    public class Transaction {
         public String getName();
         public BigInteger getAmount();
    } // There is no getter for "Balance"
    Result table should be something like this:
    Name
    Amount
    Balance
    transaction1
    300
    300
    transaction2
    200
    500
    transaction3
    500
    1000
    Also, after sorting by "Amount", "Balance" should be recalculated:
    Name
    Amount
    Balance
    transaction3
    500
    500
    transaction1
    300
    800
    transaction2
    200
    1000

    Strings can be converted to numbers by various parse methods. For instance Strings can be converted to double via Double.parseDouble(myString).
    That being said, it appears that your textfield will contain numbers and operators, and so these operators will need to be parsed too. I would advise you to search on the terms Java infix postfix.

  • Use Planning Function to calculate new value

    Hi All,
    I have what seems to be a simple problem, but no success in resolving.
    I have 3 planning keyfigures:
    -Units
    -Price
    -Value
    The price field is populated from another planning sheet.
    The unit field is entered by the user.
    The value should be calculated by planning function when button pushed.
    I have tried just basic "Value=Units*Price", but always comes back zero.
    I have also tried more complex "{Value, CharA, CharB, CharC} = {Units, CharA, CharB...." for each characteristic.  Still zero.
    It must be multipling by zero, but not sure how to avoid.
    If I put "Value=Price", it works. If I put "Value=Units", it works. If I put "Value=Units+Price", it works.
    Please help.
    Terrence

A: Use Planning Function to calculate new value

Here is the details.
In the infoprovider the data is like this:
Country/    Product/     Unit Sales/     Price/      Value
DE/             Shirt/            50/                 0/             0
DE/             Shirt/              0/             100.00/        0
The query is display:
Country/    Product/     Unit Sales/     Price/      Value
DE/             Shirt/            50/              100.00/         0
I have tried the following 2 formulas:
Formula 1:
= {Unit Sales} *
Formula 2:
FOREACH Country, Product.
{Value, Country, Product} = {Unit Sales, Country, Product} * {Price, Country, Product}
ENDFOR.
Both return zero for values.
Thanks,
Terrence

Here is the details.
In the infoprovider the data is like this:
Country/    Product/     Unit Sales/     Price/      Value
DE/             Shirt/            50/                 0/             0
DE/             Shirt/              0/             100.00/        0
The query is display:
Country/    Product/     Unit Sales/     Price/      Value
DE/             Shirt/            50/              100.00/         0
I have tried the following 2 formulas:
Formula 1:
= {Unit Sales} *
Formula 2:
FOREACH Country, Product.
{Value, Country, Product} = {Unit Sales, Country, Product} * {Price, Country, Product}
ENDFOR.
Both return zero for values.
Thanks,
Terrence

  • Calculate single value as ranked number function does not apply in CR

    Hi everybody,
    I built up a query with the SAP BEx Query designer. For one key figure I enabled the function "Calculate single values" as ranked list. So the query has the following result.
    Instead of...
    Score
    1220
    2032
    2390
    2389
    ...I got...
    Score
    1
    2
    4
    3
    Unfortunately when importing the query to Crystal Reports Crystal is just importing the key figure itself - the ranked list does not exist... so the output is the same as in the first example.
    I tried to rebuild the formula with crystal means using the Rank function but I failed...
    Can anybody provide a workaround for me?
    Is there another way as using the formula workbench?
    Best regards,
    Sebastian

    Hi Ingo and everybody,
    I used now the following function using the Nth largest function:
    If nthlargest(1, {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]})
       = {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]} then "1"
    else if nthlargest(2, {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]})
       = {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]} then "2"
    else if nthlargest(3, {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]})
       = {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]} then "3"
    else if nthlargest(4, {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]})
       = {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]} then "4"
    else if nthlargest(20, {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]})
       = {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]} then "20"
    The formula is not very handsome and will fail, if the number of records exceeds...
    Are there any alternatives?
    And: Is there a possibility to change the field name, because those clumsy field names cause that the whole formula is almost unreadable. Or is the only way to build subreports?
    Regards,
    Sebastian

  • How to calculate usage value through measuring document.

    Hi,
    While creating Sales Order with reference to a Contract i need to update the usgae value in the Order Quantity ( RV45A-KWMENG ) field (at line item level).
    Can you help me calculate usage value through measuring documents for equipment over a period of time.
    Is there any function module for the same?
    Thanks.

    Hi,
    To determine the usage value of a an equipment I had followed the following.
    From table STPO, check if the material receipted belongs to a standard BOM (STLTY='S')
    If yes, record the BOM (STLNR)  and the BOM item node number (STLKN)
    From PLMZ table, select the task list type (PLNTY), the key for task list group (PLNNR), the group counter (PLNAL), the task list node number for operation (PLNKN),   if the record is not flagged for deletion (LOEZ)
    From PLFH table, select the object type of the CIM resource (OBJTY), the object id of the resource (OBJID), the usage value (EWVGW) if the record is not flagged for deletion (LOEZ)
    From CRVE_A table, select the equipment number (EQUNR)
    The result of this selection will be all the tools which can be used for the production of the material receipted.
    The measuring point for this or these equipment(s) will be selected from equipment number and EQUI table
    The result of this selection will be all the measuring point to update.
    Create new measurement document for the selected measurement point (transaction IK11)
    Technically go as follows:-
    MAT = material receipted
    Select STLY, STLNR, STLKN from STPO table where IDNRK='MAT' and STLTY='S'
    If results exist
    Select STLTY, PLNNR, PLNAL, PLNKN from PLMZ where PLMZ.STLTY=STPO.STLTY and PLMZ.STLNR=STPO.STLNR and PLMZ.STLKN=STPO.STLKN
    And PLMZ.LOEZ<>'X'
    Select EWVGW, OBJTY, OBJID from PLFH twhere PLFH.STLTY=PLMZ.STLTY and PLFH.PLNNR=PLMZ.PLNNR and PLFH.PLNAL=PLMZ.PLNAL and PLFH.PLNKN=PLFH.PLNKN and PLFH.LOEKZ<>'X'
    USAGE=PLFH.EWVGW
    Select EQUNR from CRVE_A where CRVE_A.OBJTY=PLFH.OBJTY and CRVE_A.OJBID=PLFH.OBJID
    All the equipment number selected at this moment will be called EQUIP in the next steps
    EQUIP= Equipment number previously selected
    Select OBJNR from EQUI where EQUNR=EQUIP
    Select PARNR from IHPA where OBJNR=EQUI.OBJNR
    If PARNR = Vend then
    Select IMRC_POINT from equi where equnr=equip
    All the measuring points  selected at this moment will be called MEASP  in the next steps
    For each MEASP
    Insert into IMRG the new increment value  (USAGExMAT) in field CDIFF
    Remark: the field CDIFF is managed in floating point number, accurate to 8 bytes.
    I hope this is useful for you.
    Regards,
    Ankur Parab

  • How to calculate acquisition value for specified day

    Hi,
    in my z program I have a problem how to calculate acquisition value for my asset for specified day.
    Example:
    I have asset created 8.7.2008 with TTYPE 104 (External asset acquisition) with value 5950.
    30.11.2008 there is another TTYPE 272 (Retirement of current-yr acquis., w/o revenue) with value 950.
    So BEFORE 30.11.2008 acquisition value is 5950. After is 5000. Is there any function module (or something else) in SAP system where I can send asset number and date a it return to me acquisition value for that day?
    Many thanks for any answer!

    Hi,
    your suggestion means that I have to compute acquisition value by myself (sum all TTYPE 1** - sum all TTYPE 2**). So SAP does't provide such functionality (LDB ADA have it, because it can compute acquisitiob value for specific day)?
    Mant thanks for answer

  • How to allocate YTD values in a PERIODIC member

    Hello,
    I'm trying to allocate values of a member that has INC as ACCTYPE, in another member that has LEQ as ACCTYPE. The problem is that I need to save the YTD values of the INC type in the PERIODIC values of the LEQ type.
    Someone knows how to do that? I've try this, but it doesn't work,
    *XDIM_MEMBERSET MEASURES=YTD
    *XDIM_MEMBERSET CCOSTO=BAS(MI01)
    *RUNALLOCATION
    *FACTOR=1
    *DIM CCOSTO WHAT= BAS(MI01); WHERE= SIN_CECO;
    *DIM P_ACCT WHAT = BAS(UTI_LIB_DIS); WHERE=3.3.1;
    *DIM P_DATASRC WHAT=BAS(ALL_DATASRC);WHERE=INPUT
    *DIM PRODUCTO WHAT=BAS(ALL_PRO);WHERE=SIN_PRO
    *DIM CONCEPTO WHAT= BAS(EST_FIN); WHERE= SIN_CONCEPTO;
    *ENDALLOCATION
    The result is the same periodic values even if I've selected the member YTD as you can see in the first command line.
    Any ideas?
    Thanks & Regards
    SU

    Hello SU,
    I don't think you can *XDIM_MEMBERSET the YTD Measure (similar to BPC MS functionality).
    One possible approach is to accumulate the YTD values one month at a time. You may need to test this to confirm this works.
    i..e.
    Use your existing allocation logic but add the following line for your first month (i.e. 2011.JAN)
    *DIM TIME WHAT=2011.JAN WHERE=2011.JAN
    Then add another allocation for your second month (i.e. 2011.FEB)
    *DIM TIME WHAT=2011.JAN,2011.FEB WHERE=2011.FEB
    Then add another allocation for your third month (i.e. 2011.MAR)
    *DIM TIME WHAT=2011.JAN,2011.FEB,2011.MAR WHERE=2011.MAR
    Let us know how this works out for you.
    Thanks,
    John

  • Step to calculate YTD and MTD in OBIEE

    Hi Experts
    I need to calculate YTD and MTD in OBIEE reports. Please tell me the steps how can i calculate .
    Thanks in advance
    Regards
    Frnds

    Hi..
    Sorry to say this, i am unable to write steps,
    but go through these links.. hope you can understand, if any problem occurs then post here.. we will check
    http://www.rittmanmead.com/2007/04/30/obi-ee-time-dimensions-and-time-series-calculations/
    http://oraclebizint.wordpress.com/2007/11/15/oracle-bi-ee-101332-understanding-todate-and-ago-achieving-mago-qago-and-yago/
    http://oraclebizint.wordpress.com/2007/11/05/oracle-bi-ee-101332-understanding-todate-and-ago-achieving-ytd-qtd-and-mtd/
    If you have any problem after doing these (i mean if any errors), then follow these...
    http://siebel.ittoolbox.com/groups/technical-functional/siebel-analytics-l/time-series-functions-in-obiee-please-asap-1654886
    http://siebel.ittoolbox.com/groups/technical-functional/siebel-analytics-l/help-with-todate-and-ago-time-series-functions-in-obiee-2347570
    Thanks & Regards
    Kishore Guggilla

  • YTD Value in Period-Input System Structure

    Dear SAP Experts:
          I am using BPC 7.5 NW SP10 now, and now my application is set Periodc-input.
    I would like to transport YTD Value in Net Income to BS account, for example:
    Month Net Income(Periodic)
    Jan       100
    Feb       200
    Desired result:
    Month  CY NI in BS(Periodic)
    Jan       100
    Feb       300
    I tried to use script to take the YTD value in account net income 300 in Feb to transport into
    the account CY NI in BS, but it doesn't work
    Does anyone have advise on this?
    BRs,
    Fred Cheng

    Dear All:
            I would like to transport the YTD value in C_ACCT member 8200 into Periodic value in C_ACCT 33530001. At the same time, this value should be put into some specific dimension meber.
    Here is my script:
    *SELECT(%RPTCUR_2%, ID, RPTCURRENCY, CURRENCY_TYPE='R')
    *XDIM_MEMBERSET C_ACCT= BAS (8200)
    *XDIM_MEMBERSET GROUPS = NON_GROUP
    *XDIM_MEMBERSET RPTCURRENCY= %RPTCUR_2%
    *XDIM_MEMBERSET FLOW= F99
    //*XDIM_MEMBERSET MEASURES= YTD
    *WHEN C_ACCT.ACCTYPE
    *IS "INC"
    *REC(FACTOR=-1, C_ACCT=33530001,EXP_TYPE=9,FLOW=R20)
    *REC(FACTOR=-1, C_ACCT=33530001,EXP_TYPE=9,FLOW=F99)
    *ENDWHEN
    *COMMIT

  • What is the best way to update /101 Total Gross YTD values within CRT

    Hello - Can someone please suggest the best way that I can update the current /101 YTD values within the CRT?  We had a conversion effort take place earlier in the year that did not accumulate the amounts of one particular wage type to the /101 bucket.  The wage type itself is currently in the CRT with the appropriate accumulators set up correctly but the /101 YTD values are too low due to the missing amounts.  Any suggestions would be greatly appreciated.
    Thanks!

    Hello Kristy,
    Did you try RPUCRT00? This program is for Recreation of Payroll Cumulation tables and might help in this case.
    Hopefully this information helps.
    Kind regards,
    Graziela Dondoni

  • YTD Value

    Hi,
    I wanted to use Week level prompt in the report but at the same time YTD value should not be changed and only it should show the give week data
    i.e. Actually YTD value is changing weekly basis that needs to be stop
    thanks

    Hi,
    here is an example
    *2011*=1192812
    Quarter 1= 107460
    Jan = 18507 (YTD value)
    Feb = 35223 (YTD value)
    Mar = 65730 (YTD value)
    there is difference between YTD values at month level
    Is there anything that we might be doing wrong?

  • BPS on portal not updating all YTD values on saving

    Hi All,
    We recently integrated BW-BPS with EP portal.
    When i do a test run on layout from portal, i see some of the YTD calculations not getting updated at all even after my several hits on save icon. But this is happening only to some of the YTD calculations.
    I check the fox calculation.
    To  make sure from BW-BPS side, i ran an other test run in BW-BPS and see all YTD values updated on the layout as saved.
    Could somebody help me out if you have any idea on this issue.
    Appreciate any kind of input.
    Regards,
    Mamatha

    Issue resolved. Change to process chain.

  • Maybe you are looking for

    • How can I watch MKVs on a DVD player and keep 5.1?

      Hi, I have several MKV files which I want to convert to play in a DVD player/Xbox 360. I want to keep the hi def and 5.1 sound in the newly encoded file. I have tried using Handbrake with some success. The video is outputted in hi def and it plays in

    • Can't load images for photo gallery

      Hi All, This is my first stab at using Spry and I've run into a small problem. I can't get my images to show up for the thumbs or the large image. And when I read the article for this I only got more confused. quote: Now you can make use of these new

    • Create PO from SC in SOCO with status "Ordered"

      Hi, This is the scenario: When you approve a SC in SOCO a PO is "automatically" created. But this PO is created in status "Saved". We need to create this PO in status "Ordered". Do you know how? I've tried to find some place to put a enhancement poin

    • Time Machine, last backup = none?!?

      Hi, Suddenly Time Machine wont recognize my backups anymore.... Yesterday I renamed the TM USB disk from "unknown" to "Time Machine". When I wanted to make a new backup, Time Machine told me the latest backup was "None" so I quickly renamed the disk

    • Mac Os x Lion(10.7)

      So, I live in South Africa and my late 2006 iMac could support mac os 10.7 (Lion). The purchase has been removed from the app-store, but some 3rd party apps require Lion to run. I can't upgrade to mountain or mavericks. So, is there a way that me in