ALV GRID edit mode keyboard issue

Hi,
I have created a program that displays an ALV GRID.
From the Layout I said to edit in edit mode the ALV Grid.
In the menu toolbar I exclude the button 'cut - copy -paste and delete line'.
When I run the program I see that these buttons are not displayed --> OK.
BUT my problem is: if I use the keyboard then the ALV Grid manages these actions.
For instance. I select some lines and press the key DELETE on the keyboard --> the lines are removed and that is not that I expect because I removed this action from the toolbar.
For the cut - copy and paste it's the same.
Do you have  a solution for me --> intercept an event or change the function keys or ....
I would like that the ALV Grid does not manage the keys delete, CRTL-C, CRTL-V in edit mode.
Thanks,
Stevie,

Hi Steve
I was not aware of this. So, I recommend you to try this:
At the event <b>"before_user_command"</b> you can terminate the process by resetting the ALV user command.
<u><b>e.g.</b></u>
    CASE e_ucomm .
      WHEN '&INFO' .
        CALL METHOD gr_alvgrid->set_user_command
                      EXPORTING i_ucomm = space.
    ENDCASE .
This code within the event overrides the '&INFO' function and terminates its process. For cut and copy, you can find out ucomm values by putting a break point inside the event and tracing the value of <b>"i_ucomm"</b>.
For some relevant issues, you can inspect the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf">"An Easy Reference For ALV Grid Control"</a>.
<i>As another thing, since you are a new SDN member, you are welcome and let me introduce you the SDN forums pointing system: You can assign points to posts you find helpful while solving your question. You can reward points by clicking the yellow star icon at header of each reply post. You can reward;
- one 10 points (solved)
- two 6 points (very helpful answer)
- many 2 points (helpful answer)</i>
Kind regards...
*--Serdar

