Click event on DVT Line Graph

Hi,
Is it possible to attach a javascript click event on a DVT Line graph component?
I know ADF DVT has clickListener but what happens is that it is triggered only when you click any of the series data but clicking the the column label or row label does not raised any event where I could add logic.
What I want is that whatever part of the DVT Line graph is component it would call a managed bean method.
Here's my use case:
I am showing a list of DVT line graph and user needs to select at least one DVT Line Graph in the list. Clicking one of the Line Graph will highlight the background of that Line Graph.
Obviously, I will just PPR the surrounding parent component of the selected Line Graph.
As I have mentioned, the click listener is triggered only when clicking particular series in the graph.
I am thinking if I could attach a javascript event for this and then fire up a server listener but I could find any information on how to do this.
Is this possible?
JDEV 11G PS5

Bump....any hints? Please?

Similar Messages

  • Marker shape not showing up in DVT line graph

    Hi,
    I am facing an issue where the Marker Shape is not getting displayed in DVT Line graph. In the graph there is only one series, in which diamond markers should appear at the data points.
    I am using Jdev 11.1.1.7.0.
    Below is the expected result and the result which i am actually getting. Although the data set is different, the diamonds which we see in the first graph are not appearing in the second one(my output).
    My code snippet for the line graph is as below:
    <dvt:lineGraph id="lineGraph1"
                           value="#{bindings.VarianceGraphVO1.graphModel}"
                           subType="LINE_VERT_ABS" shortDesc="Variance Graph">
              <dvt:graphTitle text="Schedule Variance"/>
              <dvt:y1Title id="y1Title1" text="Variance % Days"/>
              <dvt:o1Title id="o1Title1" text="Cemli"/>
              <dvt:background>
                <dvt:specialEffects/>
              </dvt:background>
              <dvt:graphPlotArea/>
              <dvt:seriesSet defaultLineWidth="3">
                <dvt:series markerShape="MS_DIAMOND" markerType="MT_MARKER"
                            lineWidth="2"/>
                <dvt:series/>
              </dvt:seriesSet>
              <dvt:o1Axis rendered="false"/>
              <dvt:y1Axis/>
              <dvt:legendArea automaticPlacement="AP_NEVER"/>
            </dvt:lineGraph>
    Even though the marker shape property is mentioned it is some how not reflecting in my result. Even other types of marker shapes like square, circle, up/down arrow are not working.
    Request you to help me fix this issue.
    Thanks a lot.
    Regards,
    Tejas

    Try to set seriesSet  defaultMarkerShape="MS_CIRCLE" and markerDisplayed="true" like:
    <dvt:seriesSet defaultMarkerShape="MS_CIRCLE" markerDisplayed="true">
           <dvt:series/>
    </dvt:seriesSet>

  • Dvt:line graph

    Hi ,
    I am developing dvt line graph for two object AX and BY .Graph is designed in such a way that at particular point of time it will intersect .
    Whenever it will intersect i want to identify point of intersection and draw a vertical dotted line .
    Can anyone help me how can i approach for this design .
    Thanks ,
    Arun.

    Hi Frank ,
    As per your opinion i cant get vertical dotted line for point of intersection ?
    Thanks ,
    Arun.

  • ADF11g: dvt, line graph x-axis (o1 axis) display issue

    Hi,
    In our application we are generating line graphs for a set of data.
    This graph is plotted in between 2 sets of numeric values. (one plotted on x-axis and other on y-axis).
    For better accuracy of plotted graph we are using these numeric values upto 7 decimal places. (for example 8.1234567)
    Now when graph is plotted, then on x-axis (that is o1- axis in case of Line Graph) the tick labels are showing upto 7 decimal places.
    Is there any way so that I could control the display of these tick labels to 1 decimal place instead of 7 decimal places?
    More Info:
    ++The tick labels for x and y axis are generated at runtime by some calculation logic.++
    ++If we set the tick labels for x axis to 1 decimal place instead of 7 decimal places when they are generated , then this will lead to build in accurate graphs.++
    ++So we can't control the decimal format of tick labels when they are generated. We need to control it when they are displayed.++
    Please help...
    Thanks and Regards
    Manav Ratra

    Hi Frank,
    this is not working :( . It holds good for the case where one has to display markers (tick labels) on the lines of line graph and not the tick labels on the axis.
    Moreover here i find out tag as *<dvt:x1Format>*
    where as line graphs does not support x1axis they have o1axis .
    In my case I need to control display of tick labels on the o1axis.
    Regards
    Manav Ratra

  • DVT:  Line Graph O1TickLabels do not rotate and are misaligned

    Hi,
    I have been trying to get the O1TickLabels aligned correctly when using the line graphs, but I am still not having any luck.
    It seems that when I have enough data points and the labels are sufficiently long in length, the labels for the O1 Axis start to the left of the Y1 axis.
    I would have assumed that the auto layout would have rotated the labels, but that is not the case. I have tried changing the chart type to a bar chart and that seems to know to rotate the labels.
    Is this a limitation of the line graph or is there something else I need to set for a line graph.
    I have also tried to set the following attribute: tickLabel.setAutomaticRotation(BaseGraphComponent.AR_NO_ROTATE), but this does not solve the issue.
    Thanks,
    Will

    Try to set seriesSet  defaultMarkerShape="MS_CIRCLE" and markerDisplayed="true" like:
    <dvt:seriesSet defaultMarkerShape="MS_CIRCLE" markerDisplayed="true">
           <dvt:series/>
    </dvt:seriesSet>

  • Line graph with single values as dots

    Dear Apex experts,
    I have the requirement to create a graph in Apex which displays technical values as dots or candles and limit values and average values as lines in one graph.
    Is there a way to create two types of graphs in one image ?
    Best regards,
    Daniel

    Hi,
    as far as I know, you can't have interruptes series in the DVT line graph
    Frank

  • WAD 7.0: Mouse click events on graphs?

    I'm using BEx Web Application Designer 7.0 and was wondering what type of options are available in terms of event handling for the graphs themselves (line graphs in my case) within a Web Template?
    What I'm getting at is, I notice when I click on a point on one of my line graphs after execution it takes me to the top of the page.  Does this mean these graphs are interactive with mouse events?  Would I be able to setup a function that when a point on a line on the graph is clicked, instead of it jumping me to the top of the page I could set my drilldown item to automatically set a filter for the "0CUSTOMER" characteristic that line represents, so my graph then only displays that line and not the other 4?  My first assumption is this might be possible using javascript?
    If more information or explanation is needed please let me know.  Or if you have links to references explaining this that'd be great as well. Thanks for the help!

    Filtering by right-clicking on a series on the line graph and picking either "Keep Filter Value" or "Keep Filter Value on Axis" seems to produce unwanted results.  Often the graph will dissappear and a placeholder where the graph should be will display "No data available".  Or, it will display just the single series I selected but erases the legend, so there is no way to tell which Customer Region was chosen to be displayed if anyone but the interacting user were to look at it.  The only way to get proper results is to right click on a series and choose "Select Filter Value" and go through a Variable Selection screen, which is actually the step I am trying to shortcut.
    I'm thinking the other options, "Keep Filter Value" and "Keep Filter Value on Axis" aren't working quite right due to the hierarchies that are being used so I may just need to play around with it for a while.  But like I said above, my main goal of all this is to be able to skip the process of having to go through the Variable Selection screen, and simply left or right-click on a series or line and be able to select and display just that line, which is where I think I may need to turn to JavaScript?
    But as always, I appreciate the help!

  • How to catch click event on BAR or a BAR GRAPH???

    Hello
    I want to implemnt following things,
    1. there is Bar Graph containing 10 Bars.
    2. So i want to navigate to 10 diff. pages on click of each bar.
    So how to catch click event on BAR or a BAR GRAPH.????

    Hi,
    You can set Destination URI on a graph. The URL can be specifically associated to a particular data point plotted in the graph.
    Detail for the same is provided in OAF developer guide under 'Charts and Graphs' topic.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • On-click on ALV sum line to raise an event

    Hello, ladies and gentlemen,
    Happy New Year first of all.
    I have a following problem: I have an ALV grid and in each line I have an icon, which one can on-click and something happens. That works fine. But now I was challenged to add a sum line which should support the same on-click event, but should process the data of all lines that belong to this SUM group in one batch.
    Of course I can put in the "manual sum lines" - define groups that will support these sum lines and then add extra lines into the grid data. Unfortunatelly there is no way of telling which lines will belong to which group. I need the ALV standard summing so any user can define his own groups.
    Has anybody ever tried such thing? I am using cl_gui_alv_grid OO ALV.
    Thanks for any input,
    cheers Otto

    Hi Otto.
    You can check the logic below. Please try to disable the sort functionality as done below in the ALV because the subtotals returned by the method get_subtotals is always sorted in ascending order.
    report  z335_alv_sel.
    class lcl definition deferred.
    type-pools: slis.
    types:begin of t_data,
          werks type werks_d,
          labst type mard-labst,
          end of t_data.
    data :i_exclude type ui_functions,
          i_fcat type slis_t_fieldcat_alv ,
          i_sort type lvc_t_sort,
          i_data type table of t_data,
          i_cat type lvc_t_fcat,
          wa_sort like line of i_sort,
          wa_exclude type ui_func,
          wa type t_data,
          wa_cat type lvc_s_fcat,
          cont type ref to cl_gui_custom_container,
          grid  type ref to cl_gui_alv_grid,
          receiver type ref to lcl.
    class lcl definition.
      public section.
        methods handle_click for event double_click of
                   cl_gui_alv_grid importing e_row
                                             e_column.
    endclass.                    "lcl DEFINITION
    class lcl implementation.
      method handle_click.
        data:val(10) type n,
             it type ref to data.
        field-symbols: <ft_tab> type standard table,
                       <fs_tab> type any,
                       <ff_field> type any.
        if e_row+0(1) = 'S'.  "Subtotal
          val = e_row+23(10).
          call method grid->get_subtotals
              importing
                ep_collect01 = it.
          assign it->* to <ft_tab>.
          read table <ft_tab> assigning <fs_tab> index val.
          if sy-subrc = 0.
            assign component 1 of structure <fs_tab> to <ff_field>.
            if <ff_field> is assigned.
              loop at i_data into wa where werks = <ff_field>.
                "Process your block Here
              endloop.
            endif.
          endif.
        endif.
      endmethod.                    "handle_click
    endclass.                    "lcl IMPLEMENTATION
    start-of-selection.
      call screen 100.
    module fill_data output.
      select werks labst from mard
             into corresponding fields of table i_data
             up to 1000 rows where labst > 0.
      if sy-subrc = 0.
        wa_cat-fieldname = 'WERKS'.
        append wa_cat to i_cat.
        clear wa_cat.
        wa_cat-fieldname = 'LABST'.
        wa_cat-do_sum = 'X'.
        append wa_cat to i_cat.
        clear wa_cat.
        wa_sort-fieldname = 'WERKS'.
        wa_sort-subtot = 'X'.
        wa_sort-group = 'X'.
        wa_sort-up = 'X'.
        append wa_sort to i_sort.
        wa_exclude = cl_gui_alv_grid=>mc_fc_sort .
        append wa_exclude to i_exclude.
        wa_exclude = cl_gui_alv_grid=>mc_fc_sort_asc .
        append wa_exclude to i_exclude.
        wa_exclude = cl_gui_alv_grid=>mc_fc_sort_dsc .
        append wa_exclude to i_exclude.
      endif.
    endmodule.                 " fill_data  OUTPUT
    module display output.
      if cont is initial .
        create object cont
          exporting
            container_name = 'CONT1'.
        create object grid
          exporting
            i_parent = cont.
        call method grid->set_table_for_first_display
          exporting
          it_toolbar_excluding = i_exclude
          changing
            it_outtab       = i_data[]
            it_sort         = i_sort[]
            it_fieldcatalog = i_cat[].
        create object receiver.
        set handler receiver->handle_click  for grid.
      endif.
    endmodule.                    "DISPLAY OUTPUT

  • Drill down from a line graph? Make the entire graph click-able?

    Guys, i can drill down from other types of charts except a line chart.
    Is there anything that is special about the line chart?
    Also, can i make the entire graph click-able? So, instead of clicking on a bar to trigger a linked report, can the whole chart be a link basically?
    Thanks for your help

    There is not special with the line graph..... Just click on the data symbol to drill or navigate. These settings can be found under the "additional Charting Option" button.
    regards
    John
    http://www.obiee101.blogspot.com/

  • Line Graph

    Hi ,
    Jdev version : 11.1.1.5
    How to create a line graph  based on   x- axis is  Date  and  y-axis  is String ( hours and minutes i.e  02:30)  .
    when i click any  line /legend the line should be gray out.
    Any idea?
    Thanks in advance
    Regards
    Sathish.k

    Refer
    <dvt:lineGraph>
    &amp;lt;dvt:lineGraph&amp;gt;
    https://blogs.oracle.com/adffun/entry/using_oracle_adf_data_visualization_tools_dvt_line_graphs_to_display_weather_information

  • ClickListener in ADF Line graph

    Hello,
    Is it possible to get the x-axis and y-axis values (i.e.coordinates) of the line graph if user clicks in a line area between points (not the point itself)?
    I can get the x-axis and y-axis values if I click on point in a line as follows:
        public void graphClickListener(ClickEvent clickEvent)
            ComponentHandle handle = clickEvent.getComponentHandle();
            if (handle instanceof DataComponentHandle)
                DataComponentHandle dhandle = (DataComponentHandle)handle;
                Object val = dhandle.getValue(DataComponentHandle.UNFORMATTED_VALUE);
                Date timeVal = null;
               Attributes[] seriesInfo = dhandle.getSeriesAttributes();
                if (seriesInfo != null && seriesInfo.length > 0)
                    Object seriesName = seriesInfo[0].getValue(Attributes.LABEL_VALUE);
                       Attributes[] groupInfo = dhandle.getGroupAttributes();
                        if (groupInfo != null && groupInfo.length > 0)
                            Object timeObj = groupInfo[0].getValue(Attributes.LABEL_VALUE);
                            if (timeObj != null)
                                timeVal = new Date(((Date)timeObj).getTime());
    //However when I click on a line area between the points (not the point itself) then I can get only the series name information, not the x-axis and y axis value:
            else if (handle instanceof SeriesComponentHandle)
                // Get the series attributes
                Attributes[] seriesInfo = ((SeriesComponentHandle)handle).getSeriesAttributes();
                String data = "";
                if (seriesInfo != null)
                    for (Attributes attrs : seriesInfo)
                        data += "\nSeries value: " + attrs.getValue(Attributes.LABEL_VALUE);
                        data += "\nSeries name: " + attrs.getValue(Attributes.LABEL_ATTRIBUTE);
                        data += "\nSeries value id: " + attrs.getValue(Attributes.ID_VALUE);
                        data += "\nSeries name id: " + attrs.getValue(Attributes.ID_ATTRIBUTE);
                System.out.println(data);
    Following is the source of the jsf file:
              <dvt:graph id="lineGraph1" animationOnDisplay="auto"
                         tabularData="#{pageFlowScope.gaphPageStateBean_backing.graphTabularData}"
                         customToolTipCallback="#{pageFlowScopegraphPageStateBean_backing.callback}"
                         graphType="LINE_VERT_ABS"
                         seriesObjectCount="#{pageFlowScope.graphPageStateBean_backing.seriesCount}"
                         timeRangeStart="#{pageFlowScope.graphPageStateBean_backing.graphStartDate}"
                         timeRangeEnd="#{pageFlowScope.graphPageStateBean_backing.graphEndDate}"
                         timeAxisInterval="CTAI_MINUTE" timeRangeMode="TRM_EXPLICIT"
                         partialTriggers="::commandLink1 ::t1:cb7"
                         binding="#{backingBeanScope.graphPageBean_backing.graphBinding}"
                         clickListener="#{backingBeanScope.graphPageBean_backing.graphClickListener}"
                         timeAxisType="TAT_IRREGULAR" textAntialiasing="true"
                         scrollListener="#{backingBeanScope.graphPageBean_backing.scrollListener}"
                         zoomListener="#{backingBeanScope.graphPageBean_backing.zoomListener}"
                         markerTooltipType="MTT_VALUES_TEXT">
                <dvt:background/>
                <dvt:graphPlotArea/>
                <dvt:seriesSet defaultLineWidth="3" defaultMarkerColor="#ffffff"
                               seriesMap="#{pageFlowScope.graphPageStateBean_backing.lineGraphSeriesMap}"
                               markerDisplayed="true"
                               defaultMarkerShape="MS_CIRCLE"/>
                <dvt:o1Axis id="rhrhtr6" scrolling="on"/>
                <dvt:y1Axis id="fwef43" lineWidth="1" axisMaxValue="1.0"
                            axisMinValue="0.0" logarithmicBase="10"/>
                <dvt:legendArea automaticPlacement="AP_NEVER" rendered="false"/>
                <dvt:o1TickLabel id="o1TickLabel1" tickLabelSkipCount="50"
                                 tickLabelSkipMode="TLS_MANUAL"
                                 tickLabelSkipFirst="0"/>
                <dvt:y1MajorTick id="y1MajorTick1"
                                 tickStyle="#{pageFlowScope.gaphPageStateBean_backing.YAxisTickLine}"/>
                <dvt:y1TickLabel rendered="false"/>
                <dvt:shapeAttributesSet id="shapeAttribSet1">
                  <dvt:shapeAttributes component="GRAPH_AREAMARKER" clickable="true"
                                       id="shapeAttrib1"/>
                </dvt:shapeAttributesSet>
                <dvt:timeAxisDateFormat timeFormat="HOUR24_MINUTE"
                                        yearFormat="YEAR_LONG"
                                        monthFormat="MONTH_SHORT"
                                        quarterFormat="NONE"/>
                <dvt:o1Title text="Time:" horizontalAlignment="LEFT">
                  <dvt:graphFont id="graphFont1" underline="true" color="#002173"/>
                </dvt:o1Title>
                <dvt:annotationSet annotationMap="#{pageFlowScope.graphPageStateBean_backing.graphAnnotationMap}"/>
              </dvt:graph>
    Thank you.
    Valon
    Jdeveloper 11.1.1.5.0
    af:graph

    I use af:graph instead of af:lineGraph because the tooltip needs some special customization which af:lineGraph doesn't support.
    Just for the sake of the question, I converted the graph to af:lineGraph and I set clickListener in dvt:shapeAttributes as well. It didn't make any difference.
    When I click in a line area outside of a point the clickListener gets invoked, however it is not useful since I cannot obtain x and y coordinates.
    It goes in the else if section of the code i provided on top of this page. I.e. else if (handle instanceof SeriesComponentHandle) {............}.
    My question remains un-answered yet.
    Thank you,

  • Line Graph repeats the starting data point at the end also

    Hi,
    We have a Line Graph as below. This graph is used to show the Salary changes of a person, over time.
    But this graph shows an additional non existing data point. Basically it shows the starting data point once again at the end of the other data points.
    The model VO for this graph, does not contain this additional data point record. But the graph repeats the starting data point at the end also.
    In the screen-shot you can see that, the graph has three data points. But the table has only two. The first data point in the graph is repeated as the last data point.
    Is this a Bug..?
    Or an issue with the usage of the DVT tags?
    The code is given below.
    Please advice.
    12 <dvt:graph id="lineGraph1" value="#{bindings.SalaryHistory.graphModel}"
    13 graphType="LINE_VERT_ABS"
    14 shortDesc="#{HcmEmploymentTopGenBundle}"
    15 markerDisplayed="true"
    16 continuousTimeAxisInterval="CTAI_DAY"
    17 contentDelivery="immediate" animationOnDisplay="AUTO"
    18 imageFormat="FLASH" stylePath="April"
    19 timeSelectorListener="#{backingBeanScope.AssignmentChangesAndSalaryBean.changeTime}"
    20 timeAxisType="TAT_MIXED_FREQUENCY" dynamicResize="DYNAMIC_SIZE"
    21 inlineStyle="height:40em;"
    22 binding="#{backingBeanScope.AssignmentChangesAndSalaryBean.asgSalaryGraph}">
    23 <dvt:background>
    24 <dvt:specialEffects/>
    25 </dvt:background>
    26 <dvt:graphPlotArea/>
    27 <dvt:seriesSet>
    28 <dvt:series/>
    29 </dvt:seriesSet>
    30
    31 <dvt:o1Axis scrolling="asNeeded"/>
    32 <dvt:y1Axis/>
    33 <!-- <dvt:legendArea automaticPlacement="AP_NEVER" rendered="false"/>-->
    34 <!-- <dvt:timeSelector mode="EXPLICIT"
    35 explicitStart="#{backingBeanScope.AssignmentChangesAndSalaryBean.timeSelectorStartDate}"
    36 explicitEnd="#{backingBeanScope.AssignmentChangesAndSalaryBean.timeSelectorEndDate}"
    37 id="ts34">
    38 <dvt:specialEffects>
    39 <dvt:gradientStopStyle/>
    40 </dvt:specialEffects>
    41 </dvt:timeSelector>-->
    42 <dvt:o1MajorTick/>
    43 <dvt:o1TickLabel/>
    44 <dvt:o1Title id="o1Title1">
    45 <dvt:graphFont id="graphFont1"/>
    46 </dvt:o1Title>
    47
    48 <dvt:attributeFormat id="af1" name="DateFrom">
    49 <af:convertDateTime pattern="#{applCorePrefs.dateFormatPattern}" />
    50 </dvt:attributeFormat>
    51
    52 <dvt:markerText>
    53 <dvt:y1Format>
    54 <af:convertNumber pattern="#{applCorePrefs.numberFormatPattern}"/>
    55 </dvt:y1Format>
    56 </dvt:markerText>
    57
    58
    59 </dvt:graph>

    If I understand your question, this from the Pages online help may give the answer:
    To mark line, area, and scatter charts with data point symbols:
    Select the entire chart. You can also select the chart series (the line or area shape) that you want to mark with data point symbols.
    Click Inspector in the toolbar, and then click the Chart Inspector button.
    Click Series (except for scatter charts).
    Choose a symbol from the Data Point Symbol pop-up menu.
    Choose one of the following options from the Symbol Fill pop-up menu:
    To fill the symbol with the same color as its outline, choose Use Stroke Color.
    To fill the symbol with a solid color, choose Color Fill, click the Fill color well, and pick a color.
    To fill the symbol with a gradient, choose Gradient Fill and use the gradient controls to set the colors and change the angle of the gradient.
    To fill the symbol with an image, choose Image Fill and select the image you want. You can also resize the image by choosing an option from the pop-up menu above the Choose button.
    To fill the symbol with a tinted image, choose Tinted Image Fill and select the image you want. Click the color well to the right of the Choose button to change the tint color. You can also resize the image by choosing an option from the pop-up menu above the Choose button.

  • ALV: Issue with double  click event after sorting the ALV

    Hello Experts,
    I have an internal table that populates an ALV grid. When the user doubleclicks a row, my method HANDLE_DOUBLE_CLICK returns the e_row-index value from the ALV Grid. I use this index value to read the internal table, then retrieve additional data.
    My problem is the user may sort the ALV grid before double clicking on a line. If this happens my internal table is not sorted to match the ALV grid, so reading the internal table with the e_row-index value returns the wrong information.
    When the double click event occurs, is it possible to capture the value in column 1 instead of a value for e_row-index?
    There is one more paramter in HANDLE_DOUBLE_CLICK for row id.   It is coming blank in debugging .  what is the purpose of this parameter and how i can make use of it ?
    Regards
    Vivek

    Hi,
    I am Posting The Code Which Uses Double Click Event.
    And This Code will provide the total information to you.
    REPORT  ZALVGRID_PG.
    TABLES: SSCRFIELDS.
    DATA: V_BELNR TYPE RBKP-BELNR.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: IRNO FOR V_BELNR.
    PARAMETERS: P_GJAHR TYPE RBKP-GJAHR.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA: WA TYPE ZALVGRID_DISPLAY,
          ITAB TYPE STANDARD TABLE OF ZALVGRID_DISPLAY.
    DATA: IDENTITY TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: L_IDENTITY TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: L_TREE TYPE REF TO CL_GUI_ALV_TREE_SIMPLE.
    TYPE-POOLS: SLIS,SDYDO.
    DATA: L_LOGO TYPE SDYDO_VALUE,
          L_LIST TYPE SLIS_T_LISTHEADER.
    END-OF-SELECTION.
    CLASS CL_LC DEFINITION.
      PUBLIC SECTION.
        METHODS: DC FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID IMPORTING E_ROW E_COLUMN.
    ENDCLASS.
    CLASS CL_LC IMPLEMENTATION.
      METHOD DC.
        DATA: WA1 TYPE ZALVGRID_DISPLAY.
        READ TABLE ITAB INTO WA1 INDEX E_ROW-INDEX.
        BREAK-POINT.
        SET PARAMETER ID 'BLN' FIELD WA1-BELNR.
        CALL TRANSACTION 'FB02'.
      ENDMETHOD.                    "DC
    ENDCLASS.
    DATA: OBJ_CL TYPE REF TO CL_LC.
    START-OF-SELECTION.
      PERFORM SELECT_DATA.
      IF SY-SUBRC = 0.
        CALL SCREEN 100.
      ELSE.
        MESSAGE E000(0) WITH 'DATA NOT FOUND'.
      ENDIF.
      INCLUDE ZALVGRID_PG_STATUS_0100O01.
      INCLUDE ZALVGRID_PG_LOGOSUBF01.
      INCLUDE ZALVGRID_PG_SELECT_DATAF01.
    INCLUDE ZALVGRID_PG_USER_COMMAND_01I01.
    ***INCLUDE ZALVGRID_PG_STATUS_0100O01 .
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'AB'.
    *  SET TITLEBAR 'xxx'.
      IF IDENTITY IS INITIAL.
        CREATE OBJECT IDENTITY
        EXPORTING
          CONTAINER_NAME = 'ALVCONTROL'.
        CREATE OBJECT GRID
        EXPORTING
          I_PARENT = IDENTITY.
        CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
             I_STRUCTURE_NAME              = 'ZALVGRID_DISPLAY'
          CHANGING
            IT_OUTTAB                     = ITAB.
        CREATE OBJECT OBJ_CL.
        SET HANDLER OBJ_CL->DC FOR GRID.
        ENDIF.
        IF L_IDENTITY IS INITIAL.
          CREATE OBJECT L_IDENTITY
          EXPORTING
            CONTAINER_NAME = 'LOGO'.
          CREATE OBJECT L_TREE
          EXPORTING
            I_PARENT = L_IDENTITY.
          PERFORM LOGOSUB USING L_LOGO.
          CALL METHOD L_TREE->CREATE_REPORT_HEADER
            EXPORTING
              IT_LIST_COMMENTARY    = L_LIST
              I_LOGO                = L_LOGO.
          ENDIF    .
    ENDMODULE.                 " STATUS_0100  OUTPUT
    ***INCLUDE ZALVGRID_PG_LOGOSUBF01 .
    FORM LOGOSUB  USING    P_L_LOGO.
      P_L_LOGO = 'ERPLOGO'.
    ENDFORM.                    " LOGOSUB
    ***INCLUDE ZALVGRID_PG_SELECT_DATAF01 .
    FORM SELECT_DATA .
      SELECT RBKP~BELNR
             RBKP~BLDAT
             RSEG~BUZEI
             RSEG~MATNR
             INTO TABLE ITAB
             FROM RBKP INNER JOIN RSEG
        ON RBKP~BELNR = RSEG~BELNR
        WHERE RBKP~BELNR IN IRNO
        AND RBKP~GJAHR = P_GJAHR.
    ENDFORM.                    " SELECT_DATA
    ***INCLUDE ZALVGRID_PG_USER_COMMAND_01I01 .
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
           EXIT.
           ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Warm Regards,
    PavanKumar.G
    Edited by: pavankumar.g on Jan 19, 2012 5:30 AM

  • ALV Class Double click event

    Hi All,
    I have created an alv report using alv class. I have handled the double click event in that i am calling transaction using row currenlty selected. But after doing subtotalling the list and then i double click a line it is passing wrong data.
    Points are awarded,
    Regards,
    Bharat Mistry
    Message was edited by: Bharat Mistry

    Hi Bharat,
    Read the internal table contents in double click event with e_row-index , then you will get the data of that particular row.
    check below code :
    local class to handle semantic checks
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    DATA: g_event_receiver TYPE REF TO lcl_event_receiver.
    LOCAL CLASS Definition
    *§4.Define and implement event handler to handle event DATA_CHANGED.
    CLASS lcl_event_receiver DEFINITION.
      public section.
        METHODS:
          handle_double_click
                 FOR EVENT double_click OF cl_gui_alv_grid
                 IMPORTING e_row e_column.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_double_click.
      read table gt_outtab index e_row-index into
    Regards
    Appana
    *Reward Points for helpful answers
    Message was edited by: L Appana

Maybe you are looking for