<?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: editable alv in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646064#M1444160</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See since you want the new added row to be editable the fieldcatalog for all the columns except the one which should be non-editable must be set to editable that is &lt;STRONG&gt;wa_fieldcat-edit = 'X'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the structure of your internal table put a field for Celltab as follows,&lt;/P&gt;&lt;P&gt;celltab type lvc_t_styl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the build catalog write the following,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_fieldcat changing IT_fieldcat type lvc_t_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fs_layout-stylefname = 'CELLTAB'. &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;"----&amp;gt; this is very important&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform set_data_change changing it_data[]. &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt; Now in this form set the property(disable) of all the rows which are in the internal table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="green" __jive_macro_name="color"&gt;So in the output you will get all the rows in non-editable mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD grid1-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      is_layout            = fs_layout   &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt; we have passed the above layout to ALV&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;      is_variant           = ls_variant&lt;/P&gt;&lt;P&gt;      i_save               = 'A'&lt;/P&gt;&lt;P&gt;      i_default            = 'X'&lt;/P&gt;&lt;P&gt;      it_toolbar_excluding = lt_exclude&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      it_outtab            = it_data&lt;/P&gt;&lt;P&gt;      it_fieldcatalog      = it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form SET_DATA_CHANGE  changing p_it_data LIKE IT_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at p_it_data into ls_outtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_mode = cl_gui_alv_grid=&amp;gt;mc_style_disabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ls_celltab-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;  ls_celltab-style = l_mode.&lt;/P&gt;&lt;P&gt;  INSERT ls_celltab into table p_lt_celltab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the row in your internal table becomes un-editable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when you add  a new row since you fieldcatalog are in edit mode and the new entry is not in the internal table the new row become editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you want further help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhijit G. Bokar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Feb 2010 08:00:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-04T08:00:55Z</dc:date>
    <item>
      <title>editable alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646059#M1444155</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; i am using editable alv   and i want that the output that comes in the editable alv should be in a way that none of the fields are editable  but when i add a new row to this alv the all the fields become editable except 1 field . how can i do ?this please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 05:34:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646059#M1444155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-04T05:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: editable alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646060#M1444156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at demo report BCALV_EDIT_04.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 05:58:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646060#M1444156</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2010-02-04T05:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: editable alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646061#M1444157</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;While preparing fieldcatalog don't sepcify the parameter (FILEDCATLOG-EXIT = 'X') for the field you don't want to be editable...For rest of the fields pass it as FILEDCATLOG-EXIT = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 05:59:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646061#M1444157</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2010-02-04T05:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: editable alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646062#M1444158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Arpit ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use layout to achieve it ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Layout structure&lt;/P&gt;&lt;P&gt;DATA gs_layout TYPE lvc_s_layo .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set the layout&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    gs_layout-stylefname = 'CELLTAB'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inyour internal tbale put column with name CELLTAB .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF it_list,&lt;/P&gt;&lt;P&gt;        f1 type char,&lt;/P&gt;&lt;P&gt;        f2 type char ,&lt;/P&gt;&lt;P&gt;        celltab TYPE LVC_T_STYL,&lt;/P&gt;&lt;P&gt;      END OF it_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gt_list TYPE STANDARD TABLE OF it_list,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA LS_CELLTAB TYPE LVC_S_STYL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE gt_list LINES lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass filed name ...&lt;/P&gt;&lt;P&gt;  ls_CELLTAB-FIELDNAME = 'f1' .        &lt;/P&gt;&lt;P&gt;pass the style (Disable)                     &lt;/P&gt;&lt;P&gt;  ls_CELLTAB-STYLE = CL_GUI_ALV_GRID=&amp;gt;MC_STYLE_DISABLED.&lt;/P&gt;&lt;P&gt;  APPEND ls_CELLTAB TO WA_LIST-CELLTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass filed name ...&lt;/P&gt;&lt;P&gt;  ls_CELLTAB-FIELDNAME = 'f2' .        &lt;/P&gt;&lt;P&gt;pass the style (Enable)                     &lt;/P&gt;&lt;P&gt;  ls_CELLTAB-STYLE = CL_GUI_ALV_GRID=&amp;gt;MC_STYLE_ENABLED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND ls_CELLTAB TO WA_LIST-CELLTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify internal table from WA_LIST index  lines TRANSPORTING celltab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 06:12:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646062#M1444158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-04T06:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: editable alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646063#M1444159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Arpit ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above code can  make your as many desired  coloumn as  you want of last row editable  editable or non edittable...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and Regards...&lt;/P&gt;&lt;P&gt;Priyank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 06:15:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646063#M1444159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-04T06:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: editable alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646064#M1444160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See since you want the new added row to be editable the fieldcatalog for all the columns except the one which should be non-editable must be set to editable that is &lt;STRONG&gt;wa_fieldcat-edit = 'X'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the structure of your internal table put a field for Celltab as follows,&lt;/P&gt;&lt;P&gt;celltab type lvc_t_styl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the build catalog write the following,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_fieldcat changing IT_fieldcat type lvc_t_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fs_layout-stylefname = 'CELLTAB'. &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;"----&amp;gt; this is very important&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform set_data_change changing it_data[]. &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt; Now in this form set the property(disable) of all the rows which are in the internal table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="green" __jive_macro_name="color"&gt;So in the output you will get all the rows in non-editable mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD grid1-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      is_layout            = fs_layout   &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt; we have passed the above layout to ALV&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;      is_variant           = ls_variant&lt;/P&gt;&lt;P&gt;      i_save               = 'A'&lt;/P&gt;&lt;P&gt;      i_default            = 'X'&lt;/P&gt;&lt;P&gt;      it_toolbar_excluding = lt_exclude&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      it_outtab            = it_data&lt;/P&gt;&lt;P&gt;      it_fieldcatalog      = it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form SET_DATA_CHANGE  changing p_it_data LIKE IT_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at p_it_data into ls_outtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_mode = cl_gui_alv_grid=&amp;gt;mc_style_disabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ls_celltab-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;  ls_celltab-style = l_mode.&lt;/P&gt;&lt;P&gt;  INSERT ls_celltab into table p_lt_celltab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the row in your internal table becomes un-editable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when you add  a new row since you fieldcatalog are in edit mode and the new entry is not in the internal table the new row become editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you want further help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhijit G. Bokar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 08:00:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-alv/m-p/6646064#M1444160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-04T08:00:55Z</dc:date>
    </item>
  </channel>
</rss>

