Problem in Fox Formula..

Hi,
Total field i require GL and PO Combination wise SUM(amount).
Variables     
Provisions - Circle     MU
Fiscal year/period     003.2010
Company code     RIL
Controlling Area     RIL
Header     
Provisions - Circle     MU
Fiscal year/period     003.2010
Company code     RIL
Transactions
GL Acct     PONumbr     Costcenter     Vendr     SN     SD     Startdate     enddate     Amount     Total
7145090     15958060     902604NM     284410     38     #     29.04.2010     31.05.2010     2000     3000
7145090     15958060     902605NM     284410     39     #     29.04.2010     31.05.2010     1000     3000
7145090     15958060     902607NM     284410     40     #     29.04.2010     31.05.2010     0000     3000
7145090     15963284     902601NM     518274     49     #     29.04.2010     31.05.2010     4500     9500
7145090     15963284     902601NM     345413     51     #     29.04.2010     31.05.2010     5000     9500
7145090     15964545     902603NM     345413     52     #     25.05.2010     31.05.2010     8000     9600
7145090     15964545     902603NM     345413     45     #     25.05.2010     31.05.2010     1600     9600
Fields to be changed
GL, PO , KF
Fox Code
DATA PO TYPE EBELN.
DATA GL TYPE 0GL_ACCOUNT.
DATA SUM TYPE F.
SUM = 0.
FOREACH GL,PO.
SUM = SUM + {0AMOUNT,GL,PO}.
endfor.
{TOTAL,GL,PO}  = SUM.
IF I SEE IN DEBUG MODE ..LOOP IS ACCESSING GL Acct,PONumbr     ,Costcenter,Vendr,SN,SD,Startdate,enddate WISE. AND IT IS NOT SUMMING UP BASED ON GL,PO........ EXPERTS PLZ PROVIDE UR SUGGETIONS.. Values should store in Cube...Not display mode.
Edited by: Madhu YL on Jun 23, 2010 10:52 AM
Edited by: Madhu YL on Jun 23, 2010 10:55 AM

Hi,
Can you try this fox code:
fields to be changed : keyfigure,Costcenter, Vendr, SN, SD, Startdate, enddate
foreach gl.
foreach po.
SUM = 0.
foreach Costcenter, Vendr, SN, SD, Startdate, enddate.
SUM = SUM + {0AMOUNT,Costcenter, Vendr, SN, SD, Startdate, enddate}.
endfor.
{TOTAL,Costcenter, Vendr, SN, SD, Startdate, enddate} = SUM.
" i dnt know on which particular record you want to store the total. Please check this part.
endfor.
endfor.

