Variables for prior and next periods in logic

Hi,
I'd like to do something that I would have thought should be quite simple, but I just haven't managed to get it right.
In Category, we use the properties Year and Month. For example:
Member  Year     Month
Actual     2014     APR
SP          2016     DEC
The issue is that we would like to create SP (Strategic Plan) for 3 years, of which the year in the property, 2016, is the first.
Creating variables for the month and for the first SP year is simple:
*SELECT(%CYEAR_SP%,"[YEAR]","CATEGORY","[ID]= 'SP'")
*SELECT(%CMONTH_SP%,"[MONTH]","CATEGORY","[ID]= 'SP'")
I'd then like to  dynamically create 3 variables based on properties Year and Month; %SP1%, %SP2% and %SP3%, that I can use in scoping, in *WHEN/*IF, in GET and in *REC. It should be something like:
%SP1% = %CYEAR_SP%.%CMONTH_SP% (2016.DEC)
%SP2% = %CYEAR_SP%(+1).%CMONTH_SP% (2017.DEC)
%SP3% = %CYEAR_SP%(+2).%CMONTH_SP% (2018.DEC)
However it doesn't seem possible to use mathematical expressions for this, and I haven't managed to use NEXT or PRIOR successfully either.
Has anybody out there encountered this?
/Cecilia

Thanks Roberto! Square brackets for Year in *SELECT was the syntax solution, works like a charm!.
I developed this further by creating new variables concatenating the year and  month:
*SELECT(%SP1%,"[ID]","TIME","[ID]='%CYEAR_SP%.%CMONTH_SP%'")
*SELECT(%SP2%,"[ID]","TIME","[ID]='%CYEAR_SP2%.%CMONTH_SP%'")
*SELECT(%SP3%,"[ID]","TIME","[ID]='%CYEAR_SP3%.%CMONTH_SP%'")
/Cecilia

