Interactive Reporting - Multiple SELECT stmts in 1 query

Is it possible to multiple/nested select statements in 1 query? Actually what I need to do is pull records for the last 12 months. The SQL that I'm basing my IR query from has multiple SELECT statements and uses the add_month function w/ a parameter ranging from 0 to -12.
Thanks.
Terri

Here's some of the additional SELECTs. There are more after these that I didn't include since it would be fairly long.
CREATE OR REPLACE VIEW DEFECT_INVENTORY
(NEW_COUNT, CLOSE_COUNT, BEGINNING_COUNT, ENDING_COUNT, MONTHNAME,
SEVERITY)
AS
select New_Count, Close_Count, Beginning_count, Ending_Count,r.Monthname, r.Severity from
(select p.New_Count, q.Close_Count,p.sev Severity, p.Month_Name Monthname from
(Select count(bg_bug_id) New_Count,a.Month_Name, a.sev
from
(select bg_bug_id,
bg_severity sev,
bg_user_10 app,
bg_detection_date,
bg_closing_date,
to_date(bg_user_26, 'yyyy-mm-dd') as cancel_date,
to_date(substr(bg_vts,1,10), 'yyyy-mm-dd') as vts,
to_char(to_date((to_char(add_months(sysdate, -11), 'MM')||'/01/'||to_char(add_months(sysdate, -11), 'YYYY')), 'MM/DD/RRRR') -1, 'MON-YY') as Month_Name,
bg_status,
to_date((to_char(add_months(sysdate, -11), 'MM')||'/01/'||to_char(add_months(sysdate, -11), 'YYYY')), 'MM/DD/RRRR') -1 AS rpt_DATE_end,
to_date((to_char(add_months(sysdate, -12), 'MM')||'/01/'||to_char(add_months(sysdate, -12), 'YYYY')), 'MM/DD/RRRR') AS rpt_DATE_beg
from bug ) a
where (a.bg_status not like '65-Cancelled'
and a.bg_detection_date <= a.rpt_DATE_end
and a.bg_detection_date >= a.rpt_DATE_beg
and a.cancel_date is null)
group by a.sev, a.Month_Name) p,
(Select count(bg_bug_id) Close_Count,a.Month_Name, a.sev
from
(select bg_bug_id,
bg_severity sev,
bg_user_10 app,
bg_detection_date,
bg_closing_date,
to_date(bg_user_26, 'yyyy-mm-dd') as cancel_date,
to_date(substr(bg_vts,1,10), 'yyyy-mm-dd') as vts,
bg_status,
to_char(to_date((to_char(add_months(sysdate, -11), 'MM')||'/01/'||to_char(add_months(sysdate, -11), 'YYYY')), 'MM/DD/RRRR') -1, 'MON-YY') as Month_Name,
to_date((to_char(add_months(sysdate, -12), 'MM')||'/01/'||to_char(add_months(sysdate, -12), 'YYYY')), 'MM/DD/RRRR') AS rpt_DATE_beg,
to_date((to_char(add_months(sysdate, -11), 'MM')||'/01/'||to_char(add_months(sysdate, -11), 'YYYY')), 'MM/DD/RRRR') -1 AS rpt_DATE_end
from bug ) a
where (a.bg_status like 'Closed'
and a.bg_closing_date <= a.rpt_DATE_end
and a.bg_closing_date >= a.rpt_DATE_beg
and a.bg_closing_date is not null)
or
(a.bg_status like 'Closed'
and a.vts <= a.rpt_DATE_end
and a.vts >= a.rpt_DATE_beg
and a.bg_closing_date is null)
or
(a.bg_status not like 'Closed'
and a.bg_closing_date <= a.rpt_DATE_end
and a.bg_closing_date >= a.rpt_DATE_beg
and a.bg_closing_date is not null)
group by a.sev, a.Month_Name) q
where p.sev = q.sev) r,

