Double click on field in OOALV

Hi.
I want display the data in the second list when i am dobule click on that particular field in First List.
If i dobule click on any another field i do not want to display second list in Object Oriented ALV.
How it is possible when dobule click on that particular field value in the First list. Explain it with Good Example if Possible.
Thank You.
Regards.
Krishna.

Source from one of the website. you execute this program you will get idea
REPORT  ZALV_OOINTERACTIVE.
*Class definition for handling double click
CLASS event_class DEFINITION DEFERRED.
*Internal table and work area declarations for dd02l and dd03l
DATA : it_dd02l TYPE TABLE OF dd02l,
       wa_dd02l TYPE dd02l,
       it_dd03l TYPE TABLE OF dd03l,
       wa_dd03l TYPE dd03l.
*data declarations for ALV Main list
DATA : ty_lay1 TYPE lvc_s_layo,
       it_fieldcat TYPE lvc_t_fcat ,
       ty_fieldcat TYPE lvc_s_fcat ,
       c_alv1 TYPE REF TO cl_gui_alv_grid,
       c_cont1 TYPE REF TO cl_gui_custom_container,
       event_receiver TYPE REF TO event_class.
*data declarations for ALV Interactive list
DATA : ty_lay2 TYPE lvc_s_layo,
       it_fcat TYPE lvc_t_fcat ,
       ty_fcat TYPE lvc_s_fcat ,
       c_alv2 TYPE REF TO cl_gui_alv_grid,
       c_cont2 TYPE REF TO cl_gui_custom_container.
**Select options for multiple values and NOT ranges
SELECT-OPTIONS : s_table FOR wa_dd02l-tabname NO INTERVALS.
* Initialization event
INITIALIZATION.
*Start of selection event
START-OF-SELECTION.
*fetch data into table and field characteristics
  PERFORM fetch_data.
*ALV display for output
  PERFORM alv_output.
*&      Form  FETCH_DATA
*       text
*  -->  p1        text
*  <--  p2        text
FORM fetch_data .
*Select the table details
  SELECT * FROM dd02l INTO CORRESPONDING FIELDS OF TABLE it_dd02l
WHERE tabname IN s_table
  AND tabclass = 'TRANSP'.
ENDFORM.                    " FETCH_DATA
* CLASS lcl_event_receiver DEFINITION
CLASS event_class DEFINITION.
*Handling double click
  PUBLIC SECTION.
    METHODS:
    handle_double_click
    FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row .
ENDCLASS. "lcl_event_receiver DEFINITION
* CLASS lcl_event_receiver IMPLEMENTATION
CLASS event_class IMPLEMENTATION.
  METHOD handle_double_click.
    DATA : ls_dd02l LIKE LINE OF it_dd02l.
*Reading the selected data into a variable
    READ TABLE it_dd02l INDEX e_row-index INTO ls_dd02l.
*  *Select the field details of the selected table
    SELECT * FROM dd03l INTO CORRESPONDING FIELDS OF TABLE it_dd03l
    WHERE tabname EQ ls_dd02l-tabname.
*calling the ALV containing the field values
    CALL SCREEN 101.
  ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
*& Module pbo_100 OUTPUT
MODULE pbo_100 OUTPUT.
*set pf-status 'XXX'.
*set titlebar 'XXX'.
ENDMODULE. " PBO_100 OUTPUT
*& Module alv_100 OUTPUT
MODULE alv_100 OUTPUT.
*Check if there is no custom container in screen 100
  IF c_cont1 IS INITIAL.
*Creating object of container
    CREATE OBJECT c_cont1
     EXPORTING
       container_name = 'CCONT'.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*Creating object of alv
    CREATE OBJECT c_alv1
       EXPORTING
        i_parent = c_cont1.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*alv layout
    PERFORM alv_100_layout.
*alv field catalogue
    PERFORM alv_100_fieldcat.
*Displaying the ALV grid
    CALL METHOD c_alv1->set_table_for_first_display
      EXPORTING
        is_layout       = ty_lay1
      CHANGING
        it_outtab       = it_dd02l[]
        it_fieldcatalog = it_fieldcat.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*Create object of the event class and setting handler for double click
    CREATE OBJECT event_receiver.
    SET HANDLER event_receiver->handle_double_click FOR c_alv1.
  ENDIF.
ENDMODULE. " ALV_100 OUTPUT
*& Module pai_100 INPUT
MODULE pai_100 INPUT.
ENDMODULE. " pai_100 INPUT
* MODULE PBO_101 OUTPUT
MODULE pbo_101 OUTPUT.
*  SET PF-STATUS 'XXX'.
*  SET TITLEBAR 'XXX'.
ENDMODULE. " PBO_101 INPUT
* MODULE ALV_101 OUTPUT
MODULE alv_101 OUTPUT.
*Check if the Custom container exists.
  IF c_cont2 IS INITIAL.
*Creating container object
    CREATE OBJECT c_cont2
      EXPORTING
        container_name = 'CDCONT'.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*creating ALV grid for interactive list
    CREATE OBJECT c_alv2
      EXPORTING
       i_parent = c_cont2.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*ALV layout
    PERFORM alv_101_layout.
*ALV fieldcatalogue
    PERFORM alv_101_fieldcat.
*Sorting the output by field position
    SORT it_dd03l BY position.
*ALV for display field details
    CALL METHOD c_alv2->set_table_for_first_display
      EXPORTING
        is_layout       = ty_lay2
      CHANGING
        it_outtab       = it_dd03l[]
        it_fieldcatalog = it_fcat.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  ENDIF.
ENDMODULE. " ALV_101 OUTPUT
*& Module PAI_101 INPUT
MODULE pai_101 INPUT.
ENDMODULE. " PAI_101 INPUT
*&      Form  ALV_OUTPUT
*       text
*  -->  p1        text
*  <--  p2        text
FORM alv_output .
  CALL SCREEN 100.
ENDFORM.                    " ALV_OUTPUT
*&      Form  ALV_100_LAYOUT
*       text
*  -->  p1        text
*  <--  p2        text
FORM alv_100_layout .
  ty_lay1-grid_title = 'TABLES'.
  ty_lay1-zebra = 'X'.
  ty_lay1-no_toolbar = 'X'.
ENDFORM.                    " ALV_100_LAYOUT
*&      Form  ALV_100_FIELDCAT
*       text
*  -->  p1        text
*  <--  p2        text
FORM alv_100_fieldcat .
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 1.
  ty_fieldcat-fieldname = 'TABNAME'.
  ty_fieldcat-tabname = 'GT_DD02L'.
  ty_fieldcat-coltext = 'TableName'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 2.
  ty_fieldcat-fieldname = 'TABCLASS'.
  ty_fieldcat-tabname = 'GT_DD02L'.
  ty_fieldcat-coltext = 'CATEGORY'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 3.
  ty_fieldcat-fieldname = 'AS4USER'.
  ty_fieldcat-tabname = 'GT_DD02L'.
  ty_fieldcat-coltext = 'CREATED'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 4.
  ty_fieldcat-fieldname = 'AS4DATE'.
  ty_fieldcat-tabname = 'GT_DD02L'.
  ty_fieldcat-coltext = 'DATE'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 5.
  ty_fieldcat-fieldname = 'AS4TIME'.
  ty_fieldcat-tabname = 'GT_DD02L'.
  ty_fieldcat-coltext = 'TIME'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 6.
  ty_fieldcat-fieldname = 'CONTFLAG'.
  ty_fieldcat-tabname = 'GT_DD02L'.
  ty_fieldcat-coltext = 'Delivery Class'.
  ty_fieldcat-outputlen = 15.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
