Editable Column in ALV Column tree model

Hi Experts, I have created ALV tree using the class
CL_COLUMN_TREE_MODEL
,i have created some columns, and now  i have to make these columns editable, Please can anyone help me resolving this.

samthajain wrote:
Hi Experts, I have created ALV tree using the class
CL_COLUMN_TREE_MODEL
,i have created some columns, and now  i have to make these columns editable, Please can anyone help me resolving this.
I doubt this is possible at all. Once I tried different ways of achieving editable tree, but with no luck. You can only have text fields, buttons, checkboxes (editable too) as columns but not editable input fields.
Regards
Marcin

Similar Messages

  • Editing of a  Column of ALV Tree(OOPS) node

    is it possible to edit a column of node of ALV tree.
    i am using ALV class "CL_GUI_ALV_TREE".
    After searching existing threads, for the same issue..i found the following.
    1) Editable Tree ALV
      ( displays pop up window where user can change values and then transfer these changes back to ALV tree)
    2) Editable Field in ALV TREE Display Using OOPs
         (this approach is not working for ALV Tree)
    But i want to edit directly coulmn of a node of ALV tree.
    is it possible in  OOPS ALV Tree?
    if it possible, can any one provide the sample code,

    As you already noticed, this is not possible, but you may edit your fields outside the tree and bring your changes back to tree. I struggled with the same once but eventually used described alternative. If you use saplink you may check upgrade [chain and rename|http://code.google.com/p/saplink-chain-and-rename/downloads/list] where this approach is released. The code is free so you will be able to study and copy whatever you need from it.
    Editing in a pop up is also an alternative here.
    Regards
    Marcin

  • How to make a entire column editable in an ALV grid

    Hi all,
             I am trying to make a column editable in an ALV grid. For that I wrote the following code. In the below code I have set the 'edit' field of ls_fcat to 'X'. But Iam getting Runtime error. Can anyone help in resolving this problem or suggest any method to make a column editable in an ALV grid.
    form prepare_fc  changing go_fieldcat type lvc_t_fcat.
    data: ls_fcat type lvc_s_fcat.
    refresh: go_fieldcat.
    clear: ls_fcat.
    ls_fcat-reptext   = ' Safety Stock Figures'.
      ls_fcat-coltext    = 'Safety Stock Figures'.
      ls_fcat-fieldname  = 'EISBE'.
    ls_fcat-ref_table  = 'IMAT'.
      ls_fcat-edit = 'X'.
    modify go_fieldcat from ls_fcat.
      APPEND LS_FCAT TO GO_FIELDCAT.
    endform.
    Thanks & Regards,
    Vishnu Priya.

    ls_fcat-edit = 'X'.
    is correct only.
    have a look into this code
    struct_grid_lset  TYPE lvc_s_layo,
    i_grid_fcat    TYPE lvc_t_fcat
    DATA ls_fcat TYPE lvc_s_fcat.
      CLEAR ls_fcat.
      ls_fcat-fieldname = 'MONTH'.
      ls_fcat-ref_table = 'TYPE'.
      ls_fcat-ref_field = 'C'.
    <b>  ls_fcat-edit      = 'X'.</b>
      ls_fcat-coltext   = text-030."Month
      ls_fcat-seltext   = text-030.
      APPEND ls_fcat TO p_i_grid_fcat.
      CLEAR ls_fcat.
      ls_fcat-fieldname = 'YEAR'.
      ls_fcat-ref_table = 'TYPE'.
      ls_fcat-ref_field = 'C'.
      ls_fcat-coltext   = text-031."Year
      ls_fcat-seltext   = text-031.
      APPEND ls_fcat TO p_i_grid_fcat.
    CALL METHOD o_grid->set_table_for_first_display
          EXPORTING
            i_bypassing_buffer    =  space
            is_variant            =  ws_f_grid_disvar
            i_save                =  ws_c_grid_save
            is_layout             =  struct_grid_lset
          CHANGING
            it_outtab             =  i_grid_outs[]
            <b>it_fieldcatalog       =  i_grid_fcat[]</b>
            it_sort               =  i_sort_fcat.      " Period
    Also Check this code.Another way using field symbols.
    i_fieldcat    TYPE lvc_t_fcat,
           w_layout TYPE lvc_s_layo ,
           w_variant TYPE disvariant.
    FIELD-SYMBOLS : <lfs_fieldcat> TYPE lvc_s_fcat.
    *Default display
      LOOP AT p_fieldcat ASSIGNING <lfs_fieldcat>.
        CASE <lfs_fieldcat>-fieldname.
          WHEN 'GL_ACCT'.
            <lfs_fieldcat>-coltext = text-050.
            <lfs_fieldcat>-no_out = ' '.
            <lfs_fieldcat>-scrtext_l = text-050.
           <b> <lfs_fieldcat>-edit    = 'X'.</b>
    WHEN OTHERS.
        ENDCASE.
      ENDLOOP.
    Hope this helps.

  • Drag And Drop in ALV Column Tree

    Hello All,
    Can anyone tell me the method used for  a drag and drop in a column tree....
    i found it for a simple tree but not for a column tree.....
    thanks in advance....
    Regards,
    Praveen

    Check the links -
    drag drop required for alv column!
    drag and drop in a tree
    Drag&Drop within the Tree
    Drag&Drop within a tree
    Drag and drop in ALV tree
    Regards,
    Amit
    Reward all helpful replies.

  • Editable column in ALV list report

    Hi,
    I  developed a ALV list block report. I want to make some of column editable in my alv list report.I set WA_FIELDCAT-EDIT     = 'X' in fieldcatalog but it's not working.
    Could you please sugest.
    Regards,
    Mohit

    Hi Mohit ,
    please  check WA_FIELDCAT-EDIT = 'X'    fieldcat which you are passing to ALV grid function module is same  or different  .
    or use in this way
    perform get_fieldcat using  'QUANTITY'     'Enter.Qty'               12 'R' 'N' '000' 'N' 'N' 'N' 'N'  'N' 'N' .
    get_fieldcat  using   p_fieldname
                                p_txtname
                                p_length
                                p_justfy
                                p_keyfld
                                p_color
                                p_hotspt
                                p_total
                                p_sort
                                p_subtot
                                p_para1
                                p_zero .
      clear ms_fieldcat .
      ms_fieldcat-fieldname = p_fieldname .
      ms_fieldcat-seltext_l = p_txtname   .
      ms_fieldcat-ddictxt   = 'L'         .
      ms_fieldcat-outputlen = p_length    .
      ms_fieldcat-just      = p_justfy    .
      ms_fieldcat-lzero     = 'X'         .
      ms_fieldcat-checkbox = 'X'          .
      ms_fieldcat-edit     = 'X'          .
      if p_fieldname = 'CHK' .
        ms_fieldcat-checkbox = 'X'.
        ms_fieldcat-edit = 'X'.
      else.
        ms_fieldcat-checkbox = ' '.
        ms_fieldcat-edit = ' '.
      endif.
      if p_fieldname = 'QUANTITY' .
        ms_fieldcat-edit = 'X'.
      endif.
    regards
    Deepak.

  • Editing rows and columns in alv reports in webdynpro abap

    how edit row and columns in webdynpro abap ?
    can i add colors to salv repotrs for below and above range of values  how ?
    if possible send source code for it.............

    hi
    check out this link for editing the columns of ALV
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b
    check out for this thread as well for coloring ALV
    Coloring of selected table cells: Ideas wanted
    regards,
    amit

  • Setting the ALV Hierarchy tree with grid line between the columns and rows

    Hi Experts,
    I would like to ask if there is any suggestion on setting the ALV hierarchy tree to be separated by grid line between the columns and rows just like how it is display the same way in normal ALV grid.
    Thanks in advance.

    Hi Lin,
    The requirement which you have stated is not possible.
    Lin,
    Also i have a query regarding BADI ZME_PROCESS_REQ_CUST, which you had raised on SDN. You have marked the question as solved/answered.
    Changing the data of a customize field in purchase requisition
    Could you please let me know, the steps you did to update the screen fields through the BADI.
    I would really appreciate your reply, because i am facing exactly the same problem which you have mentioned.
    Thanks,
    Best regards,
    Prashant

  • Study Material on Alv Column Tree required.

    Hello friends,
    Pls let me know the links where I can get information regarding alv column tree creation. If u have any study material regarding the same then do forward me that too.
    Waiting for ur reply,
    Sweta.

    Hello Sweta,
    http://www1.sapdesignguild.org/resources/MiniSG/3_Managing/3_Overview_Tree_Variants.htm
    http://www1.sapdesignguild.org/resources/MiniSG/3_Managing/3_Design_Layout.htm
    <b>Check this demo program:</b>
    SAPCOLUMN_TREE_CONTROL_DEMO
    <b>
    Sample code:</b>
    http://www.geocities.com/victorav15/sapr3/utilities/zvvooa3.txt
    Regards,
    Beejal
    **Reward if this helps

  • Toolbar buttons in ALV column tree

    Dear Experts,
    Currently a report is being displayed using 2 custom container and class CL_GUI_ALV_COLUMN_TREE in a single screen Screen 100.
    Funtions like Select all, Deselect All, Expand All, Colapse all are in the GUI status of this Screen 100.
    <b>Q1</b>. Is it possible to have buttons on the container itself (instead of having it in the GUI status of Scr. 100) and have the above funtions work for ALV column tree .
    <b>Q2.</b> There exists a check box in each row of the node in both the containers which is meant for comparing data between two containers.
    e.g the user Checks one row of the first container (ALV tree output) and another in 2nd container and press Compare button which is present in Scr 100 GUI status.
    When the ckeck box is selected the rows are being selected, this is done in CheckBoX Change event of CL_GUI_ALV_COLUMN_TREE. Now when the Deselect ALL button is clicked rows are getting deselected but check marks are not getting cleared from the check box.
    How can the check box be cleared when we press Deselect All button which is in GUI Status of Scr 100.?
    Thanks n Regards

    Hello Mahesh
    Assuming that you are dealing with class
    CL_GUI_ALV_TREE (because I cannot find class CL_GUI_ALV_COLUMN_TREE) sample report BCALV_TREE_04 shows how to add a button to the toolbar.
    The crucial points can be found in routine CHANGE_TOOLBAR: 
    form change_toolbar.
    * §1.Get toolbar instance of your ALV Tree.
    * When you instantiate an instance of CL_GUI_ALV_TREE the constructor
    * of the base class (CL_ALV_TREE_BASE) creates a toolbar.
    * Fetch its reference with the following method if you want to
    * modify it:
      call method g_alv_tree->get_toolbar_object
              importing
                  er_toolbar = g_toolbar.
      check not g_toolbar is initial. "could happen if you do not use the
                                      "standard toolbar
    * §2.Modify toolbar with methods of CL_GUI_TOOLBAR:
    * add seperator to toolbar
      call method g_toolbar->add_button
              exporting
                  fcode     = ''
                  icon      = ''
                  butn_type = cntb_btype_sep.
    * add Standard Button to toolbar (for Delete Subtree)
      call method g_toolbar->add_button
              exporting
                  fcode     = 'DELETE'
                  icon      = '@11@'
                  butn_type = cntb_btype_button
                  text      = ''
                  quickinfo = text-901.   "Delete subtree
    endform.
    Regards
      Uwe

  • Editing ALV Column

    Hi,
    I am using these methods;
    lr_config      TYPE REF TO cl_salv_wd_config_table,
    lr_config->IF_SALV_WD_TABLE_SETTINGS~SET_EDIT_MODE ()
    What is supposed to be written in the parenthesis in order to edit the ALV column
    Thanks

    Hi,
    Try go through this [excellent blog|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1] by Claudia Dangers to understand how you can change 1 particular column of your ALV to editable mode.
    Regards,
    Uday
    First it is necessary to use an input field as cell editor for the column u201Cprice,u201D which should be editable. Therefore we need to enhance method WDDOINIT of view ResultView:
    WDDOINIT()
    [u2026] " Do all your basic stuff first
    " set cell editor for input fields (~make colum PRICE 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_settings ?= l_value.
    lr_column = lr_column_settings->get_column( 'PRICE' ).
    CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'PRICE'.
    lr_column->set_cell_editor( lr_input_field ).
    " The u201Cread only modeu201D has to be set to abap_false to make the table editable.
    " set read only mode to false (and display edit toolbar)
    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 ).
    ENDMETHOD.
    Without this setting the input field will not be editable!

  • Column selection with column tree model

    Hello!
    I created a column tree model. I would like to be able to select a column when i click on its header. How can I do that? There is no problem to select one item. I try to select all the items of a column but if do that this is the lines which are selected. The item_selection parameter is set to 'X'.
    Thanks in advance,

    Hi,
    I am not sure if I understood your problem right. But just in case, if you are referring to this...
    You say you need a check box to select your nodes. So you would have to add your item names in a separate column and then add the check box in a separate column using ADD_COLUMN method. You would have to use treemcitac structure and make use of ADD_ITEMS to add them.
    Once you add the column for check box, code your logic and build your tree hierarchy with all the correct node keys. For example, the root node will have node_key = 1 and parent_key = 0. The node that comes under the root node in the first hierarchy level will have node_key = 2 and parent_key = 1. Code your logic so that you build your tree hierarchy.
    Build the tree structure using treemcnota as you have done. Add the nodes built using treemcnota using ADD_NODES.
    According to your requirement,
    COL1                                                                           COL2 (for checkbox)  } -> Build using treemcitac
    Preimport (Root)  -> Root Node
    Request Checks (Node_1)  -> parent_key = Preimport
    Check Req Status (Item_1) -> parent_key = Request Checks (Node_1)
    Check Req Scope (Item_2)
    Check Req Componenets (Item_3)
    Object List Checks (Node_2)
    Check obj type (Item_1)
    check deletions (Item_2)
    Object Checks (Node_3)
    "Build the tree nodes using treemcnota and add these nodes using ADD_NODES
    Again, I am not sure if your problem is this. Hope this might be helpful.

  • In wendynpro,  i need to delete unwanted columns in ALV..

    Hi experts,
       In Webdynpro, I have selected some fields in context node through dictionary structure and to display those fields in ALV . Im getting the values for corresponding fields which i have selected but im  also getting other fields of the database dictionary structure in ALV.. Can anyone help me to delete  other fileds in it..
    Thanks in advance..
    Edited by: sivaprasath sekar on May 28, 2009 11:22 AM

    Hi,
    Use following code to delete the column from ALV.
    Here we are using config. model of ALV to delete the column.
    DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
    lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      DATA lv_value TYPE REF TO cl_salv_wd_config_table.
      lv_value = lo_interfacecontroller->get_model(
    CALL METHOD lv_value->if_salv_wd_column_settings~delete_column
      EXPORTING
        id     = 'CARRID'
    Instead of carrid you can pass your cotext_attribute which needs to be deleted.
    Thanks,
    Rahul
    Edited by: Rahul Yadav on May 28, 2009 11:30 AM

  • How to Display Sub-Columns using ALV Grid

    Hi ,
      Could someone tell me how to display sub-columns under a parent column using ALV Grid. Do we have any standard Program which has this scenario. Please let me know.
    Thanks,
    Abaper.
    Message was edited by:
            ABAP'er

    you can check all with <b>BCALV* or RSDEMO*</b> in SE38 for all Std
    check below
    BCALV_DND_01                   Drag ALV Row to Tree Folder
    BCALV_DND_02                   Drag Icons from Tree to Rows of the Grid
    BCALV_GRID_DND_TREE            ALV Grid: Drag and Drop with ALV Tree
    BCALV_GRID_DND_TREE_SIMPLE     ALV GRID: Drag and drop with ALV tree (simple)
    BCALV_TEST_COLUMN_TREE         Program BCALV_TEST_COLUMN_TREE
    Rewards if useful............
    Minal

  • How to get one column of ALV table as dropdown by key.

    Hi experts,
                  How can I get one column of ALV table as dropdown and editable. If  user wants to change that column value he can just select from that dropdown and click on update button. Can I provide tool tip to that column as " Select from drop down to change the status "?
      Please Help.
    Thanks,
      Pratibha

    You just need to change the cell editor of that column in ALV.
    So first get access to the alv model object (adjusting the code below for your ALV Component Usage name - mine was ALV_ADV):
    DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_alv_adv( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
      DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
      l_salv_wd_table = wd_this->wd_cpifc_alv_adv( ).
      DATA l_table TYPE REF TO cl_salv_wd_config_table.
      l_table = l_salv_wd_table->get_model( ).
    Then access the column object you want to change:
    DATA l_column TYPE REF TO cl_salv_wd_column.
      l_column = l_table->if_salv_wd_column_settings~get_column( 'REGION' ).
    Then create the cell editor for DDLB and set it as the new cell editor for this column:
    DATA ddlb TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
      create object ddlb
        exporting
          selected_key_fieldname = 'REGION'.
      ddlb->set_tooltip( `Select from drop down to change the status` ).
      l_column->set_cell_editor( ddlb ).

  • How can i suppress columns in ALV ?? Will reward points.

    Hello Gurus, how can i suppress column in ALV when i`m using the transparent table:
    CALL METHOD grid->set_table_for_first_display
          EXPORTING
            i_structure_name = 'ZIANEXE'
            is_layout        = wa_layout
            is_variant       = wa_variant
            i_save           = 'U'
            IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          CHANGING
            it_outtab        = itab[]
            it_fieldcatalog  = fieldcat.
    Please help.

    in the fieldcatalog you are providing there is a field NO_OUT use this.
    Loop over internal table and check fieldname. If fieldname = column you want to hide, NO_OUT = 'X'.
    Edited by: Micky Oestreich on May 8, 2008 12:06 PM

Maybe you are looking for

  • G4 Flat-panel No Longer stays up!?!  What the heck?

    Can anyone advise on how to repair my G4 flat panel? The screen no longer wants to stay up. It continues to fall as though there is no spring or resistance. I've attempted to look this issue up so as not to repeat a question, but I can't find anythin

  • How do you animate zooming in on particular items in a list?

    Hello, Does anyone know what the effect would be called (and if Keynote supports it) if you have a numbered list of small text in a slide, and as you click through the slide each line is zoomed? Kind of like the old school OS X dock effect when you h

  • Purchased songs not showing up in "purchased music" after computer migratio

    I recently had an imac stolen that had a dozen or so songs on it that I had purchased through the iTunes store. Since then, I've obtained a replacement imac (now running 10.5.1 cf. 10.4.11 before), deauthorized the old imac, authorized the new one an

  • Installing the os x 10.7 lion update. please help!

    can someone please help me install the update i purchased. i purchsed it on the app store. i am new to mac, i received an email saying with the licence number and password. how do i install and redeem the update? Is it via the internet? can someone p

  • What exactly does gamin do?

    I read on several wiki pages to install gamin with my DE. I looked and nothing I use really depends on gamin so why is it recommended?