How to compare a Date data with Current Year and Period Member on FIX

Hi experts,
I have a Project dim that each member is a Project (P01, P02...)
and Account dim that stores information of the each Project (Name, Start date, Finished Date...)
Finished Date member is in Date data type
So how can write a IF condition below in order to compare Project Finished Date with Current Year and Period members on FIX
FIX (@Descendants(Projects), Descendants(All Year), Descendants("Year Total")...)
IF (@CURRMBR(Period)->@CURRMBR(Year) < Project->FinishedDate)
Do something...
Else
Do something
Please help me on this. Sorry for my bad grammar. Please ask if there is anything unclear
Many thanks,
Huy Van.
Edited by: Huy Van on Jan 29, 2013 1:14 AM
Edited by: Huy Van on Jan 29, 2013 2:24 AM
Edited by: Huy Van on Jan 29, 2013 2:25 AM
Edited by: Huy Van on Jan 29, 2013 6:04 PM

Here is what I have done. Post for whom may concern later
VAR FM; /* Finished Month of Project*/
VAR FY; /* Finished Year of Project */
VAR CM; /* Capture Current Month on FIX statments */
VAR CY; /* Capture Current Year on FIX statments*/
FIX ( @RELATIVE( "Year", 0), @RELATIVE( "Period", 0), @IDescendants( "Base Projects")....)
FY = @ROUND( "TGHT"->"NA Contract"->"FY06"->"NA Period" / 10000, 0);
FM = @MOD( @ROUND( "TGHT"->"NA Contract"->"FY06"->"NA Period" / 100, 0), 100);
/* For FY13 return 13... */
CY = @JgetDoubleFromString( @CONCATENATE( "20", @SUBSTRING( @NAME( @CURRMBRRANGE( Year, Lev, 0, 0, 0)), 2)));
/* Set CM value based on currrent Period On FIX statement */
IF ( @ISMBR( "Jan"))
CM = 1;
ELSEIF ( @ISMBR( "Feb"))
CM = 2;
ELSEIF ( @ISMBR( "Dec"))
CM = 12;
ENDIF
IF ( CY < FY OR ( CY == FY AND CM < FM))
Do something...
ELSE
Do something...
ENDIF
ENDFIX
Edited by: Huy Van on Feb 19, 2013 11:10 PM
Edited by: Huy Van on Feb 20, 2013 7:46 PM

