Mark several cells in an editable ALV

Hello,
is there a possibility to mark several cells in an editable ALV at once?
So that the User can enter the same value in several cells at the same time?
I use the component SALV_WD_TABLE.
Does anyone know if such a feature exists or may be implemented in future?
I am grateful for every hint!
Best Regards
Manuel Nonnenmacher

I took the code above from the turorial "Editing ALV in WD4a" and I found following sentence:
Hint: In this tutorial the save functionality is only simulated to not change the flight data model content.
Now is the question, how to do a NON-simulated save functionality??
Best Regards
Ingmar

Similar Messages

  • Message connected to a cell from an editable alv

    hi,
    is it possible to connect a message (via message manager) with the changed cell in an editable alv? I mean the changed cell should be marked with an "*" for example.
    I am working with the ON_CELL_ACTION event with my alv.

    Yes you can,
    If you have access to the element in the context that is bound to the row in the ALV then you can connect the message. Marking a * is not possible by default with the WD message manager and you willl need to do it manually. Use the element method of the message manager API for this purpose.

  • ABAP WebDynpro: Handling the ON_ENTER Event in editable ALVs

    Sub: ABAP WebDynpro : Handling the ON_ENTER Event in editable ALVs
    Hi,
    I would like to know if there exists an event to handle TABout (i.e, when user navigates out of the cell with a TAB key-press) for a cell of an editable ALV.
    Alternatively, any help on how to handle ON_ENTER event and how it is triggered when data is entered by user into a cell of an editable ALV, would be really appreciated.
    Thanks,
    Adithya

    Hi
    I had one similar problem where user enter something into the editable cell and press enter. to handle this scenario i used WDDOBEFOREACTION  method of my view to call alv interface method check_data.
    if there is any change in the any table cell, it will fire an event on_data_check..which has paramater column name, row index and new and old value of the cell.
    you can handle this event and write your business logic in event handler method.
    hope it will help
    Regards
    Saurabh Garg

  • How to make cell editable alv in WebDynpro for ABAP?

    I make Column editable ALV.(See under source code)
    But I can't make Cell editable ALV.
    How to make Cell editable ALV in WebDynpro for ABAP?
    and..how to get changed data?
    DATA: l_value TYPE REF TO cl_salv_wd_config_table.
      l_value = l_ref_interfacecontroller->get_model( ).
    * { EDITABLE
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_input_field     TYPE REF TO cl_salv_wd_uie_input_field,
            lr_column          TYPE REF TO cl_salv_wd_column.
      lr_column_settings ?= l_value.
      lr_column = lr_column_settings->get_column( 'TOTAL_COUNT' ).
      CREATE OBJECT lr_input_field
        EXPORTING
          value_fieldname = 'TOTAL_COUNT'.
      lr_column->set_cell_editor( lr_input_field ).
      DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
      lr_table_settings ?= l_value.
      lr_table_settings->set_read_only( abap_false ).

    the code seems to be correct....but where are you writing it?
    put the code in the wddoinit method and it should work.
    have a look at this article..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1

  • Mark fields (columns) in editable ALV Grid as mandatory

    Hi,
    could you please help me to set up a column in an editable alv grid as mandatory? I had a look in several references and also did not find anything in the fieldcatalog structure.
    Best regards,
    Fabian

    Hello Fabian
    Here is some coding to explain what I meant.
    *& Report  ZUS_SDN_ALV_ERROR_LOG
    REPORT  zus_sdn_alv_error_log.
    DATA:
      er_data_changed    TYPE REF TO cl_alv_changed_data_protocol.
    START-OF-SELECTION.
    * Dynpro is empty (contains no elements)
      CALL SCREEN '0100'.
    END-OF-SELECTION.
    *&      Module  PBO_0100  OUTPUT
    *       text
    MODULE pbo_0100 OUTPUT.
    * Event DATA_CHANGED was fired due to changes in the editable ALV grid
      IF ( er_data_changed IS BOUND ).
    * User did not change any values
      ELSE.
        CREATE OBJECT er_data_changed
    *      EXPORTING
    *        I_CONTAINER =
    *        I_CALLING_ALV = <your ALV grid instance>
      ENDIF.
    * That is how your code probably looks like
    *  LOOP AT gt_outtab INTO gs_outtab.
    *    IF ( gs_outtab-obligatory IS INITIAL ).
    *      CALL METHOD go_alvlog->add_protocol_entry
    *        EXPORTING
    *          i_msgid     = '00'
    *          i_msgty     = 'E'
    *          i_msgno     = '398'
    *          I_MSGV1     = 'Field OBLIGATORY must not be empty'
    **          I_MSGV2     =
    **          I_MSGV3     =
    **          I_MSGV4     =
    *          i_fieldname = 'OBLIGATORY'
    **          I_ROW_ID    =
    *          I_TABIX     = syst-tabix
    *    ENDIF.
    *  ENDLOOP.
    * Generate a protocol for testing purposes
      DO 5 TIMES.
        CALL METHOD er_data_changed->add_protocol_entry
          EXPORTING
            i_msgid     = '00'
            i_msgty     = 'E'
            i_msgno     = '398'
            i_msgv1     = 'Field OBLIGATORY must not be empty'
    *          I_MSGV2     =
    *          I_MSGV3     =
    *          I_MSGV4     =
            i_fieldname = 'OBLIGATORY'
            i_row_id    = syst-index
            i_tabix     = syst-index
      ENDDO.
      CALL METHOD er_data_changed->display_protocol
    *    EXPORTING
    *      I_CONTAINER =
    ENDMODULE.                 " PBO_0100  OUTPUT
    Please note that this report dumps as soon as you close the log popup. However, this will not happen within your event handler method.
    Regards
      Uwe

  • Group cells in editable ALV

    Hello,
    We have a problem with an ALV as it doesn’t group the cells with the same value in sorted columns. The reason is that the ALV has an editable column.
    The ALV is called with the function REUSE_ALV_GRID_DISPLAY.
    If we make this column NOT editable, the values of these cells appear correctly grouped.
    But if we make any column in the ALV as editable (wa_fieldcatalog-edit = 'X'), then these cells appear ungrouped and with his value on each row.
    How can we keep the cells grouped if the ALV has an editable column?
    Thanks in advance.

    I have an ALV using FM 'REUSE_ALV_GRID_DISPLAY' with editables cells and the Sort works just fine in the editable column.
    have you defined in the USER_COMMAND form in the call of the ALV
    call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = sy-repid
          i_callback_pf_status_set = 'SET_STATUS' 
          i_callback_top_of_page   = 'TOP_OF_PAGE'
          i_callback_user_command  = 'USER_COMMAND'
          is_layout                = lv_layout
          i_save                   = 'A'
          it_fieldcat              = lv_fieldcat
        tables
          t_outtab                 = it_zfi_trans_cuenta.
    form user_command using p_okcode like sy-ucomm       "ok-code
                                               w_selfield type slis_selfield. "estruct. de linea
      w_selfield-refresh = 'X'.
    endform.

  • Editable ALV using OO concept

    Hi Experts,
    We have a  requirement for an editable ALV grid where the values can be changed in the ALV and needs to be validated.
    Once the user has made an entry in the ALV grid,
    Even if the user has entered values in all the cells, It should throw error log only for the rows selected  by the user .
    Once the user has made correct entry in the field ( the row which was selected earlier and throwing error ), then the error log should be emptied and it should allow for processing.
    Please help us on this requirement, if possible with the code.
    Thanks in Advance,
    Vidya
    Edited by: vidya vidya on Oct 16, 2009 8:30 AM

    Hi,
    in the wiki (code gallery) you can find several examples.
    e.g.
    http://wiki.sdn.sap.com/wiki/display/ABAP/InteractiveEditableOOALVgridwithdynamicitab,FCATandENTERkeyeventtrigger
    Best regards.

  • Row wise total in editable ALV

    hello all,
                I am workin on editable alv, the user need to enter the values in the editable fields and in the last column(non-editable) i need to populate the total row wise,as soon as user enters a value and goes to next editable cell or on entering a vale and press enter.how to accomplish this task...
    with regards,
    sandeep akella.
    Edited by: sandeep akella on Aug 20, 2009 1:58 PM

    You need to Implement the OnCellAction event.follow these steps;
    1. Goto WDDOMODIFYVIEW and place the following code
    IF first_time IS INITIAL.
        DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
        lo_cmp_usage =   wd_this->wd_cpuse_usg_alv( ).
        IF lo_cmp_usage->has_active_component( ) IS INITIAL.
          lo_cmp_usage->create_component( ).
        ENDIF.
        DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
        lo_interfacecontroller =   wd_this->wd_cpifc_usg_alv( ).
        DATA lo_value TYPE REF TO cl_salv_wd_config_table.
        lo_value = lo_interfacecontroller->get_model(
        CALL METHOD lo_value->if_salv_wd_table_settings~set_cell_action_event_enabled
         EXPORTING
            value = abap_true.
      ENDIF.
    2. Implement the onCellAction event as follows;
        Goto Methods tab, create a new method. Method Type- Event Handler , Event - ON_CELL_ACTION
    3. Now in this  method retrive the contents of the row and calculate the value as follows.
    DATA: l_element TYPE REF TO if_wd_context_element.
      DATA:ls_stru TYPE wd_this->element_cn_alv.
      DATA: l_node TYPE REF TO if_wd_context_node.
      l_node  = wd_context->get_child_node( 'CN_ALV' ).
      l_element = l_node->get_element(  r_param->index ).
      l_element->get_static_attributes( IMPORTING static_attributes = ls_stru ).
      ls_stru-last_col = ls_stru-col1+ls_stru-col2....+ ls_stru-col5. " add all the cells data
      l_element->set_static_attributes( exporting static_attributes = ls_stru ).

  • Capture contents from an editable alv

    I'm trying to capture fields from an editable alv. I have an update button in the application toolbar. So when i press this button, whatever changes I have done on the screen, the internal table should get updated. I'm using the function module    REUSE_ALV_GRID_DISPLAY.
    Can anybody help me out??

    Yes you can,
    If you have access to the element in the context that is bound to the row in the ALV then you can connect the message. Marking a * is not possible by default with the WD message manager and you willl need to do it manually. Use the element method of the message manager API for this purpose.

  • Retrieve front end values of editable alv in same format

    I have a problem to retrieve the front end values in editable alv filled by user.
    I am able to get it from MODIFIED CELL method but it gives the values after
    alv automatically conversion. For example if user filled 1 in cell of type numc
    then i want to keep it as 1 not as 00..001 format of numc.
    Same for when user fill alphbets in small letter the alv convert it in CAPS.
    I want to retain it as it as filled by user.
    Example: User filled aAbBcFG in a cell
    then it should update in database in same format not like AABBCFG as alv did
    <offer removed by moderator>
    Edited by: Rocky_S on Jan 20, 2011 7:50 AM
    Edited by: Rocky_S on Jan 20, 2011 7:51 AM
    Edited by: Thomas Zloch on Jan 20, 2011 11:24 PM

    Hi Srinivas I have used CONVERSION_EXIT_ALPHA_OUTPUT for number input. My problem is that
    when user fill 0 in the alv cell then alv automatically convert it into 00000000. My field is of type numc
    that why it converts in 00000000. I want to retrieve it as the user fill in alv cell. Through this function
    module the import parameter parameter is of numc format not as filled by user. In my case if it is 0
    then then i should retrieve it as it is.
    My actual scenario is i have a numc type field in alv and i want to keep it as mandatory. For which i am
    writing a logic. Because in my table there is a valid entry of 0. If user do not fill 0 then it takes automatically
    0 as input because of initial value of numc field. I want to restict it. I can not convert this field as char.
    Give me some logic to make numeric field mandatory.

  • Editable ALV & Foreign Key Check

    I am working on an Editable ALV. Here if I try to enter some value into a field which doesnt exist in the corresponding Check table of the field, ALV throws me an error. This scenario is working fine.
    But in some scenarios I populate the ALV table from a Z table (Z table has the same strucutre as the ALV table) and then show this to the user as an editable ALV but in this scenarios if some erroneous values exist in my Z table for a particular fieId I am not getting the Foreign Key check I mentioned earlier.  Here I was hoping to get error message after SET_TABLE_FOR_FIRST_DISPLAY !
    I am using CL_GUI_ALV_GRID, has anyone found a workaround for this
    Antony

    Hi Antony,
    you can INHERIT a class from CL_GUI_ALV_GRID and then redefine SET_TABLE_FOR_FIRST_DISPLAY adding the raising EVENT data_changed for all cells.
    Regards,
    Clemens

  • Editable alv: add custom validation and display "errors" in protocol list

    Hi,
    What I want to do:
    PAI validation of editable alv with displaying error's in the protocol list by adding custom entries to the existing protocol object.
    What is my problem:
    After registering "data_changed event", the protocol list don't appear.
    My understanding is, that the object "er_data_changed" is passed by the event "data_changed"
    an so I thought I can add some more entries to the protocol list.
    After "de-registering" the "data_changed" event, the protocol appears with the standard errros messages (e.g. "input to numeric" by enter charachters)
    One more hint:
    By creating a new object "er_data_changed" in the handler method the protocol list works, but I would like to append entries to the object that was passed with the event.
    Probably I've misunderstand something, please help !
    My coding:
    PAI:
    trigger event "data_changed" -> calls handler method
      CALL METHOD r_myalv->check_changed_data
        IMPORTING
          e_valid = is_valid.
    stop processing
      IF is_valid NE 'X'.
        MESSAGE 'invalid input' TYPE 'E' .
      ENDIF.
    handler method:
    handle_data_changed FOR EVENT data_changed  OF cl_gui_alv_grid  IMPORTING e_ucomm
                                                                                    er_data_changed.
    METHOD handle_data_changed.
        data: ls_mod_cell type lvc_s_modi.
         CALL METHOD er_data_changed->add_protocol_entry
                    EXPORTING
                           i_msgid     = 'SU'
                           i_msgty     = 'E'
                           i_msgno     = '000'
                           i_msgv1     = 'This is a test !'
                           i_fieldname = ls_mod_cell-fieldname.
         er_data_changed->refresh_protocol( ).
         er_data_changed->DISPLAY_PROTOCOL( ).
    ENDMETHOD.                    "handle_data_changed

    Dear Olaf,
        If understood correctly, you want to Edit an ALV and do some data validations when some data is changed in an ALV.   To do this follow the following steps:
    1.   Before displaying ALV, Register the edit event.
    * Set cell modified to trigger data_changed
    CALL METHOD go_alv_grid->register_edit_event
    EXPORTING
    i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    2.  Register the event DATA_CHANGED of class CL_GUI_ALV_GRID & handle the event.
    SET HANDLER lo_event_receiver->handle_data_changed FOR go_alv_grid.
    The event DATA_CHANGED of class CL_GUI_ALV_GRID has a parameter ER_DATA_CHANGED which is of type CL_ALV_CHANGED_DATA_PROTOCOL.
    This er_data_changed has internal table MT_MOD_CELLS(contains index of records changed ) & MP_MOD_ROWS(contains the changed row), using these update your internal table accordingly.
    DATA : wa_mod_cell TYPE lvc_s_modi.
    FIELD-SYMBOLS: <fs> TYPE table.
    LOOP AT er_data_changed->mt_mod_cells INTO wa_mod_cell.
    ASSIGN er_data_changed->mp_mod_rows->* TO <fs>.
    READ TABLE <fs> INTO wa_output INDEX wa_mod_cell-tabix.
    MODIFY lt_output FROM wa_output INDEX wa_mod_cell-row_id.
    ENDLOOP.
    3.   Here it self you can do the required data validations(No need of any PAI modules) as below.
    IF wa_orders-zfstfirmtyp = c_9.
    MESSAGE s288(zcsp).
    DELETE er_data_changed->mt_mod_cells.
    EXIT.
    ENDIF.
    Regards
    Kesava

  • Save changed data in editable ALV

    Hi experts,
    I have a problem with an editable ALV. I get data out of a table and show it with my web dynpro application in an alv. Now I made the alv editablke, so that I can change the content of each cell in the alv in the web browser. But how will this changed data be saved? I want that it will be changed after ENTER or clicking a save button. I have a button, but all I tried yet brought no success.
    Which code has to be in which method? Have I to do something eith the context. How can I reach that the changed content is also changed in the table, so that after reload the web dynpro application, the changed content is shown?
    It would be nice if you had an answer with code examples and the exact place where to put it in, because I am very new to ABAP and WD4A.
    Thanks a lot!
    Best Regards
    Ingmar

    If you look on the following lokn, there is the tutorial "Editing ALV in Web Dynpr for ABAP".
    There is described how to save the data. But in the implementation of On_data_check on page 8 and 9 the code detail for saving the data to database is missing, because the flight model shall not be changed.
    Would the missing code be the solution? What is the code?
    Thanks!!!
    Best Regards Ingmar
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1

  • Link to action in editable ALV

    Hi experts,
    I have an editable alv with a column where I implemented the UI Element "Linktoaction" for the cells of this column. I implemented it in the WddoInit-Method in my view with the alv:
    lr_column_settings ?= l_value.
      lr_column = lr_column_settings->get_column( 'LINK' ).
      CREATE OBJECT lr_linktoaction.
      lr_linktoaction->set_text( value = 'Go to Detail' ).
    If I have an normal InputField I need:
    lr_column->set_cell_editor( lr_input_field ).
    What have I to do for getting an action for clicking on the Link? The link with the text "Go to Detail" is displayed in the editable alv. But how can I navigate to another view by clicking?
    Thanls a lot for your help!!
    Best Regards
    Ingmar

    Hi Ingmar,
    Implement 'ON_CLICK_EVENT' in the same view where u have ALV. Clicking on the link in the cell using link to action gives you the following information which u can use (pass to other view etc..) -
    COLUMN_ID
    INDEX
    ATTRIBUTE
    VALUE
    You can read these values and store them in a node.
    Create one node in the view by name 'EVENT_PROPERTIES' with attributes 'NAME' and 'VALUE' of type string both and use the below code in on_click_event. Here I am navigating to the next view after clicking the link, you can do whatever u want depending on ur requirement.
      DATA: lr_node TYPE REF TO if_wd_context_node,
            lt_event_properties TYPE if_models_list_view=>elements_event_properties,
            ls_event_properties TYPE if_models_list_view=>element_event_properties.
      FIELD-SYMBOLS: <l_value> TYPE ANY.
    fill internal table
      ls_event_properties-name = 'COLUMN_ID'.
      ls_event_properties-value = r_param->column.
      APPEND ls_event_properties TO lt_event_properties.
      ls_event_properties-name = 'INDEX'.
      ls_event_properties-value = r_param->index.
      APPEND ls_event_properties TO lt_event_properties.
      ls_event_properties-name = 'ATTRIBUTE'.
      ls_event_properties-value = r_param->attribute.
      APPEND ls_event_properties TO lt_event_properties.
      ASSIGN r_param->value->* TO <l_value>.
      ls_event_properties-name = 'VALUE'.
      ls_event_properties-value = <l_value>.
      APPEND ls_event_properties TO lt_event_properties.
    navigate to context node EVENT_PROPERTIES
      lr_node = wd_context->get_child_node( 'EVENT_PROPERTIES' ).
    bind internal table to context node
      lr_node->bind_table( lt_event_properties ).
      wd_this->fire_to_pi_main_view_plg( ).
    Regards,
    Gaurav

  • Tabstrip with editable ALV:  change tab - modification lost

    Hi,
    I will first try to describe the situation that I am having:
    I have a screen with on it various tabstrips using CL_BUS_TABSTRIP etc. 
    Each tabstrip has it's specific editable ALV grid.  (CL_GUI_ALV_GRID)
    Now, the data changed event gets triggered whenever I edit a field and leave it... which is perfect.
    (          CALL METHOD <fs_object>->register_edit_event
                EXPORTING
                   i_event_id = cl_gui_alv_grid=>mc_evt_modified.                           )
    But when I edit a field and instead of leaving it just click on another tab.. then the change goes lost.  (data changed event not triggered)
    How can I make sure that the change on the alv DOES get transferred to the internal table behind it?
    Best Regards
    Edited by: Rob Burbank on Apr 21, 2010 10:10 AM

    I am afraid you can't catch the changes made in ALV without pressing the enter key for MC_EVT_ENTER or without leaving the cell for MC_EVT_MODIFIED . Anyhow you may try using...
    CALL METHOD oref_main->check_changed_data.
    ...in PAI to capture the changes, but I think it's unlikely to happen so.
    Regards
    Marcin

Maybe you are looking for

  • Opening mail application from the dock sometimes doesn't open window.

    In Mountain Lion, sometimes when I open Mail on the dock with a single left mouse (or touchpad) click, the Mail application opens, as shown in the menu bar, but a mail window doesn't open. I must then click or double click on it to get it to open a w

  • Difference Maximum Size for same Datatype

    Hi, Just wanted to know the reason behind Oracle permitting/having different Maximum Length Limits (Size) for the same Datatype between SQL and PL-SQL. Does this have anything to do with the ANSI SQL standards ? Data Type Maximum Size in PL/SQL Maxim

  • DMS - Print of PDF through  'DOCUMENT_SHOW_DIRECT'

    Hi After upgrading our Adobe Acrobat from version 5 to 7, we can't any longer print our attached PDF-documents. We have created a program, based upon PSFC_DOCLINK_DIST, where we print various types of documents, Word, Excel, PDF and so on. The print-

  • Missing message in mail sended with SO_NEW_DOCUMENT_ATT_SEND_API1

    Hi all, I've created a new function module which calls the SAP standard function module SO_NEW_DOCUMENT_ATT_SEND_API1. The mail is sent to the correct receiver. <b>The problem:</b> The message field in all my mails is empty. Only subject field is fil

  • Automatic tabbing at end of field in my dynpro

    HI, I want automatic tabbing at end of field for my dynpro field hours_start minutes_start hours_end minutes_end that are only of 2 char in dynpro. E.g. i write 15102030 i want that automatically the dynpro field is hours_start = 15 minutes_start = 1