Need to create report query to get latest open and last closed period for given application

Hi All,
I need to create a report query to get below result displayed in report output.
1)   -   Application name
2)   -    Ledger name
-o/  -Operating Unit
3)   -  Last Closed Period
4)   -  Current Open Period
5)   -  Date Closed – Last Closed Period
6)   -  Date Open – Current Open Period
I tr I tried to create the query below is the same. Please let me know if it looks fine.
SELECT *
  FROM (SELECT fav.application_name ,
               hou.name Operating_Unit_Name,
               gl.name Ledger_name,
               gl.latest_opened_period_name,
               gps.period_name Period_Name,
               DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
               gps.last_update_date Last_status_modified_date
          FROM gl_period_statuses gps,
               gl_sets_of_books   gsob,
               fnd_application_vl fav,
               hr_operating_units hou,
               gl_ledgers         gl
         WHERE gps.period_name = gps.period_name
           AND gps.closing_status ='C'
           AND fav.application_short_name =
               NVL('&p_application_short_name', fav.application_short_name)
           AND gps.application_id = fav.application_id
           AND gsob.set_of_books_id = gps.set_of_books_id
           AND hou.set_of_books_id = gps.set_of_books_id
           AND gl.ledger_id = gsob.set_of_books_id
           AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
           AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
         ORDER BY gps.last_update_date desc )WHERE ROWNUM = 1 
UNION ALL
SELECT *
  FROM (SELECT fav.application_name Application_Name,
               hou.name Operating_Unit_Name,
               gl.name Ledger_name,
               gl.latest_opened_period_name,
               gps.period_name Period_Name,
               DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
               gps.last_update_date Last_status_modified_date
          FROM gl_period_statuses gps,
               gl_sets_of_books   gsob,
               fnd_application_vl fav,
               hr_operating_units hou,
               gl_ledgers         gl
         WHERE gps.period_name = gps.period_name
           AND gps.closing_status = 'O'
           AND fav.application_short_name =
               NVL('&p_application_short_name', fav.application_short_name)
           AND gps.application_id = fav.application_id
           AND gsob.set_of_books_id = gps.set_of_books_id
           AND hou.set_of_books_id = gps.set_of_books_id
           AND gl.ledger_id = gsob.set_of_books_id
           AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
           AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
         ORDER BY gps.last_update_date desc)
         WHERE ROWNUM = 1

