<?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: Help reg editable ALV grid in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780678#M1464465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi yuvaraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u pls  guide me how to import the class into a local class. I'm getting error " Access to protected method is not allowed".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Revathi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Apr 2010 04:36:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-21T04:36:57Z</dc:date>
    <item>
      <title>Help reg editable ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780672#M1464459</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;My requirement is to hide the append row button in editable alv grid  based on the condition, say if one has appended 20 rows then I need to disable the button so that only n rows could be appended. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I searched in the forum and also looked some standard alv programs but can't' find something relevant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls can anyone suggest me regarding. Is there any standard method (I'm using classes) available for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Revathi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 05:46:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780672#M1464459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T05:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help reg editable ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780673#M1464460</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 this example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/ABAP/HIDE" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/HIDE&lt;/A&gt;&lt;EM&gt;Toolbar&lt;/EM&gt;buttons&lt;EM&gt;in&lt;/EM&gt;ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards and Best wishes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 07:00:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780673#M1464460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T07:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help reg editable ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780674#M1464461</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;Thanks for your response. Th link addressed only the normal scenario and doesn't suit my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Revathi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 07:17:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780674#M1464461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T07:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help reg editable ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780675#M1464462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use parameter IT_TOOLBAR_EXCLUDING in SET_TABLE_FOR_FIRST_DISPLAY. In that, pass internal table of type UI_FUNCTIONS. In UI_FUNCTIONS append MC_FC_LOC_APPEND_ROW attribute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD o_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;   exporting&lt;/P&gt;&lt;P&gt;      IT_TOOLBAR_EXCLUDING = lt_func&lt;/P&gt;&lt;P&gt;     CHANGING&lt;/P&gt;&lt;P&gt;       it_outtab                     = lt_vbak&lt;/P&gt;&lt;P&gt;       IT_FIELDCATALOG               = lt_fcat.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;endform.                    " displayvbak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form exclude .&lt;/P&gt;&lt;P&gt;  lv_func = cl_gui_alv_grid=&amp;gt;MC_FC_LOC_APPEND_ROW.&lt;/P&gt;&lt;P&gt;  append lv_func to lt_func.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lv_func = cl_gui_alv_grid=&amp;gt;mc_fc_print.&lt;/P&gt;&lt;P&gt;  append lv_func to lt_func.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " exclude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 13:42:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780675#M1464462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T13:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help reg editable ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780676#M1464463</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;Thanks for the reply. I have used the same but i need to enable and disable insert button based on condition, say if one has clicked insert button 10 times, then it should be disabled. Hope its clear now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Revathi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 06:22:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780676#M1464463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-20T06:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help reg editable ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780677#M1464464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi trevathi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a similar requirement. I made a make-shift arrangement for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Removed the whole toolbar and used SET_TOOLBAR_BUTTONS and displayed all the buttons which were needed. REMEMBER !! This method is &lt;STRONG&gt;protected&lt;/STRONG&gt; so you cant use it directly. &lt;STRONG&gt;TRICK  !!&lt;/STRONG&gt;  cl_gui_alv_grid has to be imported in your local class and then access SET_TOOLBAR_BUTTONS. in this, pass the table of type TOOLBAR_TABLE append all the buttons you need. &lt;/P&gt;&lt;P&gt;There is a field DISABLED in structure STB_BUTTON using this, you can disable the toolbar button.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 08:43:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780677#M1464464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-20T08:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help reg editable ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780678#M1464465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi yuvaraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u pls  guide me how to import the class into a local class. I'm getting error " Access to protected method is not allowed".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Revathi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 04:36:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780678#M1464465</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-21T04:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help reg editable ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780679#M1464466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi trevathi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code which shows how you can access protected method SET_TOOLBAR_BUTTONS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  YTEST5                                  .


data : cont type ref to cl_gui_custom_container.

data lt_toolbar type TTB_BUTTON.

class lcl_alv_grid  DEFINITION create public INHERITING FROM cl_gui_alv_grid.
  PUBLIC SECTION.
    methods m1.
endclass.

class lcl_alv_grid IMPLEMENTATION.
    method m1.
        
      CALL METHOD  SET_TOOLBAR_BUTTONS 
      EXPORTING 
        
        TOOLBAR_TABLE = lt_toolbar.
        
    ENDMETHOD.
endclass.


START-OF-SELECTION.
data : o_alv_grid type ref to lcl_alv_grid.


create object cont EXPORTING
           CONTAINER_NAME    = 'CUST_CONT'.

       CREATE OBJECT o_alv_grid
         EXPORTING
           I_PARENT          = CONT.


CALL METHOD o_alv_grid-&amp;gt;m1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need any further information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 07:11:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-reg-editable-alv-grid/m-p/6780679#M1464466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-21T07:11:25Z</dc:date>
    </item>
  </channel>
</rss>