Similar Messages

  • How to calulate previous fiscal year from current year and periods as input

    hi all,
    i have a report where i have 2 select options as year and period.
    my period can be a range  like( Ex: 1 to 6).
    i like to know previous fiscal year from the following inputs.
    Tel me a suitable conversion routine to calculate
    depending on periods and fiscal year.
    regards
    sivaram.

    Hi
    U need to check the lower period, if it's 1 the previous fyscal year will be the year before:
    IF PERIOD = '1'.
      PREV_YEAR = YEAR - 1.
    ENDIF.
    U can also use the fm FI_PERIOD_DETERMINE, in this case you need a date, u can get it from lower current period:
    Get the first day of the period
    BUDAT(4)   = YEAR.
    BUDAT+4(2) = PERIDO_LOW.
    BUDAT+6(2) = '01'.
    Now get the last day of the previous month:
    BUDAT = BUDAT - 1.
    Use this date to get its period by fm FI_PERIOD_DETERMINE
    Max

  • Current Year and Previou year Data comparision - Urgent

    Hi Experts,
    In our report we need to compare the sales value for current year and prevous year.
    The Fiscal year is the input selection field.
    Output report displayed as below
    Product|Current year sales|Previous year sales|
    404    |120.00          |20.00
    400    |122.00          |22.00
    Total  |242.00          |42.00
    Could any body help how do i use the fiscal year/period or fiscal year for the current sales and previous sales values.
    Thanks in advance.
    Mahantesh

    You have to restricit current year column with the variable Fiscal year and previous year colum with same variable with offset -1.
    For year period use a range with from valie '001.1990' and to value a variable for current and the same variable with offset -12 for previous.
    Hope it helps.
    Regards

  • How to find last  date of the current year

    Hi
    Please tell me is there any function module to find out the last date of the current year.

    Hi,
    You can do that very simply like so.
    code
    report zrich_0001.
    data: first type sy-datum.
    data: last type sy-datum.
    first = sy-datum.
    first+4(4) = '0101'.
    last = sy-datum.
    last+4(4) = '1231'.
    write:/ first, last.
    [/code]
    OR use function modules
    1.use this function module HR_GB_TAX_YEAR_DATES
    Pass these values
    P08_TXYEAR = Year
    P08_PAYROLL_AREA = '01'
    2.use FM......... FIRST_AND_LAST_DAY_IN_YEAR_GET
    DATA: first LIKE sy-datum,
    last LIKE sy-datum.
    CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
    EXPORTING
    i_gjahr = '2007'
    i_periv = '24'
    IMPORTING
    e_first_day = first
    e_last_day = last.
    WRITE: / 'First Date', first, ' Last Date', last.
    Regards,
    Raj.

  • How to compare dropdown pre value with post value in sharepoint designer list workflow

    How to compare dropdown pre value with post value in sharepoint designer list workflow

    Hi,
    Can you provide more details about your requirement? It would make others easier to find a solution for you.
    By default, a workflow will be triggered after submitting data in the NewForm or EditForm.
    If you want to monitor the value changed in a drop down menu which is supposed to be in NewForm or EditForm, it would be more appropriate to apply custom JavaScript in the NewForm
    or EditForm page.
    About how to detect the value changed using JavaScript, the demos in this thread would be helpful:
    http://stackoverflow.com/questions/12080098/dropdown-using-javascript-onchange
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Current Year and Previous Year (derived) data comparison

    Scenario:
    Dimension Table for Date:
    -Current Year
    -Previous Year
    -and other date related fields
    Fact Table:
    -Sales (contains current year sales depending on the filter set)
    *Filter on Year
    Would anyone know how will I create a measure for Previous Year Sales?
    So that whenever my report shows the current year (for example: 2009) data of my sales, I can also have a column that would also display the previous year data and it will automatically know that it would display the previous year data of the Current year displayed in my report.
    Also, how to derive the percentage change of this 2 columns.
    Year: 2009
    Branch --- Current Year Sales (Sales from Fact table) 2009 --- Previous Year Sales 2008???
    I want to add the Current Year Sales And Percentage Change of Sales in the Business Model/Mapping Section. so that it would be available in the presentation layer of Oracle Answers.
    Thanks.
    Edited by: user12074468 on Oct 16, 2009 4:38 PM

    Use column filters. Click on the fx button on your Sales column. Click on the Filter button. Now go to the Time.Year column you have and click on it. When the filter window comes up, click on Advanced and convert the filter to SQL. Now insert the Current Year column so that you have Time.Year = "Current Year" Click "OK."
    Get another Sales column and put it in your workspace. Follow the above procedure except this time use th Previous Year column.
    Now you have two Fact columns, one that filters for the Current Year and one that filters for your Previous Year.
    Now for your variance, click on one more column and place it in your workspace. Click on the fx button. This time click on the "Column" button. You will see a list of your columns. From this, create the (Current Year)-(Previous Year)/(Previous Year)*100.00. In the Data Format tab, change the format to percentage.
    You also have the option of creating the above calculations in the BMM layer too.

  • Displaying current year and previous year's data.

    hi all,
    we have fields like doc.no, company code, costcenter, posting date, year etc... in a query.
    we are using this query to display data in VC,
    how can i display the current year and previous year's data in two different tables using the available fields.
    any help will be highly appreciated.
    thanks,
    Rk

    Hi Rk,
    You can achieve your requirement using 'Filter' operator. Drag one 'Filter' operator into visual composer story board and drag the output into filter and add condition(Check year=2008) and drag one table from filter. For another table use another filter and change the condition.
    Hope it helps...
    Regards
    Basheer

  • Hot Data Block with concurrent read and write

    Hi,
    This is from ADDM Report.
    FINDING 8: 2% impact (159 seconds)
    A hot data block with concurrent read and write activity was found. The block
    belongs to segment "SIEBEL.S_SRM_REQUEST" and is block 8138 in file 7.
    RECOMMENDATION 1: Application Analysis, 2% benefit (159 seconds)
    ACTION: Investigate application logic to find the cause of high
    concurrent read and write activity to the data present in this block.
    RELEVANT OBJECT: database block with object# 73759, file# 7 and
    block# 8138
    RATIONALE: The SQL statement with SQL_ID "f1dhpm6pnmmzq" spent
    significant time on "buffer busy" waits for the hot block.
    RELEVANT OBJECT: SQL statement with SQL_ID f1dhpm6pnmmzq
    DELETE FROM SIEBEL.S_SRM_REQUEST WHERE ROW_ID = :B1
    RECOMMENDATION 2: Schema, 2% benefit (159 seconds)
    ACTION: Consider rebuilding the TABLE "SIEBEL.S_SRM_REQUEST" with object
    id 73759 using a higher value for PCTFREE.
    RELEVANT OBJECT: database object with id 73759
    SYMPTOMS THAT LED TO THE FINDING:
    SYMPTOM: Wait class "Concurrency" was consuming significant database
    time. (4% impact [322 seconds])
    what does it mean by hot block with concurrent read and write??
    is rebuilding the table solves the problem as per addm report?

    Hi,
    You must suffer from buffer busy waits.
    When a buffer is updated, the buffer will be latched, and other sessions can not read it or write it.
    You must have multiple sessions reading and writing that one block.
    Recommendation 2 results in fewer records per block, so less chance multiple sessions are modifying and reading 1 block. It will also result in a bigger table.
    The recommendation doesn't make sense for tablespaces with segment storage management auto, as for those tablespaces pctfree does not apply.
    Buffer busy waits will also occur if the blocksize of your database is set too high.
    Sybrand Bakker
    Senior Oracle DBA

  • NVision prior year totals are overwriting with current year

    Hi All,
    I have created an nVision report with two columns, one is for Current year(timespan-YTD) expense totals and other one is for Prev Year(timespan-Prev_Year) totals and row level i have all Expenditure accounts from Account Tree.
    When I run the report, Current Year and Prev Year coulumns are displaing same totals, when I ran the SQL trace, i found that Prev Year, column sql was running two times, one is for prev year and otherone is current year and second sql was overwriting with current year totals.
    When I looked into timespans for PREV_YEAR, I saw that "End Period Type" was set to "Relative to Current Period", when I swich to"Absoluate Period" then Prev Year column was showing Prev Year results.
    But switching Period type to : Absolute is wrong,when comparing the current year with Prev year with As of Date.
    Any thoughts on above issue.
    Thanks,
    Venky

    Dear Rachana
    The long text of error AA669 is very clear about the root cause of the
    error.
    The idea behind the message: it is not allowed to close first general
    ledger before subleger. This leads to inconsistencies. It is common
    accounting principle to always close the subledgers first and only
    then close the general ledger (FI-GL).
    The solution is: re-open fiscal year in FI-GL (txn OB52) and follow the
    steps from note 619969.
    o  RAAFAR00
    o  RAPOST2000
    o  RAPERB2000
    o  RAJABS00
    If it is not possible to open the fiscal year because audit has already
    been completed: workaround (which is not quite correct from the legal
    point of view) is the report RACORR20_A from note 29694.
    Best Regards,
    Blaz

  • How can I make the popup with empty fileds and create new record?

    I would like to use a popup to create new record.
    I created a af:popup by drag and drop a VO from data control to jsff. then, I created a button and place a af:showPopupBehavior. I was able to popup window by click the button.
    however, the window filled with the information from the 1st record. and when I select a record in table and click popup, the popup is filled with that record.
    How can I make the popup with empty fileds and create new record by saving the popup?
    Thanks

    You can have edit and new buttons, in the PopupFetchEvent identify button source (using popupFetchEvent.getLaunchSourceClientId()) if new button clicked clear the binding using below code.
    If you want to see empty fields, in the popup PopupFetchEvent clear the input component bindings.
    resetBindingValue("#{bindings.<componentid>.inputValue}", null);
        public static void resetBindingValue(String expression, Object newValue) {
            FacesContext ctx = FacesContext.getCurrentInstance();
            Application app = ctx.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = ctx.getELContext();
            ValueExpression valueExp = elFactory.createValueExpression(elContext,expression,Object.class);
            Class bindClass = valueExp.getType(elContext);
            valueExp.setValue(elContext,newValue);
        }

  • How do  create a slide show with both video and photos in elements 12

    how do  create a slide show with both video and photos in elements 12

    Hi Brian
    You can batch process a set of prepared slides from Full Edit (see image) using:
    File >> Process Multiple Files
    In the PMF dialog you can choose filename, date, or description (caption)
    Make sure you choose a separate destination folder to your source folder so as tot to permanently overwrite your originals.
    Click image to view

  • How can i use jpg extension with forms 10g and webutil

    I have a form with webutil and i want to open imege jpg extension but thier are Bmp but my
    image jpg and image item has no jpg extension .
    How can i use jpg extension with forms 10g and webutil ?

    You can use the JFIF image format for jpg files.

  • I live in Germany at the moment. How can I buy iPad mini with retina online and  get tax free?

    I live in Germany at the moment. How can I buy iPad mini with retina online and  get tax free?

    Do you qualify for a tax free purchase?  The online stores will collect the required taxes for their country and region.  I know in the USA, if you are a tax free corporation, and you purchase it directly with a corporate account, you can get an item tax free using the company account and the corporations registered tax exempt number.  But an individual citizen cannot avoid paying the appropriate required taxes when shopping the online Apple web store.

  • Function module to derive start and end dates from fiscal year and period.

    Hi,
    I want to know a function module to derive start and end dates from fiscal year and period.
    ie: If I have say fiscal year '2010' and period '07', then the start date of this period would be '01.10.2010'.
    Thanks.
    Moderator Messge: Basic Date questions are not allowed.
    Edited by: kishan P on Oct 18, 2010 4:45 PM

    Hi,
    This is one of my exit that display the calmonth (offset -12). Usefull when I have to retrieve in a KF a complete rolling year depending one calmonth.
    S_VMUCMN is my selection variable
    S_TXTCMN_M12 is my text variable calmonth-12
    S_TXTCMN_M0 is my text variable for selected calmonth.
    WHEN 'S_TXTCMN_M12'.
        IF i_step = '2'.
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'S_VMUCMN'.
            CLEAR l_s_range.
            " First day of the selected month
            CONCATENATE loc_var_range-low '01' INTO l_calday.
            CALL FUNCTION 'YFRBW_FUM_CAL_DATE_IN_INTERVAL'
              EXPORTING
                date      = l_calday
                months    = 12
                signum    = '-'
              IMPORTING
                calc_date = l_calday.
            l_s_range-low = l_calday+0(6).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    Thus, in KF header you have to put the two text variable to display the complete period.
    Hope it helps,

  • HOW KIND OF Standard table related with vk11, vk12 and vk13?

    HI, EVERYONE,
    HOW KIND OF Standard table related with vk11, vk12 and vk13?
    I want to know about how many and how kind Standard table related with vk11, vk12, vk13.
    I'v found some table like konp and a601 ~ a609, also I want to know about those table of uses?
    I am starting to study about vk11.
    please help me.

    Hi Reena,
    Then main pricing related tables are KONH  header details, and KONP item details.
    The other tables your have mentioned like A601,A609.............. all these are condition tables, which stored the values which you save for access sequence combination.
    Eg : For condition type PR00, lets us assume one key combination customer/material, so these details will be saved in condition table which is initially generated with fields as a part of condition techinque.
    So here the table would be A005 i guess or its A006.
    So like wise there will be condition tables for each key combination.
    Regards
    v K

Maybe you are looking for

  • How to install the Remote Desktop Services role on a Windows 2012 R2 Server

    Hello, I am a bit confused on how to install the RDP role on a 2012 R2 server. I have a two server domain and would like to make the second member server an RDP server to host applications (Word, Excel, a medical software, etc.) where users from thei

  • Blank screen after full update and reboot

    As it is now, it goes to the point during boot, right before the resolution gets set to the right value, before I get a blank screen (no input to screen). I have reinstalled several times, and tried a few different configurations. After all these att

  • How to peg sales order to stock

    Hi, Can anyone tell me how to use BAPI_PPDSSRVAPS_CHANPEGMULTI. It will help a lot if you can send me sample codes. I am trying to repeg sales order from purchase requisition to stock. Thanks!

  • External table - Function

    Hi All, How to use the oracle in-built functions in the external table. I am trying to transform the value like      CONTRACT_RATE TO_NUMBER(REPLACE(:CONTRACT_RATE,'%','')) which I use in SQL*Loader. I am using 11g Thanks in advance, Jagadish Kumar A

  • Can't edit text in CS5

    I added 3 layers of text in CS5 to an image, and saved the file as .psd.  When I reopened the file, I could not edit the text anymore. What did I do wrong?