How to implement this planning function using Fox formula

Hello,
I am new to Fox.
I want to implement this complex logic in a planning function
i have A (Kf X from infoprovider Z_A), B (Kf Y from infoprovider Z_B) & moreover there is one more condition,
If current FISCPER > variable value of FISCPER
KF Z = KF Z1 (from Cube C1)
Else KF Z = KF Z2 (from Cube C2).
for a particular calender week,
X =   ( Y * Z ) / (summation of (Y * Z)  for each week of the whole year)
I know it is complex.
but i have to implement this in a planning function.
The aggreagtion level is built on a multiprovider having A, B , C1 & C2.
Can someone help me out with the FOX formula for this? or is there any better way to do this.
Thanks john

Hi Gerardo,
Thanks for that.
I have tried something similiar to it
DATA CHA_CALWEEK TYPE 0CALWEEK.
DATA CHA_COMP_CODE TYPE 0COMP_CODE.
DATA CHA_FISCPER TYPE 0FISCPER.
DATA VAR_PERIOD  TYPE 0FISCPER.
DATA SUM_YEAR TYPE F.
DATA TEMP_D TYPE F.
DATA SUM_WEEK TYPE F.
CURRENCY IS LOCAL CURRENCY. FOR DATA SELECTION TO BE RIGHT, NECESSARY TO DERIVE FROM CC.
DATA UN_LOC_CURRCY TYPE 0LOC_CURRCY.
UN_LOC_CURRCY = VARV(Z_U_I100).
CHA_COMP_CODE = VARV(Z_U_I100).
To Calculate the D
VAR_PERIOD = VARV(Z_U_I010).
SUM_YEAR = 0.
TEMP_D =0.
IF CHA_FISCPER > VAR_PERIOD.
TEMP_D = {ZSA_BUD2X,CHA_COMP_CODE,CHA_FISCPER,YBUDG_01X,CHA_CALWEEK}.
FOREACH CHA_CALWEEK.
SUM_YEAR = SUM_YEAR + TEMP_D * {ZCREENTSV,CHA_COMP_CODE,CHA_FISCPER,ZIP_RREF1} .
ENDFOR.
ELSE.
TEMP_D = ({ZSAEXCUSV,CHA_COMP_CODE,CHA_FISCPER,YRT_C02X} - {ZCREENTSV,CHA_COMP_CODE,CHA_FISCPER,YRT_C02X}).
FOREACH CHA_CALWEEK.
SUM_YEAR = SUM_YEAR + TEMP_D * {ZIP_INDEX,CHA_COMP_CODE,CHA_FISCPER,ZIP_RREF1}) .
ENDFOR.
ENDIF.
But i am getting a syntax error
Formula error: } expected
  Syntax error in row 21, column 20
i have marke line21 in bold. above.
I feel it is correct, still wonder why i am getting this error.
can you pls help ?

