Determine context value dinamically

Hi Gurus,
I have to develop a report where as input value the user sets the year and in the columns we have the calendar week and in rows several KFs.
Let say we have KF1 and KF2. KF1 is a ratio from the underlying infoprovider, Sales volume. KF2 is the average of KF1 for the last 4 weeks(not including the one in context).
So my concern is how could I determine dinamically the value for the week in the context of the calculation so I can get the values for previous weeks. Here you have an example:
Calendar week     2     3     4     5                         6 ......
Actual Sales           200  300  400   500                     250
Avg. actual sales
last 4 weeks                                         ((200 + 300 + 400 + 500) / 4) = 350
Thanks a lot in advance!

I´ve tried using four hiden ratios and restricting them using a replacementh path variable defined over the calendar week but it does not allow me to replace by the value of the characteristic. It only allows to do the replacement by a query or another variable.

Similar Messages

  • Abort Could not determine a value for variable 0DAT from the authorizations

    Hi All,
    I encountered an error '/ Abort Could not determine a value for variable 0DAT from the authorizations\' when executing my query on a multiprovider in BW 3.5.
    Can anyone help me in finding a solutionn to this issue.
    Thanks,
    Kartik.

    Hi Kartik,
    I am sorry as that note is for NW2004s. Please check if 0DAT variable installed from a business content? if not then I think thats the cause of the problem.
    Hope this helps,
    Bye...

  • Cannot determine a value for an exit variable in the Formula fn w/p empty

    Hi All,
    We have an exit variable Z_EX_AR_VAR, the would read a hierarchy node input variable (Z_HN_AREA), which is furthur based on a hierarchy input variable (Z_HR_AREA), and wouuld return the first leaf of it.
    We have implemented a input ready query based on this exit variable and it is getting the first node and is input ready and saves the data to the database.
    It works well in the query when we have filtered the characteristic with the hier and hier node and the exit variables.
    We need to use the same value to be used in the Fox function.
    As per the requirement, the Fox function has to process the zero (empty) records.
    So, we have customized formula function to process emptry records.
    And in the function of type formula function that processes empty records, we have used the following statement.
    DATA AR type ZAREA.
    AR = VARI ( Z_HN_AREA, HIENM=Z_HR_AREA, 1).
    We are getting the following error message:
    Cannot determine a value for the variable Z_HN_AREA.
    Planning function ended with errors.
    What is that we are doing wrong here. Is it with the 'Process Empty Records' function that cannot read the variable.
    How come this variable is working in the query and it is not working in the FOX.
    We have done the variable to variable binding in the WAD also. Still the same problem.
    Any ideas? Thanks in advance.
    Best Regards,
    - Shashi
    Thanks in '

    Hi All,
    Michael Wolf from SAP confirmed that we cannot use VARiable read functions in the customized Formula function that processes the zero (empty records) as he spoke to SAP AG about the issue.
    Hence we have made a work around by creating a valid record using a dummy key figure in the Custom Formula function that processes empty records so that in the next step, the regular Formula function would get executed, where we could access the variable values by using VARV, VARI functions.
    Thanks,
    - Shashi

  • To access context values in java util methods in webdynpro java

    My requirement is to access the wdcontext values in the my util classes.
    kindly  suggest how to access the context value in my util class
    Regards
    Priya

    The context reference must be passed to the .java class in order to access same in the .java
    for example,
    Change MyUtil.java - get the reference to this file.
    public class MyUtil {
    //make a local variable of context element type.
    private IPrivateCompView.IHashContextElement local_context;
    //add context type in Constructor
    public MyUtil (IPrivateCompView.IHashContextElement local_context, /*rest of params*/){
            this.local_context = local_context;
            //.... rest of initialization
    In Webdynpro, initialize the call by passing the context reference.
    IPrivateCompView.IHashContextElement hashmap = wdContext.currentHashContextElement();
    //initialize my class
    new MyUtil( hashmap, /*rest of params*/);
    regards,
    Nikhil

  • Unable to determine the value of component  ''! Workflow error, please help

    Hi All:
        I am getting the error "Unable to determine the value of component  ''" and workflows are not getting processed. I found OSS notes 879100 related to this issue but I am new to workflow and not sure where to start from! Here is the notes description:
    The workflow WS20500025 ('Service Connection Order Processing') encounters an error directly after being started. The following error messages are displayed in the workflow log:
    SWP102: Error at start of an IF branch
    WL821: Work item 000000100012: Object FLOWITEM method EXECUTE cannot be executed
    SWF_RUN535: Error '9' when calling service 'SO_OBJECT_SEND'
    SWF_RUN534: Problems occurred when generating a mail
    WL863: Notification of completion cannot be generated
    SWF_EXP_001073: Unable to determine the value of component 'QUOTATION'
    SWF_EXP_001072: Error in the evaluation of expression '<???>' for item 1
    SWF_RLS_001101: Operator 'GT': The value of the left operand cannot be determined
    SWP085: Error when starting work item 000000100012
    SWP010: Error when evaluating the IF condition for node 0000000075
    Other terms
    Service connection processing, service connection workflow
    Reason and Prerequisites
    This is due to a program error.
    The checks in the workflow Basis have been made stricter. A query of the type 'Quotation.number > 0' now causes an error if the container element 'Quotation' is not set. This is always the case if the workflow is is running without quotation prcessing, for instance.
    Solution
    The error is corrected in the next Support Package.
    If you want to implement the corrections manually in your system, change the condition in step 000075 of workflow WS20500025 as follows:
        &IS-U: Kundenangebot& EX
    and &IS-U: Kundenangebot.Verkaufsbeleg& > 0
    Save and activate the workflow.
    I am new to workflow and not sure where to start from! Could someone please help me with this? Rewards assured.
    Thanks.
    Mithun

    ANy ideas? Please help me if anyone knows the answer.
    Thanks.
    Mithun

  • Dynamic determination of VALUES of an Attribute in a Mail-form

    Hi All,
    We have created a Mail Form with ceratin attributes. We have assigned a target group to a campaign.
    now, the requirement is to determine the VALUES of the attributes dynamically for the BPs in the target groups.
    please help me what should be done to meet this rquirement.

    Hi there,
    I believe the following link demostrates the whole process including your requirements:
    [http://wiki.sdn.sap.com/wiki/display/CRM/NavigationtotheCRMUIComponentfromMailFormorSmartFormsHyperLink|http://wiki.sdn.sap.com/wiki/display/CRM/NavigationtotheCRMUIComponentfromMailFormorSmartFormsHyperLink]
    Please reply if this helps.
    Regards,
    Vinamra.

  • How to determine the value of a Standard Value in a routing operation

    Dear Experts,
    Kindly guide me on how to detemine the value of my Standard Value in the  operation of my routing, or in the phase of my Master Recipe.
    I mean what determines the value that I enter for the Standard Values: Machine  and Labor in the phase of my Master Recipe?

    Hi,
    In the Routing / Master Recipe, the standard values are based on the lot size.
    For Example, if you have the lot of 100 KG, then in recipe the machine time will be 2 hr and labor time will be 2 hours, it means to make 100 KG we require 2 hrs of machine and 2 hrs of labor.
    Normaaly all production manager / supervisor will have the date for the hours. The system will calculate will respect to batch / lot size.
    If you have order for 1000 KG, then the system will assign 20 hrs for Machine and 20 hrs for labor.
    This will be used for Capacity planning and Costing.
    Capacity plan here your requirement is 20 hrs for machine and labor. If you have a reacto which wil run for 24 hrs a day, then the order will be completed in a day.
    Costing is concerned, all std. valur key will be assigned with an activity type in work center / Resources and the prices for activity type / cost center will be maintained in KP26.
    Based on the cost and hours, the system will allocate cost for the order (it will be planned cost). When you are confirming the order you will enter the actual time for the operation, then that will be your actual cost.
    Pl do a sample test scenario in your sand box, and surely you will understand more.
    The data for Routing / Recipe will be provided by the production manager of the plant and activity price will be provided by the finance team.
    Thanks,
    JK

  • How to determine the values for Model Parameters in Forecasting

    Hello Gurus,
          On basis we will determine the values  for the Model Parameter values (Alpha, Beta, Gamma, Sigma).
    Thanks,
    Siva.

    Dear Siva,
    the values are dependent from the forecast stratey and forecast model.
    The forecast strategy determines the method or the techniques that are used to create the forecast. You set the forecast strategy in the forecast profile.
    There are some settings that you must make for certain forecast strategies. The table below shows you which settings these are. You make these settings either in the univariate forecast profile or under the Model and Parameters tabs of the Forecast view on the demand planning desktop.
    Model initialization is the process by which the system determines the necessary model parameters for the chosen forecast model. These parameters are in following link:
    http://help.sap.com/saphelp_scm50/helpdata/en/ac/216b74337b11d398290000e8a49608/frameset.htm
    I hope this helps you further.
    Regards,
    Tibor

  • How to determine the value of  -D__SUNPRO_CC?

    Could any body tell me how to determine the value of -D__SUNPRO_CC? Iam now using Sun Studio 9.
    Thanks in advance.

    The C++ Users Guide describes all the predefined macros set by the compiler.
    The __SUNPRO_CC macro is a 3-digit hex number. The first digit is the C++ compiler major version number, which is 5 for all releases from WorkShop 5 in 1998 through the current release, Sun Studio 10. The second digit is the minor version number, increasing by 1 for each release in the major release series. The 3rd digit is a place holder for the very rare (none since 1994) cases when we have a micro version number. It is zero in current releases.
    The current compiler release is C++ 5.7, so __SUNPRO_CC is set to 0x570.
    You can see the macro setting by running
    CC -dryrun -c foo.cc
    and look for the -D__SUNPRO_CC =0xNNN on the ccfe command line.

  • Setting up Flexfield Context Value programmatically in Custom.pll

    I need to default the context value of my DFF based on user profile/responsibility, How do I assign a value to context value field in custom.pll?
    Thanks,
    AJ

    Hi John,
    I got the same issue. Is yours being resolve yet?
    Can you share the solution.
    Thanks.

  • Passing a context value to BAPI Import parameter in WebDynpro!

    Hi All,
    I have a small doubt here!
    I am trying to create a sales order using Webdynpro through BAPI.
    There i want to hard code the value of order type like, i want to fix the value before running the porgram itself i.e., statically i want to pass the value.
    What i have done is,
    created a Context variable and has assigned the value in the init() of view like,
    <b>wdContext.currentUIElementsElement().setDocType("ZORD")</b>
    and also changed the value attribute of InputField to the context variable called "DocType".
    But now we need to pass this context value to the BAPI Structure called ORDER_HEADER_IN  i.e, to the class "Bapisdhd1". with out the hardcode value it is working, but i want to pass the value before executing it self. so What i can do, can any body pls give sample line of coding.
    Thanks in advance,
    Regards,
    Sireesha.B

    Hi
    Have you bound instantiated the Bapi class?If not then do like this.
    BapiClass input = new BapiClass();
    wdContext.node<BAPINODE>.bind(input);
    Above code can be written in your Custom Controller or View's doinit.
    Then you write the code for doctype as given in the post above.
    Regards,
    Ajay

  • Null DFF Context Value in R12

    Hi Experts,
    Recently we have upgraeded ebs 11.5.10.2 to R12.1.3 .
    In 11i , we have DFF at supplier site level ( Title : Vendor Sites).
    After upgradation , we are not able to see the context value at supplier site level.
    Is there any set-up required for the same ?
    Please guide me.
    regards
    sd

    Hi
    can i get the information type from ExtraInformationTypeVO,
    but the create ,update pages using different VOs
    Please tell me the solution.
    Thanks
    Raju

  • Person DFF Context Value based on 2 criteria (Business Group and Emp Type)?

    Hello,
    We're implementing HR module into multiple business groups.
    I need to define context value for DFF "Additional Personal Details" based on 2 criteria Business Group ID and Employee Type
    Any idea how to do it?
    Thank you
    Elie

    Hello Elie,
    I am not sure on it,However have you tried creating a context with combination of Business Group and Person Type using merging,
    business_group_id || "_"|| person_type_id And structures would be something like 80_2112 Business Group id = 80 and Person Type id=2112.
    It may resolve your issue if this works out.
    Regards,
    Saurabh

  • Accessing  context value of webdynpro through  javascript

    hi gurus,
    how can I address the value of a context in adobe forms's   java script.
    I want to hide and display some fields based on  the value of the context of the WDA application .
    Thanks

    Hello,
    Please refer this blog:
    /people/juergen.hauser2/blog/2007/09/03/accessing-data-nodes-in-sap-interactive-forms
    If this is not working , assign the context value to a text field on the form which is kept hidden.
    Then by using , fieldname.rawValue we can access the field value.
    THanks & Regards,
    Omkar Mirvankar.

  • Concatenating context value and non-context value

    Hi,
    I have a context binding to one of the input field(lets say field-X) and also I have another dropdown list UI element(lets say field-Y) which is not bound to any context.  When a user enters values in field-X and selects a item from field-Y hits the save button, I need to concat "Field-X - Field-Y" and assign this concatenated value to field-X context.  So in a road-map (next screen) when I retrieve field-X context value it should have concatenated value of dropdown UI element as well.
    Where do I do this concat (I mean which method e.g. WDModify) and how do I do it?
    Thanks
    Praveen.

    Hi Praveen,
    What do you mean by field-Y is not bound to any context?? I am sure you would have atleast bound the selectedKey property of the dropdown list with some attribute of the context.
    For concatinating the fileds you have to write the code on the onAction function of Save button which is taking you to the next screen of the road map. On the onActionSave() you have to get the values of the currently selected input field and the dropdown value. Then you have to concatenate the values and set it in some attribute from where you can pick it in the next screen.
    Please use this code in onActionSave() method:
    // Get the value of the currently entered value of the input field from the attribute which is bound to the input field. I am assuming the name of the attribute as InputFiledValue
    String inpValue = wdContext.currentContextElement().getInputFiledValue();
    // Get the value of the currently selected value of the drop down field from the attribute which is bound to the drop down field. I am assuming the name of the attribute as DropDownValue
    String dropDpwnValue = wdContext.currentContextElement().getDropDownValue();
    // Concatenate with "-" in between
    String concatenatedValue = inpValue+ " - " + dropDpwnValue;
    // Set the concatenated value to a temporary attribute. This will be accessed in next view of road map.
    wdContext.currentContextElement().setConcatenatedValue(concatenatedValue);
    // OR if you want to save in same inputfield Attribute then also you can do that.
    // use the similar code as above. see this:
    // wdContext.currentContextElement().setInputFiledValue(concatenatedValue);
    Here I am assuming that the attribute which have bound to the inputfield and dropdown field are directly under the context node. If not then you have to get the values from a specific node. Do it like this:
    // Get the value of the currently entered value of the input field from the attribute which is bound to the input field.
    String inpValue = wdContext.current<NODE_NAME>Element().getInputFiledValue();
    // Get the value of the currently selected value of the drop down field from the attribute which is bound to the drop down field.
    String dropDpwnValue = wdContext.current<NODE_NAME>Element().getDropDownValue();
    In the next view you can get this concatenated value and can use whereever you want. Use following code:
    // To get the value of the concatenated string.
    String value = wdContext.currentContextElement().getConcatenatedValue();
    I hope this solves the issue. Please revert back in case you need any furtehr help on this.
    Thanks and Regards,
    Pravesh

Maybe you are looking for

  • Choosing Proper Video Output Format

    I've been searching the internet and this forum for an answer to what is probably a simple question, but haven't located the right source. -I want to produce a movie using still photographs using iMovie HD. I want to use the proper format for viewing

  • Repository Variables in Dashboard prompt.

    I am still learning how to use variables in Dashboard. I have created one Dynamic Repository Variable. I want to use this variable as Default in Dashboard prompt. Please help me resolve this issue. Thanks, Pooja

  • What is the DB field of last balance of bank reconciliation

    Dear All, After upgrade our client from SAP2007A to SAP8.8A, their last balance has been changed. Can anybody let me know what is the field name then I can compare it in the old and the new DB? Thanks. Regards, Yuka

  • New features in 1.5

    Hi, Can some direct me to a good resuource which descibes abut the new features introduced in the 1.5 release like Generics? Thanks in advance, Apu

  • I am having problems printing a Keynote file to a Keyocera c3232

    I am having problems printing a Keynote file to a Keyocera c3232.  Its a 100MB file sent from a Mac Pro 2 x 2.4 GHz Quad Core to a the C3232 which has 768MB of memory installed.  I have even optizmized the PDF down to 30 mb and still taking about a 4