<?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: code for alv grid row selection to internal table. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-alv-grid-row-selection-to-internal-table/m-p/3726570#M896949</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;For your final internal table add one more field as flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: flag TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF i_zaw_pol_plan.&lt;/P&gt;&lt;P&gt;DATA :  flag TYPE c.&lt;/P&gt;&lt;P&gt;            INCLUDE STRUCTURE zaw_pol_plan.&lt;/P&gt;&lt;P&gt;DATA : END OF i_zaw_pol_plan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ws_repid    LIKE sy-repid,&lt;/P&gt;&lt;P&gt;           gs_layout   TYPE slis_layout_alv,&lt;/P&gt;&lt;P&gt;           i_fieldcat TYPE slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After passing the data to your final internal table  and creation of field catelog..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ws_repid = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_callback_program       = ws_repid&lt;/P&gt;&lt;P&gt;            i_callback_pf_status_set = 'GUI_STAT'&lt;/P&gt;&lt;P&gt;            i_callback_user_command  = 'STAT'&lt;/P&gt;&lt;P&gt;            is_layout                = gs_layout&lt;/P&gt;&lt;P&gt;            it_fieldcat              = i_fieldcat[]&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab                 = i_zaw_pol_plan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM stat USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA selfield TYPE slis_selfield.&lt;/P&gt;&lt;P&gt;  CASE r_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   WHEN 'MOVE' .&lt;/P&gt;&lt;P&gt;       LOOP AT i_zaw_pol_plan WHERE flag EQ c_x.&lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;          MOVE-CORRESPONDING  i_zaw_pol_plan  TO i_itab.&lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;          APPEND i_itab.&lt;/P&gt;&lt;P&gt;          CLEAR  i_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       ENDLOOP. &lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. reward if useful.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2008 04:30:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-22T04:30:52Z</dc:date>
    <item>
      <title>code for alv grid row selection to internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-alv-grid-row-selection-to-internal-table/m-p/3726568#M896947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;my requirement is i have to select rows in the alv grid output and  move them to the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give provide an example code for this requirement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 04:07:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-alv-grid-row-selection-to-internal-table/m-p/3726568#M896947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T04:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: code for alv grid row selection to internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-alv-grid-row-selection-to-internal-table/m-p/3726569#M896948</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;Selecting rows means in what way???  Will check box is okay for you???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 04:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-alv-grid-row-selection-to-internal-table/m-p/3726569#M896948</guid>
      <dc:creator>abapdeveloper20</dc:creator>
      <dc:date>2008-04-22T04:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: code for alv grid row selection to internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-alv-grid-row-selection-to-internal-table/m-p/3726570#M896949</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;For your final internal table add one more field as flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: flag TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF i_zaw_pol_plan.&lt;/P&gt;&lt;P&gt;DATA :  flag TYPE c.&lt;/P&gt;&lt;P&gt;            INCLUDE STRUCTURE zaw_pol_plan.&lt;/P&gt;&lt;P&gt;DATA : END OF i_zaw_pol_plan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ws_repid    LIKE sy-repid,&lt;/P&gt;&lt;P&gt;           gs_layout   TYPE slis_layout_alv,&lt;/P&gt;&lt;P&gt;           i_fieldcat TYPE slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After passing the data to your final internal table  and creation of field catelog..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ws_repid = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_callback_program       = ws_repid&lt;/P&gt;&lt;P&gt;            i_callback_pf_status_set = 'GUI_STAT'&lt;/P&gt;&lt;P&gt;            i_callback_user_command  = 'STAT'&lt;/P&gt;&lt;P&gt;            is_layout                = gs_layout&lt;/P&gt;&lt;P&gt;            it_fieldcat              = i_fieldcat[]&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab                 = i_zaw_pol_plan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM stat USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA selfield TYPE slis_selfield.&lt;/P&gt;&lt;P&gt;  CASE r_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   WHEN 'MOVE' .&lt;/P&gt;&lt;P&gt;       LOOP AT i_zaw_pol_plan WHERE flag EQ c_x.&lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;          MOVE-CORRESPONDING  i_zaw_pol_plan  TO i_itab.&lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;          APPEND i_itab.&lt;/P&gt;&lt;P&gt;          CLEAR  i_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       ENDLOOP. &lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. reward if useful.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 04:30:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-alv-grid-row-selection-to-internal-table/m-p/3726570#M896949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T04:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: code for alv grid row selection to internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-alv-grid-row-selection-to-internal-table/m-p/3726571#M896950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can di like below in the user command form of your prog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form zf_user_command using r_ucomm like sy-ucomm&lt;/P&gt;&lt;P&gt;                        rs_selfield type slis_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  case r_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when 'SAVE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        read table it_mat index rs_selfield-tabindex into wa_mat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_mat to it_mat2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is  you just need to read your internal table that you are passing to alv from index   " rs_selfield-tabindex " .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;reward if helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 04:38:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-alv-grid-row-selection-to-internal-table/m-p/3726571#M896950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T04:38:33Z</dc:date>
    </item>
  </channel>
</rss>

