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);

Similar Messages

  • 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

  • Report with select list and link to call another report

    Hi,
    I am trying to do 2 reports (REPORT1 and REPORT2).
    The first is a summary report (REPORT1).
    This report will display sales figures for the year. Now, I need to have a select list in the result set that will have 2 options, depending on which option is chosen, I want to call REPORT2 with the select list as a parameter. How can I do this ?
    Let me try to explain what I did.
    I created REPORT1 on Page 100
    SELECT YEAR, sum(YTD_SALES), APEX_ITEM.SELECT_LIST(1,'DEPARTMENT','Department;DEPARTMENT,Division;DIVISION') Drilldown FROM SALES_ANALYSIS WHERE YEAR > 2000
    GROUP BY YEAR ORDER BY YEAR
    I created 2 hidden items namely P100_YEAR and P100_DRILLDOWN
    I also made the column YEAR as a link and specified both P100_YEAR and P100_DRILLDOWN as parameters to be passed.
    Next, I created REPORT2
    SELECT YEAR, DECODE(:P100_DRILLDOWN, 'Department', department, 'Division', Division) dept_div, sum(YTD_SALES) ytd_sales
    FROM SALES_ANALYSIS
    WHERE YEAR = :P100_YEAR
    When I run Report 1, it's fine, when I choose either Department or Division from the Select List and click on the link to call Report 2, report 2 is displayed, but the value being passed for P100_DRILLDOWN is not correct and as a result, I am unable to get correct results for Report 2
    Am I missing something ? Are there any alternate ways to do what I'm doing ?
    Thanks,
    Ashok

    Hi Ashok,
    The link definition will not know the value selected in the list as it is constructed only when the page is being rendered. You would need to create some javascript to handle this. I've done that here: [http://apex.oracle.com/pls/otn/f?p=267:182]
    The link on the EMPNO column has been defined in the HTML Expression setting for the column instead of the Link section. The HTML Expression that I have used is:
    &lt;a href="#" onclick="javascript:doDrilldown('#EMPNO#',this);"&gt;#EMPNO#&lt;/a&gt;And, in the page's HTML Header setting, I have added in:
    &lt;script type="text/javascript"&gt;
    function doDrilldown(empno,group)
    var g;
    var p = group.parentNode;
    while (p.tagName != "TR")
      p = p.parentNode;
    var x = p.getElementsByTagName("SELECT");
    if (x.length &gt; 0)
      g = x[0].value;
    var url = "f?p=&APP_ID.:183:&SESSION.::::P183_EMPNO,P183_GROUP:" + empno + "," + g;
    document.location.href = url;
    &lt;/script&gt;When a link is clicked, the doDrilldown function is called passing in the EMPNO value and the "this" object (which identifies the object triggering the call). The function starts from that object and goes up in the HTML tag tree to the nearest TR tag (the row tag that the link is on) and then finds the first SELECT list item on the row and gets its value. It then constructs a URL using this and the EMPNO value and performs a redirect to the second page (page 183 in this example).
    Andy

  • Report with Select Lists problem

    Hi all,
    I have a sql report with this query:
    select
    'Hello World' Col1,
    apex_item.select_list_from_lov_xl(1,'Data 1','TEST_LOV') lov1,
    apex_item.select_list_from_lov_xl(1,'Data 2','TEST_LOV') lov2,
    apex_item.select_list_from_lov_xl(1,'Data 3','TEST_LOV') lov3,
    apex_item.select_list_from_lov_xl(1,'Data 4','TEST_LOV') lov4
    from dual
    Where TEST_LOV is a LOV that return 400 rows. The problem is that this report gives me an error:
    report error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    I am able to create a workarround using ajax, but I don't think this is the best way.
    Does anyone knows why this happens or any solution??
    Thanks,
    Alejandro.

    Hi,
    OK - My page is defined as:
    The report is based on the following SQL:
    select
    "EMPNO",
    "EMPNO" EMPNO_DISPLAY,
    "ENAME",
    "DEPTNO"
    from "#OWNER#"."EMP"The DEPTNO column is the one that I need a select list for. I have not used the APEX_ITEM package to handle this, but I expect it could be done that way as well.
    On the DEPTNO column, I have the following settings:
    Display As: Select List (query based LOV)
    Named LOV: -Select Named LOV-
    Display Extra Values: Yes
    Display Null: Yes
    List of values definition: SELECT NULL d, NULL r FROM DUAL
    Note that it is important that you use these exact settings.
    I have then created a new PL/SQL region on the page below the tabular form. The region should use the "No Template" template to keep it hidden from view. The Region Source is:
    DECLARE
    vSEP VARCHAR2(1);
    BEGIN
    vSEP := '';
    htp.p('&lt;script type="text/javascript"&gt;');
    htp.p('var sMaster = new Array(');
    FOR c IN (SELECT DNAME d, DEPTNO r FROM DEPT ORDER BY UPPER(DNAME))
    LOOP
      htp.p(vSEP || 'new Array (' || c.r|| ',"' || c.d|| '")');
      vSEP := ',';
    END LOOP;
    htp.p(')');
    htp.p('&lt;/script&gt;');
    END;This defines a hidden select list as a javascript array using the actual values from the DEPT table.
    I then have an HTML region underneath that, again using "No Template", that has the following as the Region Source:
    &lt;script type="text/javascript"&gt;
    function updateList(sChild)
    var o;
    var sChildValue = sChild.value;
    sChild.options.length = 0;
    o = new Option('-Select-', '');
    sChild.options.add(o);
    var k;
    for (k = 0; k &lt; sMaster.length; k++)
      o = new Option(sMaster[k][1], sMaster[k][0]);
      sChild.options.add(o);
    sChild.value = sChildValue;
    if (sChild.selectedIndex == -1)
      sChild.selectedIndex = 0;
    function updateLists()
    var lists = document.getElementsByName("f03");
    var k;
    var x;
    if (lists)
      for (k = 0; k &lt; lists.length; k++)
       updateList(lists[k]);
    updateLists();
    &lt;/script&gt;For this example, you will note that I am refering to "f03" (in the updateLists() function) - my DEPTNO column's SELECT tags have "f03" as their NAME attributes. This may need to be changed for your page.
    And that's it!
    When the page is loaded, the tabular form is constructed. Due to the settings I've applied to the DEPTNO column, each list will actually consist of a NULL entry and the value on the record (that's due to setting Null/Extra Values to Yes).
    Then, a hidden select list is constructed as a javascript array. And, finally, we loop through each of the "f03" items on the page, take a note of the value already there, replace the contents of the dummy select list with the contents of the array and then select the original value again.
    Andy

  • 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 pagination

    Hi,
    i have create an interactive report with pagination .i have follow instraction form
    [http://dbswh.webhop.net/apex/f?p=BLOG:READCAT:0::::CATEGORY:10800346812869]
    i have put JQuary in Page HTML HEADER .
    Now it show me that code in header in my page .No value in my pagination select list.
    How can i solve this problem.
    Thanks

    Hi friends,
    i have sort out that problem,
    i have jus put JQuary code in JavaScript Section.
    Thanks

  • 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

  • Interactive Report with Null Columns

    I've got a user who wants to export an interactive report, and he needs certain columns to appear on the export for him to fill the data in later (this is an intermediate step, while we work on getting all the data he needs in to the database). I've created the report query, and there are a handful of null/empty columns (to preserve the correct order for the export). When I try to add this query to APEX in an interactive report, I get a "ORA-00001: unique constraint (APEX_040000.WWV_FLOW_WORKSHEET_COLUMNS_UK2) violated" error.
    Googling around shows me that this happens because of similarly-named columns, and the solution is to provide aliases to all columns. My report has aliases on all columns, but I still cannot create an interactive report. I've tried changing the null columns to empty strings, as well as enclosing the aliases in double-quotes, but nothing works. I can however use my original query to create a standard report, but due to the export requirement, this isn't ideal.
    I was able to create the interactive report with one null column, and then edited the report source to add in the others. This had to be done one at a time, since trying to add multiple null columns at the same time gives the same error again. Unfortunately, when I try and run the page, I get an "ORA-20001: get_dbms_sql_cursor error ORA-00918: column ambiguously defined" error.
    My original query:
    select customer.customer_name as customer,
           project.name as project_name,       
           trunc(project.estimated_end_dt) as due_date,
           project_status.project_status_desc as status,
           null as revenue,
           project.baseline_effort as baseline_hours,
           null as projected_cost,
           null as est_gain_loss,
           project.actual_hours as actual_hours,
           project.estimated_hours as projected_hours,
           null as projected_cost,
           null as projected_gain_loss,
           null as roi      
        from project,
             customer
      where customer.customer_id = project.customer_id
      and project.inactive_ind = 0
      and project.customer_id is not null
      and project.estimated_end_dt >= :DTP_P50_STARTDT
      and project.estimated_end_dt <= :DTP_P50_ENDDT
    order by customer.customer_name,
             project.estimated_end_dt;             Can someone tell me a way to create an interactive report with multiple null columns?

    Hi shimmoril,
    The problem is likely that you have two columns aliased as "projected_cost" (7th column and 11th column).
    Hope this helps,
    John
    If you find this information useful, please mark the post "helpful" or "correct" so that others may benefit as well.*

  • OnChanger="get_ajax_select_xml(this);" with  select list (query named LOV)

    Hello,
    i used Vikas'example Re: cascading lov for tabular form
    i have a problem with Select list (query based LOV)
    when run tabular form i have the following error:
    report error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    the number of rows of the Lov are 900
    the display variable is 70 char
    is there any limit?
    Thank in advance
    Costanti

    Leo,
    Thanks for the response, but I don't think you quite understand my problem. If I go to the Column Attributes screen for the group_id field, I have the "Display As" drop down set to "Select List (query based LOV)", not "Select List (named LOV)". This requires that the sql query be written in the "List of values definition" text area below. Within that text area I have the following query:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The APP_ID that I need to reference is for the current row of data that is being processed. Therefore, I can't use a :PNNN_APP_ID variable, because that field does not exist on the page.
    Hopefully this explains it a little better.
    Thanks,
    Kris

  • Interactive reports with alv

    Hi,
    i just wanted to know how to create interactive reports with check box and whether we can use av with interactive reports.

    hi,
    this the code for interactiv ALV
    *& Report  ZINT_ALV
    REPORT  zint_alv.
    TYPE-POOLS:slis.
    TABLES:mara,
           makt,
           mseg.
    DATA:BEGIN OF itab OCCURS 0,
          matnr LIKE mara-matnr,
          maktx LIKE makt-maktx,
         END OF itab.
    DATA:BEGIN OF itab1 OCCURS 0,
          mblnr LIKE mseg-mblnr,
          menge LIKE mseg-menge,
          meins LIKE mseg-meins,
          werks LIKE mseg-werks,
         END OF itab1.
    DATA:BEGIN OF itab2 OCCURS 0,
          mblnr LIKE mseg-mblnr,
          budat LIKE mkpf-budat,
         END OF itab2.
    DATA:fcat TYPE slis_t_fieldcat_alv,
         fcat1 TYPE slis_t_fieldcat_alv,
         fcat2 TYPE slis_t_fieldcat_alv,
         eve TYPE slis_t_event,
         eve1 TYPE slis_t_event.
    DATA:t_mat LIKE mara-matnr,
         t_doc LIKE mseg-mblnr,
         s_mat LIKE mara-matnr,
         g_repid LIKE sy-repid,
         subtot TYPE slis_t_sortinfo_alv,
         g_subtot LIKE LINE OF subtot.
    SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:mat FOR mara-matnr OBLIGATORY.
    SELECTION-SCREEN:END OF BLOCK blk1.
    INITIALIZATION.
      PERFORM build_fcat USING fcat.
      PERFORM build_eve.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM dis_data.
    *&      Form  build_fcat
          text
         -->T_FCAT     text
    FORM build_fcat USING t_fcat TYPE slis_t_fieldcat_alv.
      DATA:wa_fcat TYPE slis_fieldcat_alv.
      wa_fcat-tabname = 'ITAB'.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-ref_fieldname = 'MATNR'.
      wa_fcat-ref_tabname = 'MARA'.
      wa_fcat-seltext_m = 'Material'.
    wa_fcat-input = ' '.
    wa_fcat-edit = 'X'.
      wa_fcat-input = 'X'.
    wa_fcat-key = 'X'.
      APPEND wa_fcat TO t_fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'ITAB'.
      wa_fcat-fieldname = 'MAKTX'.
      wa_fcat-seltext_m = 'Description'.
      APPEND wa_fcat TO t_fcat.
      CLEAR wa_fcat.
    ENDFORM.                    "build_fcat
    *&      Form  build_eve
          text
    FORM build_eve.
      DATA:t_eve TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         i_list_type           = 0
       IMPORTING
         et_events             = eve
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "build_eve
    *&      Form  get_data
          text
    FORM get_data.
      SELECT maramatnr maktmaktx INTO CORRESPONDING FIELDS OF TABLE itab
      FROM mara INNER JOIN makt
      ON maramatnr = maktmatnr
      WHERE mara~matnr IN mat.
    ENDFORM.                    "get_data
    *&      Form  dis_data
          text
    FORM dis_data.
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = g_repid         "'ZINT_ALV'
         i_callback_user_command           = 'USER_COMMAND'
         i_grid_title                      = 'Interactive ALV'
         it_fieldcat                       = fcat
         it_events                         = eve
        TABLES
          t_outtab                          = itab
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "dis_data
    *&      Form  user_command
          text
         -->U_COM      text
    FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.
      CLEAR fcat1.
      CASE u_com.
        WHEN '&IC1'.
          READ TABLE itab INDEX sel_field-tabindex.
          IF sel_field-fieldname = 'MATNR'.
            IF sy-subrc = 0.
              t_mat = itab-matnr.
              PERFORM build_cat1 USING fcat1.
              PERFORM build_eve1.
              PERFORM get_data1.
              PERFORM dis_data1.
            ENDIF.
          ENDIF.
         SET PARAMETER ID 'MAT' FIELD t_mat.
         CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  build_fcat1
          text
         -->T_FCAT1    text
    FORM build_cat1 USING t_fcat1 TYPE slis_t_fieldcat_alv.
      DATA:wa_fcat1 TYPE slis_fieldcat_alv.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'MBLNR'.
      wa_fcat1-seltext_m = 'Material Doc.'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'MENGE'.
      wa_fcat1-seltext_m = 'Quantity'.
      wa_fcat1-do_sum    = 'X'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'MEINS'.
      wa_fcat1-seltext_m = 'UOM'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'WERKS'.
      wa_fcat1-seltext_m = 'Plant'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
    g_subtot-spos = 1.
    g_subtot-fieldname = 'MBLNR'.
    g_subtot-tabname = 'ITAB1'.
    g_subtot-up = 'X'.
    g_subtot-group = 'X'.
    g_subtot-subtot = 'X'.
    g_subtot-expa = 'X'.
    APPEND g_subtot TO subtot.
    g_subtot-spos = 2.
    g_subtot-fieldname = 'MENGE'.
    g_subtot-tabname = 'ITAB1'.
    g_subtot-up = 'X'.
    g_subtot-group = 'X'.
    g_subtot-subtot = 'X'.
    g_subtot-expa = 'X'.
    APPEND g_subtot TO subtot.
    ENDFORM.                    "build_fcat1
    *&      Form  build_eve1
          text
    FORM build_eve1.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = eve1
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                                                    "build_eve1
    *&      Form  get_data1
          text
    FORM get_data1.
      SELECT mblnr menge meins werks FROM mseg
      INTO CORRESPONDING FIELDS OF TABLE itab1
      WHERE matnr = t_mat.
    ENDFORM.                                                    "get_data1
    *&      Form  dis_data1
          text
    FORM dis_data1.
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = g_repid              "'ZINT_ALV'
         i_callback_user_command           = 'USER_COMMAND1'
         it_fieldcat                       = fcat1
         it_events                         = eve1
         i_save                            = 'A'
         it_sort                            = subtot
        TABLES
          t_outtab                          = itab1
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                                                    "dis_data1
    *&      Form  user_command1
          text
         -->U_COM1     text
         -->SEL_FIELD  text
    FORM user_command1 USING u_com1 LIKE sy-ucomm sel_field TYPE slis_selfield.
      CASE u_com1.
        WHEN '&IC1'.
          READ TABLE itab1 INDEX sel_field-tabindex.
          IF sy-subrc = 0.
            t_doc = itab1-mblnr.
            PERFORM build_cat2 USING fcat2.
            PERFORM get_data2.
            PERFORM dis_data2.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  build_cat2
          text
         -->P_FCAT1  text
    FORM build_cat2  USING    t_fcat2 TYPE slis_t_fieldcat_alv.
      DATA:wa_fcat2 TYPE slis_fieldcat_alv.
      wa_fcat2-tabname = 'ITAB2'.
      wa_fcat2-fieldname = 'MBLNR'.
      wa_fcat2-seltext_m = 'Material Doc.'.
      APPEND  wa_fcat2 TO t_fcat2.
      CLEAR  wa_fcat2.
      wa_fcat2-tabname = 'ITAB2'.
      wa_fcat2-fieldname = 'BUDAT'.
      wa_fcat2-seltext_m = 'Material Date'.
      APPEND  wa_fcat2 TO t_fcat2.
      CLEAR  wa_fcat2.
    ENDFORM.                    " build_cat2
    *&      Form  get_data2
          text
    -->  p1        text
    <--  p2        text
    FORM get_data2 .
      SELECT mblnr budat  FROM mkpf
        INTO CORRESPONDING FIELDS OF TABLE itab2
        WHERE mblnr = t_doc.
    ENDFORM.                                                    " get_data2
    *&      Form  dis_data2
          text
    -->  p1        text
    <--  p2        text
    FORM dis_data2 .
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = g_repid              "'ZINT_ALV'
         it_fieldcat                       = fcat2
         i_save                            = 'A'
        TABLES
          t_outtab                          = itab2
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                                                    " dis_data2
    reward if useful...

  • Can i have a sample BSP INTERACTIVE Reports with step by step.

    Hi Friends,
    Can i have a sample BSP INTERACTIVE Reports with step by step.
    Moosa

    Hello,
    Please find the sample Code below.
    FIRST PAGE
    Layout Code.
    <htmlb:label for="emp" text="Employee id" width="10"/>
          <htmlb:inputField id="emp"  value="<%= w_input1%>"/>
          <p>
    <htmlb:label for="Employee Details"/>
           <htmlb:button   id = 'get'
                           text = 'Display'
                           on Click = 'OnInput Processing' />   <p>
    <h1>Employee Details</h1>
    <htmlb:tableView id="Employee"
                     table="<%= ZTABLE%>"  <- Give the table name
                     selectionMode = "lineEdit"
                     design="ALTERNATING">
    ONINITILIZATION EVENT.
    data:
      fs_yhtable like line of TABLE.
        select * from yhtable into table ZTABLE.
    ONINPUT PROCESSING CODE:
    * event handler for checking and processing user input and
    * for defining navigation
    class cl_htmlb_manager definition load.
    case event_id.
      when cl_htmlb_manager=>event_id.
      data: event  type ref to if_htmlb_data,
            fs_yhtable like line of t_yh1205,
            selrow type ref to cl_htmlb_tableview.
      event = cl_htmlb_manager=>get_event_ex( request ).
      selrow ?= cl_htmlb_manager=>get_data( request = request
                                            name    = 'tableView'
                                            id      = 'Employee' ).
      data: tv_data type ref to cl_htmlb_event_tableview,
             t_tab type int4_table.
    *        tv_data1 type ref to cl_htmlb_event_tableview.
      tv_data = selrow->data.
       t_tab = selrow->selectedrowindextable.
      if  event is not initial
      and event->event_name = 'tableView'.
        w_int = tv_data->rowselection.
        navigation->set_parameter( 'Employee' ).
        navigation->set_parameter( name = 'w_int'
                                   value = w_int ).
        navigation->set_parameter( name = 'table'
                                   value = table ).
        navigation->goto_page( 'second.htm' ).
      endif.
    endcase.
    SECOND PAGE CODE:
    LAYOUT CODE:-
    <htmlb:content design="design2003">
      <htmlb:page title = "Employee Details">
        <htmlb:form>
    <h1>Employee Details</h1>
    <htmlb:tableView id="Employee"
                     table="<%= t_yh1205%>"
                     selectionMode = "lineEdit"
                     design="ALTERNATING">
    </htmlb:tableView>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Hope this is helpful.Let me know if you need any more help.
    Thanks
    kalyan

  • Interactive Report with specific rows editable

    I have an interactive reports, with the edit (pencil) link to a maintenance form. I only want the link to show for specific records in the reports. Can you put a condition in the link column to the pencil for certain records?
    If so, how can you access the value of the field? ie. I need to check the value of 'USER_NAME' in the select below against :APP_USER
    select A.pk_id as "PK_ID",
    A.fk_sis_user as "FK_SIS_USER",
    A.list_name as "LIST_NAME",
    A.list_description as "LIST_DESCRIPTION",
    B.user_name as "USER_NAME",
    A.creation_date as "CREATION_DATE"

    Not exactly what you are asking for, but it may give you an idea hot to create conditional
    icon and link.
    From always excellent examples from Denes Kubicek:
    http://apex.oracle.com/pls/otn/f?p=31517:23:3086073313243153::NO
    HTH
    Thomas

  • Interactive Report with PL/SQL Function Source

    Is it possible to create interactive report with PL/SQL function source returing a query? If not, has anyone done any work to simulate the interactive reporting feature for a normal report using API?

    I haven't tried that before but you could:
    1. create a collection from your result set returned by a dynamic query,
    2. create a view on that collection,
    3. use the view in your interactive report.
    The usability of this proposal depends from a question how "dynamic" your query is - does it always have the same number of columns or not.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • SSRS reporting with sharepoint list using Distinct and Multivalue parameters

    i want create ssrs report with sharepoint list using ms-vs(2008). i want create Distinct multivalue parameters by using CAML query. There is any way we put CAML query where we use Distinct keyword and IN clause in CAML query... i hope all experts will
    understand my poor English... sorry for poor English.. plz help me

    Hi AsifMehmood,
    Per my understanding you have create an SSRS report with SharePoint list, now you don’t know to create the distinct parameters by using CAML query,  right?
    For the CAML language doesn’t have any reserved word (or tag) to set this particular filter to remove duplicate results, but we can use the custom code to do this function. I have tested on my local environment and we can do that by create one hidden parameter(Param1)
    to get all the values from the fields which will  add the filter and then create another parameter(Param2) to get the distinct values based on the Param1, we use the custom code to do the deduplication.
    Step by Steps information in below thread for your reference to create the parameters and the custom code:
    "How to get distinct values of sharepoint column using SSRS"
    Other similar thread for your reference:
    https://audministrator.wordpress.com/2014/02/17/sharepoint-list-add-distinct-parameter-value/
    If your problem still exists, please feel free to ask and also try to provide us more details information.
    Regards
    Vicky Liu

  • Interactive report with single row select

    Hi,
    Is it possible to create an interactive report that has a single row select column i.e. you can only select one row and when you select another row it deselects any row selected before, simular to a list of values but with the functionionality of an IR report.
    Thanks in advance

    Hi,
    Try adding this to the query of your report:
    select ...
           apex_item.radiogroup(1, some_unique_column) sel
    from ...You didn't say how you want to use this, but when the page is submitted the array apex_application.g_f01 may contain either none or exactly one element, which will be the some_unique_column value of the selected row.
    Luis

Maybe you are looking for

  • Multiple disconnected users on the same laptop

    Has any open come across the following requirement? I have a customer that is interested in 'sharing' laptops with multiple offline users with the ability to sync. Can we have multiple disconnected users on the same laptop? If so what would be the op

  • How do I enable a right click on my MacBook Air trackpad?

    How do I enable a right click on my MacBook Air trackpad?

  • DataDirect driver throws java.lang.VerifyError

    WebLogic: 8.1.5<br> OS: Windows server 2003<br> DataDirect: 3.50.0 (JDBC driver)<br> <br> I have a web application that use its own JDBC driver management (DataDirect 3.50.0). When I moved from WebLogic 8.1.3 to WebLogic 8.1.5 the application crash w

  • Reversal of GR for a PO

    Hi Guru's, We need to reverse a PO for  line items numbers 20 & 50 only. Please tell me what are the steps with transaction codes so that I can able to apply it. Presently when I check the particular PO for the above two line item IR and GR has alrea

  • How do I cancel a online order

    trying to cancel a order that is free for 7 days than my account will be charge----I had it now for 3 days