Javascript Problem for Drill Down Action in SSRS Report when integrated to PPS 2010

Hi all,
I have a SSRS report which is integrated to PPS 2010(Performance Point Services) and it is having a drill down action through Go to URL action(I wrote javascript:void(window.open('xxxxx')) to open drill down report in new window).
This report has 5 parameters and all are multiple valued. Drill down report is opening very well when I open the report form Report Manager for any number of parameters values selected. But when I integrate the same report is PPS and deployed to SharePoint
then it is working only for 23 parameter values selected in PPS filters. If I select more the 23 values in PPS filters then the drilldown report is not opening.
But it is working well in Chrome, I verified in IE and Mozilla, both browsers are having problem.
When I look at Error Console of Mozilla, it is showing a javascript error as "Error: uncaught exception: ReferenceError: window is not defined" but the same report is working well if I select less than 24 filter values.
Please provide me the solution
Thanks in advance

Hi Vasu,
The issue might occur due to the Microsoft security update MS11-100 which limits the maximum number of form keys, files, and JSON members to 1000 in an HTTP request. Here, I suggest that you modify the Web.config file of the SharePoint site as follows:
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="10000" />
</appSettings>
If the SharePoint site uses the port 80, the web.config file of the SharePoint site is located in the C:\inetpub\wwwroot\wss\VirtualDirectories\80 folder.
Reference:
An ASP.NET request that has lots of form keys, files, or JSON payload members fails with an exception
If the issue persist, please check whether there are any related errors in the Reporting Services log file which is located in <Drive>:\Program Files\Microsoft SQL Server\MSRSXX.<Instance Name>\Reporting Services\LogFiles.
Regards,
Mike Yin
TechNet Community Support

