<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ALV Grid Control Double click error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330060#M1031730</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In my Editable ALV Grid Control I input the data ,then click save, the program display error msg if any errors , then i double click in any field ,after that I exit from the program , here i dont want this after double click also the control should be on the same field.Pleace help me out this issue.&lt;/P&gt;&lt;P&gt;THX&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Aug 2008 06:09:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-29T06:09:04Z</dc:date>
    <item>
      <title>ALV Grid Control Double click error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330060#M1031730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In my Editable ALV Grid Control I input the data ,then click save, the program display error msg if any errors , then i double click in any field ,after that I exit from the program , here i dont want this after double click also the control should be on the same field.Pleace help me out this issue.&lt;/P&gt;&lt;P&gt;THX&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 06:09:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330060#M1031730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T06:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Control Double click error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330061#M1031731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;provide proper detail of error and code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 08:58:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330061#M1031731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T08:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Control Double click error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330062#M1031732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this particular case can be resolved by writing the logic for the Double click function code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Under the function code &amp;amp;IC1 write the below logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call screen 100 ( here screen 100 is your ALV output container screen)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 09:16:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330062#M1031732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T09:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Control Double click error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330063#M1031733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But what you will do with the error data. you tell me that.&lt;/P&gt;&lt;P&gt;Don't update some error values to DB.&lt;/P&gt;&lt;P&gt;if you don't want error then check this sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report  ztest_alv_edit.

data: it_flight type standard table of sflight.

data: it_fcat type lvc_t_fcat,
      wa_fcat type lvc_s_fcat.

data: grid type ref to cl_gui_alv_grid,
      cont type ref to cl_gui_custom_container.
class lcl_event_receiver definition deferred.

data: g_handler type ref to lcl_event_receiver.

*----------------------------------------------------------------------*
*       CLASS lcl_event_receiver DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
class lcl_event_receiver definition.

  public section.
    methods:
      handle_data_changed
         for event data_changed of cl_gui_alv_grid
             importing er_data_changed.

endclass.                    "lcl_event_receiver DEFINITION

*----------------------------------------------------------------------*
*       CLASS lcl_event_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
class lcl_event_receiver implementation.
  method handle_data_changed.
   "this is important
   "this will stop poping the message
   clear er_data_changed-&amp;gt;mt_protocol.

  endmethod.                    "handle_data_changed

endclass.                    "lcl_event_receiver IMPLEMENTATION

start-of-selection.

  select * from sflight
  into table it_flight
  up to 20 rows.
end-of-selection.
  call screen 100.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module status_0100 output.
  set pf-status 'STATUS'.
  if cont is initial.


    call function 'LVC_FIELDCATALOG_MERGE'
      exporting
        i_structure_name       = 'SFLIGHT'
      changing
        ct_fieldcat            = it_fcat
      exceptions
        inconsistent_interface = 1
        program_error          = 2.
    create object cont
      exporting
        container_name              = 'CONT'
      exceptions
        cntl_error                  = 1
        cntl_system_error           = 2
        create_error                = 3
        lifetime_error              = 4
        lifetime_dynpro_dynpro_link = 5
        others                      = 6
        .
    if sy-subrc ne 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    wa_fcat-edit = 'X'.
    wa_fcat-checktable = '!'.
    modify it_fcat from wa_fcat transporting edit checktable
    where fieldname = 'FLDATE'
    .
    create object grid
      exporting
        i_parent          = cont
      exceptions
        error_cntl_create = 1
        error_cntl_init   = 2
        error_cntl_link   = 3
        error_dp_create   = 4
        others            = 5
        .
    if sy-subrc ne 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.

    call method grid-&amp;gt;set_table_for_first_display(
       changing
         it_outtab                     = it_flight
         it_fieldcatalog               = it_fcat
       exceptions
         invalid_parameter_combination = 1
         program_error                 = 2
         too_many_lines                = 3
            ).
    if sy-subrc ne 0.
      message id sy-msgid type sy-msgty number sy-msgno
                 with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    "Important for editable grid
     call method grid-&amp;gt;register_edit_event
               exporting
                  i_event_id = cl_gui_alv_grid=&amp;gt;mc_evt_enter.
     create object g_handler.
    "setting the handler
    set handler  g_handler-&amp;gt;handle_data_changed for grid.

  endif.

endmodule.                 " STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_0100  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module user_command_0100 input.
  "important method to trigger the DATA_CHANGED event
  call method grid-&amp;gt;check_changed_data.
  case sy-ucomm.
    when 'BACK'.
      leave to screen 0.
  endcase.
endmodule.                 " USER_COMMAND_0100  INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 09:18:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330063#M1031733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T09:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Control Double click error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330064#M1031734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2008 12:16:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-control-double-click-error/m-p/4330064#M1031734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-19T12:16:05Z</dc:date>
    </item>
  </channel>
</rss>

