<?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 ALVGrid:Making protected key fields as editable when adding a new entry in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alvgrid-making-protected-key-fields-as-editable-when-adding-a-new-entry/m-p/4649591#M1094191</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi colleagues,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like my ALV Grid to work like a maintenance view: only non key fields are available for editing, but when click the ALV toolbar button for adding a new entry, all fields of this entry should be editable!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For now I have the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ls_fcat TYPE lvc_s_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_structure_name = iv_tabname&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        ct_fieldcat      = rt_fcat&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        OTHERS           = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF iv_edit = lcl_dialog_const=&amp;gt;gc_true.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    set special values&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ls_fcat-edit = lcl_dialog_const=&amp;gt;gc_true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      modify rt_fcat from ls_fcat transporting edit&lt;/P&gt;&lt;P&gt;            where key = lcl_dialog_const=&amp;gt;gc_false.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this code I get the key fields blocked for editing even with a new record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate a tip for solving this issue!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Oct 2008 12:56:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-14T12:56:02Z</dc:date>
    <item>
      <title>ALVGrid:Making protected key fields as editable when adding a new entry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alvgrid-making-protected-key-fields-as-editable-when-adding-a-new-entry/m-p/4649591#M1094191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi colleagues,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like my ALV Grid to work like a maintenance view: only non key fields are available for editing, but when click the ALV toolbar button for adding a new entry, all fields of this entry should be editable!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For now I have the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ls_fcat TYPE lvc_s_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_structure_name = iv_tabname&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        ct_fieldcat      = rt_fcat&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        OTHERS           = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF iv_edit = lcl_dialog_const=&amp;gt;gc_true.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    set special values&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ls_fcat-edit = lcl_dialog_const=&amp;gt;gc_true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      modify rt_fcat from ls_fcat transporting edit&lt;/P&gt;&lt;P&gt;            where key = lcl_dialog_const=&amp;gt;gc_false.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this code I get the key fields blocked for editing even with a new record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate a tip for solving this issue!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 12:56:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alvgrid-making-protected-key-fields-as-editable-when-adding-a-new-entry/m-p/4649591#M1094191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T12:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: ALVGrid:Making protected key fields as editable when adding a new entry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alvgrid-making-protected-key-fields-as-editable-when-adding-a-new-entry/m-p/4649592#M1094192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that you need to control using the Styles(Enable/Disable). &lt;/P&gt;&lt;P&gt;Check the Program BCALV_EDIT_02&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 13:25:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alvgrid-making-protected-key-fields-as-editable-when-adding-a-new-entry/m-p/4649592#M1094192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T13:25:17Z</dc:date>
    </item>
  </channel>
</rss>

