Creation of a Query to show the values for the current month and the last 12 months data.

Dear All,
Good day!
I have to create a Query with the below requirement.
I have to create a Query to show the values for the current month and the last 12 months data.
Can you please guide me how to achieve this ??
thank you,
Regards,
Hema

Hema
explain the exact problem..? as you mentioned you want to create query to show values for current month and last 12 months.. so I think you want to show values for 12 months from current data.. you can achive this by multiple way..
you can have selection screen and field with date .. and restrict based on system current date and 12 months before or you can handle this at your target.. .. I mean there are multiple ways to restrict data by date range..
for some more hints..
http://www.forumtopics.com/busobj/viewtopic.php?t=34393&sid=7fba465d0463bf7ff5ec46c128754ed6
http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos8-l/how-to-display-last-12-months-in-report-based-on-todays-date-3231850
http://scn.sap.com/thread/3217381
search on SDN you will get many other ways..
Thanks,
Bhupesh

Similar Messages

  • So my phone is plugged into the computer for a software update and the update went halfway through and hasnt made any advancements. how do i get my phone back without losing anything?

    so my phone is plugged into the computer for a software update and the update went halfway through and kind of stopped. it says its still updating but I cant figure out how to stop it and just get my phone back. how do i get my phone back without losing anything?

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • I was wondering why the iPhone 5 has the option for a battery percentage and the iPod touch 5g doesn't? I mean... they are almost both the same thing... just the iPod does not have the phone.

    I was wondering why the iPhone 5 has the option for a battery percentage and the iPod touch 5g doesn't? I mean... they are almost both the same thing... just the iPod does not have the phone.

    One likely reason is the % battery is not that accurate because of the smaller battery capacity in the iPod compared to iPhone and iPad. Users why use a % battery app post that the % reading changes a lot.

  • I reset my disabled ipad 2 and it is asking me for the apple id which first set it up but i forgot the password for that apple id and the password/recovery information for the recovery email address. What can i do?

    i reset my disabled ipad 2 and it is asking me for the apple id which first set it up but i forgot the password for that apple id and the password/recovery information for the recovery email address. What can i do?

    Click here and use Apple's iForgot service, or contact their Account Security team, or if you're the device's original owner, take it and its purchase receipt to a physical Apple Store.
    (124525)

  • I am using iCal on my iMac, iPad and iPhone using iCloud and when I set the alert for 1 day before and the second alert to 1 hr before, then save the alerts switched.  Was is this happening?

    I am using iCal on my iMac, iPad and iPhone and when I set the alert for 1 day before and the second alert to 1 hr before, then save the alerts switched.  Was is this happening?

    http://support.apple.com/kb/he57?viewlocale=de_de
    India
    (91) 1800 4250 744
    www.apple.com/in/support/
    hope it helps

  • I am using sql trace , please tel me where i can get the value for mode of lock and type of resource.

    hi,
       I am using sql trace , it has cols like mode and type , but they have numbers , is there any place where i can get the metadata of these values
    yours sincerley

    I have already found, but the problem is, i have to put cases to show lock in fornt of numbers , what i wanted
    is if i could get this mapping any where in database like( metadata is kept) , then i have to put only join.
    Q2) I have one more question in which col of the event, i can have lock request status , like weather it is 
    granted or wait.
    yours sincerly
    Q1. You can create a table from the data in the link that
    Ashwin Menon posted, and use simple JOIN in order to replace the numbers with the Mode
    Q2. Please check this great blog:
    http://aboutsqlserver.com/2011/05/26/locking-in-microsoft-sql-server-part-4-how-to-detect-blocking/
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Store value less than current week and year.

    Hi All,
    I have a table called BACKLOG whose structure is like this
    ITEM_NUMBER   YEAR_WEEK   MS
    1N58          2012-WK02   01/15/2012
    1N58          2011-WK02   01/15/2011current from my procedure i am storing the value in my new table which is less than current week. But i want to store the value less than current week and current year. Please help me to get how i can do this.
    PROCEDURE BACKLOG_PROC_LT_CW IS
      BEGIN
    DELETE BACKLOG_LT_CW;
    COMMIT;
          INSERT INTO BACKLOG_LT_CW
            SELECT
                  DC_UTIL.GEN_YEAR_WEEK(MS) YEAR_WEEK,
                  ITEM_NUMBER,
                  MSD
                  FROM BACKLOG
              where to_char(MS, 'IW')<to_char(sysdate, 'IW');
      END BACKLOG_PROC_LT_CW;Currently with the above procedure code both the value is storing in my BACKLOG_LT_CW table but if you see the data of BACKLOG table you will find YEAR_WEEk 2012-WK02 falls in next year but still it is storing in my table because i have taken IW only. Please help me to get the soln
    Thanks in advance
    Regards

    Are you looking for this?
    where to_char(MS, 'YYYYIW')<to_char(sysdate, 'YYYYIW');

  • Where is the value of report repository stored in the database?

    Hi all,
    One of our developers is trying to write a code that would send the output report (pdf)of a process through mail, typical work flow stuff.But the problem is that we are not supposed to hard code the value of report repositiry from where the report has to be picked.can anybody suggest a table in the database from where the value of report repository can be queried.
    we tried using
    select reportrepositorypt from pswebprofile.
    but this doesnt return the correct path. we went to PIA->peopletools->webprofile ->webprofie configuration
    here we updated the value in report repository field and saved it and queried again.
    But this didnt solve our problem.
    Its showing the previous value which is different from the actual report repository path.
    all the servers are in solaris box.
    please suggets.
    Thanks!

    Right now, I am trying to send a PDF (XML Publisher report) as an email to our vendors (it is their ACH Advice).
    What I have done so far is: Created an App Engine, one step to populate a state record with run control information and the second step that runs XML Publisher and creates PDF report(s) which are published to the Report Repository and saved to a file on our network. Now I think I just need to create a third step to recall the PDF(s) and send the PDF(s) out as emails to our vendors.
    I have found that the PDF information from Report Repository is stored in the Database in the CDM_LIST_VW record (this is a view and the main underlying table is CDM_LIST, but this contains what I need for now, so I'm going to try using it first). The Report ID is stored in the CONTENTID field and the Report Description (description shown on the Report Repository -- which in our case contains the email address) is stored in the CONTENT_DESCR field. So I am going to try over the next week to write the logic to query the CDM_LIST_VW for the data needed for the email address and the ReportID to go and grab the file....The hardest part is finding the actual file but I am hoping that I can also find a URL on that table. I'd pull the file from the network, but XML Publisher writes them out into numbered folders where all the PDFs are named the XML Report Defn - thus same name). I have not tried any of this yet, but am hoping I'm on the right path.
    I hope this helped answer your question.
    Good Luck!
    Jennifer

  • Can not input data when removed the value for seleciton condition

    Dear Experts,
    We met a very strange issue for the IP.
    We create a aggregation level and relatd query for user to key in data.
    We have a filter in the aggregation level.
    It will set value for A,B,C,D
    When user opent he report, system will require user to key in the value for A,B,C,D.
    Now we found that if we key in value for B, cell is input ready.
    If we removed the value in for the B in the selection condition (I mean the value of B is empty, this means tha all the value of B will display in the report), we can not key in data.
    Could you kindly let me kow the reason?
    Thanks and best regards
    Alex yang

    Dear Experts,
    Many thanks for your information.
    I know the principle for the IP.
    But I think you may misunderstanding this issue due to my incorrect explaination.
    First, we think the aggreagtion level is ok. This is due to that for the B in my example, we set its as column value in the query.
    This is means for each record in the IP query, it has only one B value to reflect it.
    But strange things is that if we set fixed value for B, IP input is ok.
    If we removed fixed value for B, IP function is error.
    Now, we will test if we key in multi value for B whether IP input function is ok or not.
    Any update, I will inform you.
    Thanks and best regards
    Alex yang

  • The values for list items of other data blocks are not getting displayed when executed.

    Hi,
        I have a new problem again.
        I am doing a new form in which there are around 8 blocks. All the blocks have their tables in the oracle database.
        Each block has 18 columns with the same column & column names. But the values in those columns are different & the values do not match.
        The problem lies while i execute the form, it populates only the first block data. Other blocks do not display or populate the values.
        I cannot create a master relationship because all the column values are different.
        How do i display or populate the values of all the tables?
       Please help me. Thank You.

    hi
    if your form has truly disassociated tables, then you could simply use a key-exeqry trigger at forms level to travel to each block in turn and perform an execute-query built-in, eventually returning to the starting block.
    ie
    go_block('..');
    execute_query;
    go_block('..');
    execute_query;
    etc
    go_item(......);
    In this case you would use the block where clause to constrain each table to the appropriate set.
    If however, the database has no relationships between the tables but the data content has some corelation, then you could craft a forms relation manually.
    cheers
    Rod

  • Any way to pass Multiple Values for a single Label in the Parameter?

    I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610"
    One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter. 
    PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data.
    Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610.
    QUESTION:
    Any way to pass Multiple Values for a single Label in the Parameter?
    I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting
    it correct.
    I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….
    Note: We are using Report Builder 3.0

    Based on my experience, there's no way to 'intercept' the query that gets passed back to SQL Server, so a Split wouldn't work.
    Try creating either a function or stored procedure using the code below (compliments to
    http://www.dotnetspider.com/resources/4680-Parse-comma-separated-string-SQL.aspx) to parse the string: 
    CREATE FUNCTION dbo.Parse(@Array VARCHAR(1000), @Separator VARCHAR(10))
    RETURNS @ResultTable TABLE (ParseValue VARCHAR(100))AS
    BEGIN
    DECLARE @SeparatorPosition INT
    DECLARE @ArrayValue VARCHAR(1000)
    SET @Array = @Array + @Separator
    WHILE PATINDEX('%' + @Separator + '%' , @Array) <> 0
    BEGIN
    SELECT @SeparatorPosition = PATINDEX('%' + @Separator + '%', @Array)
    SELECT @ArrayValue = LEFT(@Array, @SeparatorPosition - 1)
    INSERT @ResultTable VALUES (CAST(@ArrayValue AS VARCHAR))
    SELECT @Array = STUFF(@Array, 1, @SeparatorPosition, '')
    END
    RETURN
    END
    Once created you can do things like this:
    SELECT * FROM Parse('John,Bill,David,Thomas', ',')
    SELECT * FROM (SELECT 'John' AS TestName union select 'David' AS TestName) AS Main
    WHERE TestName IN (SELECT ParseValue FROM dbo.Parse('John,Bill,David,Thomas', ','))
    This is what your SQL query would probably look like:
    SELECT OperationID, OperationName FROM dbo.Operations
    WHERE AreaID IN (SELECT ParseValue FROM dbo.Parse(@Area, ','))
    You may need to fiddle around with the Separator depending on whether SQL Server inserts a space between the comma and next value.

  • The report does not accept the value for apps.fnd_profile.value('USER_ID')

    Hi,
    I followed the below note and added a report to my SSHR menu.
    How To Add A Report To A 11i Self Service Menu [ID 334847.1]
    In my report , I have a condition in the query
    and a.created_by =apps.fnd_profile.value('USER_ID')
    When the report is submitted as a request , it works fine., however the same report when called from the self service page does not accept any value for apps.fnd_profile.value('USER_ID') .
    Is there a workaround to handle this problem.
    regards

    hi,
    I had already tried the option apps.fnd_global.USER_ID too.
    However it does not accept the value for apps.fnd_global.USER_ID.
    We want to call the reports in SSHR using oaf and at the same time the records that are pending for approval created by the employee should only be visible.
    regards
    Maya

  • 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

  • DB2Exception - The value of a host variable in the EXECUTE or OPEN statemen

    I want to store a XML file into database.
    To undersdande my problem, please see the code below:
    java.sql.Connection conn = null ;
    PreparedStatement ps;
    // Here I'm calling a function to get Database Connection.
    String sXmlFile = "" ; // This variable stores a XML file as String
    String sSQL = "INSERT INTO Crs_x_xml (XML_TRAN_ID,XML_MESSAGE,SUSPENDED_FLAG ) VALUES(?,?,?)";
    try {
         ps = conn.prepareStatement(sSQL);
         ps.setLong(1,1);
         ps.setBytes(2, sXmlFile.getBytes());
         ps.setString(3,"A");
         ps.executeUpdate();
         conn.close();
    } catch (Exception e) {
         e.printStackTrace();
    The Problem:
    The table Crs_x_xml that I used has three columns, the first is a int, the second is a BLOB and third is Char(1) and its in DB2 running on AIX.
    Sometimes it execute very well. But sometimes gives following error :=
    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/AIX64] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001
    I dont know whats going wrong. Plz help....
    ~Abhijeet

    Hi,
    I am using a CMP query in websphere, in which i am trying to execute a select query.
    The query is as follows:
    SELECT OBJECT(o) FROM HrTmmbrAct o WHERE o.tmmbrActC IN ( 1,2,3 ) AND o.effD BETWEEN '2000-02-11' AND '2008-02-22'
    The tmmbrActC is defined as a string in the Websphere CMP fields. I am not sure now to pass the value to it. Do we need to pass it as objects. pls help.
    Thanks
    - Giri

  • Pass the value for dictionary field that doen't have parameter ID

    Respected Members,
    I have a requirement that i have to call the tcode Va11(inquiry creation) from my program and pass the values for the customer po number and customer po date available in the inquiry creation screen.
    Since whatever require for the first screen of VA11 i can pass the values with using SET parameter ID becoz all the things have the parameter ID .
    Document type ,sales org, dist channel and division are having the parameters ID.
    Now exactly where to put the values for the next screen in the field customer po number and customer po date doesn't have the parameter ID.
    Fields are BSTKD and BSTDK .
    Now  how to pass the values from my module pool program.
    Please give me some solution.
    Suppose i m creating a parameter ID from the program then also it won't get attach to this fields.
    Please give me yours solution as soon as possible.
    Thanks

    hi Manish..
    It the Fields are not assigned with PARAMETER ID then We cannot pass the data using SAP Memory (Set Parameter ID).
    So the Only way u can pass the Data is using
    Enhancements (if they are provided)
    or
    BDC technique.
    Reward if Helpful.

Maybe you are looking for

  • Goods receipt indicator on PO- default

    On ME21N - Create PO- in Item details- Delivery tab there is a checkbox for Goods Receipt. I need this box checked as default- where do I set this? Thanks Raj Patel

  • OS9 Won't Switch To OSX

    When I'm on OS9 and I try to switch startup disks to OSX, programs shut down as usual and just the desktop shows, but it won't shut down and switch from that point. The cursor can be moved but no files or menus will open. It's like frozen in OS9 all

  • Retrieving of application's path

    Hi guys, i need your help. I've a jsf application called Test and stored in c:\eclipse\workspace\Test With getExternalContext().getRequestContextPath()i retrieve the relative path of my application, in this case Test What i want is retrieving the ent

  • Item Cost in query

    Hi expert how can i find last item Cost via query .

  • Need Help Removing Components

    I wouldnt bother anyone with this if I havent already attempted a variety of different ways. I'm trying to remove JLabels and JComboBox objects from a JPanel. For whatever reason I just can't get the logic right. At best I can get it where it winds u