Similar Messages

  • [Forum FAQ] How to use parameter to control the Expand/Collapse drill-down options in SSRS report?

    In SQL Server Reporting Services (SSRS), drill-down is an action we can apply to any report item to hide and show other report items. They all are ways that we can organize and display data to help our users understand our report better. In this article,
    we are talking about how to use parameter to control the Expand/Collapse drill-down options in SSRS report.
    Consider that the report has a dataset (dsSales) with following fields: SalesTerritoryGroup, SalesTerritoryCountry, CalendarYear, SalesAmount.
    1. The report has the following group settings:
    Parent Group: SalesTerritoryGroup
     Child Group: SalesTerritoryCountry
      Child Group: CalendarYear
       Details: SalesAmount
    2. Add three parameters in the report:
    GroupExpand:
    Available Values: “Specify values”
    Label: Yes           Value: Yes
    Label: No            Value: No
    Default Values: “Specify values”
    Value: Yes
    CountryExpand:
    Available Values: “Specify values”
    Label: Yes           Value: =IIF(Parameters!GroupExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No","No","Yes")
    YearExpand:
    Available Values: “Specify values”
    Label: Yes          
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No","No","Yes")
    3. Right click SalesTerritoryCountry icon in the Row Groups dialog box, select Group Properties.
    4. Click Visibility in the left pane. Select “Show or hide based on an expression” and type with following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", False, True)
    Select “Display can be toggled by this report item” option, and select “SalesTerritoryGroup” in the drop down list.
    5. Use the same method setting CalendarYear, (Details) drill-down with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", False, True)
    =IIF(Parameters!YearExpand.Value="Yes", False, True)
    6. Click SalesTerritoryGroup text box in the tablix. Select InitialToggleState property in the Properties dialog box, and type following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", True, False)
    7. Use the same method setting SalesTerritoryCountry, CalendarYear text box with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", True, False)
    =IIF(Parameters!YearExpand.Value="Yes", True, False)
    After that, when we preview the report, we can use these three parameters to expand/collapse drill-down.
    Note:
    In our test, we may meet following issue. We can check the expression of InitialToggleState property to troubleshooting the issue.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012

    In SQL Server Reporting Services (SSRS), drill-down is an action we can apply to any report item to hide and show other report items. They all are ways that we can organize and display data to help our users understand our report better. In this article,
    we are talking about how to use parameter to control the Expand/Collapse drill-down options in SSRS report.
    Consider that the report has a dataset (dsSales) with following fields: SalesTerritoryGroup, SalesTerritoryCountry, CalendarYear, SalesAmount.
    1. The report has the following group settings:
    Parent Group: SalesTerritoryGroup
     Child Group: SalesTerritoryCountry
      Child Group: CalendarYear
       Details: SalesAmount
    2. Add three parameters in the report:
    GroupExpand:
    Available Values: “Specify values”
    Label: Yes           Value: Yes
    Label: No            Value: No
    Default Values: “Specify values”
    Value: Yes
    CountryExpand:
    Available Values: “Specify values”
    Label: Yes           Value: =IIF(Parameters!GroupExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No","No","Yes")
    YearExpand:
    Available Values: “Specify values”
    Label: Yes          
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No","No","Yes")
    3. Right click SalesTerritoryCountry icon in the Row Groups dialog box, select Group Properties.
    4. Click Visibility in the left pane. Select “Show or hide based on an expression” and type with following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", False, True)
    Select “Display can be toggled by this report item” option, and select “SalesTerritoryGroup” in the drop down list.
    5. Use the same method setting CalendarYear, (Details) drill-down with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", False, True)
    =IIF(Parameters!YearExpand.Value="Yes", False, True)
    6. Click SalesTerritoryGroup text box in the tablix. Select InitialToggleState property in the Properties dialog box, and type following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", True, False)
    7. Use the same method setting SalesTerritoryCountry, CalendarYear text box with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", True, False)
    =IIF(Parameters!YearExpand.Value="Yes", True, False)
    After that, when we preview the report, we can use these three parameters to expand/collapse drill-down.
    Note:
    In our test, we may meet following issue. We can check the expression of InitialToggleState property to troubleshooting the issue.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012

  • Layout problem for Drill down ALV Report

    Hello Everyone,
                           I have developed a ALV drill down report using the method G_GRID->SET_TABLE_FOR_FIRST_DISPLAY. The problem is what ever layout i save for the primary list 'Screen 100' is effecting my secondary list 'Screen 200'.  User need to save both Screen 100 and Screen 200 layouts independently without affecting each other.
    I am calling  screen 100 as below,
    Call metthod g_grid_100->set_table_for_first_display
      Exporting
       i_Save                                     = 'A'
       is_layout                                 =  ls_layout
       is_Variant                                =   ls_Variant
      Changing
       it_outtab                                  =  ct_poitems
       it_fieldcatalog                           =  lt_fieldcat
      Exceptions
       Invalid_parameter_combimation   = 1
       Program_error                            = 2
       too_many_lines                         = 3
       others                                       = 4.
    Could any body suggest me a way to do this..
    Thanks in advance.
    Regards,
    Shyam.

    Hi,
    Use multiple Layout structure (each alv have its own structure) .
    Note the use of disvariant-log_group .
    DATA: gs_disvariant_1 TYPE disvariant ,
               gs_disvariant_2 TYPE disvariant .
    * Layout-Logical groups
    CONSTANTS: gc_log_group_1 TYPE disvariant-log_group VALUE 'ALV1' ,
                            gc_log_group_2 TYPE disvariant-log_group VALUE 'ALV2' .  
    INITIALIZATION.
      PERFORM at_initialization .
    FORM at_initialization .
    DATA: vari TYPE disvariant-variant .
      PERFORM alv_variant_get_default USING gc_log_group_1 CHANGING gs_disvariant_1 vari .
      PERFORM alv_variant_get_default USING gc_log_group_2 CHANGING gs_disvariant_2 vari .
    ENDFORM.
    FORM alv_variant_get_default
      USING
        log_group TYPE disvariant-log_group
      CHANGING
        disvariant TYPE disvariant
        variant    TYPE slis_vari .
      DATA: ls_disvariant TYPE disvariant.
      ls_disvariant-report = sy-repid .
      ls_disvariant-log_group = log_group .
      disvariant = ls_disvariant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = 'A'
        CHANGING
          cs_variant = ls_disvariant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        disvariant = ls_disvariant.
        variant    = ls_disvariant-variant .
      ENDIF.
    ENDFORM.                    "alv_variant_get_default
    Later....
       CALL METHOD gui_alv_grid_1->set_table_for_first_display
          EXPORTING
            is_layout       = wa_layout
            is_print        = wa_print
            i_save          = 'A'
            is_variant      = gs_disvariant_1
          CHANGING
            it_sort         = it_sort
            it_fieldcatalog = it_fieldcatalog
            it_outtab       = it_alv_grid_1.
      CALL METHOD gui_alv_grid_2->set_table_for_first_display
          EXPORTING
            is_layout       = wa_layout
            is_print        = wa_print
            i_save          = 'A'
            is_variant      = gs_disvariant_2
          CHANGING
            it_sort         = it_sort
            it_fieldcatalog = it_fieldcatalog
            it_outtab       = it_alv_grid_2.     
    Regards.

  • Problem with drill down on hierarchy with data on diffrent levels

    Hello,
    Im working on a project using oracle bi 10.1.3.4.1, and im kinda stuck with some problems.
    I have a transaction table in which i have data about products, something like :
    prod_id
    amount1
    amount2
    and a product hierarchy which is something like:
    prod_id
    prod_name
    parent_id
    since bi doesnt support hierarchies, i had to faltten the hier table to somehing like this:
    prod_id
    lvl1_prod_id
    lvl2_prod_id
    lvl3_prod_id
    lvl4_prod_id
    and use this as my hierarchy in oracle bi. thus when i drill to lvl3, it will find all the products which are decendents of lvl3 value and group them.
    the problem is, that the hier tree is not even, one product data (in transaction table) can be for lvl4 and another for lvl2. so for a lvl2 product id's in level 3 and 4 will be null.
    when i try to drill to lvl 4, it takes all the rows which have the selected value in column lvl4 and group them, and if lvl 4 is null, it would sum up all the rows that have no parent at lvl4...
    i hope you understand... cause it is a bit complicated..
    anyway i would eventually like to add a filter of != null to the column being drilled down.
    but how do i know which column is it?
    i cant add a != null filter to all the columns since most if not all of them will have null in some lvl (lvl 10 or so).
    one suggested solution was to make a report for each lvl with the !=null filter on the report lvl, and use navigate instead of drilldown... but that would mean i have to make 10 reports for each "real" report... a big problem to maintain.
    hope i was clear enough, any suggestions?
    thanks a lot!

    Hi Ingo,
    Thanks for your reply. If I combine two objects in one objects then I cannot use that object for drill down in my report.
    I want to drill down for both Key and Text.

  • Set headers for drill-down reports.

    Hi!!!
    The problem we have by now is when printing a report, selected characteristis are showed in header as "multiple values" instead of showing the real values that user have choose.
    Does anybody knows how to set headers for drill-down reports in order to see selected characteristics?
    Thanks in advance...
    Adela Cambiasso.

    Sorry, me again...
    I have found yet they way to show in the header the report parameters, I mean, the selection criterias that user used when execute the report... I was able to show selected characteristics inside de report but not the selection criteria...
    Do you know what I have lost? or what to use for this?
    Thanks again.
    Adela.

  • Problem with drill down in time dimension - OBIEE 11G

    Hello There,
    I have a problem with drill down in time dimension. The hierarchy for time dimension is " Fiscal Year---> Fiscal Quarter---> Month(Name)--->Date". When I select a Time dimension and click results its getting opened in a Pivot table view. The problem here is, when I click the "Total" its getting drilled down to Year ---> Quarter but when I click on "+ sign next to quarter" it should drill down to month for that particular quarter for that particular year but its drilling down to month for that particular quarter for all years.
    Any suggestions are much appreciated.
    Thanks,
    Harry.

    1.) Congrats for resurrecting a year-old thread.
    2.) Your answer is here: "Check the level key of the quarter level...it should include both quarter and year columns. Since a specific quarter occurs every year, quarter column alone can't be used as the level key."

  • KCA0 - Convert Aspect for drill-down report in ECC6

    Hello experts,
    Do you know the steps to convert an aspect (for drill-down reports) from 3.0 to ECC6? And how to add it to the list in transaction KCR0 (Execute Drill-down report). SAP has mentioned transaction KCA0 for doing a conversion after the upgrade but I am not familiar with this transaction. Please help!
    Thanks and Best regards,
    Chuong

    Hi,
    You can use all the statements in HR also.
    For getting the AB values,there are macros and function modules available.
    Macros:
    rp-imp-c2-b2.
    You need to pass b2 key values before calling macro.For eg,
      MOVE pernr-pernr  TO b2-key-pernr.(since u r using LDB)
      MOVE year         TO b2-key-pabrj. (year you need to pass)
      MOVE period       TO b2-key-pabrp. (month)
      MOVE '1'          TO b2-key-cltyp.
    have a look at these Function Modules also.
    HR_WORK_SCHEDULE_TIMES
    HR_TIME_RESULTS_GET
    HR_TIME_RESULTS_IN_INTERVAL
    HR_WORK_SCHEDULE_TIMES
    Reward points if helpful.
    Regards,
    Manoj.

  • INVALID_VARIABLE_VALUES error for drill down/up

    Hello ,
    I have created a VC model corresponding to a BI query. The query has 3 variables of which one is mandatory the value for which i am hardcoding.In the output table we have a heirarchy variable for
    which I wish to use the drill up and drill down features.But after applying these features, and running
    the application ,on clicking the drill down/up buttons i get the following error
    Nested Exception. Failure to execute native function. Nested Exception. INVALID_VARIABLE_VALUES
    The variable format seems to be fine as I have tried it from the BI side and it also generates the output in the VC output table.Following is the webapi used for drill down .
    'FILTER_IOBJNM=YGL_ACCNT;FILTER_NODE_IOBJNM=0HIER_NODE;FILTER_VALUE='&#ID[ACC40T]@G_L_Account&';FILTER_COLLAPSE= ;FILTER_IOBJNM=YGL_ACCNT;CMD_1=CMD%3DDRILL_TO_LEVEL%26LEVEL%3D2%26IOBJNM%3DYGL_ACCNT%26DATA_PROVIDER%3DDP;'
    Any help would be most appreciated.
    BI 7.0,VC 7.0
    PS: have already gone through the wiki link for this error
    Thank You
    Rgds

    Vineeth,
    Please see my comments below:
    1)The complete web api command is in the above thread, the mandatory variable is the fiscal year.
    I don't see where you have defined the fiscal year in the web API command below:
    'FILTER_IOBJNM=YGL_ACCNT;FILTER_NODE_IOBJNM=0HIER_NODE;FILTER_VALUE='&#IDACC40T@G_L_Account&';
    FILTER_COLLAPSE= ;FILTER_IOBJNM=YGL_ACCNT;
    CMD_1=CMD%3DDRILL_TO_LEVEL%26LEVEL%3D2%26IOBJNM%3DYGL_ACCNT%26DATA_PROVIDER%3DDP;'
    2)am not too sure about your question.
    Is the hierarchy for YGL_ACCNT defined as a text hierarchy or characteristic hierarchy?  If it is a characteristic hierarchy, you should specifiy the parameter FILTER_NODE_IOBJNM=YGL_ACCNT instead of FILTER_NODE_IOBJNM=0HIER_NODE.
    3)the command is as intended as per the sap documentation
    If you are following the SAP documentation, the first occurrence of FILTER_IOBJNM=YGL_ACCNT should be removed as it is already defined after the FILTER_COLLAPSE parameter.
    Regards,
    Mustafa.

  • Problem in Drill Down feature and Scroll Bar

    Hi All,
    Well I have designed a report on Oracle BI and facing the following issues:
    1. When i opened the report through image/link box(from mypage dashboard or from some other way) and if the data have enough rows and columns to overflow the screen size then there is no scroll bar on the screen so i wouldn't be able to see that data.
    2. When I am clicking on the year(as i made a time hierarchy --> year then quater then month) on the either pivot table or chart view then automatically all corresponding Dashboard Prompts(DP) disappear so i can't filter the data.
    Please help me out in this.
    thanks in advance.
    regards
    mohit

    Regarding 2)
    This is the expected behavior of drill downs. The subsequent reports from the highest level are "system-generated." If you want the prompts, you will have to use the Navigate feature and navigate to a dashboard where you can have your prompts.
    Regarding 1)
    Are you using the Table View or Pivot Table view? If Table View, you can increase the number of rows that are visible by default (change this in the Properties of the Table View.) If you are using a Pivot Table, try this link:
    http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/

  • Error while drilling down the data from reports

    Hi friends,
    I have created dimension hierarchies in rpd for drilling down the data.. While i drill down its showing no results at some level when i am clicking on the data.. but when i am clicking on the same levels column header its drilling down properly and i can view the next level for the data item which has shown no results while clicked on it.. Please help me and helps will be appreciated..

    Hi,
    >when i click on 2000 results displaying is no results
    but when i click on the header year its showing the results with 3 for 2000.
    So you are able to drill when you click on header..Go to column properties and make heading interaction to no interaction under column format,put value interaction to default and try to drill clicking on value.
    in RPD i have some derived columns like month .I created month as derived column from date using logical formula and i used this derived columns as the key.. Is it a problem?No I dont think its a problem
    Regards,
    Srikanth

  • How to use drill down option in Crystal Report

    Dear all,
            I want to know how to use drill down option in Crystal report 2008.  In below i have explained my screnario
    For example
       My scenario is.  In crystal report I have Purchase order like PO101,PO102.  Each purchase order have 5 line items.  If i drill down each purchase order it should display line item in crystal report. 
    Regards,
    Baskaran.

    hi,
    Create a Group on 'Purchase order'.
    Group Expert -> Select the Purchase Order and Click the arrow button such that it appears right side. Click ok.
    GH1 is inserted.
    Your detail section should include 'Line items' fields.
    Right Click 'Detail' section on left hand side,  Click 'Hide (Drill down Ok)'.
    Now you will see only 'Purchase order's in Group Headers.
    Now when you click on a particular order, you will see respective line items.
    Regards,
    Vamsee

  • Drill down capability in Oracle Reports graphs - Is it possible

    Hello
    I was looking for drill down capability in graphs. Example my query returns parent - child relationship. It could have upto 3-4 levels. Is it possible to drill down on a per level basis using oracle graphs?
    Message was edited by:
    M@$$@cHu$eTt$

    What I've seen, is people using a component to render the graph (Flex Charting or something else) and then put that rendered graph in the form data before it's being merged with the template.
    Jasmin

  • Drill down from the financial reports

    When generating a P&L or Balance sheet, it is not possible to view what transaction the amount is made of. you have to either generate a general ledger report or have to chart of account window open at the same time. Simple programs like quickbooks have the functionality to do drill down from any report. we have multiple customers for whom this situation is very aggravating.
    We hope you can find a solution or make this part of a new release.
    Thank you
    Sophie St-pierre

    Hi
    I hope you will get answer from this solved using pop up window for drill down
    Thanks & Regards
    Harsimran

  • Bex Free characteristic drill down in Web i report

    Hi
    I have a question, we are using bex query as source for our web i report.
    for that if you have an idea on Bex query analyzer, we can drill down on a free char list in bex and each and every drill down bex query go back to cube and fetches and refreshes the data based on the selection.
    In the same way can i get the same feature in Web i report, when i drill down my web i report should go back to the Bex query
    and should refresh the data.
    Any help in this regards is greatly appreciable
    Thanks in Advance,
    Swaraj.

    Hi,
    What you described is an OLAP 'slice and dice' type workflow - try the Analysis web application (in bi4.0 launch pad). WebI can do some drill down,  but it is really best at consuming small chunks of rowsets (not 'flattened' OLAP datasets)
    webi does go back to hit the database,  but only when you click "refresh".  so you can add a new object, and it sometimes says "#TOREFRESH" - then user refreshes to expand the scope of analysis.
    this process was automated in XI3.1 (where the interface didn't prompt for the refresh) and customers typically complained of slow response times. i.e. they didn't realise the inclusion of a results object fired a new query.
    Regards,
    H

  • Problem displaying drill down STANDARD ALV for a particular record after pressing back button

    I have a simple interactive ALV grid report. NOT 'OO'. It display correctly on initial execution. AT the moment, 6 records. I want it to work such that if i click record '1', a drill-down version of that ALV with only that one record clicked is displayed. This currently occurs correctly. The problem arises when i click the back button and want to click on a new record, say in the 2nd row..this new 2nd row record is not displayed. The first one is displayed again. I tried clearing and fiddling around but then the last record is displayed. I have used the 'ID' field as a 'hotspot' getting picked up by sy-tabindex. Maybe it could be that i shouldn't loop and use  a work area e.g in my select statement. i'm not so sure i've looked around, and tried a few things. I can't get it right yet. My code is below:
    *& Report  ZALV
    REPORT  ZALV.
    TABLES: ZCONTACT.
    TYPE-POOLS: slis. "slis contains all of the ALV data types.
    TYPES: BEGIN OF ty_zcontact.
             INCLUDE STRUCTURE zcontact.
    TYPES: icon TYPE char4, "field holding traffic light value- adding a column to internal table to hold the traffic light
             END OF ty_zcontact.
    DATA: "fieldcatALOG TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           it_zcontact TYPE TABLE OF ty_zcontact,"declares an internal table of type ZCONTACT
           wa_zcontact TYPE ty_zcontact,
           gd_layout TYPE slis_layout_alv,
           gd_repid LIKE sy-repid,
           g_variant TYPE disvariant,
           gx_variant TYPE disvariant,
           g_save TYPE c VALUE 'X',
           it_fieldcat TYPE slis_t_fieldcat_alv,"declares field catalog table of line type alv
           wa_fieldcat TYPE slis_fieldcat_alv, "declares the work area of the field catalog
           it_list_top_of_page TYPE slis_t_listheader.
    DATA: it_fieldcat1 TYPE slis_t_fieldcat_alv,
           wa_fieldcat1 TYPE slis_fieldcat_alv.
    DATA: V_FIELD(30) TYPE C,
    V_VALUE(10) TYPE C.
           "izontact TYPE TABLE OF zcontact.
            "i_logo TYPE OT.
           "ls_layout TYPE slis_layout_alv.
    **Selection Screen details
    *SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    *PARAMETERS: variant like disvariant-variant.
    *SELECTION-SCREEN END OF BLOCK B1.
    SELECT-OPTIONS:
    age FOR wa_zcontact-age,
    lastnme FOR wa_zcontact-lastname.
    **Getting default variant
    *  AT SELECTION-SCREEN ON age.
    *    SELECT SINGLE age FROM zcontact INTO wa_zcontact-age WHERE age = age.
    *  IF sy-subrc NE 0.
    *    MESSAGE:'That age does not exist mate, Please enter another age' TYPE 'E'.
    *    ENDIF.
    INITIALIZATION.
    *gx_variant-report = sy-repid.
    *CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
    *EXPORTING
    *  I_SAVE = G_SAVE
    *  CHANGING
    *    CS_VARIANT = GX_VARIANT
    *  EXCEPTIONS
    *    NOT_FOUND = 2.
    *IF SY-SUBRC = 0.
    *  VARIANT = GX_VARIANT-VARIANT.
    *  ENDIF.
    START-OF-SELECTION.
      PERFORM DATA_RETRIEVAL.
      PERFORM BUILD_FIELDCATALOG.
      PERFORM DISPLAY_ALV_REPORT.
      PERFORM top_of_page.
    "g_repid = sy-repid.
    *Fetch data from the database
    FORM DATA_RETRIEVAL.
    SELECT * FROM zcontact INTO TABLE it_zcontact WHERE age IN age AND lastname IN lastnme.
    "assigning traffic light colour to each row based on a condition
    *  IF wa_zcontact-age GE 65.
    *   wa_zcontact-icon = 1. "Red Traffic Light
    *   ELSEIF wa_zcontact-age BETWEEN 40 AND 64.
    *     wa_zcontact-icon = 2. "Yellow traffic light
    *     ELSE.
    *       wa_zcontact-icon = 3." Green traffic light
    *       ENDIF.
    *       MODIFY it_zcontact FROM wa_zcontact TRANSPORTING icon.
    *       CLEAR wa_zcontact.
    ENDFORM.
    FORM BUILD_FIELDCATALOG.
    *Build field catalog
    wa_fieldcat-fieldname = 'ID'.
    "wa_fieldcat-seltext_m = 'The Contact ID'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'LASTNAME'.
    "wa_fieldcat-seltext_m = 'Contact Lastname'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'FIRSTNAME'.
    "wa_fieldcat-seltext_m = 'Contact Firstname'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'DOB'.
    "wa_fieldcat-seltext_m = 'Date Of Birth'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'TEL'.
    "wa_fieldcat-seltext_m = 'Telephone Number'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'ADDRESS'.
    "wa_fieldcat-seltext_m = 'The Address'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'OCCUPATION'.
    "wa_fieldcat-seltext_m = 'The Occupation'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'WEIGHT'.
    "wa_fieldcat-seltext_m = 'WEIGHT'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'AGE'.
    "wa_fieldcat-seltext_m = 'AGE OF THE CONTACT'.
    wa_fieldcat-do_sum   = 'X'.        "Display column total
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'SALARY'.
    "wa_fieldcat-seltext_m = 'SALARY'.
    wa_fieldcat-do_sum   = 'X'.
    APPEND wa_fieldcat TO it_fieldcat.
    gd_layout-lights_fieldname = 'ICON'.
    ENDFORM.
    FORM DISPLAY_ALV_REPORT.
    gd_repid = sy-repid.
    *Pass data and field catalog to ALV function module to display ALV list
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
           it_fieldcat            = it_fieldcat
           i_callback_program     = gd_repid
           i_callback_top_of_page =  'TOP_OF_PAGE'
           i_callback_user_command =  'USER_COMMAND'
           i_structure_name       =  'ZCONTACT'
           i_save                 = 'X'
           is_variant             = g_variant
           is_layout     = gd_layout
    TABLES
           t_outtab      = it_zcontact
    EXCEPTIONS
           program_error = 1
           OTHERS        = 2.
    ENDFORM.
    FORM top_of_page.
    *ALV Header declarations
       DATA: it_listheader TYPE slis_t_listheader,
             wa_listheader TYPE slis_listheader,
             t_line like wa_listheader-info,
             ld_lines TYPE I,
             ld_linesc(10) TYPE C.
    wa_listheader-typ = 'H'.
    wa_listheader-info = 'Contact Details'.
    APPEND wa_listheader TO it_listheader.
    CLEAR wa_listheader.
    wa_listheader-typ = 'S'.
    wa_listheader-info = sy-repid.
    wa_listheader-key = 'Program Name:'.
    APPEND wa_listheader TO it_listheader.
    CLEAR wa_listheader.
    wa_listheader-typ = 'S'.
    wa_listheader-info = sy-uname.
    wa_listheader-key = 'User Name:'.
    APPEND wa_listheader TO it_listheader.
    CLEAR wa_listheader.
    wa_listheader-typ = 'S'.
    wa_listheader-key = 'Run Date :'.
    CONCATENATE sy-datum+6(2)
                 sy-datum+4(2)
                 sy-datum(4)
                 INTO wa_listheader-info
                 SEPARATED BY '/'.
    APPEND wa_listheader TO it_listheader.
    CLEAR wa_listheader.
    wa_listheader-typ = 'S'.
    wa_listheader-key = 'Time :'.
    CONCATENATE sy-uzeit(2)
                 sy-uzeit+2(2)
                 sy-uzeit+4(2)
                 INTO wa_listheader-info
                 SEPARATED BY ':'.
    APPEND wa_listheader TO it_listheader.
    CLEAR wa_listheader.
       CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
         EXPORTING
           it_list_commentary = it_listheader
           i_logo = 'KLOGO'.
    ENDFORM. "top_of_page
    *& Form sub_user_command
    FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
    P_SELTAB TYPE SLIS_SELFIELD.
    CASE P_UCOMM.
       WHEN '&IC1'.
    CASE p_seltab-fieldname.
       WHEN 'ID'.
       READ TABLE it_zcontact INTO wa_zcontact INDEX p_seltab-tabindex.
       PERFORM DATA_RETRIEVAL1.
       PERFORM BUILD_FIELDCATALOG1.
       PERFORM SECOND_GRID.
       ENDCASE.
       ENDCASE.
    ENDFORM. "
    FORM DATA_RETRIEVAL1.
    SELECT * FROM zcontact INTO TABLE it_zcontact WHERE id EQ wa_zcontact-id.
    ENDFORM.
    FORM BUILD_FIELDCATALOG1.
    *Build field catalog
    CLEAR: wa_fieldcat, it_fieldcat.
    wa_fieldcat-fieldname = 'ID'.
    "wa_fieldcat-seltext_m = 'The Contact ID'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'LASTNAME'.
    "wa_fieldcat-seltext_m = 'Contact Lastname'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'FIRSTNAME'.
    "wa_fieldcat-seltext_m = 'Contact Firstname'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    ENDFORM.
    FORM SECOND_GRID.
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM = SY-REPID
         IT_FIELDCAT = IT_FIELDCAT
         i_structure_name       =  'ZCONTACT'
         i_callback_user_command =  'USER_COMMAND'
         TABLES
           T_OUTTAB = IT_ZCONTACT.
       ENDFORM.

    Hi Ten Mariga,
                     I wonder why the second select Query is needed at all instead you can use
    ---> Not Needed
    FORM DATA_RETRIEVAL1.
    SELECT * FROM zcontact INTO TABLE it_zcontact WHERE id EQ wa_zcontact-id.
    ENDFORM.
    ----> Instead you can do
       READ TABLE it_zcontact INTO wa_zcontact INDEX p_seltab-tabindex.
      Append wa_zcontact to Second_table.
    And you can use the Second_table to display the second ALV. The second Select Query will affect the performance too.
    Cheers,
    Krishnakumar B.

Maybe you are looking for