<?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: regarding ALV Editing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-alv-editing/m-p/2498117#M564311</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out these sample programs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_01  	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This program illustrates how the events for print processing PRINT_TOP_OF_PAGE, &lt;/P&gt;&lt;P&gt;PRINT_END_OF_PAGE, PRINT_TOP_OF_LIST,PRINT_END_OF_LIST are handled. The &lt;/P&gt;&lt;P&gt;corresponding handler methods control the appearance of the list printed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_02 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Show a detail list in an amodal window. There is no second dynro needed in contrast to &lt;/P&gt;&lt;P&gt;BCALV_GRID_03.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_03 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This program implements a function on event DOUBLE_CLICK. According to the selected line data &lt;/P&gt;&lt;P&gt;from table SBOOK is selected and displayed by a second ALV Control in a dialog dynpro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_04 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Illustrates the use of exceptions (lights or leds). According to the values of SFLIGHT-SEATSOCC, the &lt;/P&gt;&lt;P&gt;lights are set to 1 (red), 2 (yellow) or 3 (green).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_05 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Demonstrate the creation of an own toolbar button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_06 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Demonstrate the creation of an own context menu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_07 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append a menu button to the standard toolbar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_08 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append a menu with default button to the standard toolbar.  It is exactly the same as &lt;/P&gt;&lt;P&gt;BCALVC_TB_WITH_MENU except for methods HANDLE_MENU_BUTTON and HANDLE_TOOLBAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Editable ALV grids&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_01 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This report illustrates the simplest case of using an editable/noneditable ALV Grid Control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_02 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This report illustrates how to set chosen cells of an ALV Grid Control editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_03 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example the user may change values of fields SEATSOCC (occupied seats) and/or PLANETYPE. &lt;/P&gt;&lt;P&gt;The report checks the input value(s) semantically and provides protocol messages in case of error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_04 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This report illustrates how to add and remove lines to a table using the ALV Grid Control and how to &lt;/P&gt;&lt;P&gt;implement the saving of the new data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_05 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example shows how to use checkboxes within an ALV Grid Control. You learn:&lt;/P&gt;&lt;P&gt;	(1) how to define a column for editable checkboxes for an attribute of your list&lt;/P&gt;&lt;P&gt;	(2) how to evaluate the checked checkboxes&lt;/P&gt;&lt;P&gt;	(3) how to switch between editable and non-editable checkboxes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_06 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example shows how to define a dropdown listbox for all cells of one column in an editable ALV &lt;/P&gt;&lt;P&gt;Grid Control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_07 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example shows how to define dropdown listboxes for particular cells of your output table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_08 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This report implements an ALV Grid Control with an application specific F4 help. The following aspects &lt;/P&gt;&lt;P&gt;are dealt with:&lt;/P&gt;&lt;P&gt;	(1) how to replace the standard f4 help&lt;/P&gt;&lt;P&gt;	(2) how to pass the selected value to the ALV Grid Control&lt;/P&gt;&lt;P&gt;	(3) how to build an f4 help, whose value range depend on a value of another cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 21 Jul 2007 07:16:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-21T07:16:31Z</dc:date>
    <item>
      <title>regarding ALV Editing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-alv-editing/m-p/2498116#M564310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have made a report in ALV using Reuse ALV Grid Diaplay &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a requirement for editing the data shown in ALV &lt;/P&gt;&lt;P&gt;Pls Help me out.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2007 07:11:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-alv-editing/m-p/2498116#M564310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-21T07:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: regarding ALV Editing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-alv-editing/m-p/2498117#M564311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out these sample programs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_01  	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This program illustrates how the events for print processing PRINT_TOP_OF_PAGE, &lt;/P&gt;&lt;P&gt;PRINT_END_OF_PAGE, PRINT_TOP_OF_LIST,PRINT_END_OF_LIST are handled. The &lt;/P&gt;&lt;P&gt;corresponding handler methods control the appearance of the list printed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_02 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Show a detail list in an amodal window. There is no second dynro needed in contrast to &lt;/P&gt;&lt;P&gt;BCALV_GRID_03.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_03 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This program implements a function on event DOUBLE_CLICK. According to the selected line data &lt;/P&gt;&lt;P&gt;from table SBOOK is selected and displayed by a second ALV Control in a dialog dynpro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_04 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Illustrates the use of exceptions (lights or leds). According to the values of SFLIGHT-SEATSOCC, the &lt;/P&gt;&lt;P&gt;lights are set to 1 (red), 2 (yellow) or 3 (green).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_05 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Demonstrate the creation of an own toolbar button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_06 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Demonstrate the creation of an own context menu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_07 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append a menu button to the standard toolbar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_GRID_08 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append a menu with default button to the standard toolbar.  It is exactly the same as &lt;/P&gt;&lt;P&gt;BCALVC_TB_WITH_MENU except for methods HANDLE_MENU_BUTTON and HANDLE_TOOLBAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Editable ALV grids&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_01 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This report illustrates the simplest case of using an editable/noneditable ALV Grid Control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_02 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This report illustrates how to set chosen cells of an ALV Grid Control editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_03 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example the user may change values of fields SEATSOCC (occupied seats) and/or PLANETYPE. &lt;/P&gt;&lt;P&gt;The report checks the input value(s) semantically and provides protocol messages in case of error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_04 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This report illustrates how to add and remove lines to a table using the ALV Grid Control and how to &lt;/P&gt;&lt;P&gt;implement the saving of the new data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_05 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example shows how to use checkboxes within an ALV Grid Control. You learn:&lt;/P&gt;&lt;P&gt;	(1) how to define a column for editable checkboxes for an attribute of your list&lt;/P&gt;&lt;P&gt;	(2) how to evaluate the checked checkboxes&lt;/P&gt;&lt;P&gt;	(3) how to switch between editable and non-editable checkboxes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_06 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example shows how to define a dropdown listbox for all cells of one column in an editable ALV &lt;/P&gt;&lt;P&gt;Grid Control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_07 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example shows how to define dropdown listboxes for particular cells of your output table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_EDIT_08 	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This report implements an ALV Grid Control with an application specific F4 help. The following aspects &lt;/P&gt;&lt;P&gt;are dealt with:&lt;/P&gt;&lt;P&gt;	(1) how to replace the standard f4 help&lt;/P&gt;&lt;P&gt;	(2) how to pass the selected value to the ALV Grid Control&lt;/P&gt;&lt;P&gt;	(3) how to build an f4 help, whose value range depend on a value of another cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2007 07:16:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-alv-editing/m-p/2498117#M564311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-21T07:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: regarding ALV Editing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-alv-editing/m-p/2498118#M564312</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 sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: ok_code LIKE sy-ucomm,
      save_ok like sy-ucomm,
      g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
      g_grid  TYPE REF TO cl_gui_alv_grid,
      g_custom_container TYPE REF TO cl_gui_custom_container,
      gs_layout TYPE lvc_s_layo,
      g_max type i value 100.

