<?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: getting data from alv in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263499#M1215519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Poonam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

* to reflect the data changed into internal table try doing like this:

      DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
 
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
 
      IF NOT ref_grid IS INITIAL.
        CALL METHOD ref_grid-&amp;gt;check_changed_data.
      ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regrds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Mar 2009 06:36:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-16T06:36:45Z</dc:date>
    <item>
      <title>getting data from alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263495#M1215515</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 have a report which display's the output in ALV grid. i also have checkbox to all the rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my requirement is that if i check any checkbox of a particular row, i should be able to take that data in intenal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to achieve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 06:26:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263495#M1215515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-16T06:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: getting data from alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263496#M1215516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to write the following code in the User-Command routine : &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: GD_REPID LIKE SY-REPID,
  REF_GRID TYPE REF TO CL_GUI_ALV_GRID.

  DATA: L_VALID TYPE C.

*Code to reflect the changes done in the internal table

  IF REF_GRID IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
      IMPORTING
        E_GRID = REF_GRID.
  ENDIF.

  IF NOT REF_GRID IS INITIAL.

    CALL METHOD REF_GRID-&amp;gt;CHECK_CHANGED_DATA
      IMPORTING
        E_VALID = L_VALID.

  ENDIF.

LOOP AT IT_MAT WHERE CHK = 'X'.
"Process your logic here
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Rock.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 06:30:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263496#M1215516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-16T06:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: getting data from alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263497#M1215517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A little search could solve you problem more quickly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer&amp;gt;&lt;SPAN __jive_macro_name="thread" id="137930"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 06:35:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263497#M1215517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-16T06:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: getting data from alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263498#M1215518</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 this wiki code by me on &lt;STRONG&gt;ALV Grid Display with checkbox to process selected records at runtime&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It will definitely help you.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 06:36:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263498#M1215518</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-03-16T06:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: getting data from alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263499#M1215519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Poonam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

* to reflect the data changed into internal table try doing like this:

      DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
 
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
 
      IF NOT ref_grid IS INITIAL.
        CALL METHOD ref_grid-&amp;gt;check_changed_data.
      ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regrds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 06:36:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263499#M1215519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-16T06:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: getting data from alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263500#M1215520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The below mention process is to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)First keep a checkbox in your ALV display so that you can mark the row that you wan to delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to do so what you have to do is keep a field like below in your final ITAB that you want to ALVdisplay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BEGIN OF T_final ,&lt;/P&gt;&lt;P&gt;chk(1) TYPE c, for making checkbox..&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;..............&lt;/P&gt;&lt;P&gt;END OF T_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Then when you create the field catalog for the checkbox(chk field of your ITAB)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write down the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA_fieldcat-fieldname = 'CHK'.&lt;/P&gt;&lt;P&gt;WA_fieldcat-seltext_m = 'CheckBox'.&lt;/P&gt;&lt;P&gt;WA_fieldcat-checkbox = 'X'.&lt;/P&gt;&lt;P&gt;WA_fieldcat-edit = 'X' .&lt;/P&gt;&lt;P&gt;WA_fieldcat-input = 'X'.&lt;/P&gt;&lt;P&gt;WA_fieldcat-tabname = 'IT_FINAL'.&lt;/P&gt;&lt;P&gt;WA_fieldcat-col_pos = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND WA_fieldcat TO IT_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR WA_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Declare a data at your data section of the report&lt;/P&gt;&lt;P&gt;DATA : lc_s_glay TYPE lvc_s_glay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then before calling REUSE_ALV_GRID_DISPLAY&lt;/P&gt;&lt;P&gt;just write down the following piece of code&lt;/P&gt;&lt;P&gt;lc_s_glay-edt_cll_cb = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the REUSE_ALV_GRID_DISPLAY FM&lt;/P&gt;&lt;P&gt;you must set the follwing 2 Exporting Parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i) i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;P&gt;ii) i_grid_settings = lc_s_glay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i) write down the following subroutine........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM user_command USING I_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;DATA: l_out_string TYPE string,&lt;/P&gt;&lt;P&gt;l_out_final TYPE ekpo-menge,&lt;/P&gt;&lt;P&gt;l_cntr TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE I_r_ucomm.&lt;/P&gt;&lt;P&gt;WHEN 'SEL1'. assuming your Fcode&lt;/P&gt;&lt;P&gt;loop at itab into wa_itab where chk = 'X'.&lt;/P&gt;&lt;P&gt;append wa_itab to itab2.&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;hope it solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sarbajit Majumdar on Mar 16, 2009 12:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 07:07:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-data-from-alv/m-p/5263500#M1215520</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2009-03-16T07:07:24Z</dc:date>
    </item>
  </channel>
</rss>

