ALV Grid Options ( Editable/Drill Down)

Hi ,
    I have a  requirement, in which i need a replace a view content with an editable,drop
down to fields in an ALV grid and should be able to drill down or a pop up view on some of the field
attributes. can you please provide some sample code to do in ABAP WEBDYNPRO.
Thanks and Regards,
Kumar

Hi,
Please refer this article: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c060fcb4-2c62-2b10-d2b2-f32407a5cc6f
I hope it helps.
Regards
Arjun

Similar Messages

  • ALV Grid Handle Edit Event (Lost Focus)

    Hi all,
    I have some problems with the ALV Grid.
    Target:
    I have an ALV Grid with editable Column. If the user insert, update or delete the content of the column and leave the column (column lost focus) i'd like to do somthing - this means I need a event for this action. Can anybody help me to solve this problem?
    Thanks Stefan

    Use Event data_changed and data_changed_finished of the cl_gui_alv_grid.Then all you have to do is registering your event to the ALV and fill the methods with what you want to do.In ALV Grid, There is no event to capture the lost focus of a column if you don't modify it.
    CLASS lcl_event_receiver DEFINITION.
        METHODS:
    *$ Check the change
           handle_data_changed FOR EVENT data_changed
                                   OF cl_gui_alv_grid
                               IMPORTING er_data_changed
                                         e_ucomm
                                         e_onf4
                                         e_onf4_before
                                         e_onf4_after,
           handle_data_changed_finished
                               FOR EVENT data_changed_finished
                                   OF cl_gui_alv_grid
                                IMPORTING e_modified
                                         et_good_cells
                                         sender,
    ENDCLASS.                    "LCL_EVENT_RECEIVER DEFINITION

  • Return Option after drill down in the DB

    Hello,
    Got a requirement to remove return option after drill down in the Dashboard?
    Appreciate your help in achieving this.
    Thanks,
    Gouda.

    Gouda,
    Check this,
    Sasi Nagireddy
    Mark if helps,
    Thanks,

  • ALV Grid Display Editable Field Disables Zebra Style

    Hi all,
    First of all, I want to say: "I did my research." I found a post with a very similar question but not identically my case, or at least I can't solve it the same way. [Here is the reference post.|Re: Check box impact on ALV grid (Using OOPS)]
    My Goal: I have an ALV Grid which I want to display using the ZEBRA style in the layout and also make one field in the field catalog editable.
    My Issue: As soon as you make one field editable in the field catalog using the EDIT option, the ZEBRA style in the layout does not works. I also have key fields in the ALV Grid which I want to keep as KEY and which get painted dark blue.
    I can't use the individual row coloring method used in the reference link above since this overrides the blue coloring of the key fields in the ALV. I haven't gone through all the effort of individually painting each cell on the grid, and honestly I don't think it is efficient.
    My Question: Is there a way to have editable fields in the ALV Grid and keep the ZEBRA setting working?
    Please, I will really appreciate if you can read and try to understand my issue before posting incoherent solutions or answers. I don't want to waste anybody's time nor mine.

    Shiva,
    Thanks for your reply; it someway addresses what I am looking for. Unfortunately, I've already went through that reference code; it has exactly the same problem that I am facing.
    If you take that code for example, and you throw it u201Cas-isu201D in your ABAP editor you'll see that even when the ZEBRA style is being used in the layout, since the EDIT option in the field catalog is being set for field NETPR, the ZEBRA style gets lost; only the whole editable column gets white. You can go ahead and play a little bit with that piece of code and you will see what I am saying.
    Regards

  • ALV Grid and a Drop-Down column

    Hi All, 
    Currently I'm working on a Web Dynpro ABAP component where I'm display several columns of data within an ALV Grid. 
    I have made two of the columns input fields so the User can update the back-end tables.  I want to made these two columns not only input fields, but I want them to have "Drop Down" capability (Value and Text) so that the User can pick  only standard values.  
    Does anyone have any sample code I could use. 
    Thank you in Advance.
    Paul

    Hi Paul,
    I dont think that you can provide the capability of both the input field & dropdown to the same columns. (Coz using input fields you should be able to enter any value you wish whereas using a dropdown you can enter a value from within the value set specified.) If you want to create a dropdown within your ALV columns then just go through the code snippet below:
    I have a context node by name NODE with the attributes from SFLIGHT. I have 2 additional attributes TEMP & TEMP_NEW under the same node. I have typed them with my custom data element so that they can use the value range defined at the domain level. My task is to display these 2 columns TEMP & TEMP_NEW as dropdowns with the permissible values coming from their associated domains.
    Regards,
    Uday
    METHOD build_alv .
      DATA:
        lr_alv_usage       TYPE REF TO if_wd_component_usage,
        lr_if_controller   TYPE REF TO iwci_salv_wd_table,
        lr_config          TYPE REF TO cl_salv_wd_config_table,
        lr_column_settings TYPE REF TO if_salv_wd_column_settings,
        lt_columns         TYPE        salv_wd_t_column_ref,
        lr_link            TYPE REF TO cl_salv_wd_uie_link_to_action,
        lr_checkbox        TYPE REF TO cl_salv_wd_uie_checkbox,
        lr_image           TYPE REF TO cl_salv_wd_uie_image,
        lr_dropdown        TYPE REF TO CL_SALV_WD_UIE_DROPDOWN_BY_KEY.
      FIELD-SYMBOLS
        <fs_column> LIKE LINE OF lt_columns.
    Instantiate the ALV Component
      lr_alv_usage = wd_this->wd_cpuse_alv( ).
      IF lr_alv_usage->has_active_component( ) IS INITIAL.
        lr_alv_usage->create_component( ).
      ENDIF.
    Get reference to model
      lr_if_controller = wd_this->wd_cpifc_alv( ).
      lr_config        = lr_if_controller->get_model( ).
    To get the dropdowns displayed you need to set the table to editable by using below statement
      lr_config->if_salv_wd_table_settings~set_read_only( abap_false ).
    Set the UI elements.
      lr_column_settings ?= lr_config.
      lt_columns = lr_column_settings->get_columns( ).
    You can use the below commented approach to fill the dropdowns instead of using a custom domain
    data: lr_node_info type ref to if_wd_context_node_info,
           lr_node      type ref to if_wd_context_node,
           wa_value_set type wdr_context_attr_value,
           lt_value_set type table of wdr_context_attr_value.
    lr_node = wd_context->get_child_node( name = 'NODE' ).
    lr_node_info = lr_node->get_node_info( ).
    wa_value_set-value = '1'.
    wa_value_set-text  = 'One'.
    insert wa_value_set into table lt_value_set.
    wa_value_set-value = '2'.
    wa_value_set-text  = 'Two'.
    insert wa_value_set into table lt_value_set.
    wa_value_set-value = '3'.
    wa_value_set-text  = 'Three'.
    insert wa_value_set into table lt_value_set.
    lr_node_info->set_attribute_value_set( name      = 'TEMP'
                                            value_set = lt_value_set ).
      LOOP AT lt_columns ASSIGNING <fs_column>.
        IF <fs_column>-id = 'CARRID'.
          CREATE OBJECT lr_link.
          lr_link->set_text_fieldname( <fs_column>-id ).
          <fs_column>-r_column->set_cell_editor( lr_link ).
        ENDIF.
        IF <fs_column>-id = 'TEMP'.
          CREATE OBJECT lr_dropdown
            EXPORTING
              selected_key_fieldname = 'TEMP'.
          <fs_column>-r_column->set_cell_editor( lr_dropdown ).
        ENDIF.
        IF <fs_column>-id = 'TEMP_NEW'.
          CREATE OBJECT lr_dropdown
            EXPORTING
              selected_key_fieldname = 'TEMP_NEW'.
          <fs_column>-r_column->set_cell_editor( lr_dropdown ).
        ENDIF.
      ENDLOOP.
    ENDMETHOD.

  • ALV grid with editable fields

    Dear Colleagues,
    I develop an ALV grid with OO standard methods. Before the first display of the table I define the editable fields. It works fine.
    I have a problem : if the table is empty and I press the standard icons "Append a line" or "Insert a line", the new line don't have the defined editable characteristics.for fields. Is there a standard method which I have forgotten ?
    Thanks a lot and kind regards
    Peter

    vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_delete_row.
        APPEND vs_toolbar_excluding TO i_toolbar_excluding.
        vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_append_row.
        APPEND vs_toolbar_excluding TO i_toolbar_excluding.
        vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_copy_row.
        APPEND vs_toolbar_excluding TO i_toolbar_excluding.
        vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_insert_row.
        APPEND vs_toolbar_excluding TO i_toolbar_excluding.
        vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_copy.
        APPEND vs_toolbar_excluding TO i_toolbar_excluding.
        vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_cut.
        APPEND vs_toolbar_excluding TO i_toolbar_excluding.
        vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_paste.
        APPEND vs_toolbar_excluding TO i_toolbar_excluding.
        vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_undo.
        APPEND vs_toolbar_excluding TO i_toolbar_excluding.
        vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
        APPEND vs_toolbar_excluding TO i_toolbar_excluding.
    * Displaying the output in ALV Grid
        vs_layout_grid-no_rowmark = 'X'.
        vs_layout_grid-zebra      = 'X'.
        vs_layout_grid-cwidth_opt = 'X'.
        vs_layout_grid-edit       = 'X'.
        vs_layout_grid-ctab_fname = 'CT'.
        vs_layout_grid-stylefname = 'CELLTAB'.
        CALL METHOD v_grid->set_table_for_first_display
          EXPORTING
            i_save                        = 'X'
            is_layout                     = vs_layout_grid
            it_toolbar_excluding          = i_toolbar_excluding[]
          CHANGING
            it_outtab                     = itab[]
            it_fieldcatalog               = it_fieldcat[]
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            OTHERS                        = 4.
        IF sy-subrc NE 0.
          MESSAGE 'ALV Grid display unsuccessful' TYPE 'I'.
          STOP.
        ENDIF.                             " IF sy-subrc NE 0
      ELSE.                                " IF w_custom_container...
    * Refresh the container if it already exists
        CALL METHOD v_grid->refresh_table_display
          EXCEPTIONS
            finished = 1
            OTHERS   = 2.
        IF sy-subrc NE 0.
          MESSAGE 'Refreshing the container is not successful' TYPE 'I'.
          STOP.
        ENDIF.                            

  • Problem with ALV grid in edit mode

    Hello, gurus!
    I have a problem with ALV-grid. Sometimes when I call F4 help for a cell, data is inserted in a different cell.  And when I call check_changed_data method, my internal table (passed to ALV-control in set_table_for_first_display) does not updates properly. In what can be a problem?
    Thanks,
    Mikhail

    Hi Prabhu,
    MODULE pbo_100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      title_of_report = text-010.
      SET TITLEBAR '0100' WITH title_of_report.
      DATA: g_event_receiver TYPE REF TO lcl_event_handler.
      IF z_custom_container IS INITIAL .
        CREATE OBJECT z_custom_container
          EXPORTING
            container_name = 'ALV_ZAC'.
        CREATE OBJECT alv_grid
          EXPORTING
            i_parent = z_custom_container.
        g_repid = sy-repid.
        gs_variant-report = g_repid.
        x_save = 'A'.
        PERFORM check_alv_grid_fields.
        ps_layout-cwidth_opt = 'X'.
        ps_layout-edit = 'X'.
        CALL METHOD alv_grid->set_ready_for_input
          EXPORTING
            i_ready_for_input = '1'.
    *    CALL METHOD alv_grid->register_edit_event
    *      EXPORTING
    *        i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        APPEND   s_list_rec   to it_list_rec.
        CALL METHOD alv_grid->set_table_for_first_display
          EXPORTING
            is_layout       = ps_layout
            is_variant      = gs_variant
            i_save          = x_save
          CHANGING
            it_fieldcatalog = pt_fieldcat
            it_outtab       = it_list_rec[].
        CALL METHOD alv_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        CALL METHOD alv_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    ENDIF.
    FORM check_alv_grid_fields .
      DATA: ls_fcat LIKE LINE OF pt_fieldcat.
    REFRESH pt_fieldcat .
    CLEAR: ps_layout, ls_fcat.
      ls_fcat-fieldname = 'VBELN'.
      ls_fcat-ref_field = 'VBELN'. ls_fcat-ref_table =  'LIPS'. " .
      ls_fcat-outputlen = 9.
    *  ls_fcat-datatype   = 'CHAR'.
    *  ls_fcat-inttype    = 'C'.
      APPEND  ls_fcat TO pt_fieldcat.
      CLEAR: ls_fcat.
      ls_fcat-fieldname = 'ERDAT'.
      ls_fcat-ref_field = 'ERDAT'. ls_fcat-ref_table = 'LIPS'.
      ls_fcat-outputlen = 9.
    *  ls_fcat-f4availabl = 'X' .
    *  ls_fcat-datatype   = 'DATS'.
    *  ls_fcat-inttype    = 'D'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR: ls_fcat.
    ENDFORM.                    " check_alv_grid_fields
    FORM save_p .
      CLEAR l_valid.
      CALL METHOD alv_grid->check_changed_data
        IMPORTING
          e_valid = l_valid.
      IF l_valid IS INITIAL.
        CALL FUNCTION 'POPUP_TO_INFORM'
          EXPORTING
            titel = text-i01
            txt1  = text-i02
            txt2  = text-i03
            txt3  = text-i04.
      ELSE.
        i_dat_reg = zrumm_prr-cdprr.
        CLEAR is_temp_otc.
        freshit i_prrpus_fax.
        freshit i_list2_ot.
        LOOP AT it_list_rec INTO s_list_rec.
          MOVE-CORRESPONDING s_list_rec TO i_list2_ot.
          i_list2_ot-fgrup = 'RECE'.
          i_list2_ot-prrnu = i_num_prr.
          APPEND i_list2_ot.
          MOVE-CORRESPONDING s_list_rec TO i_prrpus_fax.
          APPEND i_prrpus_fax.
        ENDLOOP.
      ENDIF.
    Edited by: Mikhail Sarychev on Mar 16, 2011 6:41 AM
    Edited by: Mikhail Sarychev on Mar 16, 2011 6:49 AM
    Edited by: Mikhail Sarychev on Mar 16, 2011 6:49 AM

  • Group feature at ALV grid with editable columns

    Am I right ?
    Group function by using a sorted layout is disabled while having one (or more) editable columns, isn't it ?
    ... or is there a possibility to use gouped rows ?
    Greetings
    Markus

    Also...
    *& Report ZDEMO_ALVGRID_EDIT *
    *& Example of a simple ALV Grid Report *
    *& The basic ALV grid, Enhanced to display specific fields as *
    *& editable depending on field value *
    REPORT ZDEMO_ALVGRID_EDIT .
    TABLES: ekko.
    TYPE-POOLS: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    statu TYPE ekpo-statu,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    menge TYPE ekpo-menge,
    meins TYPE ekpo-meins,
    netpr TYPE ekpo-netpr,
    peinh TYPE ekpo-peinh,
    field_style TYPE lvc_t_styl, "FOR DISABLE
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA: it_fieldcat TYPE lvc_t_fcat, "slis_t_fieldcat_alv WITH HEADER LINE,
    wa_fieldcat TYPE lvc_s_fcat,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE lvc_s_layo, "slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM set_specific_field_attributes.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    wa_fieldcat-fieldname = 'EBELN'.
    wa_fieldcat-scrtext_m = 'Purchase Order'.
    wa_fieldcat-col_pos = 0.
    wa_fieldcat-outputlen = 10.
    wa_fieldcat-emphasize = 'X'.
    wa_fieldcat-key = 'X'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'EBELP'.
    wa_fieldcat-scrtext_m = 'PO Item'.
    wa_fieldcat-col_pos = 1.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'STATU'.
    wa_fieldcat-scrtext_m = 'Status'.
    wa_fieldcat-col_pos = 2.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'AEDAT'.
    wa_fieldcat-scrtext_m = 'Item change date'.
    wa_fieldcat-col_pos = 3.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'MATNR'.
    wa_fieldcat-scrtext_m = 'Material Number'.
    wa_fieldcat-col_pos = 4.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'MENGE'.
    wa_fieldcat-scrtext_m = 'PO quantity'.
    wa_fieldcat-col_pos = 5.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'MEINS'.
    wa_fieldcat-scrtext_m = 'Order Unit'.
    wa_fieldcat-col_pos = 6.
    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 = 7.
    wa_fieldcat-outputlen = 15.
    wa_fieldcat-datatype = 'CURR'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'PEINH'.
    wa_fieldcat-scrtext_m = 'Price Unit'.
    wa_fieldcat-col_pos = 8.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    FORM build_layout.
    Set layout field for field attributes(i.e. input/output)
    gd_layout-stylefname = 'FIELD_STYLE'.
    gd_layout-zebra = 'X'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_user_command = 'USER_COMMAND'
    is_layout_lvc = gd_layout
    it_fieldcat_lvc = it_fieldcat
    i_save = 'X'
    TABLES
    t_outtab = it_ekko
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
    UP TO 10 ROWS
    FROM ekpo
    INTO CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM. " DATA_RETRIEVAL
    *& Form set_specific_field_attributes
    populate FIELD_STYLE table with specific field attributes
    form set_specific_field_attributes .
    DATA ls_stylerow TYPE lvc_s_styl .
    DATA lt_styletab TYPE lvc_t_styl .
    Populate style variable (FIELD_STYLE) with style properties
    The NETPR field/column has been set to editable in the fieldcatalog...
    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.
    "set field to disabled
    APPEND ls_stylerow TO wa_ekko-field_style.
    MODIFY it_ekko FROM wa_ekko.
    ENDIF.
    ENDLOOP.
    endform. " set_specific_field_attributes
    REWARD POINTS IF usefful !!

  • IDA ALV - different behavior regarding "drill-down" for grouped attributes after upgrade to ERP 6.0 EHP7 SPS5

    Hello Experts,
    we have  upgraded our Dev System to ERP 6.0 EHP 7 SPS5 (coming from SPS4).
    We had implement an example with an IDA ALV. On SPS4 we could make a "drill-down" to the single lines of grouped attributes. Now with SPS5 this is not possible anymore if the grouping is done for more than one attribute.
    On the following screenshot it scan be seen that the grouping is done over a Peril attribute and the Currency. I can only make a drill-down via the peril attribute, so that the aggregated values per currency are displayed. ON SPS4 it was possible to make a further drill-down for the currency attribute, so that the different single lines were visible which were part of the grouping/aggregation.
    SPS5 behavior:
    SPS4 behavior:
    I did not found any new settings which steers the behavior. Also I did not found any note which gives a hint that this is a bug.
    Does anyone know if the behavior for that was changed and why?
    Thx & Best regards,
    Florian

    Hi Florian,
    it is related with the currency field and it seems to be a bug. Please open a ticket to get the problem fixed. The component is BC-WD-CMP-ALV.
    Cheers
    Jens

  • Problem with alv grid control editable

    Hello all. I ask your help with this question because I did not find the answer in the forum. Sorry for my pour english.
    I have an alv grid control (OO) with the standards buttons 'insert a line', 'delete a line', 'copy a line'.
    My problem is I want to catch the event of these buttons, because after I register the events mc_evt_enter y mc_evt_modifies, when I push the button to insert a new line the alv grid show the new line and then get a dump with error: Field symbol has not yet been assigned.
    My problem is that no event is launched when I push the button. I tried to catch the event before command but it does not happen.
    It is like these standard buttons works apart and it is not possible to find out what they are doing.
    I have read the manual easy reference for alv grid control, and I created the class lcl_event_handler exactly equal.
    I have tried to debug the code in order to find the error but I can find out where it has been done.
    Thank you in advance. If anybody needs to see my code I will send you or post you.

    David,
    What you need to do for that is to enable the editing field by field. You will have to add a field STYLE type LVC_T_STYL to the DATA table. This nested internal table will hold the information for each field of the row, whether the column is editable or not. So, if you have 5 columns, then the nested internal table will have 5 rows for each row of the main internal table.
    Once this is done, you will have to append a blank row to the table, making all the fields editable and REFRESH the display.
    Regards,
    Ravi
    Note: Please mark the answers as helpful if they help.

  • ALV grid field editable/non editable at runtime

    Hi All,
    I am working on alv grid using containers. I have to make few cells in grid to editable and few othres to non editable which I did using styles by defining table type lvc_t_styl and updating my main internal table. Now once grid is displayed for first time (using set_table_for_first_display) it has required fields in editable and non editable as required. But now on triggering of data_changed event I have to change the editable cells to non editable and the non editable cells to editable. I tried doing this as same way as I have done before calling set_table_for_first_display method i.e. by  defining table of type lvc_t_styl in data_changed event and modifying my main internal table but this time the editable fields are changed to non editable and again becomes editable. Same problem with non editable cells also. They become editable and again becomes non ediatble of there own. Can anyone suggest any solution.
    <b>Note: Points awarded for helpful answers</b>
    null

    Hi,
    Check this link.I am explaining the steps for this.
    Kindly reward points by clicking the star on the left of reply,if it helps.<a href="https://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database(OOPS)">Editing OOPS ALV</a>

  • ALV GRID CELL EDIT without object use

    Hi !
    I'm not using grid object, I'm using the standard
    function.
    I want to edit one cell only in the grid,
    again - I'm not using the alv grid object.
    how can I change the style of one cell.
    thank you
      Adi

    Hi,
    You can edit one column as below.But I am not sure about editing a cell.
      DATA: line_fieldcat TYPE slis_fieldcat_alv.
    line_fieldcat-fieldname = 'WS_CHAR'.
      line_fieldcat-tabname   = 'I_DATA'.
      line_fieldcat-seltext_l = 'Test Character Field'.
      line_fieldcat-datatype  = 'CHAR'.
      line_fieldcat-outputlen = '15'.    
      line_fieldcat-edit      = 'X'.     
      APPEND line_fieldcat TO i_fieldcat. " column.

  • ALV Grid in Edit mode

    Dear all,
    I would like to do a refresh of the ALV GRID table display in event "handle_data_changed_finished".
    "refresh_table_display" is NOT working.
    I obviously need to go through PAI & PBO to refresh the table display.
    Is there something to syncronize the data?
    There must be an easy solution...
    bye
    Niko
    Niko Prindesis
    Itelligence AG

    Dear Andreas,
    thank you!
    If I call "SAPGUI_SET_FUNCTIONCODE" in "handle_data_changed_finished", I can trigger the PAI/PBO.
    So this solves my problem!
    But ...
    ... isn't there a solution without going through PAI/PBO???
    I want to stay in the ALVGrid control!
    bye
    Niko

  • ALV Grid after EDIT has to UPDATE DB........

    Hi,
    I am using FM 'REUSE_ALV_GRID_DISPLAY' and in FIELD CATALOG I set EDIT option for some coloumns.
    Now every thing is working fine and values are changing in output when I press ENTER after value is changed.
    Now I want to know how to catch that changed values in Internal table and I want to Update DATABASE Table.
    So let me know what are the events I have to process.
    If any one has example code plzzzz post it.
    Thanks in advance.

    Hi,
    Here is the sample code.If you executed the program and edited something,then after pressing back you will get the changed value in output.For that,I have used loop..Endloop. after FM.SInce your requirement is to update DB,you use
    modify db from table itab.
    That will insert/update the entries in db.
    Kindly reward points by clicking the star on the left of reply,if it helps.
    TYPE-POOLS: slis.
    DATA: report_id LIKE sy-repid.
    DATA: ws_title TYPE lvc_title VALUE 'An ALV Report'.
    DATA: i_layout TYPE slis_layout_alv.
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv.
    types : begin of ty,
    pernr type pa0001-pernr,
    SEQNR type pa0001-seqnr,
    end of ty.
    data itab type standard table of ty.
    data wa type ty.
    select pernr seqnr from pa0001 into table itab.
    report_id = sy-repid.
    PERFORM f1000_layout_init CHANGING i_layout.
    PERFORM f2000_fieldcat_init CHANGING i_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = report_id
    i_grid_title = ws_title
    is_layout = i_layout
    it_fieldcat = i_fieldcat
    i_save = 'A'
    TABLES
    t_outtab = itab
    EXCEPTIONS
    program_error = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *Use modify statement here instead of loop
    <b>loop at itab into wa.
    write : / wa-pernr, wa-seqnr.
    endloop.</b>
    FORM f1000_layout_init USING i_layout TYPE slis_layout_alv.
    CLEAR i_layout.
    i_layout-colwidth_optimize = 'X'.
    i_layout-edit = 'X'.
    ENDFORM.
    FORM f2000_fieldcat_init CHANGING i_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: line_fieldcat TYPE slis_fieldcat_alv.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'PERNR'. " The field name and the table
    line_fieldcat-tabname = 'ITAB'. " name are the two minimum req.
    line_fieldcat-key = 'X'. " Specifies the column as a key (Blue)
    line_fieldcat-seltext_m = 'Personal No.'. " Column Header
    APPEND line_fieldcat TO i_fieldcat.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'SEQNR'.
    line_fieldcat-tabname = 'ITAB'.
    line_fieldcat-seltext_l = 'No. of records with same key'.
    line_fieldcat-edit = 'X'. APPEND line_fieldcat TO i_fieldcat.
    ENDFORM. " f2000_fieldcat_init

  • Content Area: Cannot edit/drill down to folders at the lowest level

    URGENT: Need your help.
    I am using Oracle Portal 3.0.6 (Production) installed on Win NT 4.0 Server with Oracle 8.1.7. I am working on hosting a website for my development group.
    I created a Content Area and associated it with a page style. Then I created numerous folders to meet the requirements of the various product teams working in my team. Under each folders, I created various sub-folders. Now I want to add items under each folder I created. Earlier, using the link "Edit Folder", I could do by clicking on the folder under which I wanted to create an item. Now when I click on the folder, it returns back the same page showing all the folders along with the icons meant for "Edit", "Add", "Delete", "Move" and "Copy". Nothing is happening and I am stuck here. It displays all the sub-folders with links upto 2-level, since I set the navigator property to the level 2. But I cannot navigate to the sub-folder created at the third level by clicking on the sub-folder link above it (at the 2-level) and add any items under the clicked folder.
    Only mistake I could think about was by mistake, I tried to delete a content area which was created for test purpose. There were folders created under this. But I attempted to delete the content area directly without deleting the folders underneath. I got an error saying ".... child records exist". Later while clicking on the tab "content area", I was getting the following error:
    An unexpected error ORA-06503: PL/SQL: Function returned without value occurred when executing action of the SITE datasource. (WWC-38130)
    (WWS-00000)
    Error:No data found (WWS-32101)
    ORA-1403: ORA-01403: no data found
    ORA-01403: no data found (WWC-36000)
    normal, successful completion (WWS-00000)
    All product teams already submitted the contents they want me to put on the folders but I am unable to resolve the above problem. Any help / pointer to the above issue will be highly appreciated.
    Thanks in advance
    Jay

    Hierarchy keys are set properly and "use for display" is checked.
    Dimension presentation hierarchies does not work only when I use particular two hierarchies togather in one report table. When each of hierarchies is displayed separately it works ok.

Maybe you are looking for

  • How to make the font shown in Flash CS5 ?

    The font can not be shown in Flash CS5, I download the Meiryo font from internet, and paste it to the font folder in windows7 control panel , when i re-open the flash cs5, it is not shown yet. who can tell me how to solve this problem?

  • How do I get rid of Inbox?

    It downloaded with another program and now I can't get rid of it. I have removed it from my search engine list and it is still there. It is not listed in Programs and Features on Control Panel so I can't uninstall it. It has taken over my home page.

  • Using Regular Expressions to replace Quotes in Strings

    I am writing a program that generates Java files and there are Strings that are used that contain Quotes. I want to use regular expressions to replace " with \" when it is written to the file. The code I was trying to use was: String temp = "\"Hello\

  • HT201335 AirPlay work but not mirroring?

    Why does AirPlay works with my ipad 2 and iTv but not the mirroring feature?

  • Implications of changing UPN suffix in preparation for Office 365 & DirSync

    Hi, I hoping someone can add their experience and recommendations for implementing DirSync with a new Office 365 installation. My client's current UPN suffix is xxx.local. We need to change this to their routable internet address of xxx.com. I've rea