<?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 Multiple Input Rows In ALV Grid (Editable) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196708#M129842</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;I have an editable ALV grid and need to have multiple blank rows ready for input. Something similar to what happens when you click the "New Entries" button in SM30 (Table Maintainance).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a local function for appending lines in the ALV grid toolbar but this only allows a single entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have replaced the local function with my own button (same icon etc) and on user_command event, I am appending several blank lines to my output table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However these lines are not being shown on the screen. I have looked through the layout and field catalog but there is no field to allow blank lines to be shown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My 2 questions are:&lt;/P&gt;&lt;P&gt;1. Is there some standard way of entering multiple entries in ALV Grid Editable.&lt;/P&gt;&lt;P&gt;2. If not then how to allow blank lines to be shown as ready for input. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if someone could suggest a way to do error checking for all entries on the screen especially duplicate entries I will be extremely grateful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Preet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jan 2006 15:05:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-24T15:05:35Z</dc:date>
    <item>
      <title>Multiple Input Rows In ALV Grid (Editable)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196708#M129842</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;I have an editable ALV grid and need to have multiple blank rows ready for input. Something similar to what happens when you click the "New Entries" button in SM30 (Table Maintainance).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a local function for appending lines in the ALV grid toolbar but this only allows a single entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have replaced the local function with my own button (same icon etc) and on user_command event, I am appending several blank lines to my output table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However these lines are not being shown on the screen. I have looked through the layout and field catalog but there is no field to allow blank lines to be shown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My 2 questions are:&lt;/P&gt;&lt;P&gt;1. Is there some standard way of entering multiple entries in ALV Grid Editable.&lt;/P&gt;&lt;P&gt;2. If not then how to allow blank lines to be shown as ready for input. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if someone could suggest a way to do error checking for all entries on the screen especially duplicate entries I will be extremely grateful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Preet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 15:05:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196708#M129842</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-24T15:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Input Rows In ALV Grid (Editable)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196709#M129843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Preet,&lt;/P&gt;&lt;P&gt;   What you can do is to append empty lines to your final internal table itself and see if your able to achieve your requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 15:09:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196709#M129843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-24T15:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Input Rows In ALV Grid (Editable)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196710#M129844</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;I did try to append lines to my internal table at the "user_command" event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The grid does not show the lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the event data_changed I can see the blank lines in the debugger. I have also set the style for the blank lines to be enabled for the specific cells as required. Still doesnt seem to display it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I remember that when using the REUSE Functions you could set a field to allow initial lines to be displayed. But in the LVC_ field catalog and layouts there doesnt seem to be any such field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Preet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 15:15:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196710#M129844</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-24T15:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Input Rows In ALV Grid (Editable)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196711#M129845</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;populate blank rows(how many ever you want append them and give the option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layout-edit = 'X'.&lt;/P&gt;&lt;P&gt;and pass the layout to FM,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 15:16:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196711#M129845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-24T15:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Input Rows In ALV Grid (Editable)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196712#M129846</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;I think I got a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the user_command event calling the method of the grid "refresh_table_display" shows multiple input rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any specific method or event to validate the input rows on the grid?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Preet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 15:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196712#M129846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-24T15:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Input Rows In ALV Grid (Editable)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196713#M129847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;there is no method or event to validate, &lt;/P&gt;&lt;P&gt;you just need to loop the output internal table and need to validate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2006 16:01:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196713#M129847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-24T16:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Input Rows In ALV Grid (Editable)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196714#M129848</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;You can use DATA_CHANGED event to validate input data before PAI is executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rao A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2006 13:14:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196714#M129848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-26T13:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Input Rows In ALV Grid (Editable)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196715#M129849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Preet!&lt;/P&gt;&lt;P&gt;You can easily do whatever checks you wish. You should declare an event handling method for event DATA_CHANGED and call the ADD_PROTOCOL_ENTRY method of the ER_DATA_CHANGED event parameter (it's an object of the class CL_ALV_CHANGED_DATA_PROTOCOL). You must not forget to set handler for your ALV grid.&lt;/P&gt;&lt;P&gt;For example, this piece of code checks for all changed fields resulting in error message if they are initial. In short, this makes all the fields obligatory.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;METHODS: on_data_changed FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING er_data_changed.
...
SET HANDLER your_object-&amp;gt;on_data_changed FOR your_alv_grid.
...
METHOD on_data_changed.
DATA: s_mod_cell TYPE lvc_s_modi.
LOOP AT er_data_changed-&amp;gt;mt_mod_cells INTO s_mod_cell.
    IF s_mod_cell-value IS INITIAL.
*       issue message 'Make an entry in all required fields'
        CALL METHOD er_data_changed-&amp;gt;add_protocol_entry
          EXPORTING i_msgid     = '00' 
                    i_msgno     = '055' 
                    i_msgty     = 'E'
                    i_fieldname = s_mod_cell-fieldname
                    i_row_id    = s_mod_cell-row_id.
    ENDIF.
ENDMETHOD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Furthermore, if you make your class inherited from CL_GUI_ALV_GRID you can make use of protected attribute MT_OUTTAB which is a data object referencing your output table. Then you can have:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;outtab&amp;gt; TYPE STANDARD TABLE.
ASSIGN me-&amp;gt;mt_outtab-&amp;gt;* TO &amp;lt;outtab&amp;gt;.
* do whatever you want with &amp;lt;outtab&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Igor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. Regarding the blank lines that you need, what's wrong with standard ALV grid buttons "Append row" and "Insert row" which appear whenever the grid is editable (unless you deliberately remove them)? They work just fine with me (just like on SM30). I don't see reason for programatically appending lines to your internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2006 14:16:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196715#M129849</guid>
      <dc:creator>former_member185943</dc:creator>
      <dc:date>2006-01-26T14:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Input Rows In ALV Grid (Editable)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196716#M129850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Preet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the following method for change entries :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If all entries are ok, ALV transferes new values to the output&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;table which you then can modify.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD G_GRID-&amp;gt;CHECK_CHANGED_DATA&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      E_VALID = L_VALID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF L_VALID EQ 'X'.&lt;/P&gt;&lt;P&gt;    LOOP AT PT_OUTTAB INTO LS_OUTTAB.&lt;/P&gt;&lt;P&gt;---Move your change enteries to another internal table...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lanka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2006 14:27:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196716#M129850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-26T14:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Input Rows In ALV Grid (Editable)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196717#M129851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Preet!&lt;/P&gt;&lt;P&gt;If you find answer(s) useful, it would be nice to reward points.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2006 06:53:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-input-rows-in-alv-grid-editable/m-p/1196717#M129851</guid>
      <dc:creator>former_member185943</dc:creator>
      <dc:date>2006-02-01T06:53:24Z</dc:date>
    </item>
  </channel>
</rss>