ENDFORM.                    " ALV_100_FIELDCAT
*&      Form  ALV_101_LAYOUT
*       text
*  -->  p1        text
*  <--  p2        text
FORM alv_101_layout .
  ty_lay2-grid_title = 'FIELDS'.
  ty_lay2-zebra = 'X'.
  ty_lay2-no_toolbar = 'X'.
ENDFORM.                    " ALV_101_LAYOUT
*&      Form  ALV_101_FIELDCAT
*       text
*  -->  p1        text
*  <--  p2        text
FORM alv_101_fieldcat .
  REFRESH it_fieldcat.
  REFRESH it_fcat.
  CLEAR ty_fcat.
  ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 1.
  ty_fcat-fieldname = 'FIELDNAME'.
  ty_fcat-tabname = 'GT_DD03L'.
  ty_fcat-coltext = 'Fieldname'.
  ty_fcat-outputlen = 10.
  APPEND ty_fcat TO it_fcat.
  ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 2.
  ty_fcat-fieldname = 'CHECKTABLE'.
  ty_fcat-tabname = 'GT_DD03L'.
  ty_fcat-coltext = 'CHECKTABLE'.
  ty_fcat-outputlen = 10.
  APPEND ty_fcat TO it_fcat.
  ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 3.
  ty_fcat-fieldname = 'KEYFLAG'.
  ty_fcat-tabname = 'GT_DD03L'.
  ty_fcat-coltext = 'Key Flag'.
  ty_fcat-outputlen = 10.
  APPEND ty_fcat TO it_fcat.
ENDFORM.                    " ALV_101_FIELDCAT
Selection screen