Similar Messages

  • CF Set form.variable for query and Next/Previous pages error

    I have a CF form with a select that posts to a CF "action" page.
    On the action page I: CFSET ItemNumber=#form.ItemNumber#
    I CFOUTPUT the 'ItemNumber' into the CFQUERY (which is an Inner Join dependant on the '#ItemNumber#')...
    All of the above works just fine and displays the database fields in color alternating rows, per the rest of the code.
    Here's the problem:
    I'm displaying 40 rows on a page per "Next and Previous" code. (CFPARAM name="start" default="1" and CFPARAM name="disp" default="40" along with the rest of the NextN code in the header and body). This does display 40 rows on the page and puts a link at the bottom of the page "Next 40 Rows", etc.
    Note: I'm only querying the database once and using the query (query name="data") to populate the table rows And the NextN code (CFOUTPUT name="data") And (CFIF start + disp GREATER THAN data.RecordCount, etc)...
    The problem happens when you click the "Next 40 Rows" link to display the 2nd page of rows. Since (I'm assuming) this NextN code is 're-reading' the same page from top to bottom, an error is thrown when the code tries to read the CFSET ItemNumber=#form.ItemNumber# at the top of the page.
    With the #form.ItemNumber# on this action page Originally coming from the previous posting of the form to this action page, when the "Next 40 Rows" link is clicked and the NextN code re-reads this action page - the CFSET ItemNumber (#form.ItemNumber) is not getting populated and throws the error...
    I hope I've not made this sound confusing.
    I can get the NextN code to work when I'm just querying the database without "flying in" a form variable. But when I CFSET a variable (#form.ItemNumber#) that is inserted into the query, the second page of the NextN throws an error and doesn't display.
    I would include the page code here but it would be fairly lengthy and, as well, the NextN code is a 'standard' CF code -- I've narrowed the problem down to the above "Element is undefined" (when the page tries to reload from the "Next 40 Rows" link) and am hoping there's a simple fix or another way to display the records in Next and Previous pages.
    Thanks to anyone in advance for shedding light on this.
    - e

    Thank you for the reply, Owain.
    Yes - The Next/Previous at the bottom of the page are hyperlinks.
    <a href="ThisPage.cfm?start=#Evaluate("start + disp")#">
    The following is at the top of the page (and is the variable from the form that I CFOUTPUT in the query):
    <cfparam name="ItemNumberDropdown01" default="">
    <cfset ItemNumber = #form.ItemNumberDropdown01#>
    The error report showed that the "Next Page" hyperlink was reading an undefined variable... although when the "action page" first opens from the form posting to it, it populates the CFSET just fine (per the cfparam and cfset above)... As you mention, the hyperlink clearing the form scope is what causes the error in trying to display the next set of records...
    The form page and the 'action page' are both secure pages with an application page setting the session, etc. Am I at risk in using an URL scope?
    Where would this URL scope be put? (The href is shown above - would the URL scope go in this? - How would this be written?)
    The CFPARAM and CFSET would still exist at the top of the 'action page' and still throw an error wouldn't it or would this be replaced with something else to read the form.variable for this 'first' action page to be displayed?
    Thanks again for the 'education' on this...
    - ed

  • Authorization check for Open and Close Periods ( OB52)

    Dear Experts,
                           We have created ZOB52 for Opening and closing periods. This is replica of Tcode: OB52 with some other developments that we required. Here for resticting user I had tried authorization Object: F_BKPF_BUP for particular company code wise posting. This was however not working. Kindly suggest.

    Hi,
    The last column in OB52 - AuGr (Authorization Group) helps you in restricitng certain users to use a posting period. This field is freely definable.
    If only a limited set of users is to be able to post in a particular posting period, proceed as follows:
    Add the posting period authorization (authorization object F_BKPF_BUP) to the authorizations of the selected users. Assign an authorization group (e.g. '0001').
    In OB52,  in the row with the account type '+', enter the period(s) whose use is to be restricted in the first period, those which are available to all users in the second period, and the authorization group (e.g. '0001') in the last column.
    For company code wise restrictions, you should have a seperate posting period variant for each company code.
    Edited by: Michael Gerard Leo on Jan 12, 2010 2:55 PM
    Edited by: Michael Gerard Leo on Jan 12, 2010 3:01 PM

  • Reg:T-CODE for open and close period for materials(new plant).

    hi sap guru's
    T-code for following process
        can anybody send me , how to create calendar to new plant . and what is the T-code to be use for open and close period of materials for new plant.
    thanks
    sakthi..

    Hi Sakthi,
    I am assuming that you are asking about the factory calendars which are assigned while difing the plant.
    Factory calendars are created through transaction "SCAL".
    Opening and closing of MM periods can be done through transaction MMPV.This is based on the company code.Before using MMPV ,you can look the last opened period in the transaction MMRV.
    Reward points if it helps.
    Regards
    Karan

  • Report that display 'Net Pay' by Empl for current and previous period.

    Hi,
    We are looking for a SAP report that display 'Net Pay' by Employee for current and previous period in USA payroll module. If you know of any, pl let me know.
    Thanks in advance,
    Niranjan

    Thanks Archana and Sikindar.
    We knew about this report, however, it gives information one below the other if we run, say for 2 periods, but what we are looking for is something as shown in example below
    Empl #      Empl # Name    Prev Pay period Net Pay        Current Pay period net pay.
    123              XYZ                     $ 1200.00                                 $ 1200.00
    256              ABC                    $  2000.00                                $ 3000.00 
    We want to run for 2 periods at a time and get the results as above. That way, payroll dept can run this report and compare if we are paying too much in current pay, compared to previous pay. This is basically to avoid any typos when they create new pay records in infotype 0008.
    Niranjan

  • The pinwheel is spinning for longer and longer periods of time. Have to manually shut off iMac sometimes to get it to restart.

    The pinwheel is spinning  for longer and longer periods of time. Why and what do I need to do about that?

    You have 10.6 on that machine, I suggest you stick with it for performance, third party hardware and software reasons as long as possible.
    Consider 10.8 (not 10.7) when it's released, because 10.7 and 10.8 will require a new investment in software and newer third party hardware as it requires newer drivers the old machines won't have. (forced upgrade because of software, really nice of them)
    http://roaringapps.com/apps:table
    Far as your Safari problem do these things until it's resolved:
    1: Software Update fully under the Apple menu.
    2: Check the status of your plug-ins and update (works for all browsers) also install Firefox and see if your problems continue. You should always have at least two browsers on the machine just in case one fails.
    https://www.mozilla.org/en-US/plugincheck/
    Flash install instructions/problem resolution here if you need it.
    How to install Flash, fix problems
    3: Install Safari again from Apple's web site
    https://www.apple.com/safari/
    4: Run through this list of fixes, stopping with #16 and report back before doing #17
    Step by Step to fix your Mac

  • How to create Presentation variable for columns and to use it in Narrative?

    Hi All,
    Anybody know how to create presentation variable for a column (i.e., i need to create it in edit formula section itself). And then, I should use it in Narrative section to display that column value. Is it possible? Or do i need to use any other variable for this requirement? If so please let me know, how to create it? This is very urgent requirement.
    Thanks in Advance
    Thenmozhi

    Hi Satya,
    I just want to create a table that should horizontally display the values like below:
         SUID Tag # :123456               Year Mfg: 2007                                                                                     
         Description: computer corporation FA ID#: 4576
         Model Number: 4569 hESC: #ert
         Serial Number: 78945 Flags: c
    Department: Hematology
    User: thenmozhi
    Database: OLAP
    I think we can create this type of report using either Narrative or Static Text. But I am not sure whether it is possible or not? And also another thing is that sectioning is applied for SUID Tag # column. So, depending on the dashboard prompt if the SUID Tag # retrieves two or more values.
    Then the first value for example 123456     and the values for the other columns related to this SUID Tag # value should display in the first page (i.e., page 1). And if the next value of the SUID Tag # for example say 678901 then the values should move to second page that is like this:
         SUID Tag # :678901               Year Mfg: 2008                                                                                     
         Description: Computer Manufacturing FA ID#: 4577
         Model Number: 4570 hESC: #eth
         Serial Number: 78946 Flags: G
    Department: Hematology
    User: Rehman
    Database: OLAP
    Thanks
    Thenmozhi

  • SSRS Prior and Next Functions

    I have several reports in Hyperion that I use the next and prior functions to look at the row right before and/or the row after.
    To do this, I sort the data in a certain way to make sure the prior or next functions in hyperion find the right rows above or below the current row. For example, I may sort 2 other rows to get the right sorting for the functions to work correctly.
    Now I would like to be able to find a way to recreate these reports in Access and SSRS.
    I have been looking for a way to accomplish this in either or both.  But at the moment I have not found a way.
    If I need a unique field to help with this, I can concatenate between about 4 fields to make a column that has a unique key for each row.
    Could anyone point me at a good article or know how to do this?  I would really appreciate it very much, thank you!

    Hi grahamtribe,
    Based on my research, there is no such next function in Reporting Services. We can use custom code with VB code to write a function to achieve the similar goal. For more details, please see:
    Add Code to a Report (SSRS)
    Alternatively, if you have any concern about this, please submit a feedback at
    https://connect.microsoft.com/SQLServer/Feedback. Connect site is a connection point between you and Microsoft, and ultimately the larger community. Your feedback enables Microsoft to make software and services the best that they can be, and you can learn
    about and contribute to exciting projects.
    Thank you for your understanding.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Do I need to set  system env variables for weblogic and SOA server installation?

    Hi All,
       I already have two weblogic application servers on my machine(that were installed by others).
    I observed some environment variables were also set in System variables(ORACLE_HOME,WEB_SERVER_HOME etc) section in Env variables section(Start Menu---> Computer --> properties ---).But why do we need to have system environment variables wherein we already have those variables in files like setDomainEnv.bat or/and setSOADoaminEnv.bat for each server.
    And one more thing system variables will be applicable for all servers(the whole machine) right.It may spoil the installation of new servers and present servers as variables should be unique to each server.
        I want to install weblogic and SOA server installation.
    So Can I remove the existing system variables(as they will applicable for every server) and install weblogic and SOA server installation without setting up the environment variables?
    Especially I have multiple Weblogic servers,In that case how it would be to have environment variables(JAVA_HOME,WL_HOME,ORACLE_HOME etc)?
    Please guide me on this to installl SOA suite .
    Thanks in advance

    Hi All,
       I already have two weblogic application servers on my machine(that were installed by others).
    I observed some environment variables were also set in System variables(ORACLE_HOME,WEB_SERVER_HOME etc) section in Env variables section(Start Menu---> Computer --> properties ---).But why do we need to have system environment variables wherein we already have those variables in files like setDomainEnv.bat or/and setSOADoaminEnv.bat for each server.
    And one more thing system variables will be applicable for all servers(the whole machine) right.It may spoil the installation of new servers and present servers as variables should be unique to each server.
        I want to install weblogic and SOA server installation.
    So Can I remove the existing system variables(as they will applicable for every server) and install weblogic and SOA server installation without setting up the environment variables?
    Especially I have multiple Weblogic servers,In that case how it would be to have environment variables(JAVA_HOME,WL_HOME,ORACLE_HOME etc)?
    Please guide me on this to installl SOA suite .
    Thanks in advance

  • Variable for prior 36 months

    Hi all,
    I need to create a required variable to get the prior 36 months of data EXCLUDING the current month. Can someone help me with this?
    Thanks,
    Angie

    HI,
    in BI Go to SE38 ZXRSRU01 where you can write code for user exit variable.
    DATA : Month(2) type c.
    DATA : Year(4) type c.
      WHEN 'ZVAR2'.
        IF I_STEP = 2. "after the popup
          Month = sy-datum+4(2).
          Year = sy-datum+o(4).
          IF Month EQ '01'.
          Month = '12'.
          Year = Year -1.
          ELSE.
          Month = Month - 1.
          ENDIF.
          Concatenate year month into L_S_RANGE-high.
         clear : month, year.
          Month = sy-datum+4(2).
          Year = sy-datum+o(4).
          Year = Year - 3.
          Concatenate year month into  L_S_RANGE-low.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
    ENDCASE.

  • 11.1.1.6.4 Repository variables for DSN and USER do not work after upgrade

    Hi,
    The Repository Variables OLAP_DSN and OLAP_USER no longer work after upgrading to 11.1.1.6.4 i.e they return a connection error when trying to import metadata but the connection is correct if explicitly set without the variable used.
    I have tried the following resolution:
    - From command line execute commands to set variable properties via admintool.exe /command vartext.txt
    Open rpdname user password
    SetProperty "Variable" "OLAP_DSN" Initializer "'ORCL.GLOBAL'"
    Save
    Close
    Exit
    This script works fine as demonstrated by commenting out Save, Close, Exit and running. But it does not resolve the problem.
    The issue is consistent as in the OLAP_USER variable does not work if DNS for connection pool set to ORCL.GLOBAL.
    Is this a bug?
    Thanks in advance
    Edited by: 983325 on 26-Feb-2013 02:35

    There is a 3.1.0.5 client. First thing I would try is the newest client.
    Sent from Cisco Technical Support iPad App

  • Environment variable for share and etc

    Hi all, first let me say sorry if this is the wrong sub-section, This one is the closest as far as I could tell.
    I've been messing around with building self-contained packages for top level apps like gimp, vlc etc. Ive gotten all the libraries worked out by using LD_LIBRARY_PATH.
    However they still need files in /usr/share and /etc. I know I can change these at compile time, but what im trying to do change some variable to look in the programs root directory not the systems.
    Does anyone know if sysconfdir can be changed at runtime? for example use ~/Progs/Gimp/usr/share instead of /usr/share? Ive been playing around with a command called cde which sandboxes that apps fairly well
    but its very unclean, and is not aware of any files outside the sandbox (think chroot).
    Thanks in advance, and sorry for my bad grammer.

    Prashant,
    Did you check this?
    https://kr.forums.oracle.com/forums/thread.jspa?threadID=670431
    Regards,
    Dpka

  • Gcc seems not to be recognising environment variables for include and lib.

    I'm trying to install programs into a non standard location, but GCC does not seem to be checking the paths defined in global profile. All 3rd party dependencies are not found and only the default locations are checked.
    The environment variables defined in profile are:
    CPLUSINCLUDEPATH="/DVL/include:/GNU/include:/usr/X11/include:/TEST/include"
    DYLDLIBRARYPATH="/DVL/lib":/GNU/lib:/usr/x11/lib"
    LIBRARY_PATH="/dvl/lib:/gnu/lib:/TEST/lib"
    As GCC is a proven technology, I can only assume that my variables are incorrect or something is missing. Has anyone else experienced this or is your configuration recognising non-standard locations?

    sorry, wrong forum. I put this topic again in forum "portal applications"

  • [E039(R9E)] Errors: Source 0P_RMA_CPER is not a permitted variable for targ

    Hi,gurus here.
    When I saved Query, it reported an error:
    [E039(R9E)] Errors: Source 0P_RMA_CPER is not a permitted variable for target Current Year Period.
    I never used 0P_RMA_CPER in query. How to find it and make it up?
    Thanks.

    Hi,
    Please log out  and login again.
    I had the same issue. above solution worked for me.

  • Use BEx variable for user input data, not to filter.

    Hi,
    I have a situation where I am displaying notification task data.  Each header notif has a number of tasks.  These tasks are marked either newest, oldest or no mark (in the middle) for each different task code.
    Using VKF's and by passing the user entered variables for newest and oldest I am able to make KF calculations.
    So if I have a notif that is like this:
    Notif XYZ
      Task 1  Code: SCM     Date: 1/1/2000
      Task 2  Code: SCM     Date: 1/4/2000
      Task 3  Code: SCK     Date: 1/10/2000
    If the user selects Newest = SCM and Oldest = SCK
    The key figure would use those 2 different notif tasks to calculate.
    This works fine.
    My problem now is that since the data is displayed at the line level.  When the user enteres his choices for task code, BEx will filter to find one single task item that has both the Newest and Oldest values that the user entered.  It will return no data.
    Example:
    NOTIF    TASK      NEWEST     OLDEST
    XYZ.........1.......SCM
    XYZ.........3..................SCK
    If user enteres Newest = SCM and OLDEST = SCK
    It will look for one line with both value, returning nothing.
    So, I want to simply use the BEx selection screen to pass values to my virtual code (which I already have working)-  but I do not want the report to filter on a notification that only has both values as OLDEST and NEWEST tasks.
    Is this possible?  To deactivate the BEx filtering for two infoobjects thus only passing the user entered values to my CMOD code?
    Any help/suggestions would be appreciated.
    Thanks in advance,
    Brandon

    Hi Prakash,
    Can you explain what you mean?  I know using a text variable would allow me to take the user entry and apply it to the header of a column... but how would it disable filtering on what was entered?
    Thx

Maybe you are looking for

  • Lack of EZ Photo Print PRO on the PRO-100 ONLY

    I've been using Canon printers for fifteen years, I think, so this is not so overly picky newbie observation.  For the last five years, iP4300 and 4500's, and a 9000 MK II.  All come with the Easy Photo Print EX, as does the PRO-100 printer.  Way too

  • Reg: FM - DATE_CONVERT_TO_FACTORYDATE not working for 2011

    Hi All, The FM - DATE_CONVERT_TO_FACTORYDATE was working correctly so long. This FM is not working for the year 2011 alone!! When i check the FM, it is actually a C module which is called and is not allowed for debugging. Can anyone help as to what c

  • How to disable auto update?

    On the Q10, how can the automatic updates be disabled so that operating system version updates cannot proceed without user approval? Thanks! . . . .  Pete

  • Job with materialized view not working anymore

    I'm on windows 2008 server with 10.2.0.4 I have a job that was running at every hour in the database that was refreshing some materialized view (refresh group) the sql query on that MV goes by dblink to another database. Le atrget database had crashe

  • Weird start up 1/4 of the screen with big pixels

    Before loading the screen in wich you pick the user, a 1/4 of the screen show you big pixels as if there was a major crash on the system but then after a few seconds goes away back normal -.-