It is within the table I believe (I'm not a DBA or a developer) since I created a BLOB column and then used the file browse feature to allow users to attach a resume to the table in order to be able to perform a search of the attached documents.
I'm just having a hard time pointing the link in the search results report to the document in the blob column.
The information on that page is great if you're trying to create a link to the document on the initial report.
But I created a query using Oracle Text to run a report that does a boolean search of the attached word documents in the table.
When it displays the search results, it doesn't create a link to the document and I can't figure out how to do it.
Here's a link the the instructions I used to create the initial search report with Oracle Text, mind you I only created the index and query, I didn't add in all the link data since they're using documents on websites and I'm using documents in a table.
http://www.oracle.com/technology/products/database/application_express/pdf/apex_text_application_v1.6.pdf
If you can help me with this I'd really appreciate it.
Thanks again.
Greg
Edited by: gjones77 on Dec 2, 2008 8:14 AM

Similar Messages

  • Create a query to find the open PO

    Hi all,
    I want to create a query to find the Open PO which GR is not complete or Open invoice.
    But I don't know how can I get the value: still to be invocied ,still to be delivery .
    I want to know which table I can find these information.
    I know a T-code :ME2L can run this report, but the format is not user friendly,so I want to create a new query .

    Hi
    No need to create any query to find an Open PO.
    You can use ME2N or ME2L or ME2N with proper scope of list and selection parameter.
    In scope of list you can use the ALV one to get the user friendly report, if you do not have the ALV then you can
    create your own scope of list by following the steps.
    1) press F1 and click on the customizing icon
    2) Click the button W/O specifying the project
    3) Click Define scope of list
    4) Copy any scope of list for example BEST and rename it as BEST_ALV and Tick the check box AL on the Bottom
    5) You can get this new scope of list in the tcods mentioned above and execute thereports.
    6) Once you get the output you can modify the layoout  to get the user friendly format. Also you can download into excel sheet.
    Hope it helps
    Thanks/karthik

  • SSRS adhoc (2005/2008) - Need to create Report Model (.smdl file) for adhoc using Stored procedure

    Hi All,
    I need to create Report Models using stored procedures. But whenever I am going to create data sources for same, I am just getting tables and views to use. Please see the screenshot below:
    Is there any way out to create data source based on stored procedure? Please help.
    Thanks in Advance
    Regards
    Kumud

    Hi Kumud,
    As per my understanding, it is not support to create a Datasource View (DSV) using stored procedures.
    In a DataSource View, only views, tables or named queries can be used. We can use stored procedures in a query. No parameterized queries, parameterized stored procedures or parameterized UDFs can be used in a DSV named query. You can try to using below approach
    to achieve what you are require:
    To build views in our relational source and add the views to the datasource view to proceed with modelling.
    There is a similar issue, you can refer to it.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/22207c21-03c7-4e5a-bb67-0372f29220a3/sql-server-reporting-services-2008-creating-report-models-using-stored-procedures
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • I keep getting the message when I open Muse CC, that the latest version is here and that i need to download it... But when i click "Download Latest Version" and it takes me to the applications manager it tell me that Muse is "Up to date"..... I also downl

    I keep getting the message when I open Muse CC, that the latest version is here and that i need to download it... But when i click "Download Latest Version" and it takes me to the applications manager it tell me that Muse is "Up to date"..... I also downloaded a template from Muse and it tells me when I open it that i also need the latest version... Can anyone explain why Iam getting this message and Why I can not up date?... Much appreciated

    Download the creative cloud desktop app using the below link:-
    Download Adobe Creative Cloud apps | Free Adobe CC trial
    And then check if you get install Button for Muse CC 2014.3
    Regards,
    Neha

  • Need to create new query

    Hi Experts,
    I have a query in my devlopment box and i need to create similar query in development box only, so is there any copy option for this?
    Thanks in advance
    David

    hi
    Open you Query in Bex designer and 'Save As' with a different description and technical name,
    cheers
    Umesh

  • Need help in SQL query to get only distinct records

    Hi all.
    I am new to oracle SQL and i want to write a query to get only distinct values from 2 tables.
    for example i hade 2 tables table1(employee_id,employee_no,grade) and another table2 with same structure.
    for example data in table1 is
    Employeeid employeeno Grade
    1 101 A
    1 101 B
    1 101 E
    1 101 D
    and data in table 2 is
    Employeeid employeeno Grade
    1 101 A
    1 101 B
    1 101 E
    i want to display only the fourth row like the data that doesnt exist in table2 i,e (1 101 D)
    I had too much records in both tables and i jst want to see the records that is in table 1 not in table 2 only.
    employeeid and employeeno are the same in both tables
    I hope u understand my query. I user left outer join and right outer join bt it displays all the results that and matching and unmatching. I want jst unmatched records.
    Any help is highly Appreciated.
    Thanx in Advance.
    I am using oracle 10G on windows

    Try MINUS:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries004.htm#i2054381
    SQL> -- generating sample data:
    SQL> with t1 as (
      2  select 1 employeeid, 101 employeeno, 'A' grade from dual union
      3  select 1, 101, 'B' from dual union
      4  select 1, 101, 'E' from dual union
      5  select 1, 101, 'D' from dual
      6  )
      7  ,  t2 as (
      8  select 1 employeeid, 101 employeeno, 'A' grade from dual union
      9  select 1, 101, 'B' from dual union
    10  select 1, 101, 'E' from dual
    11  )
    12  --
    13  -- actual query:
    14  --
    15  select employeeid
    16  ,      employeeno
    17  ,      grade
    18  from   t1
    19  minus
    20  select employeeid
    21  ,      employeeno
    22  ,      grade
    23  from   t2;
    EMPLOYEEID EMPLOYEENO G
             1        101 D
    1 row selected.

  • Linking Access tables, creating a query with using both Access and Oracle

    Hello,
    I am using 3.0.04.34 version Oracle Developer. I am supposed to create a script/procedure to use both Access tables and oracle tables together. There is an option in developer to copy the access tables into oracle. But it doesn't help me. Because when we updated the access tables
    the copied ones are not be updated. How can I created a linked access tables to oracle and create a query with using both access and oracle table together.
    I will appreciate if you guys help me. I look forward to hearing from you guys.
    Thanks,
    Pinar

    Pinar,
    to be able to query MS Access tables in Oracle you need an additional product, the Oracle Database Gateway for ODBC. It allows you to link any foreign database into an Oracle database using a suitable ODBC driver. You can then access the MS Access tables through a database link based on the Database Gateway for ODBC. This will also allow you to join local Oracle and remote MS Access tables from your Oracle database.
    There's a note on My Oracle Support which gives you more details:Document 233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases - For example - DB2, SQL*Server, Sybase, Informix, Teradata, MySQL
    And there's also a dedicated Forum: Heterogeneous Connectivity

  • I need to create buttons in which the color changes, and stays on after you release the button

    I need to create buttons in which the color changes, and stays on after you release the button. The hard part is the buttons must change independently of each other.
    To get an idea of some of things I’ve tried I’ve tried making the movie with two frames.
    When I click the button it switched to the new frame which would show a movie clip,
    Unfortunately all buttons would change color together and don’t see how to make it so that they change independently.

    you must use movieclip buttons and code for their frame changes.

  • Query to get the blocker and holder info

    Hi All,
    I have framed the following query to get the blocker and holder info.I intend to use this query in a auto-generated mail which executes every 15 mins
    I have put an outer join on the holder because the holder query might have been executed at the time the auto mail configuration fires this query
    I am not a dba and was apprehensive is there is some mistake in the logic of my query. I was also expecting to join v$sql_bind_capture using sql_hash_value and sql_address just the way in which I have joined v$sqlarea
    Looking forward to your kind help in vetting the below query
    Select distinct waiting_session,
    dba_waiters.holding_session,
    decode(to_char(session_waiting_info.STATE),'0','waiter is currently waiting','-2','duration of last wait by waiter is unknown','-1','waiter waited for a short time',' waiter waited long time') "waiters waiting state",
    decode(session_waiting_info.WAIT_TIME,0,'waiter waiting') "waiters last wait time",
    decode(to_char(session_holding_info.STATE),'0','holder is currently waiting','-2','duration of last wait by holder is unknown','-1','holder waited for a short time','holder waited long time') "holders waiting state",
    decode(session_holding_info.WAIT_TIME,0,'waiter waiting') "holders last wait time",
    sql_waiting_info.sql_text "query of the waiter",
    sql_holding_info.sql_text "query of the holder",
    session_waiting_info.STATUS "waiting STATUS",
    session_holding_info.STATUS "holding STATUS",
    session_waiting_info.process "waiting process",
    session_waiting_info.PROGRAM "waiting PROGRAM",
    session_holding_info.process "holding process",
    session_holding_info.PROGRAM "holding PROGRAM",
    session_waiting_info.ROW_WAIT_OBJ# "waiting object",
    session_waiting_info.ROW_WAIT_ROW# "waiting row",
    session_holding_info.ROW_WAIT_OBJ# "holding object",
    session_holding_info.ROW_WAIT_ROW# "holding row",
    session_waiting_info.BLOCKING_SESSION_STATUS "waiting session status",
    session_holding_info.BLOCKING_SESSION_STATUS "holding session status",
    session_waiting_info.username "holding os username",
    session_holding_info.username "waiting os username",
    session_waiting_info.MACHINE "waiting MACHINE",
    session_waiting_info.TERMINAL "waiting TERMINAL",
    session_holding_info.MACHINE "holding MACHINE",
    session_holding_info.TERMINAL "holding TERMINAL",
    session_waiting_info.TYPE "waiting TYPE",
    session_holding_info.TYPE "holding TYPE"
    from dba_waiters,
    v$session session_holding_info,
    v$session session_waiting_info,
    v$sqlarea sql_waiting_info,
    v$sqlarea sql_holding_info
    Where dba_waiters.waiting_Session = session_waiting_info.sid
    and dba_waiters.holding_Session = session_holding_info.sid
    And session_waiting_info.sql_hash_value = sql_waiting_info.hash_value
    And session_waiting_info.sql_address = sql_waiting_info.address
    and session_holding_info.sql_hash_value = sql_holding_info.hash_value(+)
    And session_holding_info.sql_address = sql_holding_info.address(+)
    and dba_waiters.mode_held <> 'None'
    Regards,
    Vishal
    Edited by: user11924113 on Feb 18, 2011 2:39 AM

    Query to track the holder and waiter info
    People who reach this place for a similar problem can use the above link to find their answer
    Regards,
    Vishal

  • I need to create a image using some numeric values and i want to display values in image,

    I need to create a image using some numeric values and i want to display values in image, Numeric values be enterd by text file, excel file or user input by dialog box,
    this is the sample if image.
    http://s17.postimg.org/5xvtzbztn/5_01_03_I.png
    128 x 16 Pixels , Back ground Black, Numbers in Red, Should be same as above picture.
    Because i have hundreds of images to create like this.
    If any one can make a script for this it is very good.
    Sorry about my English.
    Thank you.

    Have you checked out data driven graphics?
    https://helpx.adobe.com/photoshop/using/creating-data-driven-graphics.html

  • Trying to get the Opening and Closing Balance, 0TOTALSTCK and 0VALSTCKVAL

    Hi Experts, Good Day.
    I am developing a query for Stock Balances, Using Custom cube created with copy from 0ic_c03.
    I am trying to get the Opening and Closing Balance, based on Non-Cumulative KF - 0TOTALSTCK and 0VALSTCKVAL.
    Both The KF's Behaviour for Exception Aggregat. = Last Value
    I am using VARIABLE OFFSET as -1 to get Opening Balance, and just restriction for Closing Balance based on 0CALMONTH
    Unfortunately i am getting data for the periods which does not have data in my Cube. It is taking the total value as closing balance for the periods which we don't have transaction in the cube.
    For Ex. I have data for 09.2010 & 10.2010 a particular material, when i enter 08.2010 as input i am getting the total value of the material.
    I hope you understand the problem and solution soon.
    I will give you more explanation if needed.
    Thanks in Advance....
    Have a great Day Ahead.....
    GopalN

    Hi GopaIN,
    can you explain us process you have done about initialization of data (2LIS_03_BX, cube compression)? it seams like there was data before 09.2010 and you load it with 2LIS_03_BX data source. That data is not in cube, but just used for update markers.
    Edited by: Sasa Todorovic on Mar 25, 2011 9:48 AM

  • How can I get the "Open" and "Save As" dialog boxes to open at larger than their default size?

    How can I get the "Open" and "Save As" dialog boxes to open at larger than their default size?  I would like them to open at the size they were previously resized like they used to in previous operating systems.  They currently open at a very small size and the first colum is only a few letters wide necessitating a resize practically every time one wants to use it.  Any help would be appreciated.

    hi Prasanth,
    select werks matnr from ZVSCHDRUN into table it_plant.
    sort it_plant by matnr werks.
    select
            vbeln
            posnr
            matnr
            werks
            erdat
            kbmeng
            vrkme
            from vbap
            into table it_vbap
            for all entries in it_plant
            where matnr = it_plant-matnr and
                  werks = it_plant-werks.
    and again i have to write one more select query for vbup.
    am i right?

  • 0FISCPER3 - Default to last closed period in Report Variable

    Hi all,
    We have a requirement in our reports to default the Posting Period to last closed period.
    In the InfoCube we have 0CALMONTH (In Period) and also 0FISCPER3 (Posting Period). The values for Posting Period varies from 1 to 16.
    What is the functionality behind Posting Period ?
    How can we find the last closed period as months are 12 and Posting period are 16 ?
    Kindly clarify.
    Thanks!

    Hello,
    The fiscal year variant contains the number of posting periods in the fiscal year and the number of special periods.
    You can define a maximum of 16 posting periods for each fiscal year in the Controlling component (CO).
    The fiscal year variant specifies the number of periods and special periods in a fiscal year and how the SAP System is to determine the assigned posting periods.
    You have 12 periods in SAP and also four special periods. These periods are stored in what is called the fiscal year variant (K1, K2, K3 and K4)
    You can use the function module DATE_TO_PERIOD_CONVERT to get the period by passing the date.
    Also see
    [Determining Posting Periods|http://help.sap.com/saphelp_nw04/helpdata/en/c6/f0c33b8e2811d4b3090050dadefebd/frameset.htm]
    special periods
    Thanks
    Chandran

  • Garageband does not start and I get this open and do not shut down or restart

    garageband does not start and I get this open and do not shut down or restart

    Such an error is always caused by inconsistent files in the Firefox program folder (application.ini and/or platform.ini and possibly others) and your only option is to reinstall that version of Firefox, either via the software repositories or the Mozilla server.<br />
    Be sure to delete all files in that folder before copying the files from that tar.bz2 archive.<
    *http://kb.mozillazine.org/Installing_Firefox#Linux
    Note that the current ESR version is 10.0.5
    *http://www.mozilla.org/en-US/firefox/organizations/all.html
    *http://www.mozilla.org/en-US/firefox/17.0.5/releasenotes/
    *http://www.mozilla.org/en-US/firefox/17.0.5/system-requirements/
    All Firefox releases:
    *https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ (17.0.5esr/, latest-esr/, latest/)

  • The App Store said I needed to switch countries so I clicked the button and it switched it for me but now I can't update my apps but when I try to change it through settings it still says the country is the u.s. I don't know what to do to change it back

    The App Store said I needed to switch countries so I clicked the button and it switched it for me but now I can't update my apps but when I try to change it through settings it still says the country is the u.s. I don't know what to do to change it back

    See  >  Change your iTunes Store country
    Here  >  http://support.apple.com/kb/HT1311
    If necessary Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

Maybe you are looking for