Similar Messages

  • Multiple Input Rows In ALV Grid (Editable)

    Hi,
    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).
    There is a local function for appending lines in the ALV grid toolbar but this only allows a single entry.
    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.
    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.
    My 2 questions are:
    1. Is there some standard way of entering multiple entries in ALV Grid Editable.
    2. If not then how to allow blank lines to be shown as ready for input.
    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.
    Many Thanks,
    Preet

    Hi, Preet!
    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.
    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.
    METHODS: on_data_changed FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING er_data_changed.
    SET HANDLER your_object->on_data_changed FOR your_alv_grid.
    METHOD on_data_changed.
    DATA: s_mod_cell TYPE lvc_s_modi.
    LOOP AT er_data_changed->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->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.
    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:
    FIELD-SYMBOLS: <outtab> TYPE STANDARD TABLE.
    ASSIGN me->mt_outtab->* TO <outtab>.
    * do whatever you want with <outtab>
    Hope this helps.
    Kind regards,
    Igor
    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.

  • ALV grid EDIT updation

    hi Experts!!
    I am working on a ALV Grids which are on a Tabstrip Sub screen area.I have done the ALV  in Edit mode and :
    > <b>when we enter the values in the editing colums i want it to be updateted in the DB table.
    >But when we enter values it is not comming in the internal table also and not updateing in DB table.
    >Plz suggest waht needs to be done to catch the edited valuse and update the same into DB table</b>.

    hi,
    Check this might help you...
    Regard points if helpful....
    DATA: G_CONTROL TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
    G_ALV TYPE REF TO CL_GUI_ALV_GRID.
    DATA: T_FCAT TYPE LVC_T_FCAT,
    WA_FCAT TYPE LVC_S_FCAT.
    DATA: I_ZAMIT TYPE TABLE OF ZAMIT_SHIP_TAB WITH HEADER LINE.
    DATA: I_INDEX TYPE I.
    DATA: G_OK_CODE TYPE SY-UCOMM.
    DATA: G_OK_CODE1 TYPE SY-UCOMM.
    SELECT * FROM ZAMIT_SHIP_TAB INTO TABLE I_ZAMIT.
    CALL SCREEN 9000.
    SCREEN FORMS>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    *& Module STATUS_9000 OUTPUT
    text
    MODULE STATUS_9000 OUTPUT.
    SET PF-STATUS 'PF9001'.
    SET TITLEBAR 'xxx'.
    ENDMODULE. " STATUS_9000 OUTPUT
    *& Module CREATE_CONTROL OUTPUT
    text
    MODULE CREATE_CONTROL OUTPUT.
    CREATE OBJECT G_CONTROL
    EXPORTING
    PARENT =
    CONTAINER_NAME = 'G_CUSTOM_CONTROL'
    STYLE =
    LIFETIME = lifetime_default
    REPID =
    DYNNR =
    NO_AUTODEF_PROGID_DYNNR =
    EXCEPTIONS
    CNTL_ERROR = 1
    CNTL_SYSTEM_ERROR = 2
    CREATE_ERROR = 3
    LIFETIME_ERROR = 4
    LIFETIME_DYNPRO_DYNPRO_LINK = 5
    others = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDMODULE. " CREATE_CONTROL OUTPUT
    *& Module CREATE_ALV OUTPUT
    text
    MODULE CREATE_ALV OUTPUT.
    CREATE OBJECT G_ALV
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    I_PARENT = G_CONTROL
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    ERROR_CNTL_CREATE = 1
    ERROR_CNTL_INIT = 2
    ERROR_CNTL_LINK = 3
    ERROR_DP_CREATE = 4
    others = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDMODULE. " CREATE_ALV OUTPUT
    *& Module DISPLAY_ALV OUTPUT
    text
    MODULE DISPLAY_ALV OUTPUT.
    PERFORM PREPARE_FIELD_CATALOG.
    CALL METHOD G_ALV->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME = 'SFLIGHT'
    IS_VARIANT =
    I_SAVE = 'X'
    I_DEFAULT = 'X'
    IS_LAYOUT =
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING = T_TOOLBAR[]
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    IT_OUTTAB = I_ZAMIT[]
    IT_FIELDCATALOG = T_FCAT
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    others = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDMODULE. " DISPLAY_ALV OUTPUT
    *& Form PREPARE_FIELD_CATALOG
    text
    --> p1 text
    <-- p2 text
    FORM PREPARE_FIELD_CATALOG .
    REFRESH T_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-COL_POS = 1.
    WA_FCAT-COLTEXT = 'SHIPMENT NO.'.
    WA_FCAT-FIELDNAME = 'ZSHIP_NO'.
    WA_FCAT-REF_TABLE = 'I_ZAMIT'.
    WA_FCAT-edit = 'X'.
    APPEND WA_FCAT TO T_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-COL_POS = 2.
    WA_FCAT-COLTEXT = 'DOC TYPE'.
    WA_FCAT-FIELDNAME = 'ZDOC_TYP'.
    WA_FCAT-REF_TABLE = 'I_ZAMIT'.
    WA_FCAT-KEY = 'X'.
    APPEND WA_FCAT TO T_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-COL_POS = 3.
    WA_FCAT-COLTEXT = 'NAME_CR'.
    WA_FCAT-FIELDNAME = 'ZNAME_CR'.
    WA_FCAT-REF_TABLE = 'I_ZAMIT'.
    WA_FCAT-KEY = 'X'.
    APPEND WA_FCAT TO T_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-COL_POS = 4.
    WA_FCAT-COLTEXT = 'SHIP_TYP'.
    WA_FCAT-FIELDNAME = 'ZSHIP_TYP'.
    WA_FCAT-REF_TABLE = 'I_ZAMIT'.
    WA_FCAT-KEY = 'X'.
    APPEND WA_FCAT TO T_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-COL_POS = 5.
    WA_FCAT-COLTEXT = 'LEG_IND'.
    WA_FCAT-FIELDNAME = 'ZLEG_IND'.
    WA_FCAT-REF_TABLE = 'I_ZAMIT'.
    WA_FCAT-KEY = 'X'.
    APPEND WA_FCAT TO T_FCAT.
    CLEAR WA_FCAT.
    ENDFORM. " PREPARE_FIELD_CATALOG
    *& Module LEAVE INPUT
    text
    MODULE LEAVE INPUT.
    LEAVE PROGRAM.
    ENDMODULE. " LEAVE INPUT
    *& Module USER_COMMAND_9000 INPUT
    text
    MODULE USER_COMMAND_9000 INPUT.
    IF G_OK_CODE = 'CHANGE'.
    DATA: VALUE TYPE C,
    COL TYPE I ,
    ROW TYPE LVC_S_ROW,
    COLNO TYPE LVC_S_COL,
    ROWNO TYPE LVC_S_ROID.
    CALL METHOD G_ALV->GET_CURRENT_CELL
    IMPORTING
    E_ROW = I_INDEX
    CALL METHOD G_ALV->GET_CURRENT_CELL
    IMPORTING
    E_ROW =
    E_VALUE = VALUE
    E_COL = COL
    ES_ROW_ID = ROW
    ES_COL_ID = COLNO
    ES_ROW_NO = ROWNO.
    READ TABLE I_ZAMIT INDEX I_INDEX.
    CALL SCREEN 9001 STARTING AT 10 10 .
    ENDIF.
    ENDMODULE. " USER_COMMAND_9000 INPUT
    *& Module STATUS_9001 OUTPUT
    text
    MODULE STATUS_9001 OUTPUT.
    SET PF-STATUS 'PF9002'.
    SET TITLEBAR 'xxx'.
    ENDMODULE. " STATUS_9001 OUTPUT
    *& Module USER_COMMAND_9001 INPUT
    text
    MODULE USER_COMMAND_9001 INPUT.
    IF G_OK_CODE1 = 'SAVE'.
    MODIFY ZAMIT_SHIP_TAB FROM I_ZAMIT.
    SELECT * FROM ZAMIT_SHIP_TAB INTO TABLE I_ZAMIT.
    CALL METHOD G_ALV->REFRESH_TABLE_DISPLAY.
    CALL SCREEN 9000.
    ENDIF.
    ENDMODULE. " USER_COMMAND_9001 INPUT

  • ALV GRID Edit Validations (how to do your own)

    Hi folks, I am using ALV Grid to enter some data, I would like to do some validations on save and also adjust data in the table and validate it upon another few buttons.
    All is good and works fine using the standard events, however these events are only triggered if you directly change the data yourself, <b>I need validates once a button is hit</b>.
    I have been playing with the following methods, and the cells are returned in the "good" list and the mod list (as expected), but the cell on the screen is not highlighted in red, and if you change something on the screen, the messages you have added are then lost.
      CALL METHOD p_grid->change_data_from_inside
        EXPORTING
          it_style_cells = lt_modi.
    Has anyone added there own custom validations upon hitting a button - in a manner that the red cell border is shown?
    I have tried both of these handlers:
    CALL METHOD p_defn-grid->register_edit_event
       EXPORTING
         i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    **Own event on enter or ucomm
      CALL METHOD p_defn-grid->register_edit_event
        EXPORTING
          i_event_id = cl_gui_alv_grid=>mc_evt_enter.
    I am adding in my messages in event data_changed, using method add_protocol_entry of class cl_alv_changed_data_protocol - this is passed to me in the data_changed event.
    I have also looked at the data_changed_finished event, but cant get anything from that either - it doesn’t even keep my good fields.
    Ps I have also played with the layout setting layout-val_data = 'X' and space and "C" - but the messages are still not kept, and cells not bordered in red.
    The solution may have something to do with triggering the event manually somehow - but i cant find a way to call a method that would do it as they are all private!
    thanks in advance - this is a tricky one!

    Adobe Pat 206
    You cannot create a Premiere Elements (any version) DVD Template from scratch using Photoshop Elements (any version). To do that you need Photoshop CS or higher. The reason for "higher" is that earlier Photoshop versions do not support Layers Groups within the Layer Groups.
    But, providing you find a version of Photoshop Elements on a given computer operating system that will open the Photoshop Layer Groups in its key structure (.psd file), you can use Photoshop Elements to edit (not create from scratch) the .psd file for the main and scene menus of a given existing Adobe theme. I am careful on my language here since there have been recent difficulties getting Photoshop Elements to do this job which it once did without issue.
    The process is easy enough, but very detail dependant, with strict requirements for names files as well as Layer Groups, sublayers groups, and layers in the .psd file. To give you an idea of what is involved, please check out two articles I have written related to Premiere Elements DVD Template creation and customization.
    http://www.elementsvillage.com/forums/showthread.php?t=56244
    http://www.atr935.blogspot.com/2013/05/pe-one-page-14-scene-buttons-dvd-menu.html
    Not placing the new menu in the correct directory and any error in spelling and such are just some of the ingredients for failure in this type of project.
    Unless you want to add extra buttons to a menu, it might be easier for you to explore customization opportunties in the Movie Menu section of the program. See Tools/Movie Menus. The Movie Menus customization area should look like this
    Note that the Adjustments...Menu Background shows Video or Stills among other things.
    If you have questions on anything that I have written, please ask me here in your thread.
    You can also check out the Adobe documentation on this type of topic.
    http://help.adobe.com/en_US/premiereelements/using/WS09e4b3c48f3a79fc19b622510385d4355c-7e 0c.html
    Thanks.
    ATR

  • ALV Grid  Usin Function Modulesshould be Displayed in ALV Grid Function mod

    Hi,
    I had a requirmentlike SM30 we hav to create initial Screen and wat ever ZXXXX tables we enter it will create Fieldcatalog Dynamically and press dislay it show in display mode.
    If we Press Maintain it will Display in Editable Mode.The changed data should be updated into DB.Evrything should be displayed in
    ALV Grid Function MOdule..
    How to Get value from Screen Field ?
    How To Generate Fieldcatalog For that Table dynamically?

    Hello,
    How To Generate Fieldcatalog For that Table dynamically?
    Use the FM 'REUSE_ALV_FIELDCATALOG_MERGE' pass the table name in the import param I_STRUCTURE_NAME & you'll get the fiel cat dynamically!
    BR,
    Suhas

  • Class ALV in Edit mode and F4 Value help

    I am displaying Customer Information in ALV Grid with class method. Customer Number is editable mode and having search help. When user F4 on Customer Number and select any value from search help. This selected new value is not passing to ALV grid in Customer number column. I tried with on_f4 method, but it is not working or something i doing incorrect.
    Can any one help to solve this problem ?
    Many thanks

    Hi.
    try with method check_changed_data in after event.
    CALL METHOD go_grid->check_changed_data
          IMPORTING
    or implement a local_event_class to handle F4 event and Change event.
    The demo program "BCALV_TEST_GRID_F4_HELP" can help you tu find the correct code.

  • ALV grid Editable based on a Field value

    Hi,
    I need to make a ALV Grid Row editable based on a particular field of that row.
    For example
    if fields are   A   B   C  D
    and if there are three rows of data
    I must make the Field B editable in all the rows which have D value as X else it must be non Editable.
    I searched in SDN but could not find a suitable answer.
    Hope I am clear with my issue.
    Regards

    this sample code makes the NETPR field editable based on a desired condition.
    this is the solution to your problem.
    * TABLES:     ekko.
    * TYPE-POOLS: slis.
    * TYPES: BEGIN OF t_ekko,
    *  ebeln TYPE ekpo-ebeln,
    *  ebelp TYPE ekpo-ebelp,
    *  netpr TYPE ekpo-netpr,
    *  field_style  TYPE lvc_t_styl,
    * END OF t_ekko.
    *DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    *      wa_ekko TYPE t_ekko.
    *DATA: it_fieldcat TYPE lvc_t_fcat,    
    *      wa_fieldcat TYPE lvc_s_fcat,
    *      gd_tab_group TYPE slis_t_sp_group_alv,
    *      gd_layout    TYPE lvc_s_layo,  
    *      gd_repid     LIKE sy-repid.
    *START-OF-SELECTION.
    *SELECT ebeln ebelp netpr
    *   UP TO 10 ROWS
    *    FROM ekpo
    *    INTO  CORRESPONDING FIELDS OF TABLE it_ekko.
    *  DATA ls_stylerow TYPE lvc_s_styl .
    *  DATA lt_styletab TYPE lvc_t_styl .
    ** The following code sets it to be disabled(display only) if 'NETPR'
    ** is gt than 10.
    *  LOOP AT it_ekko INTO wa_ekko.
    *    IF wa_ekko-netpr GT 10.
    *      ls_stylerow-fieldname = 'NETPR' .
    *      ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
    *      APPEND ls_stylerow  TO wa_ekko-field_style.
    *      MODIFY it_ekko FROM wa_ekko.
    *    ENDIF.
    *  ENDLOOP.
    *  wa_fieldcat-fieldname   = 'EBELN'.
    *  wa_fieldcat-scrtext_m   = 'Purchase Order'.
    *  wa_fieldcat-col_pos     = 1.
    *  APPEND wa_fieldcat TO it_fieldcat.
    *  CLEAR  wa_fieldcat.
    *  wa_fieldcat-fieldname   = 'EBELP'.
    *  wa_fieldcat-scrtext_m   = 'PO Item'.
    *  wa_fieldcat-col_pos     = 2.
    *  APPEND wa_fieldcat TO it_fieldcat.
    *  CLEAR  wa_fieldcat.
    *  wa_fieldcat-fieldname   = 'NETPR'.
    *  wa_fieldcat-scrtext_m   = 'Net Price'.
    *  wa_fieldcat-edit        = 'X'. "sets whole column to be editable
    *  wa_fieldcat-col_pos     = 3.
    *  wa_fieldcat-datatype     = 'CURR'.
    *  APPEND wa_fieldcat TO it_fieldcat.
    *  CLEAR  wa_fieldcat.
    *  gd_layout-stylefname = 'FIELD_STYLE'.
    *  gd_layout-zebra             = 'X'.
    *  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    *       EXPORTING
    *            i_callback_program       = sy-repid
    *            is_layout_lvc            = gd_layout
    *            it_fieldcat_lvc          = it_fieldcat
    *            i_save                   = 'X'
    *       TABLES
    *            t_outtab                = it_ekko

  • ALV Grid editable - How to raise the data_changed event from outside object

    Hi,
    i'd like to like to raise the data_changed event from outside the ALV-Grid object in order to display errors to the user.
    For example a new row was inserted within the program. The user has only to complete the missing informations. Before saving the transactions the program has to execute some semantic checks. The errors of this check process should be shown to the user by creating an instance of the cl_alv_changed_data_portocol object.
    Thanks.
    Regards

    You don't need to raise the data_changed event to perform the edits or to issue messages using cl_alv_changed_data_protocol.
    The following assumes you have an ALV grid object g_alv based on the CL_GUI_ALV_GRID class.
    You can mark the inserted records upon insertion as selected using the set_selected_rows method, and then retrieve these rows later using get_selected_rows and perform necessary edits.
    Save the row number of each inserted row into a table of the appropriate type (see the method definition for this):
    DATA: t_index_rows    TYPE  lvc_t_row.
    DATA: s_row_no        TYPE  lvc_s_roid.
    DATA: t_row_no        TYPE  lvc_t_roid.
    Load entries into t_row_no after each insert.  Capture the row number and save in the table t_row_no.
    e.g.
    PERFORM insert_row USING s_row_no-row_id.
    APPEND s_row_no TO t_row_no.
    FORM insert_row would have whatever code you are using to insert the row.  Save the row id into s_row_no-row_id (which is an INT4).
    When done with all inserts do the following
      IF t_row_no[] IS NOT INITIAL.
        CALL METHOD g_alv->set_selected_rows
          EXPORTING
            it_index_rows            = t_index_rows
            it_row_no                = t_row_no
            is_keep_other_selections = 'X'.
      ENDIF.
    Then, if SAVE is pressed without the data_changed event having been raised (such as if the user just pressed SAVE without changing anything), use method get_selected_rows to retrieve the rows that were inserted and perform the necessary edits.
      DATA: l_t_rows    TYPE lvc_t_row.              " ALV control: Table rows
      CALL METHOD g_alv->get_selected_rows
        IMPORTING
          et_index_rows = l_t_rows.
    Loop through l_t_rows and use the row as an index into the grid, perform the necessary edits, just as you would if the data_changed event had been raised.
    If any edits fail, then send messages to the user, abort the save, and re-display the grid.
    Remember to refresh the t_row_no and t_index_rows tables if you load a new data set.
    You can also use a similar technique with the data_changed event to mark each changed row as selected by saving the row ids, and then you only have to update the changed rows on SAVE, which can minimize database I/O.
    Good luck.
    Brian

  • Need help in ALV grid editable cells

    Hi,
    I have created a ALV Grid program in which i made certain cells as editable cells.Now my question is if suppose i have 2 rows in my output then if i change the 2nd rows some cells, then some calculation has to perform till this it is fine but nw i want to modify the 3rd rows some cells as per the changes in 2nd row.
    How to do it with ALV oops concepts.
    I have refered BCALV_EDIT_02 and BCALV_EDIT_03 these std programs.
    Thanks & Regards
    Madhuri

    Hello Madhuri
    I recommend to do any post-processing of the changed data OUTSIDE your event handler method (HANDLE_DATA_CHANGED).
    Within the event handler method do all required validations and the trigger PAI by calling method CL_GUI_CFW=>SET_NEW_OK_CODE (for an example refer to my sample report ZUS_SDN_TWO_ALV_GRIDS in alv)
    Now at PAI of your screen you can do any kind of post-processing, calculation, etc. within the itab used for the ALV list.
    Regards
      Uwe

  • ALV in EDIT-Mode: can't hide the toolbar in edit-mode

    Hi,
    I have supressed in my ALV all standard-buttons with the help of an it_toolbar_excluding. I have built my own toolbar (p_object->mt_toolbar). Until know everything is fine, the ALV shows only my own generated toolbar.
    In that moment, when I change a property of a column in the fieldcatalog ( wa_catalog-edit  = 'X' ), both toolbars are shown, the standard toolbar and my own generated buttons.
    What's wrong, how can I hide the standard toolbar when I am in the edit mode?
    Kind regards
    Andreas
    Edited by: Andreas Waldt on Sep 3, 2008 5:19 PM

    Thank you very much,
    during testing I have recognized, that the buttons in the toolbar are new functions, because of the edit mode.
    So I have put all the new button into the excluding list. It worked!
    Thanks again!
    Andreas

  • ALV Grid Editable

    How to make the ALV grid data as editable ?
    Regards
    Badari

    In the field catalog, set the EDIT field to X for whichever field you want to be editable.
    Regards,
    Ravi
    Note : Please mark all the helpful answers

  • ALV Grid editable fields

    Hello,
    I got a dynpro with 3 ALV grids. I edit a value of grid 3, then I execute a pushbutton of grid 1. The value of grid 3 is resetted then.
    What should I do to keep the value?
    Reward points guaranteed.
    Regards
    René

    Sounds like the event handler method for event data_changed  is not being fired.  In one of my programs, I am registering the "ENTER" key, the user must hit enter after editing the field to fire the data_changed event. 
    * Set for first display
            call method alv_grid->set_table_for_first_display
                exporting
                     is_layout              = lt_layout
                     it_toolbar_excluding   = lt_exclude
                changing
                     it_outtab       = ialv[]
                     it_fieldcatalog = fieldcat[].
    * If cancelling points, register "ENTER" as event
    * and create the event receiver
    <b>          call method alv_grid->register_edit_event
                            exporting
                               i_event_id = cl_gui_alv_grid=>mc_evt_enter.</b>
    *   create Event Receiver
              create object event_receiver.
    *   handler for ALV grid
              set handler event_receiver->handle_data_changed for alv_grid.
    Do this records the changes that the user has made.  I believe that this must be done before you start the processing of the button on Grid1.
    Regards,
    Rich Heilman

  • Alv grid Editable field

    Hai friends,
    I am displaying data in ALV Grid, in this 2-fields are editable,so i have to change existing values and input our own values ,but here trouble is i unable to catch new values ,can any one help me that how to catch these input values.
    Thanks in Advance

    Thanku for reply..please see the below code.
      fieldcatalog-fieldname     = 'NEWA'.
      fieldcatalog-just          = 'C'.
      fieldcatalog-key           = 'X'.
      fieldcatalog-input        = 'X'.
      fieldcatalog-edit          = 'X'.
      fieldcatalog-seltext_m     = 'New Aggrement'.
      fieldcatalog-outputlen     = 15.
      append fieldcatalog to fieldcatalog.
      clear fieldcatalog.
      fieldcatalog-fieldname     = 'NEWI'.
      fieldcatalog-just          = 'C'.
      fieldcatalog-key           = 'X'.
      fieldcatalog-edit          = 'X'.
      fieldcatalog-seltext_m     = 'New Item'.
      fieldcatalog-outputlen     = 15.
      append fieldcatalog to fieldcatalog.
      clear fieldcatalog.
    call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program            = gd_repid
          i_callback_pf_status_set  = 'PFSTATUS'
          i_callback_user_command   = 'USER'
          is_layout                 = gd_layout
          it_fieldcat               = fieldcatalog[]
          it_events                 = gi_events
        i_save                    = 'X'
           tables
             t_outtab               = gt_final
           exceptions
             program_error          = 1
           others                   = 2.

  • Saving ALV Grid to Local File issue - Missing half of the report

    Hi Experts, Good Day.
    I have developed an ALV Grid report using class CL_SALV_TABLE which displays 200 Columns and 100+ rows/records. It is displaying well, but when I am saving the output into local file (any type) there only 98 columns are downloading and remaining all the columns are missing.
    I would like to know whether there is any restriction for number of columns or what might the problem for it. How can I download all the columns into local file.
    Thanks in Adv.
    Vijay

    Hi,
    Thanks for your response. Even though there are multiple ways to send data to local file I believe all three are same. And even I am facing same issue all the ways. Only 98 Columns data is getting downloaded into Files (it might be .txt, .xls, etc.).
    After downloading first 98 Columns, I am hiding the downloaded columns and again I am downloading remaining columns. Then I am merging in the Excel file. This is very complicated for the End-User. So, please help me out.
    I have used only following methods for displaying ALV.
    For initial object/instance:
    CL_SALV_TABLE=>FACTORY,
    For ALV functions:
    CL_SAVL_TABLE->GET_FUNCTIONS,
    CL_SALV_FUNCTIONS_LIST->SET_ALL,
    For Column heading and Optimized width:
    CL_SALV_TABLE->GET_COLUMNS,
    CL_SALV_COLUMNS_TABLE->SET_OPTIMIZE,
    CL_SALV_COLUMNS_TABLE->GET_COLUMN,
    CL_SALV_COLUMN->SET_SHORT_TEXT,
    To display grid:
    CL_SALV_TABLE->DISPALY.
    - Thanks
    Vijay

  • ALV Grid editing cell cursor position

    Hello !
    i hope i can get the answer to my question here.
    i have an alv-grid with editable cells
    when i click in one cell (it is a textfield) where there is no more written text it marks the hole cell and when i start to write, it overwrites the whole text.
    i would like the cursor to be placed at the end of the field in this case.
    when i click in the cell where there is written text it is ok - it puts the cursor to the clicked position.
    thanks very much for your help
    Helmut

    Hi, i am also facing same probelm.
    after  call method sender->refresh_table_display.
    i am using
    call method sender->set_current_cell_via_id
          exporting
            is_row_id    = l_rowid
            is_column_id = l_colid.
    this will simply select the cell. i am not able to see curser in end or front of the cell.Can anybody please suggest me how to it.
    Thanks
    Sudhakar