Similar Messages

  • IP - Problem in FOX formula: how to use 0FISCPER3 counter of a DO function?

    Hi,
    IP 7.0:
    I'd like to define a top-down function which distributes the values in 0FISCPER3 = # to the periods selected by the user with two variables (period from and period to variable).
    -> Problem I experience is the conflict in different data types. How can I use the value of the selection variable for 0FISCPER3 in a counter of a DO function. Here is the code:
    formula example:
    change the value of the keyfigure ZQUANTITY of PRODUCT11
    to the value of ZQUANTITY of PRODUCT09 times 1.1
    assumption for fields to be changed: ZPRODUCT
                     ==> operand: {name of keyfigure, ZPRODUCT}
      DATA L_FACTOR TYPE F.
      L_FACTOR = 1.1.
      { ZQUANTITY, PRODUCT11 } = { ZQUANTITY, PRODUCT09 } * L_FACTOR.
    DATA LV_COUNTER TYPE 0FISCPER3.
    DATA LV_PERIODS TYPE  0FISCPER3.
    DATA LV_PERIOD_FROM TYPE 0FISCPER3.
    DATA LV_PERIOD_TO TYPE 0FISCPER3.
    *Transfer variable period from and period to into local variable and count interval of periods.
    LV_PERIOD_FROM = VARV(Z_PERIOD_FR).
    LV_PERIOD_TO = VARV(Z_PERIOD_TO).
    LV_PERIODS =  LV_PERIOD_TO - LV_PERIOD_FROM.
    Do top-down distribution for all adjustment values on period = #
    LV_COUNTER = (LV_PERIOD_FROM).
    DO.
    <b> { 0G_QVVGRM, LV_COUNTER} = { 0G_QVVGRM, # } / LV_PERIODS.</b>
    <b> LV_COUNTER =  LV_COUNTER + 1.</b>
        IF LV_COUNTER >= LV_PERIOD_TO.
            EXIT.
      ENDIF.
    ENDDO.
    -> the lines indicated in bold give errors. If I change the datatype of LV_COUNTER to I, how to start the do function the value of the first period selected by the user?
    function TMLV is also not supported apperantly in IP.
    Help would be very appreciated
    regards
    D

    Small extension:
    function TMVL does work, but I still have the problem to use the difference in periods solely for calculation in a key figure. I cannot switch from type 0FISCPER into F or I. In SAP R/3 ABAP this is no problem but apperantly in FOX it is???
    Hereby revised coding:
    DATA LV_COUNTER TYPE I.
    DATA LV_PERIODS TYPE  0FISCPER3.
    DATA LV_PERIOD_FROM TYPE 0FISCPER3.
    DATA LV_PERIOD_TO TYPE 0FISCPER3.
    DATA LV_FISCPER3 TYPE 0FISCPER3.
    *TRANSFER VARIABLE PERIOD FROM AND PERIOD TO INTO LOCAL VARIABLE AND COUNT INTERVAL OF PERIODS.
    LV_PERIOD_FROM = VARV(Z_PERIOD_FR).
    LV_PERIOD_TO = VARV(Z_PERIOD_TO).
    LV_PERIODS =  LV_PERIOD_TO - LV_PERIOD_FROM.
    DO TOP-DOWN DISTRIBUTION FOR ALL ADJUSTMENT VALUES ON PERIOD = #
    LV_COUNTER = 0.
    DO.
      LV_FISCPER3 = TMVL(LV_PERIOD_FROM,LV_COUNTER).
    <b>{ 0G_QVVGRM, LV_FISCPER3} = { 0G_QVVGRM,#} / LV_PERIODS.</b>
    { 0G_QVVGRM,#} = { 0G_QVVGRM,#} - { 0G_QVVGRM, LV_FISCPER3}.
    IF { 0G_QVVGRM, #} < 0.01.
    EXIT.
    ENDIF.
    LV_COUNTER = LV_COUNTER + 1.
    ENDDO.
    ERROR: conflict between operation type F and 0FISCPER3

  • Summation problem in fox formula

    Hi friends,
    My requirement is....I have GL Account, PO Number, Vender, costcenter  Scroll number and amount is displaying in layout.
    I have one more field let say TotalAmount. in this field i have populate sum of GL and PO Combination...
    I have writen code in fox. Keeping GL Account, PO Number and amount in chaged fields..
    DATA SUM TYPE F.
    DATA SUM1 TYPE F.
    DATA SUM2 TYPE F.
    DATA PO TYPE EBELN.
    DATA GL TYPE 0GL_ACCOUNT.
    SUM = 0.
    *BREAK-POINT.
    FOREACH GL,PO .
    SUM1 =  {0AMOUNT,GL,PO}.
    SUM = SUM + SUM1.
    ENDFOR.
    {0PRICE,GL,PO} = SUM.
    As it is not giving me Accurate result....
    Itried in debug mode...and in trace ....fox is picking total cube values like GL Account, PO Number, Vender, costcenter  Scroll number  and summing up...But i want GL Account, PO Number wise.....
    One more thing if i remove GL Account, PO Number  from changed field...fox proposing for changed field...
    Thanks
    Raju

    Thanks for response...
    UR right....Please suggest me...the variables i have created on PO and GL should have which properties like
    Text Replacement - Characteristic Value.
    Replacement Type - User Defined right.
    Question 1 . should i restrict these variables in level or not. if  not so i have to remove PO and GL in changed fields and call variables in Fox right.
    Question 2. IF so what about my layout...
    or else please give a example if i create  variables for both..what exactly i have to do after that to effect the result values..

  • Problem with Nested loop in Fox-Formula

    Dear Experts,
    Let s share the scenario :
    MaterialGroups with following Keys for Example AAAA, BBBB, CCCC..., Materialgroups are selected in the 1st input ready query, which is assigned to DataProvider DP_1 in a  webtemplate.
    every Materialgroup has several Materials, for instance:
    Materialgroup AAAA has following Materials: AAAA10, AAAA11, AAAA12, AAAA13...
    Materials are  selected in a second  input ready Query, which is assigned to a second DataProvider DP_2 in the Same Webtemplate as the query 1.
    Both Materialgroup and Material are based on the same Aggreagtion level and same real time cube.
    I want to copy the input values for every  MaterialGroup ( 1st query, DP_1) only to it s own Materials (2cond Query, DP_2).
    To resolve this Issue i wrote the following Fox Formula code with a nested loop, however it does not work properly. when I m debugging the code, i could release that the second Loop was ignored.but wehn i replace the second loop (nested loop) with a fixed value it s seems to work properly
    DATA MG1 TYPE MATG.<------ MaterialGroup
    DATA MT1 TYPE MAT.<----
    Material
    DATA S1 TYPE STRING.
    DATA S2 TYPE STRING.
    DATA S3 TYPE STRING
    DATA K TYPE F.
    DATA Z TYPE F.
    FOREACH MG1.
    To check Materialgroup in debugger
    S1= MG1.
    BREAK-POINT.
    K = {KEYfIG, #, MG1}.
    BREAK-POINT.
    FOREACH  MT1.   <----- if i set MT1 to a fixed value like AAAA11 then S3 get the wished value namely AAAA
    S2 = MT1.
    BREAK-POINT.
    S3 =  SUBSTR (MT1, 0, 4).  
    BREAK-POINT.
    IF S1 = S3.
    {KEYFIG, MT1, #} = K.
    following Statement is only used To check in debugger if Material has become the same Materialgroup value
    Z = {KEYFIG, MT1, #}.
    BREAK-POINT.
    ENDIF.
    ENDFOR.
    ENDFOR.
    Thakns for any help
    Frank
    Edited by: FRYYYBM on Mar 17, 2011 10:54 PM
    Edited by: FRYYYBM on Mar 17, 2011 11:06 PM

    Hi,
    Please try this way.
    DATA MG1 TYPE MATG.<------ MaterialGroup
    DATA MT1 TYPE MAT.<----
    Material
    DATA S1 TYPE STRING.
    DATA S2 TYPE STRING.
    DATA S3 TYPE STRING
    DATA K TYPE F.
    DATA Z TYPE F.
    FOREACH MT1.
    FOREACH MG1.
    To check Materialgroup in debugger
    S1= MG1.
    BREAK-POINT.
    K = {KEYfIG, #, MG1}.
    BREAK-POINT.
    FOREACH MT1. <----- if i set MT1 to a fixed value like AAAA11 then S3 get the wished value namely AAAA
    S2 = MT1.
    BREAK-POINT.
    S3 = SUBSTR (MT1, 0, 4).
    BREAK-POINT.
    IF S1 = S3.
    {KEYFIG, MT1, #} = K.
    following Statement is only used To check in debugger if Material has become the same Materialgroup value
    Z = {KEYFIG, MT1, #}.
    BREAK-POINT.
    ENDIF.
    ENDFOR.
    ENDFOR.
    ENDFOR.
    Thanks.
    With regards,
    Anand Kumar

  • Problem in writing Fox Formula

    Hello All,
    I need to write a formula to fill values in the  key figure.
    The value is to be sum of other two input ready key figures.
    ex a = b +c ( B and c are input ready key figures)
    To implement this i have to write a fox formula in planing function.
    I am new to Integrated Planning.
    Please let me know how this formula will be written.
    Regards,
    Pratighya.

    Hi,
    If you want to do a simple calculation like price = Quantity * Revenue for the year 2009. Then the code is
    Data prc type f.
    Data qty type f.
    Data rev type F.
    data d type 0fiscyear.
    prc = {2009,zprice}.
    qty = {2009,zquantity}.
    rev = {2009,zrevenue}.
    = * .
    {2009,zprice} = .
    Here prc,qty,rev are some buffer variables created here. zprice, zquantity, zrevenue are the keyfigures of your Infoprovider. 0fiscyear is the Time Characteristic of your Info Provider.
    Fields to be changed should be Ofiscyear becoz you are restricting the data based on year.
    If you dont want to restrict then the code will be
    Data prc type f.
    Data qty type f.
    Data rev type F.
    prc = .
    qty = .
    rev = .
    prc = qty * rev.
    Regards,
    Pushpa M

  • How using ABAP function in fox formula ?

    Hello,
    I want to launch standard function :"RSW_CURRENCY_TRANSLATION" by Fox formula. I declare this function in SAP Table :rsplf_fdir, and I can call this function by fox, with all parameters.
    But when I want to use it, I've a problem with the first parameter : "Formula error: Type RSR_CTTNM is not permitted"
    What's the solution ?
    Best regards,

    Hi Cyril,
    I read the fact that you have chosen to use CURC instead of the Function Module.
    Did you fix your exchange rate type in your CURC formula: For example:
    CURC (LCAMT,12312008,EURP,LCUR,GCUR).
    Or did you make into a variable, that can be chosen at run time?
    I'm asking because I'm trying to make the 'exchange rate type' in this formula to be more dynamic (like a local variable).For example:
    DATA EXRATE TYPE 0RTYPE.
    DATA EXRATE_V TYPE 0RTYPE.
    EXRATE_V = VARV(EXCHRATE).
    {0AMOUNT,GCUR, GCTYPE,FYPERIOD,VERSION,COSTELM,INT_ORDER} = CURC (LCAMT,12312008,EXRATE_V,LCUR,GCUR).
    But the system returns the error meesage that it doesn't recognise 'EXRATE_V' even though i have declared it earlier on. So I have a fear that the system is expecting me to enter a fixed exchnage rate type that exists in RSCUR, in this formula..!!  Is that true??
    I don't want it to be fixed in the formula, it should be chosen at time of planning. How do you have yours right now? Do you know why I get this error message, and what I need to do to in the FOX formula, to make sure it can be populated at run time?
    Thanks for your help and information in advance.

  • Fox Formula In IP.

    Hi Friends,
    I have a problem in Executing Fox Formula.
    I want to Add all rows of the Column.  And want to Use the Total Summation Of Column in Another Column Using ForEach Loop but it is not working as Expected.
    I Posted the Following Code :
    DATA Z_MAT TYPE 0MATERIAL.
    DATA Z_COM TYPE 0COMP_CODE.
    DATA TLACTSUM TYPE F.
    FOREACH  Z_MAT, Z_COM.
    TLACTSUM = TLACTSUM + {ZTP_TOTC,Z_MAT,Z_COM }.
    { ZTP_LP2 ,ZFISC_YEAR  }= TLACTSUM.
    ENDFOR.
    My Requirement is :
    ZTP_TOTC             ZTP_LP2
    20                                140
    40                                140
    30                                140
    50                                140
    140 is addition of all the fields in Column (i.e  204030+50).
    But Output i'm getting is :
    ZTP_TOTC             ZTP_LP2
    20                                20
    40                                40
    30                                30
    50                                50
    Please Help with Answer.
    Regards,
    Girish

    Hello,
    Use this following code:
    DATA Z_MAT TYPE 0MATERIAL.
    DATA Z_COM TYPE 0COMP_CODE.
    DATA TLACTSUM TYPE F.
    TLACTSUM = 0.
    FOREACH Z_MAT, Z_COM.
    TLACTSUM = TLACTSUM + {ZTP_TOTC,Z_MAT,Z_COM }.
    ENDFOR.
    FOREACH Z_MAT, Z_COM.
    { ZTP_LP2 ,ZFISC_YEAR }= TLACTSUM.
    TLACTSUM = 0.
    ENDFOR.
    Thanks.
    With regards,
    Anand Kumar

  • Fox Formula vs ABAP

    Hi guys,
    I'm working with a Material Hierarchy (Main Group (MG)(0PRODH1), Group(G) (0PRODH2), Subgroup (0PRODH3) (SG) and Mat (0MATERIAL). In my Planning package I have a specific Hierarchy Node for 0MATERIAL.
    I need to perform a calculation in different levels: For example:
    If I use Fox Formula I can get passed a data record like:
    MG, G, SG, Mat, Qty  and  MG, #, #, #, Qty
    But If use User Exit I can only see a data record like:
    MG, G, SG, Mat, Qty  and Not  MG, #, #, #, Qty (because in this case the Mat is # (empty).
    To get around of that I put # in the Material Hierarchy for testing, but now I having problem with locking.
    Is there any other solution for that?
    I'll appreciate your comments.
    Thank you,
    Heverton

    Keep a session break-point as shown below.
    Go to se37 : Function: RSPLFC_FORMULA_EXECUTE
    Keep Session break-point at line 17
    PERFORM planf_forml IN PROGRAM (i_genprog) USING i_th_ref_data
                                                     i_s_blockline
                                                     i_guid
                                               CHANGING
                                                     lt_mesg
                                                     c_th_data.
    single step execution ( F5 ) will tke yo to FOX Code.

  • Calculating a Leap Year with a FOX Formula

    Hi to everybody.
    Is it posible to calculate a leap year using BPS in BW 3.5 with a FOX formula?
    The code i need to write is something like this:
    if ((year % 4 == 0) AND ((year % 100 != 0) OR (year % 400 == 0)) then
      it is a leap year;
    else
      it isn´t a leap year;
    endif;
    The problem i have is that my variable year is an standard type 0CALYEAR and I cannot do i.e.
    Year MOD 4, and save this value to an integer because 0CALYEAR and INTEGER are different types of variables.
    Any idea?
    Thanks in advance!
    Edited by: Ivan Lopez on Jan 15, 2008 5:24 PM
    Edited by: Ivan Lopez on Jan 15, 2008 5:24 PM

    Hi,
    Eventhough variable is on the characteristic 0CALYEAR, you can assign the variable value to an integer in FOX.
    Declare a local variable of type integer.
    DATA YEAR TYPE I.
    YEAR = VARV(variable).
    Now you can do MOD operations on YEAR.
    Regards,
    Bindu

  • Fox Formula in Integrated planning.

    Hi All,
    I have a requirement like this.
    My data in cube is like this.
    SEASN BR    DU   ST      PS      VOL..
    SS09    AD    BB   ST1    PS1     100
    SS09    AD    BB   ST1    PS2     200.
    SS09    AD    BB   ST2    PS3     300.
    SS09    AD    BB   ST3    PS4     400.
    i need to count the no.of PS under one ST i.e for  ST1 the count should be 2 and for ST2 it should be1.
    The fox formula thar we are using is ,
    DATA DU TYPE ZDEVPUN.
    DATA SR TYPE ZGSMSR.
    DATA BR TYPE ZORBRANDS.
    DATA PS TYPE ZPRODSPEC.
    DATA SEASON TYPE ZSEANI.
    DATA ST  TYPE ZSOURCTYP.
    DATA COUNTER TYPE I.
    DATA PSA TYPE STRING.
    DATA PSB TYPE STRING.
    PSA = 'XXX'.
    COUNTER =0.
    FOREACH SEASON,BR,DU,SR,ST,PS.
    PSB =ST.
    IF PSA <> PSB AND PSA <> 'XXX'.
    COUNTER =0.
    ELSE.
    COUNTER =COUNTER +1.
    ENDIF.
    PSA = ST.
    ENDFOR.
    but while executing this code PS is considering  all four values i.e PS1,PS2,PS3,PS4 for ST1 and populating COUNTER with value 4.
    Please provide any inputs for this problem.
    Thanks in Advance.
    Reshma.

    Keep only PS and key figure name in fields to be changed and the remaining in field list.
    Write code as below.
    count = 0.
    Foreach PS.
    count = count + 1.
    Endfor.
    This will give you the count of PS for each combination of SEASN BR DU ST.

  • Fox formula for actual/plan data  - Planning function

    Hello,
    I am working on the following scenarios for developing a  planning functions for a monthly forecast.
    It is rolling montly forcast where user starts the planning in Jan and he has to show the actaul value for the month of Jan and blank values for the remaining 11 months of the year and then the user post his new forecast values for the remain 11 of the year(to replace initial balnk values) so that the data will be saved to real time cube with version v108
    In Feb, Jan & Feb months has to show the act values and remaining 10 months has to show last month forecast data. The the user may revise the forecast for the 10 months and then we have to write the data to the real time cube with version v208
    In Mar, Jan, Feb and Mar has to show the actual values and the reamining 9 months has to show the last month forecast and then users may revise the forecast data and then i have to write back to the cube with version v308.
    I want to automate this process for all the months and all years without manual intervention. So, i decideed to write a fox formula for this scenario with following draft code.
    I will get the fy period & year as a variable values and then take the system date into the variable
    for each fy period
    if the fy perio <= sys date.
      {version, infoprovider,value type,amount} = {0,act cube, 10, 0amount)
    else
    {version, infoprovider,value type,amount} = {result,plan cube, 20, 0amount)
    endif.
    result will be calculated on the separe routine and populated here
    case (fy per)
    when 01.
    concatenate v1 with fy+2(2) into y
    result = v1+y
    when 02.
    concatenate v2 with fy+2(2) into y
    result = v2+y
    when 03.
    concatenate v3 with fy+2(2) into y
    result = v3+y
    when 04.
    concatenate v4 with fy+2(2) into y
    result = v4+y
    when 05.
    concatenate v5 with fy+2(2) into y
    result = v5+y
    when 06.
    concatenate v6 with fy+2(2) into y
    result = v6+y
    when 07.
    concatenate v7 with fy+2(2) into y
    result = v7+y
    etc...for all months
    So, can you please let me know the best way to implement this (either by fox formuls or exits)...your inputs are really appreciated
    Thanks,
    Srini
    Edited by: srini on Mar 28, 2008 12:05 PM

    Hi Srini,
    If I 've understood u r problem clearly ,You have to write two Fox Functions and you can call exit variable in both to check the system date.
    I think first you should create exit varriable which would return the system date,use the same variable in data slice to lock the data till current period.
    After that create one fox restricted with any one version where you can copy the data for planning .for example:-
    1)First Fox:-
    DATA TIM_FISCPER TYPE 0FISCPER.
    TIM_REF_FISCPER = VARV(ZEXIT_FPER).
    Get the last month
    version using modlue or any another logic .(v108)
    FOREACH TIM_FISCPER.
        IF TIM_FISCPER <= TIM_REF_FISCPER.
      {0amount,version(001) ,tim_fiscper} = {0amount,version(000) ,tim_fiscper}.
    else.
      {0amount,version(001) ,tim_fiscper} = {0amount,version(v108) ,tim_fiscper}.
         endfor.
    Its just n example use the granularity according to the requirement.
    2)Second fox would save the changed plan data:-
    DATA TIM_FISCPER TYPE 0FISCPER.
    TIM_REF_FISCPER = VARV(ZEXIT_FPER).
    Get the last month
    version using modlue or any another logic .(v208)
    FOREACH TIM_FISCPER.
        IF TIM_FISCPER > TIM_REF_FISCPER.
      {0amount,version(v208) ,tim_fiscper} = {0amount,version(001) ,tim_fiscper}.
         endfor.
    Here ZEXIT_FPER is an exit variable created using cmod and populated with system date.
    Hope it will helpful for u.
    Rgds,
    Indu

  • Definition of Reference Data in complex Fox Formulas

    Hello IP Experts / Gurus / Developers,
    As far as I know there is no real concept behind the determination of Reference Data in Integrated Planning, when you do run functions from a sequence and not directly on a Dataprovider (where you have the possiblity to define editable and not editable structure elements).
    The reference data is generated at runtime of the FOX Code. Using Complex FOX Code with a nested loop, the reference data in the planning buffer (seen in Planning Modeller) isnt really the data that it should be. Some read statements (in loops, but also outside the loops) are not recognized and obviously do not lead to the definition of Reference Data. This is not a specific problem of my function or architecture. It doesnt occur, when I reduce the complexity of the FOX Code to a few rows.
    The question that I have is: Is there any possibility to define reference data in a fox statement or before running it?
    Function modules, hidden statements etc. ?
    Maybe a trick with running a loop like the one below (doesnt work, it also leads to immense performance issues)
    FOREACH YEAR, CCODE IN SELECTION.
       VALUE = {0amount, YEAR, CCODE).
       EXIT.
    ENDFOR.
    Thanks in advance for sharing your experience.
    Michael

A: Definition of Reference Data in complex Fox Formulas

Hi Michael,
   I don't think I understand from your post what is the issue that you are trying to solve; but it would not be correct to say that there is 'no real concept' behind determination of reference data.
Reference data is the data a planning function needs to read, which is outside the selection of the filter under which the function is currently running. So for the same function, reference data can change when running under different filters. Reference data can only be read, not modified - I am sure that is already clear. And also, the selection corresponding to reference data is not locked by planning.
Whenever you put any selection (inside the curly braces - {}) on the right hand side of the equal sign (talking about Fox), and if this selection is not contained in the filter, this data will be read as reference data. Also, statement like FOREACH in REFDATA will read reference data. Regarding the amount of data that is read (and hence the performance impact), it depends on factors like master data (for eg, in the Foreach statement in your code, it must be slow becuase of the huge master data that CCODE might be having), and number of records in cube, that are being read. You cannot really "define" reference data using code - it will be determined at run-time.
Hope this helps.

Hi Michael,
   I don't think I understand from your post what is the issue that you are trying to solve; but it would not be correct to say that there is 'no real concept' behind determination of reference data.
Reference data is the data a planning function needs to read, which is outside the selection of the filter under which the function is currently running. So for the same function, reference data can change when running under different filters. Reference data can only be read, not modified - I am sure that is already clear. And also, the selection corresponding to reference data is not locked by planning.
Whenever you put any selection (inside the curly braces - {}) on the right hand side of the equal sign (talking about Fox), and if this selection is not contained in the filter, this data will be read as reference data. Also, statement like FOREACH in REFDATA will read reference data. Regarding the amount of data that is read (and hence the performance impact), it depends on factors like master data (for eg, in the Foreach statement in your code, it must be slow becuase of the huge master data that CCODE might be having), and number of records in cube, that are being read. You cannot really "define" reference data using code - it will be determined at run-time.
Hope this helps.

  • Error in syntax FOX Formula

    Hello all !!
    I have a problem when I execute fox formulas in BPS0 in version 7.0, becuase they don't work.
    The company migrated BW-BPS to 7.0 version.
    The problem occurs when I execute the formulas in BPS0 in the quality environment, which is working with 7.0 version, but we are using 3.5 version in the productive environment; besides we are working with 7.0 version in BW.
    I was wondering if the syntax of the FOX formulas between version is diferrent.....any idea??
    I appreciate your help!!!

    Hi Arlene,
    please check [Re: Foxformula].
    Regards Matthias Nutt
    SAP Consulting Switzerland

  • Error Control on Fox Formula

    Hello everybody
    I have a problem with a Fox formula. When i chek my formula i have the error
    "RFCCheckScreenNecessary: Exception condition "INPUT_NOT_LEGAL" raised., error key: RFC_ERROR_SYSTEM_FAILURE "
    This Formula Use 12 Formula Variables ZVPOIDSx.
    My Formula work Fine when i use only 2 Formula Variables ZVPOIDSx. (ZVPOIDS1 et ZVPOIDS2). The control is OK and the results ar Ok
    But when i use 3 (or +) variable it s not ok
    Extract of my Formula
    DATA ZPOIDS1 TYPE I.
    DATA ZPOIDS2 TYPE I.
    DATA ZPOIDS3 TYPE I.
    DATA ZPOIDS4 TYPE I.
    DATA ZPOIDS5 TYPE I.
    DATA ZPOIDS6 TYPE I.
    DATA ZPOIDS7 TYPE I.
    DATA ZPOIDS8 TYPE I.
    DATA ZPOIDS9 TYPE I.
    DATA ZPOIDS10 TYPE I.
    DATA ZPOIDS11 TYPE I.
    DATA ZPOIDS12 TYPE I.
    DATA ZPOIDSTOT TYPE I.
    ZPOIDS1 = VARV(ZVPOIDS1).
    ZPOIDS2 = VARV(ZVPOIDS2).
    ZPOIDS3 = VARV(ZVPOIDS3).
    ZPOIDS4 = VARV(ZVPOIDS4).
    ZPOIDS5 = VARV(ZVPOIDS5).
    ZPOIDS6 = VARV(ZVPOIDS6).
    ZPOIDS7 = VARV(ZVPOIDS7).
    ZPOIDS8 = VARV(ZVPOIDS8).
    ZPOIDS9 = VARV(ZVPOIDS9).
    ZPOIDS10 = VARV(ZVPOIDS10).
    ZPOIDS11 = VARV(ZVPOIDS11).
    ZPOIDS12 = VARV(ZVPOIDS12).
    *ZPOIDSTOT is the sum of all ZPOIDSx
    ZPOIDSTOT = ZPOIDS1 + ZPOIDS2 + ZPOIDS3 + ZPOIDS4 +  ZPOIDS5  + ZPOIDS6  + ZPOIDS7  + ZPOIDS8  + ZPOIDS9  + ZPOIDS10  + ZPOIDS11  + ZPOIDS12.
    *{ 0AMOUNT, 013 } is the Budget for all the year
    { 0AMOUNT, 001 } = { 0AMOUNT, 013 }*  (ZPOIDS1 /ZPOIDSTOT).
    { 0AMOUNT, 002 } = { 0AMOUNT, 013 }*  (ZPOIDS2 /ZPOIDSTOT).
    { 0AMOUNT, 003 } = { 0AMOUNT, 013 }*  (ZPOIDS3 /ZPOIDSTOT).
    { 0AMOUNT, 004 } = { 0AMOUNT, 013 }*  (ZPOIDS4 /ZPOIDSTOT).
    { 0AMOUNT, 005 } = { 0AMOUNT, 013 }*  (ZPOIDS5 /ZPOIDSTOT).
    { 0AMOUNT, 006 } = { 0AMOUNT, 013 }*  (ZPOIDS6 /ZPOIDSTOT).
    { 0AMOUNT, 007 } = { 0AMOUNT, 013 }*  (ZPOIDS7 /ZPOIDSTOT).
    { 0AMOUNT, 008 } = { 0AMOUNT, 013 }*  (ZPOIDS8 /ZPOIDSTOT).
    { 0AMOUNT, 009 } = { 0AMOUNT, 013 }*  (ZPOIDS9 /ZPOIDSTOT).
    { 0AMOUNT, 010 } = { 0AMOUNT, 013 }*  (ZPOIDS10 /ZPOIDSTOT).
    { 0AMOUNT, 011 } = { 0AMOUNT, 013 }*  (ZPOIDS11 /ZPOIDSTOT).
    { 0AMOUNT, 012 } = { 0AMOUNT, 013 }*  (ZPOIDS12 /ZPOIDSTOT).
    Thanks for your help

    Hi,
    I hope the note will work. But still I would test the following:
    DATA ZPOIDS1 TYPE I.
    DATA ZPOIDS2 TYPE I.
    DATA ZPOIDS3 TYPE I.
    DATA ZPOIDS4 TYPE I.
    DATA ZPOIDS5 TYPE I.
    DATA ZPOIDS6 TYPE I.
    DATA ZPOIDS7 TYPE I.
    DATA ZPOIDS8 TYPE I.
    DATA ZPOIDS9 TYPE I.
    DATA ZPOIDS10 TYPE I.
    DATA ZPOIDS11 TYPE I.
    DATA ZPOIDS12 TYPE I.
    DATA ZPOIDSTOT TYPE I.
    ZPOIDS1 = VARV(ZVPOIDS1).
    ZPOIDS2 = VARV(ZVPOIDS2).
    ZPOIDS3 = VARV(ZVPOIDS2).
    ZPOIDS4 = VARV(ZVPOIDS2).
    ZPOIDS5 = VARV(ZVPOIDS2).
    ZPOIDS6 = VARV(ZVPOIDS2).
    ZPOIDS7 = VARV(ZVPOIDS2).
    ZPOIDS8 = VARV(ZVPOIDS2).
    ZPOIDS9 = VARV(ZVPOIDS2).
    ZPOIDS10 = VARV(ZVPOIDS2).
    ZPOIDS11 = VARV(ZVPOIDS2).
    ZPOIDS12 = VARV(ZVPOIDS2).
    If this works, the problem is within variable ZVPOIDS3 - ZVPOIDS12.
    Also note that the latest SP is 14, so if you are still in development I would recommend to install SP13 and 14!
    D

  • Delete amounts of keyfigure before an execution of fox formula

    Hi,
    I have a layout with a button that executes a fox formula, my problem is if the user puts data on columns of amounts, when I execute the fox formula (copy of previous snapshot) these amounts not are deleted (0) if previous amounts don’t have data in these columns.
    Example:
    (0calmonth is dynamical)
    Previous snapshot
    ...............03.2007|04.2007
    materialA| 10........| 0
    Actual snapshot
    ...............03.2007|04.2007
    materialA| 15........| 80
    After the copy function on actual snapshot
    ...............03.2007|04.2007
    materialA| 10........| 80
    I need  80 belong to 0 after the copy.
    There is some way to delete all amounts of the layout and then execute the fox formula, when the user pushes on the button.
    I would appreciate your help.
    regards
    Victoria

    THANKS RAVI,
    This function  delete all the data with its characteristic combination, there is a way to delete the data only like the garbage button of the layout?
    if I use the delete function, if I have a combination of characteristic in my actual snapshot that are not in the previous snapshot I will lose it.
    Victoria

  • Maybe you are looking for

    • Cannot upload applications from iphone 3gs to itunes

      starting from yesterday my new iphone wont sync applications with itunes correctly. It works this way -It will sync applications bought from apple store from itunes to iphone -it wil not sync applications bought from apples store from iphone to itune

    • Macbook Air to Tv

      Hi all, newbie here. Recently brought my MBA, now I want to connect it to my TV to watch films etc. I've been told there are two different ways of doing this, thunderbolt to HDMI OR Apple TV 3rd Gen. I want to know, what the differences are? And whic

    • Bad quality in mirroring ....

      Hi, At the beginning I had Huge lag problem that partialy solved by connecting the ATV to the router by Ethernet cable. I can live with the delay for movies, no way playing games..... Second , the quality is SOOO... bad , anyone can help here . Third

    • Can Logic 7 pro install on my new I Mac 10.5.4?

      Can Logic 7 pro install on my new I Mac 10.5.4?

    • Toad connectivity

      hi all i am trying to connect through toad to database and i modified tnsnames.ora in developerhome. but when i try to connect to the database by using toad it gave me error. *ORA-01017: invalida username/password;login denied. but i have created use