Similar Messages

  • Interactive report on SELECT * FROM X

    Hi,
    Is there anyway to create an interactive report using SELECT * FROM my_table; where you can add a new column to "my_table" and for the interactive report to pick up the new column without having to go into the report region and hit apply changes?
    I've tried using a collection but that doesn't work as you still have to manually refresh the report region.
    I've even tried hacking my way into:
    wwv_flow_f4000_util.save_interactive_rpt_region (
    p_region_id in number,
    p_flow_id in number,
    p_plug_name in varchar2 default null,
    p_region_name in varchar2 default null,
    p_region_template in number default null,
    p_display_seq in number default null,
    p_display_column in number default null,
    p_display_point in varchar2 default null,
    p_region_source in varchar2 default null,
    p_breadcrumb_template in number default null,
    p_list_template in number default null,
    p_region_display_error_msg in varchar2 default null,
    p_required_role in varchar2 default null,
    p_display_when_cond in varchar2 default null,
    p_display_when_cond2 in varchar2 default null,
    p_display_cond_type in varchar2 default null,
    p_region_header in varchar2 default null,
    p_region_footer in varchar2 default null,
    p_region_column_width in varchar2 default null,
    p_customized in varchar2 default null,
    p_customized_name in varchar2 default null,
    p_requied_patch in number default null,
    p_url_text_begin in varchar2 default null,
    p_url_text_end in varchar2 default null,
    p_translate_title in varchar2 default null,
    p_comment in varchar2 default null);
    (Yes, I know that's bad!)
    Still can't get this to work anyway.
    There must be a way of doing this....
    Any help gratefully recieved.
    Thanks
    Yog

    Keith,
    No it doesn't.
    Here is an example.
    1. Created an interactive report with source as select * fom dept.
    2. Ran my page and saw a report based on columns deptno, dname and loc
    3. Added a column to dept called "newcol"
    4. Reran the page - columns are still deptno, dname and loc
    5. clicked on green cog / select columns and the only options avaiable are still deptno, dname and loc
    In order to get "newcol" to appear I have to edit the page, go to my report region and click Apply Changes. A summary appears with the new column "newcol" shown. I click apply changes again and run the page and only then does the new column appear.
    Cheers
    Yog

  • Setting current values in Multiple Select List in SQL Query based Report

    Hi,
    I have a report based on a sql query that contains a multiple select list. Unfortunately I cannot get the multiple select list to display the current values (p_value) correctly. I have created a page item, :p311_current_versions, that is set using a pre-header process and it returns a value with a colon delimited format e.g. '10.1.2.1.0:10.1.2.2.0'. Then this item is used in the sql query to set the current value (p_value) of the apex_item.select_list_from_query function. However when the table is displayed, instead of having two entries, 10.1.2.1.0 and 10.1.2.2.0 selected, it has an extra entry '10.1.2.1.0:10.1.2.2.0' selected.
    Here is my code:
    select distinct a.product, a.version from (
    select distinct
    apex_item.display_and_save(2,product)||apex_item.hidden(1,env_product_id) PRODUCT,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(3,decode(product, 'HTTP Server' , :p311_current_versions, version), 'SELECT distinct version d, version r FROM ebs_tech_stack where
    product ='''||PRODUCT||'''',
    decode(PRODUCT, 'HTTP Server' ,'multiple="multiple" style="width:170px"','style="width:170px"'),
    'NO') as version
    from ebs_environment_tech_stack
    where environment_id = :p311_umgebung_id) a order by a.product
    If anyone can help me figure out how to set the current values correctly I'd be really grateful!!
    Thanks in advance,
    Jean

    Jean,
    I don't think this is possible using the apex_item package. The select_list_from_query function accepts only a single value for the second parameter.
    Scott

  • Interactive Report with union all in the query

    I have an interactive report with the following query in the report region:
    select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
    suserdefined1,trans_notes,samount,detail_notes
    from journal_entries
    union all
    select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
    suserdefined1,trans_notes,stotalamount,detail_notes
    from charge_entries;
    This gets translated as listed below during runtime. I am trying to pass a value to both SELECT statements instead of the just the bottom select statement. Is this possible using interactive reports.
    select
    PROPERTY,
    SADDR1,
    UPOSTDATE,
    SOTHERDATE1,
    ACCOUNT,
    SDESC,
    UREF,
    SUSERDEFINED1,
    TRANS_NOTES,
    SAMOUNT,
    DETAIL_NOTES,
    "JOURNAL_CONTROL-1000000000" "JOURNAL_CONTROL-1000000000"
    from (
    select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
    suserdefined1,trans_notes,samount,detail_notes
    from journal_entries
    union all
    select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
    suserdefined1,trans_notes,stotalamount,detail_notes
    from charge_entries
    ) r
    where ("PROPERTY" = :APXWS_EXPR_1)
    0.14: IR binding: ":APXWS_EXPR_1"="APXWS_EXPR_1" value="prop1"
    Thanks for any help,
    Jim

    The bottom query is actually the third query, it encompasses the two that are unioned. It is generated by APEX to allow for the search facility - to achieve what you want ignore the larger query, and get your query working in something like SQL developer. Once it's working then put it into APEX, and the search wrapper will be generated.
    select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
    suserdefined1,trans_notes,samount,detail_notes
    from journal_entries
    where property = :YOUR_CRITERIA
    union all
    select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
    suserdefined1,trans_notes,stotalamount,detail_notes
    from charge_entries
    where property = :YOUR_CRITERIA;
    Then you need to think about how you are using the report, if it is linked to from another report, then create a hidden variable and pass it from the parent.
    If the report is standalone , then you could create an item , that can be edited and when submitted, re-executes the report based on the criteria entered.
    Steve
    Hot and bothered in sunny Dubai

  • Interactive Report with select list

    Hi,
    I am trying to make an interactive report where the output is based on the choice of a value from the select list;
    the list is based on a lov:
    select name,id
    from kunden order by 1
    I created the select list named P2_KUNDEN_ID and used this in my query for the report:
    select
    lizenzen.id,
    lizenzen.produktbeschreibung,
    lizenzen.anzahl,
    lizenzen.lizenztyp,
    lizenzen.support_vertragsnr,
    lizenzen.csi_nr,
    lizenzen.startdatum,
    lizenzen.enddatum,
    lizenzen.status,
    lizenzen.zuordnung,
    lizenzen.info,
    lizenzen.kunde,
    kunden.name
    from lizenzen, kunden
    where lizenzen.kunde = kunden.id(+)
    and (lizenzen.kunde = :P2_KUNDEN_ID OR (lizenzen.kunde is null and nvl(:P2_KUNDEN_ID,'-1')=-1))
    But the report doesn't change if I make a different selection from the list. I think I made it exactly as shown in the developer's guide.
    Thx in advance.

    Hello,
    You have to use the apex_util.ir_filter
    apex_util.ir_filter(p_page_id=> 2
    ,p_report_column=>'kunde',p_operator_abbr=>'EQ',p_filter_value=>:P2_KUNDEN_ID);

  • Interactive Report with Select List LOV's

    Hi All -
    I need to develop an Interactive Report which displays reports based on values selected from a select list (LOV's) on this IR report.
    Following is what I am working on.
    This page has 2 select lists with the corresponding LOV values:
    Date From ==> Q1, 2010
    Q2, 2010
    Q3, 2010
    Q4, 2010               
    Date To ==> Q1, 2010
    Q2, 2010
    Q3, 2010
    Q4, 2010     
    When the user visits this report page first time, "Date From" and "Date To" select lists have null values and the report should display all the records.
    Once the user selects values from "Date From" and "Date To" select lists then the report should be filtered based on the values selected i.e.
    If the user selects *"Date From"* ==> Q1, 2010 and *"Date To"* ==> Q3, 2010, then the report should show all the records whose reporting period falls between "Jan 1, 2010" to "Sept 30, 2010" i.e Q1-Q3 2010 only.
    And the Reporting date format stored in the table is "18-OCT-2010", "12-APR-2010" etc ....
    How can this be achieved. Please share your expertise.
    Thanks,
    -Seenu

    Hi,
    First Create 2 Select List with List Of Queries in LOV Region like
    +'STATIC2:Q1-2010;01-Jan-2010,Q2-2010;01-Apr-2010,Q3-2010;01-Jun-2010,Q4-2010;01-Oct-2010'+ in Date From List lets name it P10_DF and
    +'STATIC2:Q1-2010;31-Mar-2010,Q2-2010;30-Jun-2010,Q3-2010;30-Jun-2010,Q4-2010;31-Dec-2010'+ in Date To List P10_DT.
    (Enable Display Null Value on both the select list)
    Then Now in the Report Source add Where Query some thing like
    select FIELD1,FIELD2 from TBL_REPORTS where Report_Date>=NVL( *:P10_DF* ,'01-Jan-2010') and Report_Date<=NVL( *:P10_DT* ,'31-Dec-2010')
    And also create a button to submit the values
    NOTE: This is not tested but this is how i will come about it in the specified scenario. You can try this and post the results...
    Good Luck.
    Regards,
    Afsar

  • Trying to create table using Union All Clause with multiple Select stmts

    The purpose of the query is to get the Substring from the value for eg.
    if the value is *2 ASA* then it should come as ASA
    where as if the value is *1.5 TST* the it sholud come as TST like wise for others too.
    I am trying to execute the below written SQL stmt but getting error as:
    *"ORA-00998 must name this expression with the column alias 00998.00000 - Must name this expression with the column alias"*
    CREATE TABLE TEST_CARE AS
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =5
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =7
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =14
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3),LEN FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =7 AND old_care_lvl ='Regular'
    I want to create the table using the above given multiple select using the Union ALL clause but when trying to create run the query getting error as "ORA-00998 must name this expression with the column alias 00998.00000 - Must name this expression with the column alias"
    Please guide me how to approach to resolve this problem.
    Thanks in advance.

    When you create a table using a SELECT statement the column names are derived from the SELECT list.
    Your problem is that one of your columns is an expression that does not work as a column name SUBSTR(old_care_lvl,3)What you need to do is alias this expression and the CREATE will pick up the alias as the column name, like this:
    CREATE TABLE TEST_CARE AS
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3) column3, len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =5
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =7
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =14
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3),LEN FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =7 AND old_care_lvl ='Regular'
    );You may not like the name "column3" so use something appropriate.

  • COPA Report: Multiple selection

    Hi Gurus,
    I want to have a profit center as a multiple selection to be given as an input in KE30 report. That means user should be able to execute the report based on the selection of the profit center in the entry screen
    For the same I created a global variable and following are the details fo the same
    Appl. class        KE
    Type of variable           Characteristics Value
    Variable Name            &PCT
    Field Name                PRCTR
    Replacement type      Entry
    Optional entry           Optional entry
    Parameter/selectopt. Select option
    Short text                  Profit Ctr
    Description               Profit Center
    Text                         Profit Center
    I have created Form for the report based on the line item (Tcode KE94). If I want to use this global variable "&PCT" in the "General Data selection" tab  in the Form,the characteristic Profit center is not available for selection from the field catlog. Profit center is one of the characteristic in the operating concern.But this is available for the Navigation in KE30 report. I deselected Profit center from the Nevigation in KE32 but still I am not able to make it available for selection in "General data Selection" tab in Form.
    What is the relevance of Variable On/OFF in KE30 report? How to make this Global variable available to be used in "General data selection" tab in the Form?
    Will you please help me out?
    regards,
    makrand

    Dear Makrand,
    Please look into the following:
    I brought profit center in selection criterion:
    For this I have changed my Form T Code:  KE35:
    General Data Selection :
    Included Profit center along with the controlling Area.
    Then I changed my report:
    KE30:
    Variables Tab:
    Givn Profit center as entry at execution.
    Hope this will helps you......
    Regards,
    Pavan Kumar Arvapally

  • Interactive report - multiple lines

    Hi,
    I saw a thread on here where people used custom <something> to make reports spread over multiple lines (ATD example). However, that was a normal report. Is there a way to make a column spread over two rows in an interactive report? An app has just been released for testing but the description field is causing headaches in the report.
    Mike

    Nevermind it seems to have started adjusting itself now :o
    Mike

  • Multiple select staement in 1 query

    Hell Team,
    I am New to this SQL world. Please help me out with htis:-
    I have following queries:-
    #select name from v\$database;
    #select log_mode from v\$database;
    #select count(*)"INVALID_OBJECTS" from dba_objects where status='INVALID';
    #select count(*) "INVALID_N/A_INDEXES" from dba_indexes where status!='VALID';
    #select count(*)"Invalid Triggers" from user_objects where OBJECT_NAME like '%TRIGGERS%' and status='VALID';
    #select count(*) "Broken Jobs" from dba_jobs where broken!='Y';
    #select count(*) "Block Corruption" from v\$database_block_corruption;
    i want a table which can be generated just by select cmd and it will list the result of all the above queires as follow:-
    DB_NAME ARCH_MOD INV_OBJ INV_IDX INV_TRG B_JOB BLK_CRP
    PROD NOARCHIVELOG 0 86 6 3 0
    I mean to say i want multiple select queries into 1 table (note:- i m not saying to create a tables and then insert,update(using select from other tables), its just a sheel script that will fetch these record into a txt file)

    Something like this ?
    SQL> ed
    Wrote file afiedt.buf
      1  select a.name,
      2  a.log_mode,
      3  b."INVALID_OBJECTS",
      4  c."INVALID_N/A_INDEXES",
      5  d."Invalid Triggers",
      6  e."Broken Jobs",
      7  f."Block Corruption"
      8  from
      9  v$database a,
    10  (select count(*) "INVALID_OBJECTS" from dba_objects where status ='INVALID') b,
    11  (select count(*) "INVALID_N/A_INDEXES" from dba_objects where status !='VALID') c,
    12  (select count(*) "Invalid Triggers" from user_objects where OBJECT_NAME like '%TRIGGERS%' and status='VALID') d,
    13  (select count(*) "Broken Jobs" from dba_jobs where broken!='Y') e,
    14* (select count(*) "Block Corruption" from v$database_block_corruption) f
    SQL> /
    NAME      LOG_MODE     INVALID_OBJECTS INVALID_N/A_INDEXES Invalid Triggers Broken Jobs Block Corruption
    ORCL      ARCHIVELOG                 1                   1                0           3                0
    SQL>Now just try to replace your script with this :
    #!/bin/bash
    export hostname=$2;
    echo " export started"
    export ORACLE_SID=$1;
    export ORACLE_HOME=/$1db/db/10.2.0;
    export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$ORACLE_HOME/lib;
    export TNS_ADMIN=/$1db/db/tech_st/11.2.0/network/admin/$1_$2;
    PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/local/oracle/bin:/usr/local/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch;
    export PATH=$PATH:$ORACLE_HOME/bin;
    echo $ORACLE_HOME
    echo "all export complete"
    #export var1=/$1db/db/tech_st/11.2.0/$1_$2.env
    #export var2=/$1db/db/tech_st/11.1.0/$1_$2.env
    export var3=/$1db/db/10.2.0/$1_$2.env
    #. /$1db/db/tech_st/11.2.0/$1_$2.env
    #. /$1db/db/tech_st/11.1.0/$1_$2.env
    #./$1db/db/10.2.0/$1_$2.env
    sqlplus / as sysdba <<eof
    select a.name,
    a.log_mode,
    b."INVALID_OBJECTS",
    c."INVALID_N/A_INDEXES",
    d."Invalid Triggers",
    e."Broken Jobs",
    f."Block Corruption"
    from
    v\$database a,
    (select count(*) "INVALID_OBJECTS" from dba_objects where status ='INVALID') b,
    (select count(*) "INVALID_N/A_INDEXES" from dba_objects where status !='VALID') c,
    (select count(*) "Invalid Triggers" from user_objects where OBJECT_NAME like '%TRIGGERS%' and status='VALID') d,
    (select count(*) "Broken Jobs" from dba_jobs where broken!='Y') e,
    (select count(*) "Block Corruption" from v\$database_block_corruption) f;
    exit; >>filename.txt
    Let us know if it works for you or not.
    Regards
    Girish Sharma

  • ABAP list report, multiple selections - select-options

    I have written a very simple ABAP list report, that contains a single select-option.  On the selection screen, I have the option of entering multiple values, with each new value being displayed directly underneath the old, but I am only getting the first value entered on the screen displayed.  Does anyone have any sample code for me?

    Hi Daniel,
    Select_Options consists of 4 parameters, in with the range consists in eg...
    Select-options s_vbeln for vbak-vbeln.
    then s_vbeln-low, s_vbeln-high are the range values...
    So whne you write select query.
    write vbeln in s_vbeln
    instead of vbeln eq s_vbeln
    Hope this solves your problem.
    Thanks & Regards,
    Dileep .C

  • ALV REPORT MULTIPLE SELECTION

    CAN ANYONE PLZ TEMME HOW TO SELECT MULTIPLE RECORDS IN ALV AND EDIT THEM...........................
    EG....SELECT MULTIPLE VALUES AND CHANGE D ACTIVE INDICATOR.........
    THANX IN ADVANCE...........

    Hi,
    Reprots
    http://www.sapgenie.com/abap/reports.htm
    http://www.allsaplinks.com/material.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV? http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV? http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV? http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Check this for basic concepts of OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Tabstrip
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
    Editable ALV
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
    Tree
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
    General Tutorial for OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
    http://www.sapdevelopment.co.uk/reporting/alvhome.htm
    http://www.sap-img.com/abap/what-is-alv-programming.htm
    http://www.sap-img.com/abap-function.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree%5Calvtree_basic.htm
    http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf
    http://www.sap-img.com/abap-function.htm

  • Interactive Report  count selected rows

    I have a I/R report with a checkbox is column 1 of each row using:
    HTMLDB_ITEM.CHECKBOX
    (1,R.RESEARCH_ID,
    decode(:Pxx_SELECT_ALL_ROWS,'Y','CHECKED',
    decode(instr(nvl(:Pxx_SELECTED_IDS,0),R.RESEARCH_ID),0,NULL,'CHECKED'))
    AS select_flag
    I want to use Javscript or a Dynamic Action to "count" how many selected rows there are, when a UPDATE button is pressed.
    Right now, the UPDATE button "submits" the page, then a page item computation runs the following code to get a count:
    DECLARE
    v_cnt number(9);
    BEGIN
    v_cnt := 0;
    FOR i in 1..htmldb_application.g_f01.count
    LOOP
    v_cnt := v_cnt + 1;
    END LOOP;
    return v_cnt;
    This works... but I dont want to submit (and rerun the report) just to get this count.
    I have copied this loop into a Dynamic Action using the Click action of the UPDATE button, but it doesnt seem to recognize htmldb_application.g_f01.count .. so my value returns as 0.
    Any ideas - thanks!

    I am not that strong in javascript, so I put a few alerts in the function you provided, to try to understand it better.
    My example query returns 2 rows.
    document.wwv_flow.f01.length returns a value = 2.
    I checked both rows, then called the function.
    I put an Alert inside the FOR loop in your example, it never executed.
    The FOR loop in your example used a “>” sign, which never would evaluate as true, since i=0 > 2 is immediately false.
    I changed the operator in the FOR loop to “<”.
    The loop executed 2 times,
    I displayed the with variable i : values = 0, 1
    I displayed the value of document.wwv_flow.f01.id, it was NULL both iterations.
    The $x(curr_id).checked is never true, so count remains = 0
    function f_count_checked ()
    var counter = 0;
    for (var i = 0; i > document.wwv_flow.f01.length; i++) ---- I changed this to “<”
    {var curr_id = document.wwv_flow.f01[i].id;
    if ($x(curr_id).checked==true)
    {counter = counter + 1;}}
    alert ('You have checked: '+counter+' rows.');

  • Interactive report's Enchance QUERy

    HI All
    I have one question when we apply any filter on a interactive report then their might be some query is generated for that filter.
    so how we can find that query in apex pls tell me i m very much intreasted in that.
    Thank's In Advance to all expert.
    Dipen.

    Hi,
    These links might help
    http://stewstools.wordpress.com/apex_ir_query-package/
    http://www.talkapex.com/2009/04/log-apex-interactive-report-search.html
    Regards,
    Jari

  • Reuse Interactive Report Filtering components

    Hi everyone! I wanted to create a change notification application with APEX. I'm planning to use the Interactive Report to enable the users build their own saved query using the filtering function of IR. I will provide an option for the user to subscribe (via email) for every query they want when their conditions has been met due to data change in the future. (ex. the user is waiting for some material delivery. This application will alert the user when it became available.)
    I want to use the filtering components from the Interactive Report (column selection, automatic operator availability based on column data type and the expressions box) for query building. Is this possible? Or if not, can I at least retrieve the "SQL WHERE clause" behind the Filter?
    Any ideas for this type of application? Thanks in advance!

    I've found it! I could get the SQL for the filters by using the APEX_APPLICATION_PAGE_IR_COND APEX view. I'm still not sure about the multiple user situation. But all the filter information are there! Great!
    APEX is magnificent! And I'm such a newbie.
    Thanks!

Maybe you are looking for