<?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 Editable ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133187#M1189845</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 editable alv control.&lt;/P&gt;&lt;P&gt;I want to fetch the customer description, when a user enters a customer code in next field.&lt;/P&gt;&lt;P&gt;How to do this at runtime?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Jan 2009 07:03:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-23T07:03:40Z</dc:date>
    <item>
      <title>Editable ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133187#M1189845</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 editable alv control.&lt;/P&gt;&lt;P&gt;I want to fetch the customer description, when a user enters a customer code in next field.&lt;/P&gt;&lt;P&gt;How to do this at runtime?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 07:03:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133187#M1189845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-23T07:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Editable ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133188#M1189846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You mean to say when ever in ALV if find a customer field then user will give the input in the alv and press enter then the value should be updated if you u r using ALV oops try this because i have used alv opps only so i dont now it will work for normal grid dispaly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You try this example program you will get BCALV_EDIT_03.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have use same program to get the edit field and change the value and it should get updated after pressing enter key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 07:13:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133188#M1189846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-23T07:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Editable ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133189#M1189847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Method modify_cell of class cl_alv_changed_data_protocol to change cell values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer program BCALV_EDIT_04&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 07:14:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133189#M1189847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-23T07:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Editable ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133190#M1189848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code at any user command.&lt;/P&gt;&lt;P&gt;This code will reflect all the changes into the internal table that is being displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* to reflect the data changed into internal table
      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;When you double-click on any cell of alv grid, use this code to fetch the data of the line that you currently clicked, its working:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you double click on the ALV grid line, you will have sy-ucomm = &lt;STRONG&gt;'&amp;amp;IC1'&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when you define a &lt;STRONG&gt;i_callback_user_command&lt;/STRONG&gt; for the &lt;STRONG&gt;FM reuse_alv_grid_display&lt;/STRONG&gt;, and create it as:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM command USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
  DATA : ok_code TYPE sy-ucomm.
  ok_code = ucomm.
  CASE ok_code.
    WHEN '&amp;amp;IC1'. "for double click on alv grid line
      " your code
  ENDCASE.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you have used &lt;STRONG&gt;selfield TYPE slis_selfield&lt;/STRONG&gt;, the field &lt;STRONG&gt;selfield&lt;/STRONG&gt; will hold all the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To know on which row you have clicked and to retain that line, use code:-&lt;/P&gt;&lt;P&gt;Suppose you are currently displaying data from internal table &lt;STRONG&gt;itab&lt;/STRONG&gt; and corresponding to it you have work area &lt;STRONG&gt;wa&lt;/STRONG&gt;.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
read table itab into wa index selfield-tabindex. "index value of line you clicked
" now you have the contents of line that you double clicked currently
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now to know the field name that you clicked, use:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
selfield-fieldname " will fetch you the name of field that you clicked
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now using the work-area and the name of field that you clicked, you can easily make out the details of the field i.e., field name and field value and you can code as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 07:51:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133190#M1189848</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-01-23T07:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Editable ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133191#M1189849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ur reply.&lt;/P&gt;&lt;P&gt;I reffered your code, but It is too complex for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you just give me the example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want customer name field to be fetched from std table into alv when a user enters or changes cutomer code field in alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 07:58:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/5133191#M1189849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-23T07:58:20Z</dc:date>
    </item>
  </channel>
</rss>