DATA: gt_outtab type table of sflight.

*---------------------------------------------------------------------*
*       MAIN                                                          *
*---------------------------------------------------------------------*
CALL SCREEN 100 starting at 1 1..

*---------------------------------------------------------------------*
*       MODULE PBO OUTPUT                                             *
*---------------------------------------------------------------------*
MODULE pbo OUTPUT.
  SET PF-STATUS 'MAIN100'.
  set TITLEBAR 'MAIN100'.
  IF g_custom_container IS INITIAL.
    CREATE OBJECT g_custom_container
           EXPORTING container_name = g_container.
    CREATE OBJECT g_grid
           EXPORTING i_parent = g_custom_container.
*§1.Set status of all cells to editable using the layout structure.
    gs_layout-edit = 'X'.

    select * from sflight into table gt_outtab up to g_max rows.

    CALL METHOD g_grid-&amp;gt;set_table_for_first_display
         EXPORTING i_structure_name = 'SFLIGHT'
                   is_layout        = gs_layout
         CHANGING  it_outtab        = gt_outtab.
*§2.Use SET_READY_FOR_INPUT to allow editing initially.
*   (state "editable and ready for input").
    CALL METHOD g_grid-&amp;gt;set_ready_for_input
          EXPORTING i_ready_for_input = 1.

  ENDIF.
ENDMODULE.
*---------------------------------------------------------------------*
*       MODULE PAI INPUT                                              *
*---------------------------------------------------------------------*
MODULE pai INPUT.
  save_ok = ok_code.
  clear ok_code.
  CASE save_ok.
    WHEN 'EXIT'.
      PERFORM exit_program.
    WHEN 'SWITCH'.
      PERFORM switch_edit_mode.
    WHEN OTHERS.
*     do nothing
  ENDCASE.
ENDMODULE.
*---------------------------------------------------------------------*
*       FORM EXIT_PROGRAM                                             *
*---------------------------------------------------------------------*
FORM exit_program.
  LEAVE PROGRAM.
ENDFORM.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  SWITCH_EDIT_MODE
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM switch_edit_mode.
*§3.Use IS_READY_FOR_INPUT to fetch current substate of editable cells.
  IF g_grid-&amp;gt;is_ready_for_input( ) EQ 0.
*§4.Use SET_READY_FOR_INPUT to switch between the substates.
    CALL METHOD g_grid-&amp;gt;set_ready_for_input
                     EXPORTING i_ready_for_input = 1.
  ELSE.
    CALL METHOD g_grid-&amp;gt;set_ready_for_input
                     EXPORTING i_ready_for_input = 0.
  ENDIF.
ENDFORM.                               " SWITCH_EDIT_MODE
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2007 07:35:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-alv-editing/m-p/2498118#M564312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-21T07:35:21Z</dc:date>
    </item>
  </channel>
</rss>