Maybe you are looking for

  • Atualização documentos FI com o número da NF-e - mensageria não SAP

    Pessoal, Estou num cliente que a impressão da NF-e é feita por um sistema externo de mensageria não SAP. Pergunta.. neste caso, como é feita a atualização do documento contábil (campo refência) com o nro da nfe?? Temos que fazer alguma interferência

  • Calendar: "Weather data from Yahoo..."

    when i choose "About Calendar..." i see this: ...which leads me to believe there's some kind of built-in weather functionality in Calendar.app, but i can't find any other indication within the app that this is true. does anybody know what this is abo

  • Automatic creation of MS Word Documents within a Report

    Dear Experts, within my report which creates automatically activities in a background process I have to create MS Word Documents and attach this Word Documents to the Activity. The Word Document does have a Logo and the text is changing with every Ac

  • Can't find or add previous event to calendar.

    I have not updated to 8.1 yet. I KNOW that I had a calendar event on Sept. 22nd  and many others that aren't showing up. I went back to add it [it' s important] and it won't 'take'. I toggled calendar off in settings and back on, restarted the iPhone

  • Xml structure being ignored

    XML structure in "Bus Card Order Form" created in inDesign is being ignored by Acrobat>Tools>Forms>More Form Options>Export Data.  inDesign form also has DTD. 1. inDesign "BC Order Form" is output to interactive pdf fillable form 2. pdf filled form i