Similar Messages

  • Open T-code on double click of field in table maintenance

    Hi Gurus,
    I have one scenario, I have to show a transaction on double click event on a field of Table Maintence.
    Please guide me in this .
    Is there is any event in Table Maintenance Events to capture double_click of a field.
    Regards,
    Sowmen

    1. In the field attributes of the particular field there is a chechbox  in display tab which says respond to double click, check that.
    2. Assign the fuction code "PICK" for function code F2 in GUI status.
    3.Now whenver you double click the field function code "PICK" gettes triggeed.
    Now you can wrie yyou code based on this function code.
    CASE sy-comm.
    WHEN 'PICK'.
    *If you want the name of the field and the value in that field use the below code.
    GET CURSOR FIELD gv_field VALUE gv_cursor_value.
    *DO your operation based on the field and the value.
    ENDCASE.
    Regards,
    Smithesh

  • Double click on field in ALV Report

    hi everyone
    i have written a program which displays data in an alv grid report, now i need to extend my program a bit more.
    when i double click on any field value the corresponding record should be displayed
    can anyone suggest if i need to call any fn module for this, if so wht's the fn module
    if anyone can give an example that would be fine
    Cheers,
    rama

    Hi,
    *& Report  Z_REPORTFROMKNA1ANDT005T
    REPORT  Z_REPORTFROMKNA1ANDT005T
                      LINE-SIZE 180
                      MESSAGE-ID ZZ.
    TABLES:EKKO.
    TYPE-POOLS : SLIS.
          Internal table for ALV
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,     "Field catalog
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,       "WA for Field catalog
           IT_EVENT TYPE SLIS_T_EVENT,               "events
           WA_EVENT TYPE SLIS_ALV_EVENT,             "WA for events
           IT_COMMENT TYPE SLIS_T_LISTHEADER,        "Header details
           WA_COMMENT TYPE SLIS_LISTHEADER,          "WA for header details
           WA_LAYOUT TYPE SLIS_LAYOUT_ALV,           "Layout
           IT_SORT TYPE SLIS_T_SORTINFO_ALV,         "Sort table
           WA_SORT TYPE SLIS_SORTINFO_ALV,           "WA for sort table
           IT_KEYINFO TYPE SLIS_KEYINFO_ALV.         "Pass key value
    DATA : V_REPID LIKE SY-REPID.
    V_REPID = SY-REPID.
    DATA : V_DATE LIKE SY-DATUM.
    color management.
    DATA  : IT_COLOR TYPE TABLE OF LVC_S_SCOL.       "Color management.
          Internal table declearation
    DATA:BEGIN OF IT_EKKO OCCURS 0,
      EBELN LIKE EKKO-EBELN,
      BUKRS  LIKE EKKO-BUKRS,
      AEDAT  LIKE EKKO-AEDAT,
    END OF IT_EKKO.
    DATA : BEGIN OF IT_EKPO OCCURS 0,
      EBELN LIKE EKPO-EBELN,
      EBELP LIKE EKPO-EBELP,
      MATNR LIKE EKPO-MATNR,
      MENGE LIKE EKPO-MENGE,
      MEINS LIKE EKPO-MEINS,
      NETPR LIKE EKPO-NETPR,
      NETWR LIKE EKPO-MENGE,
      chk(1) type c,
    END OF IT_EKPO.
    DATA : BEGIN OF IT_EKBE OCCURS 0,
           EBELN LIKE EKBE-EBELN,
           EBELP LIKE EKBE-EBELP,
           BELNR LIKE EKBE-BELNR,
           MENGE LIKE EKBE-MENGE,
           MATNR LIKE EKBE-MATNR,
      END OF IT_EKBE.
    DATA : BEGIN OF IT_FINAL OCCURS 0,
      EBELN LIKE EKPO-EBELN,
      EBELP LIKE EKPO-EBELP,
      MATNR LIKE EKPO-MATNR,
      MENGE LIKE EKPO-MENGE,
      MEINS LIKE EKPO-MEINS,
      NETPR LIKE EKPO-NETPR,
      NETWR LIKE EKPO-NETWR,
      LINE_COLOR(4) TYPE C,     "Used to store row color attributes
    END OF IT_FINAL.
    SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:S_EBELN FOR EKKO-EBELN.
    PARAMETERS : RB1 RADIOBUTTON GROUP G1 MODIF ID Z1,
                 RB2 RADIOBUTTON GROUP G1 MODIF ID Z2,
                 RB3 RADIOBUTTON GROUP G1 MODIF ID Z3.
    SELECTION-SCREEN END OF BLOCK BLK.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM MODIFY_SCREEN.
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM GET_ALV.
    *&      Form  modify_screen
          text
    -->  p1        text
    <--  p2        text
    FORM MODIFY_SCREEN .
    IF RB1 = 'X'.
       LOOP AT SCREEN.
         IF SCREEN-GROUP1 = 'Z1' .
           SCREEN-INVISIBLE = 1.
           SCREEN-ACTIVE = 0.
         ELSE.
           SCREEN-INVISIBLE = 0.
           SCREEN-ACTIVE = 1.
         ENDIF.
         MODIFY SCREEN.
       ENDLOOP.
    ENDIF.
    ENDFORM.                    " modify_screen
    *&      Form  GET_DETAILS
          Get the details
    FORM GET_DETAILS .
      DATA: LD_COLOR(1) TYPE C.
      SELECT EBELN
             BUKRS
             AEDAT
        FROM EKKO
        INTO TABLE IT_EKKO
       WHERE EBELN IN S_EBELN.
      IF SY-SUBRC = 0.
        SORT IT_EKKO BY EBELN.
      ELSE.
        MESSAGE E000 WITH 'DATA NOT FOUND'.
      ENDIF.
      IF NOT IT_EKKO[] IS INITIAL.
        SELECT EBELN
               EBELP
               MATNR
               MENGE
               MEINS
               NETPR
               NETWR
              chk
          FROM EKPO
          INTO TABLE IT_EKPO
           FOR ALL ENTRIES IN IT_EKKO
         WHERE EBELN = IT_EKKO-EBELN.
        IF SY-SUBRC = 0.
          SORT IT_EKPO BY EBELN.
        ENDIF.
      ENDIF.
      LOOP AT IT_EKPO.
        IT_FINAL-EBELN = IT_EKPO-EBELN.
        IT_FINAL-EBELP = IT_EKPO-EBELP.
        IT_FINAL-MATNR = IT_EKPO-MATNR.
        IT_FINAL-MENGE = IT_EKPO-MENGE.
        IT_FINAL-MEINS = IT_EKPO-MEINS.
        IT_FINAL-NETPR = IT_EKPO-NETPR.
        IT_FINAL-NETWR = IT_EKPO-NETWR.
        ON CHANGE OF IT_FINAL-EBELN.
          LD_COLOR = 7.
          CONCATENATE 'C' LD_COLOR '10' INTO IT_FINAL-LINE_COLOR.
        ENDON.
        APPEND IT_FINAL.
        CLEAR IT_FINAL.
      ENDLOOP.
    ENDFORM.                    " GET_DETAILS
    *&      Form  GET_ALV
          text
    FORM GET_ALV .
      PERFORM GENERATE_FIELDCAT.
      PERFORM GENERATE_LAYOUT.
      PERFORM GENERATE_EVENTS.
      PERFORM GENERATE_SORT.
      PERFORM ALV_GRID_DISPLAY.
    ENDFORM.                    " GET_ALV
    *&      Form  GENERATE_FIELDCAT
          Field catalog
    FORM GENERATE_FIELDCAT .
      IF RB1 = 'X' OR RB2 = 'X'.
        WA_FIELDCAT-FIELDNAME = 'EBELN'.
        WA_FIELDCAT-COL_POS = '1'.
        WA_FIELDCAT-JUST = 'R'.
        WA_FIELDCAT-SELTEXT_L = 'PO Number'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        WA_FIELDCAT-DO_SUM = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'EBELP'.
        WA_FIELDCAT-COL_POS = '2'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'Item Number'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        WA_FIELDCAT-edit = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'MATNR'.
        WA_FIELDCAT-COL_POS = '3'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'Material Number'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'MENGE'.
        WA_FIELDCAT-COL_POS = '4'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'PO Quantity'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'MEINS'.
        WA_FIELDCAT-COL_POS = '5'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'Order unit'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'NETPR'.
        WA_FIELDCAT-COL_POS = '6'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'Net price'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'NETWR'.
        WA_FIELDCAT-COL_POS = '7'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'Net order value'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
       wa_fieldcat-fieldname = 'CHK'.
       wa_fieldcat-col_pos = '8'.
       wa_fieldcat-just = 'C'.
       wa_fieldcat-seltext_l = 'Check Box'.
       wa_fieldcat-lowercase = 'X'.
       wa_fieldcat-checkbox = 'X'.
       wa_fieldcat-edit = 'X'.
       append wa_fieldcat to it_fieldcat.
      ELSE.
        CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
           I_PROGRAM_NAME               = V_REPID
           I_INTERNAL_TABNAME           = 'IT_EKKO'
        I_STRUCTURE_NAME             = I_STRUCTURE_NAME
        I_CLIENT_NEVER_DISPLAY       = 'X'
           I_INCLNAME                   = V_REPID
        I_BYPASSING_BUFFER           = I_BYPASSING_BUFFER
        I_BUFFER_ACTIVE              = I_BUFFER_ACTIVE
          CHANGING
            CT_FIELDCAT                  = IT_FIELDCAT
         EXCEPTIONS
           INCONSISTENT_INTERFACE       = 1
           PROGRAM_ERROR                = 2
           OTHERS                       = 3
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
           I_PROGRAM_NAME               = V_REPID
           I_INTERNAL_TABNAME           = 'IT_EKPO'
      I_STRUCTURE_NAME             = I_STRUCTURE_NAME
      I_CLIENT_NEVER_DISPLAY       = 'X'
           I_INCLNAME                   = V_REPID
      I_BYPASSING_BUFFER           = I_BYPASSING_BUFFER
      I_BUFFER_ACTIVE              = I_BUFFER_ACTIVE
          CHANGING
            CT_FIELDCAT                  = IT_FIELDCAT
         EXCEPTIONS
           INCONSISTENT_INTERFACE       = 1
           PROGRAM_ERROR                = 2
           OTHERS                       = 3
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " GENERATE_FIELDCAT
    *&      Form  GENERATE_EVENTS
          Generate Events
    FORM GENERATE_EVENTS .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        IMPORTING
          ET_EVENTS       = IT_EVENT
        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.
      IF NOT IT_EVENT[] IS INITIAL.
        READ TABLE IT_EVENT INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
        IF SY-SUBRC = 0.
          WA_EVENT-FORM = 'TOP_OF_PAGE'.
          MODIFY IT_EVENT FROM WA_EVENT INDEX SY-TABIX.
        ENDIF.
    <b>   READ TABLE IT_EVENT INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
        IF SY-SUBRC = 0.
          WA_EVENT-FORM = 'IT_USER_COMMAND'.
          MODIFY IT_EVENT FROM WA_EVENT INDEX SY-TABIX.
        ENDIF.</b>
      ENDIF.
    ENDFORM.                    " GENERATE_EVENTS
    *&      Form  TOP_OF_PAGE
          TOP_OF_PAGE
    FORM TOP_OF_PAGE.
      DATA : V_CONCATE(50) TYPE C.
      DATA : V_SPACE(10) TYPE C.
      CONCATENATE 'VIKRANTH' 'RAJESH' INTO V_CONCATE.
      WA_COMMENT-TYP = 'S'.
      WA_COMMENT-KEY = 'USER :'.
      WA_COMMENT-INFO = V_CONCATE.
      APPEND WA_COMMENT TO IT_COMMENT.
      WA_COMMENT-TYP = 'S'.
      WA_COMMENT-KEY = 'DATE:'.
      WA_COMMENT-INFO = SY-DATUM.
      APPEND WA_COMMENT TO IT_COMMENT.
      WA_COMMENT-TYP = 'S'.
      WA_COMMENT-KEY = 'TIME:'.
      WA_COMMENT-INFO = SY-TIMLO.
      APPEND WA_COMMENT TO IT_COMMENT.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = IT_COMMENT.
      CLEAR IT_COMMENT.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_GRID_DISPLAY
          Grid display
    FORM ALV_GRID_DISPLAY .
      IF RB1 = 'X'.
        PERFORM GRID_DISPLAY.
      ELSEIF RB2 = 'X'.
        PERFORM LIST_DISPLAY.
      ELSE.
        PERFORM HIERSEQ_DISPLAY.
      ENDIF.
    ENDFORM.                    " ALV_GRID_DISPLAY
    *&      Form  GENERATE_LAYOUT
          LAYOUT
    FORM GENERATE_LAYOUT .
      WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.           "OPTIMIZING FIELD WIDTH
      WA_LAYOUT-ZEBRA = 'X'.                       "PUTTING ZEBRA COLORS
      WA_LAYOUT-TOTALS_TEXT = 'Total'.
      WA_LAYOUT-SUBTOTALS_TEXT = 'SUB TOTAL'.
      WA_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
    ENDFORM.                    " GENERATE_LAYOUT
    *&      Form  GENERATE_SORT
          SORT
    FORM GENERATE_SORT .
      WA_SORT-FIELDNAME = 'EBELN'.
      WA_SORT-SPOS = '1'.
      WA_SORT-UP = 'X'.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
    ENDFORM.                    " GENERATE_SORT
    *&      Form  GRID_DISPLAY
          GRID DISPLAY
    FORM GRID_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = V_REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = 'IT_USER_COMMAND'
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = 'Purchase Order Details'
      I_GRID_SETTINGS                   = I_GRID_SETTINGS
       IS_LAYOUT                         = WA_LAYOUT
       IT_FIELDCAT                       = IT_FIELDCAT
      IT_EXCLUDING                      = IT_EXCLUDING
      IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
       IT_SORT                           = IT_SORT
      IT_FILTER                         = IT_FILTER
      IS_SEL_HIDE                       = IS_SEL_HIDE
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        = IS_VARIANT
       IT_EVENTS                         = IT_EVENT
      IT_EVENT_EXIT                     = IT_EVENT_EXIT
      IS_PRINT                          = IS_PRINT
      IS_REPREP_ID                      = IS_REPREP_ID
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
      IT_HYPERLINK                      = IT_HYPERLINK
      IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
      IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
      IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
        TABLES
          T_OUTTAB                          = IT_FINAL
    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.                    " GRID_DISPLAY
    *&      Form  LIST_DISPLAY
          LIST DISPLAY
    FORM LIST_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
        I_INTERFACE_CHECK              = ' '
        I_BYPASSING_BUFFER             = I_BYPASSING_BUFFER
        I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = V_REPID
        I_CALLBACK_PF_STATUS_SET       = ' '
    <b>     I_CALLBACK_USER_COMMAND        = 'IT_USER_COMMAND'</b>
        I_STRUCTURE_NAME               = I_STRUCTURE_NAME
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
        IT_EXCLUDING                   = IT_EXCLUDING
        IT_SPECIAL_GROUPS              = IT_SPECIAL_GROUPS
         IT_SORT                        = IT_SORT
        IT_FILTER                      = IT_FILTER
        IS_SEL_HIDE                    = IS_SEL_HIDE
        I_DEFAULT                      = 'X'
        I_SAVE                         = ' '
        IS_VARIANT                     = IS_VARIANT
         IT_EVENTS                      = IT_EVENT
        IT_EVENT_EXIT                  = IT_EVENT_EXIT
        IS_PRINT                       = IS_PRINT
        IS_REPREP_ID                   = IS_REPREP_ID
        I_SCREEN_START_COLUMN          = 0
        I_SCREEN_START_LINE            = 0
        I_SCREEN_END_COLUMN            = 0
        I_SCREEN_END_LINE              = 0
        IR_SALV_LIST_ADAPTER           = IR_SALV_LIST_ADAPTER
        IT_EXCEPT_QINFO                = IT_EXCEPT_QINFO
        I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER        = E_EXIT_CAUSED_BY_CALLER
        ES_EXIT_CAUSED_BY_USER         = ES_EXIT_CAUSED_BY_USER
        TABLES
          T_OUTTAB                       = IT_FINAL
       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.                    " LIST_DISPLAY
    *&      Form  HIERSEQ_DISPLAY
          HIERSEQ DISPLAY
    FORM HIERSEQ_DISPLAY .
      IT_KEYINFO-HEADER01 = 'EBELN'.
      IT_KEYINFO-ITEM01 = 'EBELN'.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
      I_INTERFACE_CHECK              = ' '
         I_CALLBACK_PROGRAM             = V_REPID
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   = IT_EXCLUDING
      IT_SPECIAL_GROUPS              = IT_SPECIAL_GROUPS
         IT_SORT                        = IT_SORT
      IT_FILTER                      = IT_FILTER
      IS_SEL_HIDE                    = IS_SEL_HIDE
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     = IS_VARIANT
         IT_EVENTS                      = IT_EVENT
      IT_EVENT_EXIT                  = IT_EVENT_EXIT
          I_TABNAME_HEADER               = 'IT_EKKO'
          I_TABNAME_ITEM                 = 'IT_EKPO'
      I_STRUCTURE_NAME_HEADER        = I_STRUCTURE_NAME_HEADER
      I_STRUCTURE_NAME_ITEM          = I_STRUCTURE_NAME_ITEM
          IS_KEYINFO                     = IT_KEYINFO
      IS_PRINT                       = IS_PRINT
      IS_REPREP_ID                   = IS_REPREP_ID
      I_BYPASSING_BUFFER             = I_BYPASSING_BUFFER
      I_BUFFER_ACTIVE                = I_BUFFER_ACTIVE
      IR_SALV_HIERSEQ_ADAPTER        = IR_SALV_HIERSEQ_ADAPTER
      IT_EXCEPT_QINFO                = IT_EXCEPT_QINFO
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER         = ES_EXIT_CAUSED_BY_USER
        TABLES
          T_OUTTAB_HEADER                = IT_EKKO
          T_OUTTAB_ITEM                  = IT_EKPO
       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.                    " HIERSEQ_DISPLAY
    <b>
    *& Form IT_USER_COMMAND
    text
    FORM IT_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.
      FREE IT_FIELDCAT.
      CASE R_UCOMM.
        WHEN '&IC1'.
          READ TABLE IT_FINAL INDEX RS_SELFIELD-TABINDEX.
          PERFORM GET_EKBE.
          PERFORM GET_FIELD_CATALOG.
          PERFORM GET_LIST.
      ENDCASE.
    ENDFORM.                               "IT_USER_COMMAND</b>
    *&      Form  GET_EKBE
          text
    FORM GET_EKBE .
      IF NOT IT_FINAL[] IS INITIAL.
        SELECT EBELN
               EBELP
               BELNR
               MENGE
               MATNR
          INTO TABLE IT_EKBE
          FROM EKBE
           FOR ALL ENTRIES IN IT_FINAL
         WHERE EBELN = IT_FINAL-EBELN
           AND EBELP = IT_FINAL-EBELP.
      ENDIF.
    ENDFORM.                    " GET_EKBE
    *&      Form  GET_FIELD_CATALOG
          text
    FORM GET_FIELD_CATALOG .
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-COL_POS = '1'.
      WA_FIELDCAT-JUST = 'R'.
      WA_FIELDCAT-SELTEXT_L = 'PO Number'.
      WA_FIELDCAT-LOWERCASE = 'X'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'EBELP'.
      WA_FIELDCAT-COL_POS = '2'.
      WA_FIELDCAT-JUST = 'R'.
      WA_FIELDCAT-SELTEXT_L = 'Item Number'.
      WA_FIELDCAT-LOWERCASE = 'X'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'BELNR'.
      WA_FIELDCAT-COL_POS = '3'.
      WA_FIELDCAT-JUST = 'R'.
      WA_FIELDCAT-SELTEXT_L = 'Material Document'.
      WA_FIELDCAT-LOWERCASE = 'X'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'MENGE'.
      WA_FIELDCAT-COL_POS = '4'.
      WA_FIELDCAT-JUST = 'R'.
      WA_FIELDCAT-SELTEXT_L = 'Quantity'.
      WA_FIELDCAT-LOWERCASE = 'X'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-COL_POS = '5'.
      WA_FIELDCAT-JUST = 'R'.
      WA_FIELDCAT-SELTEXT_L = 'Material Number'.
      WA_FIELDCAT-LOWERCASE = 'X'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
    ENDFORM.                    " GET_FIELD_CATALOG
    *&      Form  get_list
          text
    FORM GET_LIST .
      IF RB1 = 'X'.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
        I_INTERFACE_CHECK                 = ' '
        I_BYPASSING_BUFFER                = ' '
        I_BUFFER_ACTIVE                   = ' '
           I_CALLBACK_PROGRAM                = V_REPID
        I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = ' '
        I_CALLBACK_TOP_OF_PAGE            = ' '
        I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
        I_CALLBACK_HTML_END_OF_LIST       = ' '
        I_STRUCTURE_NAME                  = I_STRUCTURE_NAME
        I_BACKGROUND_ID                   = ' '
           I_GRID_TITLE                      = 'SECONDARY LIST'
        I_GRID_SETTINGS                   = I_GRID_SETTINGS
        IS_LAYOUT                         = IS_LAYOUT
           IT_FIELDCAT                       = IT_FIELDCAT
        IT_EXCLUDING                      = IT_EXCLUDING
        IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
        IT_SORT                           = IT_SORT
        IT_FILTER                         = IT_FILTER
        IS_SEL_HIDE                       = IS_SEL_HIDE
        I_DEFAULT                         = 'X'
        I_SAVE                            = ' '
        IS_VARIANT                        = IS_VARIANT
        IT_EVENTS                         = IT_EVENTS
        IT_EVENT_EXIT                     = IT_EVENT_EXIT
        IS_PRINT                          = IS_PRINT
        IS_REPREP_ID                      = IS_REPREP_ID
        I_SCREEN_START_COLUMN             = 0
        I_SCREEN_START_LINE               = 0
        I_SCREEN_END_COLUMN               = 0
        I_SCREEN_END_LINE                 = 0
        I_HTML_HEIGHT_TOP                 = 0
        I_HTML_HEIGHT_END                 = 0
        IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
        IT_HYPERLINK                      = IT_HYPERLINK
        IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
        IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
        IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
        ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
          TABLES
            T_OUTTAB                          = IT_EKBE
         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.
      ENDIF.
      IF RB2 = 'X'.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             = I_BYPASSING_BUFFER
      I_BUFFER_ACTIVE                = ' '
           I_CALLBACK_PROGRAM             = V_REPID
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               = I_STRUCTURE_NAME
      IS_LAYOUT                      = IS_LAYOUT
           IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   = IT_EXCLUDING
      IT_SPECIAL_GROUPS              = IT_SPECIAL_GROUPS
      IT_SORT                        = IT_SORT
      IT_FILTER                      = IT_FILTER
      IS_SEL_HIDE                    = IS_SEL_HIDE
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     = IS_VARIANT
      IT_EVENTS                      = IT_EVENTS
      IT_EVENT_EXIT                  = IT_EVENT_EXIT
      IS_PRINT                       = IS_PRINT
      IS_REPREP_ID                   = IS_REPREP_ID
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      IR_SALV_LIST_ADAPTER           = IR_SALV_LIST_ADAPTER
      IT_EXCEPT_QINFO                = IT_EXCEPT_QINFO
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER         = ES_EXIT_CAUSED_BY_USER
          TABLES
            T_OUTTAB                       = IT_EKBE
         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.
      ENDIF.
    ENDFORM.                    " get_list
    Thanks
    Vikranth Khimavath
    Message was edited by:
            Khimavath Vikranth

  • Error when double clicking any field in Alv grid

    Hi All,
    I have created a custom container. To that custom container I am displaying an alv grid with all editable fields using oops concept.
    Hence when I am double clicking on any on the field of the table I am getting a dump " an exception condition ERROR raised in CL_GUI_ALV_GRID_BASE  in method SET_DRAG_DROP_ROWS".
    Kindly help

    Hi,
    Check the PF-STATUS. It seems that you have assigned F6 shortcut key for some event.
    Remove the F6 assignment & activate the pf-status.
    Best regards,
    Prashant

  • How to capture the field name on a form when it's double-clicked?

    Hello,
    I plan to create a two field Help table that uses the thirty or so unique field names on the user form in field one. The second field is a Memo type field that contains the Help information for each field.
    Once I know the field name clicked, I will probably use a query to retrieve the help information. I'm planning to use the Double-Click event so the users can double-click any field on the form to be presented the specific field related information
    from the Help table.
    How can I capture the name of the field that was double-clicked, so I can proceed with this project? Thank you.
    Cordially,
    John
    Thank you, John Portland, Maine

    Thank you, Hans,
    How about this code:
    Dim varClickedFieldName as String
    varClickedFieldName = ScreenActiveControl.ControlSource
    Or would you recommend other code?
    Cordially,
    John
    Thank you, John Portland, Maine

  • How to initiate some action when user clicks a field in CRViewer?

    <p><span style="font-family: Courier"><font size="1">ReportObjects doesn't expose click event despite the fact that a field can get focus frame, you can even tab from field to field. </font></span><span style="font-family: Courier"><font size="1">Drill() event works only on group names.</font></span><span style="font-family: Courier"><font size="1">So, how to initiate some action (based on a clicked field value) when user clicks a field in CRViewer?</font></span><span style="font-family: Courier"><font size="1">After doing some googling, have found that something similar exists but it's FoxPro API</font></span></p><p><strong><span style="font-size: 12pt; font-family: Courier"><font size="1">From some PDF: </font></span></strong><strong><span style="font-size: 12pt; font-family: Courier"><font size="1"> </font></span></strong></p><p><strong><span style="font-size: 12pt; font-family: Courier"><font size="1">> Report objects events</font></span></strong> </p><p style="margin: 0cm 0cm 0pt; line-height: normal" class="MsoNormal"><span style="font-size: 10pt; font-family: Courier"><font size="1"><span style="font-size: 12pt; font-family: Courier"><font size="1"><strong>> </strong></font></span>Report object events occur when you click or double-click a field, </font></span></p><span style="font-size: 10pt; font-family: Courier"><font size="1"><span style="font-size: 12pt; font-family: Courier"><font size="1"><strong>> </strong></font></span>heading, or label in a report.</font></span> <p style="margin: 0cm 0cm 0pt; line-height: normal" class="MsoNormal"><span style="font-size: 10pt; font-family: Courier"><font size="1"><span style="font-size: 12pt; font-family: Courier"><font size="1"><strong>> </strong></font></span>Doing this creates the EventInfo object. This object contains </font></span></p><span style="font-size: 10pt; font-family: Courier"><font size="1"><span style="font-size: 12pt; font-family: Courier"><font size="1"><strong>> </strong></font></span>information about the event and</font></span> <p style="margin: 0cm 0cm 0pt; line-height: normal" class="MsoNormal"><font size="1"><span style="font-size: 10pt; font-family: Courier"><span style="font-size: 12pt; font-family: Courier"><font size="1"><strong>> </strong></font></span>passes as a parameter to the event method. </span><strong><span style="font-size: 10pt; font-family: Courier">Table 3 </span></strong><span style="font-size: 10pt; font-family: Courier">lists the</span></font></p><p style="margin: 0cm 0cm 0pt; line-height: normal" class="MsoNormal"><font size="1"><span style="font-size: 10pt; font-family: Courier"><strong><span style="font-size: 12pt; font-family: Courier"><font size="1">> </font></span></strong>EventInfo object properties.......</span></font></p>

    The article you found refers to the ActiveX viewer which is used with the COM-based tool called Report Designer Component. Since you have posted to the .NET forum, I'm assuming you're not using the RDC and therefore this article will not apply.
    Recently, Click events were added to the Windows Form Viewer to get similar functionality as the ActiveX viewer. Take a look at the following link for more information....
    [http://diamond.businessobjects.com/node/2109 | /node/2109]
    However, if you are using the CR Web Forms Viewer in an ASP.NET app, then this functionality is not available.

  • Help in double click in alv

    hi,
    i doing alv and it working o.k. and i wont to add the double click on field and move it to transction how can i do that?
    I reward
    thankes
    "this is my declartion alv
    FORM f_display_data.
      DATA:
        ls_layout   TYPE slis_layout_alv,
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv.
      m_fieldcat 'OBJECT' 'ITAB' 'X' 'Object'.
      m_fieldcat 'OBJECT_NAME' 'ITAB' 'X'  'Oject Name'.
    * Fill Layout - Name of the field with color
      ls_layout-info_fieldname = 'LINE_COLOR'.
      ls_layout-colwidth_optimize = 'X'.
    * Display the list
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          is_layout    = ls_layout
          it_fieldcat  = lt_fieldcat
          i_grid_title = 'User Exit & Badi'
        TABLES
          t_outtab     = itab.
      CASE wf_object.   "this lines is what i wont to add for double click
        WHEN 'SMOD'.
          SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
          CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
        WHEN 'SXSD'.
          SET PARAMETER ID 'EXN' FIELD sy-lisel+1(20).
          CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
      ENDCASE.
    Regards

    Hi
    Here is an example program which illistrates how to handle the double click event.
    REPORT ZRICH_0001.
    TABLES: MARA.
    DATA: BEGIN OF I_ALV OCCURS 0,
          MATNR TYPE MARA-MATNR,
          MAKTX TYPE MAKT-MAKTX,
          END OF I_ALV.
          CLASS cl_event_receiver DEFINITION      Handles Double Click
    CLASS CL_EVENT_RECEIVER DEFINITION.
      PUBLIC SECTION.
        METHODS HANDLE_DOUBLE_CLICK
          FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
          IMPORTING E_ROW E_COLUMN.
      PRIVATE SECTION.
    ENDCLASS.
          CLASS CL_EVENT_RECEIVER IMPLEMENTATION    Handles Double Click
    CLASS CL_EVENT_RECEIVER IMPLEMENTATION.
      METHOD HANDLE_DOUBLE_CLICK.
        PERFORM DRILL_DOWN USING E_ROW-INDEX.
      ENDMETHOD.
    ENDCLASS.
    DATA: ALV_CONTAINER  TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: EVENT_RECEIVER TYPE REF TO CL_EVENT_RECEIVER.
    DATA: ALV_GRID       TYPE REF TO CL_GUI_ALV_GRID.
    DATA: FIELDCAT  TYPE LVC_T_FCAT.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001 .
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
      PERFORM GET_DATA.
      CALL SCREEN 100.
         Module  status_0100  OUTPUT
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS '0100'.
      SET TITLEBAR '0100'.
    Create Controls
      CREATE OBJECT ALV_CONTAINER
             EXPORTING
                   CONTAINER_NAME    = 'ALV_CONTAINER'.
      CREATE OBJECT ALV_GRID
             EXPORTING
                   I_PARENT          =  ALV_CONTAINER.
    Create Event Receiver
      CREATE OBJECT EVENT_RECEIVER.
    ALV Specific. Data selection.
    Populate Field Catalog
      PERFORM GET_FIELDCATALOG.
      CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          CHANGING
               IT_OUTTAB       = I_ALV[]
               IT_FIELDCATALOG = FIELDCAT[].
      handler for ALV grid
      SET HANDLER EVENT_RECEIVER->HANDLE_DOUBLE_CLICK FOR ALV_GRID.
    ENDMODULE.
         Module  USER_COMMAND_0100  INPUT
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK' OR 'CANC'.
          IF NOT ALV_CONTAINER IS INITIAL.
            CALL METHOD ALV_CONTAINER->FREE.
            CLEAR: ALV_CONTAINER.
            FREE : ALV_CONTAINER.
          ENDIF.
          IF SY-SUBRC = 0.
            SET SCREEN 0.
            LEAVE SCREEN.
          ELSE.
            LEAVE PROGRAM.
          ENDIF.
        WHEN 'EXIT'.
          IF NOT ALV_CONTAINER IS INITIAL.
            CALL METHOD ALV_CONTAINER->FREE.
            CLEAR: ALV_CONTAINER.
            FREE : ALV_CONTAINER.
          ENDIF.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.
    FORM GET_DATA
    FORM GET_DATA.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE I_ALV
            FROM MARA
              INNER JOIN MAKT
                ON MARAMATNR = MAKTMATNR
                   WHERE MARA~MATNR IN S_MATNR
                     AND MAKT~SPRAS = SY-LANGU.
      SORT I_ALV ASCENDING BY MATNR.
    ENDFORM.
         Form  Get_Fieldcatalog - Set Up Columns/Headers
    FORM GET_FIELDCATALOG.
      DATA: LS_FCAT TYPE LVC_S_FCAT.
      REFRESH: FIELDCAT.
      CLEAR: LS_FCAT.
      LS_FCAT-REPTEXT    = 'Material Number'.
      LS_FCAT-COLTEXT    = 'Material Number'.
      LS_FCAT-FIELDNAME  = 'MATNR'.
      LS_FCAT-REF_TABLE  = 'I_ALV'.
      LS_FCAT-OUTPUTLEN  = '18'.
      LS_FCAT-COL_POS    = 1.
      APPEND LS_FCAT TO FIELDCAT.
      CLEAR: LS_FCAT.
      LS_FCAT-REPTEXT    = 'Material Description'.
      LS_FCAT-COLTEXT    = 'Material Description'.
      LS_FCAT-FIELDNAME  = 'MAKTX'.
      LS_FCAT-REF_TABLE  = 'I_ALV'.
      LS_FCAT-OUTPUTLEN  = '40'.
      LS_FCAT-COL_POS    = 2.
      APPEND LS_FCAT TO FIELDCAT.
    ENDFORM.
    DRILL_DOWN
    FORM DRILL_DOWN USING INDEX.
      READ TABLE I_ALV INDEX INDEX.
      IF SY-SUBRC = 0.
    Do whatever you need to do, in this case, I'm driling into tcode MM03
        SET PARAMETER ID 'MAT' FIELD I_ALV-MATNR.
        CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
      ENDIF.
    ENDFORM.
    <b>Reward if useful</b>

  • Call Transaction in ALV Tree Display on Double Click

    Hi Experts,
    How can i call any Transaction on Double clicking  a field in ALV Tree?
    I'm able to call the transaction when Double clicked a field but it is not reading the value of the field on which i double click. It calls the transaction skipping the first screen with always the same value of the field.
          E.g : Whether i click on Purchase order no.  450000010 or 450000003 it displays the purchase order 4500000010 after it goes to ME23N transaction skipping the first screen.
            I am Trying Method ITEM_DOUBLE_CLICK of Class CL_GUI_COLUMN_TREE
    by passing the parameter NODE_KEY.But it's not working.
    Thanks & Regards,
    Vinit Ranjan

    hi
    (also check u have refresh the field)
    Check the demo program,In this double click the data fields it will display some field in screen,You can check it
    BCALV_GRID_DND_TREE
    Thanks
    Edited by: dharma raj on Jun 17, 2009 7:41 PM

  • How to get the line information when double click the ALV line?

    LOOP AT it_outr.
        AT END OF vornr.
          REFRESH it_out.
          CLEAR it_out.
          LOOP AT it_outt WHERE nplnr = it_outr-nplnr
                            AND vornr = it_outr-vornr.
            MOVE-CORRESPONDING it_outt TO it_out.
            APPEND it_out.
          ENDLOOP.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = g_repid
          i_callback_pf_status_set = 'HANDLE_EVENT_PF_STATUS'
          i_callback_user_command  = 'HANDLE_EVENT_USER_COMMAND'
          is_layout                = ls_layo
          it_fieldcat              = lt_fcat
          it_events                = lt_evts1
          is_print                 = ls_prnt
        TABLES
          t_outtab                 = it_out
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
        ENDAT.
    When we double click a field, how do we get the line information with the field?
    READ TABLE it_out INDEX rs_selfield-tabindex. is not worked, because the table it_out is changing.

    hi
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = SY-REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
         *I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'*
    *    I_CALLBACK_TOP_OF_PAGE            = ''
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
       I_BACKGROUND_ID                   = 'ALV_BACKGROUND'
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
         IS_LAYOUT                          = LAYOUT
         IT_FIELDCAT                        = RT_FIELDCAT
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =  'X'
    *   IS_SEL_HIDE                       =
         I_DEFAULT                         = 'X'
         I_SAVE                            = 'A'
         IS_VARIANT                        = G_VARIANT
         IT_EVENTS                         = XT_EVENT
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IT_FINAL
       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.
    CASE U_UCOMM.
        WHEN '&IC1'.
          READ TABLE IT_FINAL INDEX US_SELFIELD-TABINDEX INTO WA_FINAL.
          CHECK SY-SUBRC EQ 0.
          CASE US_SELFIELD-FIELDNAME.
            WHEN 'VBELN'.
              SET PARAMETER ID: 'VF' FIELD WA_FINAL-VBELN.
              CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.
          ENDCASE.
          ENDCASE.
    regard,
    nawa

  • On Double Clicking An ALV

    Hi ALL,
    I have a doubt in ALV,
    My requirement is that, I developed one ALV report.
    Now when i double click one field i have to show some fields in a new report.
    How this can be done.
    Thanks & Regards,
    Pradeep Alex

    BC ALV report will help you using OOABAP.
    any method you want to use, what you need to do is pass a subroutine name to the  USER_COMMAND method. either directly in the  ALV FM export parameter or in the event table.
    in this subroutine which you have defined for USER_COMMAND, do what ever code you want. this will trigger when you double click the ALV output.

  • How to  record double click action in ECATT ...?

    Hi,
    I created ecatt for Asset master in that recording there is sub field in which i need to enter data only after double clicking main field ,while recording i double clicked tha main field after upload txt file unless i double click the field it is not moving farward,
    so can u help the same..
    thanking you

    You can record double click action using ecatt or u can do same by pressing f2 key while recordiing

  • Double click from OOALV Display to call relevant field transaction

    Hi,
    In program used the below code to dispaly ALV grid.
         CALL METHOD OBJ_GRID_DETAIL->SET_TABLE_FOR_FIRST_DISPLAY
            EXPORTING
              IS_LAYOUT       = X_LAYOUT
              IS_VARIANT      = X_VARIANT
              I_SAVE          = 'A'
            CHANGING
              IT_FIELDCATALOG = IT_FLDCAT_DETAILS
              IT_OUTTAB       = IT_ORDERS[]
    The display contains Sales order number, material etc.
    If double click on sales order number, should call the transaction VA03 etc.
    I am new to OOPS, please suggest me.
    Thanks
    Hema

    Please try this,
    FORM handle_double_click
         USING i_row TYPE lvc_s_row
               i_column TYPE lvc_s_col
                  is_row_no TYPE lvc_s_roid.
    READ TABLE IT_ORDERS[] INDEX is_row_no-row_id .
    IF sy-subrc = 0 AND i_column-fieldname = 'VBELN' .
    * Set the Parameter Id for the Sales Order Number
    SET PARAMETER ID 'AUN' FIELD IT_ORDERS-vbeln.
    CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    ENDIF .
    ENDFORM .
    The below document explains all the event handling and OO ALV concepts,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    Regards
    Kathirvel

  • Capture field name in table control on double click

    Hi,
    How can I capture the field name of internal table passed to table control on double click?
    I have set function code as 'PICK' and applied 'Respond to double click' and used GET CURSOR statement. Here I can get the values like row number (line number), field value also. But I would like to capture on which field the cursor is (or on which column the cursor is)?
    Thanks in advance.
    Regards
    Ramesh.

    Got it.
    We can capture it by using the statement GET CURSOR only.
    GET CURSOR field <field xx> .
    Here the <field xx> is the field name where we have said double click.

  • Double click on list field in ALV grid control

    Hello all,
    I developed a report with a ALV grid control. I would like to move some functionality from marking a line and pressing a button in the status line to double clicking a specific field in the output list and execute a command there (i.e. double click on PO number and go to PO display TAC then). Can anybody provide some example coding for that?
    Thanks so much for your help!
    Torsten

    Here is your sample program.  Copy this code into a z program.  Create the screen 100 with a container in it and name it "ALV_CONTAINER".  Create the gui-status with "BACK".
    report zrich_0001.
    tables: ekko.
    data: begin of i_alv occurs 0,
          ebeln type ekko-ebeln,
          end of i_alv.
    *       CLASS cl_event_receiver DEFINITION      Handles Double Click
    class cl_event_receiver definition.
      public section.
        methods handle_double_click
          for event double_click of cl_gui_alv_grid
          importing e_row e_column.
      private section.
    endclass.
    *       CLASS CL_EVENT_RECEIVER IMPLEMENTATION    Handles Double Click
    class cl_event_receiver implementation.
      method handle_double_click.
        perform drill_down using e_row-index.
      endmethod.
    endclass.
    data: alv_container  type ref to cl_gui_custom_container.
    data: event_receiver type ref to cl_event_receiver.
    data: alv_grid       type ref to cl_gui_alv_grid.
    data: layout    type lvc_s_layo.
    data: fieldcat  type lvc_t_fcat.
    selection-screen begin of block b1 with frame title text-001 .
    select-options: s_ebeln for ekko-ebeln.
    selection-screen end of block b1.
    start-of-selection.
      perform get_data.
      call screen 100.
    *      Module  status_0100  OUTPUT
    module status_0100 output.
      set pf-status '0100'.
      set titlebar '0100'.
      data: variant type  disvariant.
      variant-report = sy-repid.
      variant-username = sy-uname.
    * Create Controls
      create object alv_container
             exporting
                   container_name    = 'ALV_CONTAINER'.
      create object alv_grid
             exporting
                   i_parent          =  alv_container.
    *  Create Event Receiver
      create object event_receiver.
    *  Populate Field Catalog
      perform get_fieldcatalog.
      call method alv_grid->set_table_for_first_display
          exporting
               is_layout              = layout
               is_variant             = variant
               i_save                 = 'U'
               i_structure_name       = 'I_ALV'
          changing
               it_outtab       = i_alv[]
               it_fieldcatalog = fieldcat[].
    *   handler for ALV grid
      set handler event_receiver->handle_double_click for alv_grid.
    endmodule.
    *      Module  USER_COMMAND_0100  INPUT
    module user_command_0100 input.
      case sy-ucomm.
        when 'BACK' or 'CANC'.
          if not alv_container is initial.
            call method alv_container->free.
            clear: alv_container.
            free : alv_container.
          endif.
          if sy-subrc = 0.
            set screen 0.
            leave screen.
          else.
            leave program.
          endif.
        when 'EXIT'.
          if not alv_container is initial.
            call method alv_container->free.
            clear: alv_container.
            free : alv_container.
          endif.
          leave program.
      endcase.
    endmodule.
    * FORM GET_DATA
    form get_data.
      select * into corresponding fields of table i_alv
                from ekko
                     where ebeln in s_ebeln.
      sort i_alv ascending by ebeln.
    endform.
    *      Form  Get_Fieldcatalog - Set Up Columns/Headers
    form get_fieldcatalog.
      data: ls_fcat type lvc_s_fcat.
      refresh: fieldcat.
      clear: ls_fcat.
      ls_fcat-reptext    = 'PO Number'.
      ls_fcat-coltext    = 'PO Number'.
      ls_fcat-fieldname  = 'EBELN'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '12'.
      ls_fcat-col_pos    = 1.
      append ls_fcat to fieldcat.
    endform.
    * DRILL_DOWN
    form drill_down using index.
      read table i_alv index index.
      if sy-subrc = 0.
        set parameter id 'BES' field i_alv-ebeln.
        call transaction 'ME23' and skip first screen.
        if not alv_container is initial.
          call method alv_container->free.
          clear: alv_container.
          free : alv_container.
        endif.
      endif.
    endform.
    Regards,
    Rich Heilman

  • Get value of field object when I double click on any column of report

    Hi,
    We are converting our projects from .NET 2003 to .Net 2008 and upgrading reports10 to crystal reports 2008 and changing our Active x report viewer control  to crystal report viewer.
    We donu2019t use reports just to see and print the data. Our use is a bit more.
    As we were using Active X Control (CRAXDDRT) to perform different operations
    Following are some functions which are included in our requirements:
    1-     We need the columns width to be flexible which we can changed in the code dynamically according to the users wish
    2-     Setting text of some fields dynamically from .Net code
    3-     Hide and show the columns dynamically from .Net code
           Upto here we are done using crystal report 2008 and .net 2008
           Now we are stuck with problem
    4-     When we double click on fieldobject at runtime we are able to fetch the value of field object by using e.objectinfo.text.tostring, so far it is perfect
    But we have different situation here and need a solution for this
    I have two fields like Account ID and Account Description
    I need the solution so that when user clicks either on Account ID or Account Description I should be able to fetch the Field object value of Account ID Column only so that i will be able to open different forms and reports based on that ID
    As we were doing it before using Active X Control the code snippet is giving below
    case "Field: Account. AccountID ", "Field: Account.Description"
    GlobalCode = GiveCode(mYFields.Item(1).value) '------ Where 1 refer to Account ID, so in both cases either we click Account ID or Description Field at run time we are able to return the account ID field value.
    so we need solution some thing like that please do let us know how we can do that
    For Your reference we were using CrystalActivexReportViewerLib10.CRVFields obejct to fectch the report values
    Thanx in Advance
    Regards,
    Arshad Hussain Bhatt

    Hello,
    I am getting value of that cell where I am clicking. But I need the value of other columns also in that particular row where I double clicked. For this I gave one example also that suppose I have a report where there are two columns. One is AccountID and other is AccountDescription. Now if I click on Account ID I get the value of AccountID and when I click on AccountDescription I get the value of AccountDescripiton This is oK n good but I want that If i double click on AccountDescription I should be able to get the value of AccountID also.Please tell me is there anyway to do so?
    We did so when we were using CRAXDRT.Report Bellow is the code snippet for how I did it in that.
    Dim MyField As CrystalActiveXReportViewerLIb10.CRVFields
    Private Function GiveFieldIndex(ByVal As CrystalActiveXReportViewerLib10.CRVFields, ByVal FldName As String) As Integer
    For i as integer = 1 To FldArry.Count
        If FldArry.Item(i).name = FldName Then
                    GiveFieldIndex = i
          End If
    End Function
    Private Sub CRViewer1_DoubleClick(ByVal eventSender As System.Object, ByVal eventArgs As AxCrystalActiveXReportViewerLib10._ICRViewerEvents_DblClickedEvent) Handles CRViewer1.DblClicked
    If MyField.Name = "Field: AdoJV.AccountID" Or MyField.Name = "Field: AdoJV.AccountDesc" Then
    /Following line will give us AccountID in anycase either we click on AccountID or Account Desc or even you can add more column by adding Or Operator. We need something like this in Crystal Report 2008/
      Dim GlobeAddEditCode  as String = myFields.Item(GiveFieldIndex(myFields, "Field: AdoJV.AccountID")).Value
    End If
    End Sub
    Regards,
    Arshad Hussain Bhatt
    Edited by: arshhb on Oct 31, 2009 6:44 AM
    Edited by: arshhb on Oct 31, 2009 7:09 AM
    Edited by: arshhb on Oct 31, 2009 7:13 AM

Maybe you are looking for