<?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: Conditinal Editable Alv in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802235#M914472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;fatch only 2 rows with index soo u can edit only 2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 May 2008 10:22:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-26T10:22:44Z</dc:date>
    <item>
      <title>Conditinal Editable Alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802230#M914467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have designed one alv having PO Quantity which is editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same time i want restrict 2nos of PO (says 40000000145. 400000000544), as "not Editable".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to restrict that....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same way i want to design Table Control Conditinal Editable Fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 05:29:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802230#M914467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T05:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Conditinal Editable Alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802231#M914468</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;Check the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sapdev.co.uk/reporting/alv/alvgrid_editable.htm" target="test_blank"&gt;http://sapdev.co.uk/reporting/alv/alvgrid_editable.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 06:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802231#M914468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T06:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Conditinal Editable Alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802232#M914469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi anee,&lt;/P&gt;&lt;P&gt;You can follow the following steps to code your requirement&lt;/P&gt;&lt;P&gt;you must be aware of the method&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL METHOD g_grid1-&amp;gt;set_table_for_first_display
    EXPORTING
      is_layout            = gs_layout_grid
      it_toolbar_excluding = gt_exclude_grid
    CHANGING
      it_fieldcatalog      = gt_fieldcat_batch
    it_outtab            =        gt_list[].
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to pupulate proper values to make specific cells as non-editable/editable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. declare gt_list as&lt;/P&gt;&lt;P&gt;DATA BEGIN OF gt_list OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE zbm_ast_assum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA cellstyles TYPE lvc_t_styl.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA END OF gt_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here in your structure add new table field  called cellstyles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. make &lt;STRONG&gt;gs_layout_grid&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;the grid layout table as of type 'CELLSTYLES'&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
gs_layout_grid-stylefname = 'CELLSTYLES'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;3. make field catalog for all columns as editable.&lt;/P&gt;&lt;P&gt;4. now code to make specific cells as non-editable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data ls_stylerow type lvc_s_styl
data lt_styletab type lvc_t_styl

  LOOP AT gt_list INTO ls_listrow.
    IF ls_listrow-zassum = 'P_032'.
      ls_stylerow-fieldname = 'ZASSET'.
note :here i m making field zasset as non-editable when my data in another field zassum is P_032
in your case you can put condition as per your requirements

      ls_stylerow-style = cl_gui_alv_grid=&amp;gt;mc_style_disabled.
      APPEND ls_stylerow TO lt_styletab.
    ENDIF.
 INSERT LINES OF lt_styletab INTO ls_listrow-cellstyles INDEX sy-tabix.
    MODIFY gt_list FROM ls_listrow.
  ENDLOOP
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
5.  CALL METHOD g_grid1-&amp;gt;set_frontend_fieldcatalog
    EXPORTING
      it_fieldcatalog = gt_fieldcat_batch.

  CALL METHOD g_grid1-&amp;gt;set_table_for_first_display
    EXPORTING
      is_layout            = gs_layout_grid
      it_toolbar_excluding = gt_exclude_grid
    CHANGING
      it_fieldcatalog      = gt_fieldcat_batch
    it_outtab            =        gt_list[].
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;6. last step is to refresh the display&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL METHOD g_grid1-&amp;gt;refresh_table_display.
  CALL METHOD g_grid1-&amp;gt;set_ready_for_input
    EXPORTING
      i_ready_for_input = '1'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;follow the sequence  and you will get the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;pratyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 07:12:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802232#M914469</guid>
      <dc:creator>former_member5472</dc:creator>
      <dc:date>2008-05-22T07:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Conditinal Editable Alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802233#M914470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you send me complete code piyush.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for repling.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 09:31:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802233#M914470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T09:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Conditinal Editable Alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802234#M914471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Anee&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample report &lt;STRONG&gt;PROGRAM BCALV_EDIT_02&lt;/STRONG&gt; shows you all you need to know about editability on cell level in ALV grids.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROGRAM BCALV_EDIT_02.
*&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;
* Purpose:
* ~~~~~~~~
* This report illustrates how to set chosen cells of an
* ALV Grid Control editable. (See BCALV_EDIT_01 for an overview
* of possible states).
* Remark: You may set the states for chosen columns using field
*         EDIT of the fieldcatalog, see BCALV_EDIT_03.
*-----------------------------------------------------------------
* To check program behavior
* ~~~~~~~~~~~~~~~~~~~~~~~~~
* Switch to the state editable and ready for input.
* You may then change the
* price of flights where the capacity of a plane is greater or equal
* than 300 seats.
*-----------------------------------------------------------------
* Essential steps (search for '§')
* ~~~~~~~~~~~~~~~
* 1.Extend your output table for a field, e.g., CELLTAB, that holds
*   information about the edit status of each cell for the
*   corresponding row (the table type is SORTED!).
* 2.After selecting data, set edit status for each row in a loop
*   according to field SEATSMAX.
* 2a.Use attribute CL_GUI_ALV_GRID=&amp;gt;MC_STYLE_ENABLED to set a cell
*    to status "editable".
* 2b.Use attribute CL_GUI_ALV_GRID=&amp;gt;MC_STYLE_DISABLED to set a cell
*    to status "non-editable".
* 2c.Copy your celltab to the celltab of the current row of gt_outtab.
* 3.Provide the fieldname of the celltab field by using field
*   STYLEFNAME of the layout structure.
*&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 03:29:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802234#M914471</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-05-23T03:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conditinal Editable Alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802235#M914472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;fatch only 2 rows with index soo u can edit only 2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2008 10:22:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conditinal-editable-alv/m-p/3802235#M914472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-26T10:22:44Z</dc:date>
    </item>
  </channel>
</rss>