Similar Messages

  • How to call standard planning function in FOX code

    Hi,
    I want to call std. Distribution by reference planning function in FOX formula. Through CALL FUNCTION std planning functions can not be used.
    My requirement is that because I need to execute this distribution function thousands of times with different variable values so I am planning to pass the values for these variables through FOREACH loop.
    Any help is appreciated.
    regards
    Amit Jain

    Hi Amit,
    unfortunately calling a planning function inside a planning function is not possible. And calling a planning sequence from a planning sequence is not supported as well.
    I think is is better if go for a more complex FOX or an exit-function if the planning function needs to be executed online.
    Another way some customers are using to met similar requirements is writing a z-program which determines the variable values in a loop (e.g. by reading a z-table). Inside the loop they set the variables (in the variable container) and when this is done execute a planning sequence for the current variable setting. The whole thing could be executed e.g. in a process chain.
    Hope this helps ...
    Regards Matthias Nutt
    SAP Consulting Switzerland

  • How to implement this Planning sequence ?

    Hello guys,
    I have a requirement something like this.
    A = B * C / D
    where
    A = a KF from InfoProvider IC1
    B = a KF from Infoprovider IC2
    C = a KFfrom  inforprovider IC3
    D = a KF from infoprovider IC4        
    this is how i am planning to do it.
    1. create a multiprovider over all the Infocubes IC1, IC2, IC3, IC4 & a dummy IC5.& an aggregation level on this multiprovider
    2. Do a Copy function with filters to copy the KF B from IC2 to dummy IC5.
    3. Do a Copy function with filters to copy the KF C from IC3 to dummy IC5.
    4. Do a Copy function with filters to copy the KF D from IC4 to dummy IC5.
    5. Implement a Fox formula to do the calculations.
    i wanted to know, whether what i have planned is correct ?
    or is there a better way to do it ?
    Pls give in your suggestions,guys
    Thanks
    John

    Hello Bindu,
    I fear i wont be able to do that.
    Kf A is a KF which has value at a day level. e.g. distribution key for each day of the week
    Kf B is a KF which has a value at a week level.e.g. distribution key for each week of the year.
    will then, your logic work ?
    Thanks
    John

  • How to implement this calendar function in ABAP code

    Hi everyone,
    Our requirement is : Give a date (e.g. YYYY.MM.DD, 1983.12.26), then we need to know which weekday it is. Is there a existing FM for this fuction? or how to implement it in ABAP?
    Thanks a lot for any hint
    Best regards
    Deyang

    Hi Deyang Liu,
        Could you please check these the below links they would give you some idea ....[SAP Calendar Control|http://help.sap.com/printdocu/core/print46b/en/data/en/pdf/BCCICALENDAR/SAP_KALENDER.pdf]
    [Calendar functions |http://help.sap.com/saphelp_nw04/Helpdata/EN/2a/fa00f6493111d182b70000e829fbfe/content.htm]
    [SAP Functions|http://abap4.tripod.com/SAP_Functions.html]
    [Determine calendar |http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa00e9493111d182b70000e829fbfe/content.htm]
    Regards,
    S.Manu

  • How to implement Excel like functionality using Table?

    I have a requirement to implement excel like functionality in a table, i.e when I update the amount in the first row and tab out, the values in the rows below should get affected.
    Could any one suggest idea how to get this done?

    Hi Timo,
    Thanks for your Reply.
    Can you please provide the code for capturing the key stroke in java script and queue it in the server and calling only the adf data table values from it.
    Thanks And Regards,
    Lovenish Garg
    Edited by: lovenish on 21-Jan-2011 04:25

  • How to implement a callback function using LabView's Call Library Function Node?

    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    The SDK.h deacribes the function as:
    //  Function:   SdkSetPropertyEventHandler
    SdkError SDKAPI SdkSetPropertyEventHandler(
                SdkCameraRef                    inCameraRef,
                SdkPropertyEvent                inEvnet,          
                SdkPropertyEventHandler         inPropertyEventHandler,
                SdkVoid*                        inContext );
    //  Description:
    //       Registers a callback function for receiving status
    //          change notification events for property states on a camera.
    //  Parameters:
    //       In:    inCameraRef - Designate the camera object.
    //              inEvent - Designate one or all events to be supplemented.
    //              inPropertyEventHandler - Designate the pointer to the callback
    //                      function for receiving property-related camera events.
    //              inContext - Designate application information to be passed by
    //                      means of the callback function. Any data needed for
    //                      your application can be passed.
    //      Out:    None
    //  Returns:    Any of the sdk errors.
    A separate header file called SDKTypes.h contains the following data:
    typedef  SdkUInt32  SdkPropertyEvent;
    typedef  SdkUInt32  SdkPropertyID;
    typedef  void       SdkVoid;
    typedef  struct __SdkObject*    SdkBaseRef;
    typedef  SdkBaseRef    SdkCameraRef;
     SdkPropertyEventHandler
    typedef SdkError ( SDKCALLBACK *SdkPropertyEventHandler )(
                        SdkPropertyEvent        inEvent,
                        SdkPropertyID           inPropertyID,
                        SdkUInt32               inParam,
                        SdkVoid *               inContext );
    Thanks for your help.
    Alejandro
    Solved!
    Go to Solution.

    alejandroandreatta wrote:
    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    Basically you do not do that. LabVIEW does not know pointers and certainly not function pointers. What you should do instead is writing a C DLL that implements the callback and also exports a function to be called by LabVIEW that translates between the callback and a LabVIEW user event. Look for PostLVUserEvent() here on the NI site to find examples how to do that.
    Rolf Kalbermatter
    Message Edited by rolfk on 02-11-2009 08:00 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How Can implement the audit function using toplink?

    My system must record all the modification, how can I use toplink to implement it.
    I know when toplink modify some object, the toplink will check how many attribute
    have been modified, and then update it to database, Can I implement the record when
    the toplink check modification?
    PS: I dont want to use database trigger.
    Thank first!!

    This thread has been inactive for a while, so perhaps I'm missing something. I am attempting to create audit events on domain objects using a TopLink 10.1.3 DescriptorEventAdapter.
    These audit events mutate or create a snapshot collection on the domain object. Based on what I understand from the above thread, do I still need to create another UoW to commit these in my preInsert()/preCreate() handler methods?
    Is there a way to get in the game before the IDs are assigned to the objects and the change set is computed?
    I certainly don't claim to fully understand the historical client session docs. However, one of our requirements is to show object-attribute-level deltas (list chronologically, grouped by transaction, the attributes that have changed, who changed them, etc. with their before and after values). So my first-blush reaction is that it's easier to utilize the change set to create a collection of transactionally-grouped audit objects on the domain.
    Thanks much,
    --Todd Fredrich                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to change the variable value in fox formula?

    Hi All,
        Please help me achieve this scenario,
             in the variable selection screen , i wil give some i/p like, calyear(0calyear) = 2008.
          In planing function using FOX formula, i must be able change the variable value to 2009.
      Will it be possible to achieve this, can we change a variable value using FOX formula, if possible
    please let me knw how to achieve this.
    Thanks n Regards,
    Priya.

    Hi Priyadarshini,
    i dont know what is your requirement exactly.If you can give a better explanation of ur requirement we can help you. But to answer your question yes we can get new values for the variable in the planning function.
    for this you need to couple the planning function together with the planning filter in a planning sequence. This planning filter should have the variable that you wanted to change. In the WAD when you want to call this planning sequence there is an option to call variable screen. If you enable this, it will pop up the variable screen to get this value again.
    Guess this was helpful.
    Regards.
    Shafi.

  • Which planning function i have to use and how to write this planning fucnti

    Hi Bi Guru's,
    I have rolled out  BW SEM-BPS Planning Layout's for the Annual Budget in my organistaion.
    There are two levels of layout given for the each sales person.
    1)  Sales quantity to be entered Material and  country wise for all 12 months ( April 2009 to March 2010)
    2)  Rate per unit and to entered in second sheet, Material and country wise for the total qty entered in the first layout.
    Now i need to calculate the sales vlaue for each period and for the each material.
    Which planning function i have to use and how to write this planning fucntion.
    Please suggest me some solution ASAP.
    Thanks in Advance,
    Nilesh

    Hi Deepti,
    Sorry to trouble you...
    I require your help for the following scenario for caluclating Sales Value.
    I have Plan data in the following format.
    Country   Material    Customer    Currency    Fiscyear    Fiscper           Qty         Rate        Sales Value
    AZ          M0001      CU001          #             2009          001.2009        100.00                        
    AZ          M0001      CU002          #             2009          001.2009        200.00                        
    BZ          M0001      CU003          #             2009          001.2009        300.00
    BZ          M0001      CU003          #             2009          002.2009        400.00
    BZ          M0002      CU003          #             2009          002.2009        300.00
    AZ          M0001       #               USD          2009             #                                 10.00
    BZ          M0001       #               USD          2009             #                                 15.50
    BZ          M0002       #               USD          2009             #                                 20.00
    In the Above data the Rate lines are entered in the Second Layout, Where the user enters on the Country Material Level with 2009 value for FISCYEAR.
    I am facing problem with this type of data. 
    I want to store the sales value for each Material Qty.
    Please suggest some solution.
    Re
    Nilesh

  • How to Implement custom share functionality in SharePoint 2013 document Lib programmatically?

    Hi,
    I have created custom action for Share functionality in document library.
    On Share action i'm showing Model pop up with Share form with addition functionality.
    I am developing custom share functionality because there is some addition functionality related to this.
    How to Implement custom share functionality in SharePoint 2013  document Lib pro-grammatically?
    Regards,
    - Siddhehswar

    Hi Siddhehswar:
    I would suggest that you use the
    Ribbon. Because this is a flexible way for SharePoint. In my project experience, I always suggest my customers to use it. In the feature, if my customers have customization about permission then i can accomplish this as soon
    as possible. Simple put, I utilize this perfect mechanism to resolve our complex project requirement. Maybe we customize Upload/ Edit/ Modify/ Barcode/ Send mail etc... For example:
    We customize <Edit> Ribbon. As shown below.
    When user click <Edit Item>, the system will
    render customized pop up window.
    Will

  • How to implement this in Oracle Apps 11i

    Hello Friends
    I am working as a consultant for a manufacturing company.
    They have a format for charging Excise and Sales tax on their products (example below). I dont know how to implement this using oracle apps. Please help me ASAP.
    eg.
    Product A:
    MRP = Rs. 100
    Assessable Value (i.e. the value at which I have contract with the Government to pay Excise Duty) = 60% of MRP = Rs. 60 in this case.
    Excise Duty = 16% of AV =0.16*60 = Rs. 9.6
    Now, let’s suppose I am selling my product to a dealer at 30% discount.
    Therefore, Sale Price = 70% of MRP = Rs. 70
    Sales Tax = 4% of Sale Price = 0.04*70 = 2.8
    Therefore, total revenue from the deal = 70-9.6-2.8 = Rs. 57.6

    you can use Advance Pricing or creating discount or attiribute while calculating.
    this is not much complex, possible even with Advance Pricing too. Thanks
    Shiv

  • How to implement this code in labview?

    How do implement this pseudo code in labview? Please keep in mind "a" and "c" in the code below ARE VARIABLES
    for i =0 to i=maxvalue
           if i <= a 
               output = output2
           else if i > a AND i<=c
               output = output2
           else if i < c 
               output = output3
           else i = d
               output = output4
    I understance i can use a case structures and modify the label, but i do not know how to make the label dependent on a variable value. 
    Thanks 

    Try an array of boudaries and use threshold array. See this old example:
    Now just iterate over an array of values using a FOR loop.
    LabVIEW Champion . Do more with less code and in less time .

  • How to implement this attribute ?

    Hi,
    I've this problem.
    In our application to control healthcare expense I've implemented a cube with 6 dimensions. (here for who knows Italian : http://www.oracle.com/global/it/customers/profiles/profile_77.html )
    The biggest dimension is the "patient" one, with 1.500.000 units at 5th level, grouped in geographic aggregates, until the entire city at highest level.
    Now customers wants to have the possibility to select patiens with chronic disease from these. There are about 500 kinds of chronic diseases.
    Every patient can have no one, one, or (and this is the problem) more then one of these chronic disease.
    How to try to implement this? as a new dimensions or as an attribute ?
    I've thought that best way is to introduce a new (chronic diseases) dimension, to have a way to select one or more of these diseases at all levels of patient dimension.
    I'm asking how to solve the problem that a single patien can also have more than one disease.
    Is there any way to implement this ?

    thanks to everyone for the answers
    I've some questions.
    to olapworld:
    have you any sample code to show me how to implement the dimensionalized valueset and the customizations needed ??
    to scott:
    I think I'm not understanding your suggestion:
    my target is to add the "ilnesses" selection to other ones. The most important cube of my applications analyze
    healthcare expenses from six dimensions. Customer wants analyze cube "adding" a way to select only "ilnesses" patients and elvaluate their expense.
    I'm in doubt becouse a patient can also have more then one ilness, so I can't simply add a "ilnesses" dimensions to the cube and mapping it to an "ilness_id" in the fact table.
    How can the two dimensioned cube to help me in this ?
    to Rafalm1:
    in any case, implementing Count(Distinct patient) would be useful for me, to have a way to count the number of patients who had a healthcae assistence. Can you suggest me how to implement this ?

  • How to implement this aggregate logic at target column in odi inteface mapp

    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    how to implement this aggregate logic at target column in odi inteface mappings

    Hi
    if you don't want to aggregate try to define a user function
    analytic_sum($(value))
    implémented by
    sum($(value))
    after that
    replace your
    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    by
    analytic_sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)

  • How to delete Hyperion Planning member using ODI

    Hi All,
    Anyone know how to delete Hyperion Planning member using ODI? And how to update account type on Hyperion Planning Using ODI?
    e.g.:
    I have a member with account type Saved Assumption, and I need to change to Revenue, but it cannot change. But if I change to Expense, it can. So what's wrong with the mapping?
    This is my csv file for update a member on Hyperion Planning.
    Parent,Account,Default Alias,Operation,Data Storage,Two Pass Calculation,Account Type,Time Balance,Skip Value,Data Type,Exchange Rate Type,Use 445,Variance Reporting,Source Plan Type,Aggregation,Member Formula
    Account,Statistics,,Update,,,,,,,,,,,,
    Account,Meal,,Update,Store,,Expense,,,,,,,,,
    Account,Test1,,Update,Never Share,,Saved Assumption,Average,None,Non-currency,none,,,Consol,~,
    Account,Test2,,Update,Never Share,,Revenue,Average,None,Non-currency,none,,,Consol,~,
    Account,Test3,,Update,Never Share,,Saved Assumption,Average,None,Non-currency,none,,,Consol,~,
    Thanks in advance.
    Regards,
    Sumardi
    Edited by: Sumardi Wijaya on Mar 31, 2009 10:57 PM

    Hi,
    To delete a member you use the Operation column, the following values can be used.
    Update – This is the default and is used if not populated, it Add, updates, moves the member being loaded.
    Delete Level 0 - Deletes the member being loaded if it has no children
    Delete Idescendants –Deletes the member being loaded and all of its descendants.
    Delete Descendants –Deletes the descendants of the member being loaded, but does not delete the member itself.
    Does the member you trying to change to Revenue have a variance reporting set to "Expense" as it will need to be set to "Non Expense"
    Also in your interface you can add logging options in the IKM, this maybe will give a clearer indication where your problem lies.
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for

  • Solaris 10/6/06 Routing

    Hello, I am trying to set up my Solaris server as a router and am having trouble. I am brand new to solaris but have had some experience with windoze. Basically my server has two nics sfe0 and sfe1 sfe0 is connected through a switch to my private net

  • Editable regions in child page

    Hi all. Dreamweaver 8. I have a template with two editable regions, Header and Body. I have a new page, and I want to apply the template. I am prompted to move the content to the new regions. Is my new child page supposed to have editable regions wit

  • Cannot Schedule report in WEBI

    I've built a report in Crystal XI Release 2 and brought it into WEBI, however, I cannot schedule the report to run (even immediately).  When I try to schdule the report, I get a request for Database Logon information for every query in the report, ev

  • Time Machine Disk Icon not Displaying Properly After Reconnect

    I'm noticing a little oddity that has been happening since I upgraded to Mavericks.  If I disconnect my Time Machine (TM) volume, then, reconnect it later and perform a backup, the disk icon on my desktop isn't changing to the green TM icon, it's sti

  • I finally updated my iPhone 4 last night, and all of my apps are gone. Is there a way I can get them back?

    Everything else remained-- pictures, notes, even my open web pages. It is probably worth mentioning that I recently got a new computer (MacBook), and I initially set up my iPhone on an old PC. Are my apps salvageable?