<?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 Problem While Saving the editable ALV GRID in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253743#M1631339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a scenario in which i am display the ALV(using class) with some data in the custom container of module pool screen in the non-editable mode.Also i have save and edit buttons.If i click the edit button i have written the code to edit the some columns in the ALV grid, it is working fine.After editing it,when i click the save button then ALV has to refreshed with edited data and then it should go to non editable mode but it is not working.I have written the code for changing the editable ALv to non editable mode as follows :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method c_alvgd-&amp;gt;set_ready_for_input&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      i_ready_for_input = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****Row and column of the alv are refreshed after changing values&lt;/P&gt;&lt;P&gt;  stable-row = 'X'.&lt;/P&gt;&lt;P&gt;  stable-col = 'X'.&lt;/P&gt;&lt;P&gt;*REfreshed ALV display with the changed values&lt;/P&gt;&lt;P&gt;*This ALV is non editable and contains new values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method c_alvgd-&amp;gt;refresh_table_display&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      is_stable = stable&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      finished  = 1&lt;/P&gt;&lt;P&gt;      others    = 2.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you Suggest me solution for this issue ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;R.Dhineshraj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Oct 2011 14:23:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-10-10T14:23:49Z</dc:date>
    <item>
      <title>Problem While Saving the editable ALV GRID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253743#M1631339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a scenario in which i am display the ALV(using class) with some data in the custom container of module pool screen in the non-editable mode.Also i have save and edit buttons.If i click the edit button i have written the code to edit the some columns in the ALV grid, it is working fine.After editing it,when i click the save button then ALV has to refreshed with edited data and then it should go to non editable mode but it is not working.I have written the code for changing the editable ALv to non editable mode as follows :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method c_alvgd-&amp;gt;set_ready_for_input&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      i_ready_for_input = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****Row and column of the alv are refreshed after changing values&lt;/P&gt;&lt;P&gt;  stable-row = 'X'.&lt;/P&gt;&lt;P&gt;  stable-col = 'X'.&lt;/P&gt;&lt;P&gt;*REfreshed ALV display with the changed values&lt;/P&gt;&lt;P&gt;*This ALV is non editable and contains new values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method c_alvgd-&amp;gt;refresh_table_display&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      is_stable = stable&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      finished  = 1&lt;/P&gt;&lt;P&gt;      others    = 2.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you Suggest me solution for this issue ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;R.Dhineshraj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 14:23:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253743#M1631339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-10T14:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem While Saving the editable ALV GRID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253744#M1631340</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;class CL_GUI_ALV_GRID has three flags M_EDIT, M_EDIT_COLS and M_EDIT_GLOBAL. Your call of method &lt;STRONG&gt;set_ready_for_input&lt;/STRONG&gt; resets the M_EDIT_GLOBAL flag. But if there are any fields remaining in field catalogue with the marked EDIT flag, the other flags will not be resetted and the GRID is still editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please change your fieldcatalogue and remove all marked EDIT flags before calling method &lt;STRONG&gt;set_ready_for_input&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will be enough to get a non-editable grid again.&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;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 06:40:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253744#M1631340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T06:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem While Saving the editable ALV GRID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253745#M1631341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dhinesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose that you are able to get your changes values on screen but not able to get your field in DISPLAY mode from editable mode, let me know if this is not your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you press SAVE, after the PAI, again PBO will run and hence the editable code for that field will overwrite which will keep it editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, do something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: gv_edit value 'X'.....  "global variable in TOP include
..............
PBO....

loop at ...

if gv_edit = 'X'.
 CALL METHOD lo_alv-&amp;gt;set_ready_for_input
  EXPORTING
    i_ready_for_input = 1.
else.
CALL METHOD lo_alv-&amp;gt;set_ready_for_input
  EXPORTING
    i_ready_for_input = 0.
endif.
endloop.
........
...........

PAI.

when 'SAVE'.

gv_edit =  space.

When 'EDIT'.

gv_edit = 'X'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Diwakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 07:26:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253745#M1631341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T07:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem While Saving the editable ALV GRID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253746#M1631342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diwakar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.I have done all those things which you have mentioned still it is not going to non-editable mode and also i am not able to get the chnaged data after editing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;R.Dhineshraj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 07:55:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253746#M1631342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-12T07:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem While Saving the editable ALV GRID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253747#M1631343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dhinesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use method CHECK_CHANGED_DATA for new data to be visible in itab, search for avail info in SCN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For display mode activate, did you debug and check that on SAVE, you could mark it as ready_for_input 0 .?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you will have field name STYLE in your itab ?&lt;/P&gt;&lt;P&gt;Use, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

 CALL METHOD lo_alv-&amp;gt;set_ready_for_input
   EXPORTING
    i_ready_for_input = 0.

    gs_cstyle-fieldname = 'FNAME'.
    gs_cstyle-style     = cl_gui_alv_grid=&amp;gt;MC_STYLE_DISABLED.
    APPEND gs_cstyle TO Gs_itab-style.

   modify gt_itab from gs_itab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Diwakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 10:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-saving-the-editable-alv-grid/m-p/8253747#M1631343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-12T10:34:06Z</dc:date>
    </item>
  </channel>
</rss>

