<?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 -- METHOD set_selected_cells in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-method-set-selected-cells/m-p/5541194#M1265525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a program with ALV_GRID  in which, with event DBL_CLICK in one cell, I show data with function REUSE_ALV_POPUP_TO_SELECT to select the data with the objective fill this cell only with data I suggest in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't know, when I use this method  set_selected_cells , don't save the value data..., and in ALV don't show the change...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happen??... Why don't save this method the value???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before I execute Method SET ..., I execute Method GET... and the value of cell it's null... don't save the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put my code in resume...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_handle_double_click1  USING p_row    TYPE lvc_s_row&lt;/P&gt;&lt;P&gt;                                                         p_column TYPE lvc_s_col.&lt;/P&gt;&lt;P&gt;  DATA: it_cells TYPE lvc_t_cell,&lt;/P&gt;&lt;P&gt;             wa_cells TYPE lvc_s_cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Read the line of the internal table of the ALV&lt;/P&gt;&lt;P&gt;  READ TABLE i_datos INDEX p_row-index.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE p_column-fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'COD_MODELO_AFIS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*POP UP with data to select .&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_selection          = 'X'&lt;/P&gt;&lt;P&gt;          i_zebra              = 'X'&lt;/P&gt;&lt;P&gt;          it_fieldcat          = lt_fieldcat&lt;/P&gt;&lt;P&gt;          i_tabname            = 'TB_MODELOS'&lt;/P&gt;&lt;P&gt;          i_checkbox_fieldname = 'CHECKBOX'&lt;/P&gt;&lt;P&gt;          is_private           = ls_private&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          e_exit               = l_exit&lt;/P&gt;&lt;P&gt;        TABLES&lt;/P&gt;&lt;P&gt;          t_outtab             = tb_modelos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CHECK l_exit = space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      READ TABLE tb_modelos WITH KEY checkbox = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_cells-col_id = p_column.&lt;/P&gt;&lt;P&gt;      wa_cells-row_id = p_row.&lt;/P&gt;&lt;P&gt;      wa_cells-value = tb_modelos-nom_modelo_afis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND wa_cells TO it_cells.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Save the data in cell&lt;/P&gt;&lt;P&gt;      CALL METHOD g_grid1-&amp;gt;set_selected_cells&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          it_cells = it_cells.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      REFRESH it_cells.    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Verify if the data have been saved&lt;/P&gt;&lt;P&gt;      CALL METHOD g_grid1-&amp;gt;get_selected_cells&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          et_cell = it_cells.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " F_HANDLE_DOUBLE_CLICK1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Apr 2009 10:37:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-24T10:37:44Z</dc:date>
    <item>
      <title>ALV GRID -- METHOD set_selected_cells</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-method-set-selected-cells/m-p/5541194#M1265525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a program with ALV_GRID  in which, with event DBL_CLICK in one cell, I show data with function REUSE_ALV_POPUP_TO_SELECT to select the data with the objective fill this cell only with data I suggest in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't know, when I use this method  set_selected_cells , don't save the value data..., and in ALV don't show the change...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happen??... Why don't save this method the value???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before I execute Method SET ..., I execute Method GET... and the value of cell it's null... don't save the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put my code in resume...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_handle_double_click1  USING p_row    TYPE lvc_s_row&lt;/P&gt;&lt;P&gt;                                                         p_column TYPE lvc_s_col.&lt;/P&gt;&lt;P&gt;  DATA: it_cells TYPE lvc_t_cell,&lt;/P&gt;&lt;P&gt;             wa_cells TYPE lvc_s_cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Read the line of the internal table of the ALV&lt;/P&gt;&lt;P&gt;  READ TABLE i_datos INDEX p_row-index.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE p_column-fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'COD_MODELO_AFIS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*POP UP with data to select .&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_selection          = 'X'&lt;/P&gt;&lt;P&gt;          i_zebra              = 'X'&lt;/P&gt;&lt;P&gt;          it_fieldcat          = lt_fieldcat&lt;/P&gt;&lt;P&gt;          i_tabname            = 'TB_MODELOS'&lt;/P&gt;&lt;P&gt;          i_checkbox_fieldname = 'CHECKBOX'&lt;/P&gt;&lt;P&gt;          is_private           = ls_private&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          e_exit               = l_exit&lt;/P&gt;&lt;P&gt;        TABLES&lt;/P&gt;&lt;P&gt;          t_outtab             = tb_modelos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CHECK l_exit = space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      READ TABLE tb_modelos WITH KEY checkbox = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_cells-col_id = p_column.&lt;/P&gt;&lt;P&gt;      wa_cells-row_id = p_row.&lt;/P&gt;&lt;P&gt;      wa_cells-value = tb_modelos-nom_modelo_afis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND wa_cells TO it_cells.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Save the data in cell&lt;/P&gt;&lt;P&gt;      CALL METHOD g_grid1-&amp;gt;set_selected_cells&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          it_cells = it_cells.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      REFRESH it_cells.    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Verify if the data have been saved&lt;/P&gt;&lt;P&gt;      CALL METHOD g_grid1-&amp;gt;get_selected_cells&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          et_cell = it_cells.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " F_HANDLE_DOUBLE_CLICK1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2009 10:37:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-method-set-selected-cells/m-p/5541194#M1265525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-24T10:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: ALV GRID -- METHOD set_selected_cells</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-method-set-selected-cells/m-p/5541195#M1265526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 07:29:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-method-set-selected-cells/m-p/5541195#M1265526</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-22T07:29:17Z</dc:date>
    </item>
  </channel>
</rss>

