<?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 Re: ALV display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/4939457#M1152063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vivek,&lt;/P&gt;&lt;P&gt;Say for example you want to send mail after clicking a push button with fcode 'MAIL' .&lt;/P&gt;&lt;P&gt;You use the following logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare data to capture selcted fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
* Internal table for indexes of selected rows
  gi_index_rows TYPE lvc_t_row,
* Information about 1 row
  g_selected_row LIKE lvc_s_row.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Handle user command when clicked on the push button for mail:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
METHOD handle_user_command.
*   Handle own functions defined in the toolbar
    CASE e_ucomm.
      WHEN 'MAIL'.
        PERFORM send_mail.
    ENDCASE.
  ENDMETHOD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM send_mail.
* Read index of selected rows
  CALL METHOD go_grid-&amp;gt;get_selected_rows
    IMPORTING
      et_index_rows = gi_index_rows.

"Move the selected contents to another internal table it_final1
  LOOP AT gi_index_rows INTO g_selected_row.
    READ TABLE it_final INDEX g_selected_row-index INTO
    wa_final.
   APPEND wa_final TO it_final1
  ENDLOOP.
"Now it_final1 contains only the selected rows.
"Write your logic to send mail using 'it_final1'
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manoj Kumar P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Dec 2008 15:10:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-16T15:10:42Z</dc:date>
    <item>
      <title>ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/4939455#M1152061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following method to hide the standard buttons of my ALV display.&lt;/P&gt;&lt;P&gt;My requirement is such that of the data displayed in the AL layout i have to select some rows and those will be going as a mail output.&lt;/P&gt;&lt;P&gt;How to capture those selected rows in the ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lwa_exclude = cl_gui_alv_grid=&amp;gt;mc_fc_loc_insert_row.&lt;/P&gt;&lt;P&gt;  APPEND lwa_exclude TO it_exclude.&lt;/P&gt;&lt;P&gt;  lwa_exclude = cl_gui_alv_grid=&amp;gt;mc_fc_loc_copy_row.&lt;/P&gt;&lt;P&gt;  APPEND lwa_exclude TO it_exclude.&lt;/P&gt;&lt;P&gt;  lwa_exclude = cl_gui_alv_grid=&amp;gt;mc_fc_loc_cut.&lt;/P&gt;&lt;P&gt;  APPEND lwa_exclude TO it_exclude.&lt;/P&gt;&lt;P&gt;  lwa_exclude = cl_gui_alv_grid=&amp;gt;mc_fc_loc_copy.&lt;/P&gt;&lt;P&gt;  APPEND lwa_exclude TO it_exclude.&lt;/P&gt;&lt;P&gt;  lwa_exclude = cl_gui_alv_grid=&amp;gt;mc_fc_loc_paste.&lt;/P&gt;&lt;P&gt;  APPEND lwa_exclude TO it_exclude.&lt;/P&gt;&lt;P&gt;  lwa_exclude = cl_gui_alv_grid=&amp;gt;mc_fc_loc_paste_new_row.&lt;/P&gt;&lt;P&gt;  APPEND lwa_exclude TO it_exclude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_is_layout-SEL_MODE = 'D'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD g_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      it_toolbar_excluding = it_exclude&lt;/P&gt;&lt;P&gt;      is_layout                = wa_is_layout&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      it_outtab            = it_final&lt;/P&gt;&lt;P&gt;      it_fieldcatalog      = it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vivek Agarwal on Dec 16, 2008 12:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 11:03:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/4939455#M1152061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T11:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/4939456#M1152062</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;Refer to this Demo program BCALV_GRID_05&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 11:12:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/4939456#M1152062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T11:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/4939457#M1152063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vivek,&lt;/P&gt;&lt;P&gt;Say for example you want to send mail after clicking a push button with fcode 'MAIL' .&lt;/P&gt;&lt;P&gt;You use the following logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare data to capture selcted fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
* Internal table for indexes of selected rows
  gi_index_rows TYPE lvc_t_row,
* Information about 1 row
  g_selected_row LIKE lvc_s_row.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Handle user command when clicked on the push button for mail:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
METHOD handle_user_command.
*   Handle own functions defined in the toolbar
    CASE e_ucomm.
      WHEN 'MAIL'.
        PERFORM send_mail.
    ENDCASE.
  ENDMETHOD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM send_mail.
* Read index of selected rows
  CALL METHOD go_grid-&amp;gt;get_selected_rows
    IMPORTING
      et_index_rows = gi_index_rows.

"Move the selected contents to another internal table it_final1
  LOOP AT gi_index_rows INTO g_selected_row.
    READ TABLE it_final INDEX g_selected_row-index INTO
    wa_final.
   APPEND wa_final TO it_final1
  ENDLOOP.
"Now it_final1 contains only the selected rows.
"Write your logic to send mail using 'it_final1'
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manoj Kumar P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 15:10:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/4939457#M1152063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T15:10:42Z</dc:date>
    </item>
  </channel>
</rss>

