Usage of Single Markable cell - Cell Variants.

Hi,
Using Cell Variant SingleMarkable Cell, is it possible to set different colours for cell's in a single column ..
If its possible , could someone elobarate on how it works ? And provide info on attributeToMark and attribute pointer..?
Thanks and Regards
Bharathwaj

Hi Bharathwaj,
if you want to set different colors, just use the cell variant TableStandardCell.
You can find documentation here:
http://help.sap.com/saphelp_nw2004s/helpdata/en/ed/785a42793d1653e10000000a155106/frameset.htm
In this case it's described for a TableSingleMarkableCell, but it works in the same way for a TableStandardCell.
Hope this helps
Kind Regards
Stefanie

Similar Messages

  • Table sIngle Markable cell

    Hi friends,
    I got a task to find the X and Y coordinates of a table cell  using Table Single Markable cell.......
    Is it possible to get X,Y coordinates  using the above API.....
    Is there any alternative for this......
    please code me and help me....
    Thanks &Regards
    Shravan kumar

    Hi shravan..
    Go thru this link..
    https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDTableSingleMarkableCell.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9214b1e5-0601-0010-fdb0-ec32d43b06e0
    Urs GS...

  • How to raise on click event for Single Markable cell in WD Table

    Hi All,
        I want to raise an event when a cell is clicked on Single Markable Cell and get the row and column of that cell.
    I have tried all the events of the table and also On Enter event of input Field.
    But I am not able to trigger on click event .
    Please help me out. Points will be rewarded.
    Thanks,
    Anil

    Hi Anil,
            If the cell editor is a link to action then it triggers the ON CLICK event , Write the following code into
           the ON CLICK event handler to get the selected Row and Column ID.
          Event Properties is a node with two attributes Name and Value of type string.
    data: lr_node type ref to if_wd_context_node,
    lt_event_properties type wd_this->elements_event_properties,
    ls_event_properties type wd_this->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.

  • Example ---Defining Cell Variants: TableSingleMarkableCell-Getting error

    Hi All,
          We are trying an example of cell variant concept of table as given in NetWeaver help. But after deploying we are getting folllowing error. Please guide me.
    <b>Create a value attribute attributePointer, switch to the Properties, click … for the property type, and select the Java Simple Type. Enter com.sap.tc.webdynpro.progmodel.api.IWDAttributePointer and confirm with Ok</b>---
    I am not able to get this type..I have chosen ---com.sap.ide.webdynpro.uielementdefinitions.AttributePointer
    Thanks in Advance,
    Gangadhar.
    <b>Error we are getting is</b>  
    java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDAbstractTableColumn
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
         at java.lang.Class.getConstructors(Class.java:865)
         at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:68)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.<init>(DelegatingView.java:41)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.createUninitializedView(ViewManager.java:486)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:523)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
         at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    <b>Example we are trying is</b>
    You need the option to select a single cell to provide a value help for individual cells, for example.
    The interface TableSingleMarkableCell allows you to group cell variants in any way as you like and to make a single cell selectable in this group. The following example shows how to proceed if you want to implement a selection of a single cell from an entire table.
    Prerequisites
    You have created an applicaton with a component and view in your Web Dynpro project.
    Procedure
    Creating the Context
           1.      Create a value node TableNode for the data of the table and insert three value attributes of the type String for the table columns.
           2.      Create a value attribute selectedCellVariant of the type String in the TableNode.
           3.      Create a value attribute attributePointer, switch to the Properties, click … for the property type, and select the Java Simple Type. Enter com.sap.tc.webdynpro.progmodel.api.IWDAttributePointer and confirm with Ok.
    Creating the View
           1.      Open the context menu in the Outline, select Apply Template and then Table. In the subsequent dialog box from the context, select three attributes for the columns (col1, col2, col3). Confirm by choosing Finish
           2.      Set the property selectionMode of the table to none.
    Repeat the steps for each column.
           3.      Highlight the column and open the context menu. Select Insert Cell Variant, TableSingleMarkableCell and confirm with Finish.
           4.      Enter the same value for each TableSingleMarkableCell for the property variantKey - for example, variant1
           5.      Insert a cell editor of the type TextView in each TableSingleMarkableCell.
    Binding the UI Elements
           1.      Bind the text property of each TextView to the column in which the property is contained.
           2.      Bind the attributeToMarkproperty of the corresponding TableSingleMarkableCell to the column in which the element is contained.
           3.      Bind the selectedCellVariantproperty of each TableColumn to the context attribute selectedCellVariant.
           4.      Add the following source code to the wdDoInit method.
    wdDoInit()
    1
    2
    3
    IPrivateUseSingleMarkableCellsView.ItableNodeElement elem;
          int count = 10;
    // Fill dummy data
         for(int i=0; i<count; i++) {
             elem = wdContext.nodeTableNode().createTableNodeElement();
             wdContext.nodeTableNode().addElement(elem);
             elem.setCol1(“1.” + i);
             elem.setCol2(“2.” + i);
             elem.setCol3(“3.” + i);
    // set TableSingleMarkableCell as a variant for the table
             elem.setSelectedCellVariant(“variant1”);
                For each element that is created in the for loop and is then added, the
                TableSingle MarkableCell is set as a cell variant in row 3.
           5.      Add the following source code to the wdDoModifyView method.
    wdDoModifyView()
    IWDAttributeInfo markedDataInfo = wdContext.currentContextElement().getAttributePointer(“attributePointer”).getAttributeInfo();
                            ((IWDTableSingleMarkableCell) view.getElement(“TableSingleMarkableCell1”)).bindMarkedData(markedDataInfo);
                            ((IWDTableSingleMarkableCell) view.getElement(“TableSingleMarkableCell2”)).bindMarkedData(markedDataInfo);
         1.                          ((IWDTableSingleMarkableCell) view.getElement(“TableSingleMarkableCell3”)).bindMarkedData(markedDataInfo);
    The current AttributeInfo is now retrieved at every change of the view and is bound to the context using the markedDataproperty.
    Result
    Each single cell can be selected separately. You can define an action and in its method, you can determine the coordinates of the currently selected cell using the following code:
    IWDAttributePointer attPointer = wdContext.currentContextElement().getAttributePointer();
    Message was edited by:
            Gangadharayya Hiremath

    Hi Gangadhar,
    at first: you are right: you have to choose
    com.sap.ide.webdynpro.uielementdefinitions.AttributePointer
    and not the other one. I already updated the documentation for this.
    In which SP are you working?
    Kind Regards
    Stefanie

  • Freely-programmed value help for a single ALV cell

    Greetings everyone,
    I have a freely-programmed value help that works beautifully when attached to the context element of a single field, but now I'm needing to use it in an ALV for a specific cell.  Is there a way to shut off the dropdown for all of the rows (cells) in the column where I don't need it?  Or, is there an appropriate workaround that can deliver the same results?
    I've found several posts that address similar issues, but nothing for this exact problem.
    Thanks,
    Jason Block

    I take it from reading your description what you want is a little more complicated than just controlling the read-only property on the input field. If I read you properly you still want to have all the cells in a column to be open for input, just on some of them you want to disable the value help.  Is that correct?  See these screen shots for clarification:
    If you focus on the the input field in the first row, you get the value help:
    http://www.flickr.com/photos/tjung/2714133068/
    However if you go to the second row and focus on the same input field in this column, you don't get the value help:
    http://www.flickr.com/photos/tjung/2714133094/
    If this is what you want, then buckel up because this was a challenging one.  The problem is that the value help specification is not done at the UI element level, but instead at the context attribute level.  Therefore it can't be as simple as controlling a property on the inputField itself.  What you will need to do is extend the context node that you have bound to the ALV.  You need to add a second version of the attribute that is bound to your input field.  In this second version you can set the value help specification to Disabled:
    http://www.flickr.com/photos/tjung/2713320505
    Notice from the screen shot that I also added another attirbute called CVAR (type STRING).  We will need that later.  It will be used to store which cell variant show be used on a particular row.
    Now we must go to the place in your code where you fill the context node with data.  You will need to copy the data from your primary attribute to your secondary one.  In my case I was copying the values from CARRID to CARRID2.  Of course for update, you would need to merge the data back together before saving it back to the database.  I also set a simple odd/even pattern of controller in the cell variant.  I assume you will have some actual business logic that controls this:
    data odd type boolean value abap_true.
       loop at lt_f_r_sflight[] assigning <ls_f_r_sflight>.
        clear ls_c_r_sflight.
        move-corresponding <ls_f_r_sflight> to ls_c_r_sflight.
        move <ls_f_r_sflight>-carrid to ls_c_r_sflight-carrid2.
        if odd = abap_true.
          odd = abap_false.
        else.
          odd = abap_true.
          ls_c_r_sflight-cvar = 'NOVH'.
        endif.
        insert ls_c_r_sflight into table lt_c_r_sflight[].
      endloop.
      lo_r_sflight->bind_table( lt_c_r_sflight[] ).
    Next is the logic in the initialization of the ALV.  We will need to create two input fields - each bound to the different context attributes. We will make the one the primary cell editor.  The other will become the cell editor of the cell variant.  We then tell the column where it can get its cell variant value from:
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_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( ).
      DATA l_table TYPE REF TO cl_salv_wd_config_table.
      l_table = l_salv_wd_table->get_model( ).
      l_table->if_salv_wd_table_settings~set_read_only( abap_false ).
      DATA input1 TYPE REF TO cl_salv_wd_uie_input_field.
      DATA l_column TYPE REF TO cl_salv_wd_column.
      l_column = l_table->if_salv_wd_column_settings~get_column( 'CARRID' ).
      CREATE OBJECT input1
        EXPORTING
          value_fieldname = 'CARRID'.
      l_column->set_cell_editor( input1 ).
      DATA input2 TYPE REF TO cl_salv_wd_uie_input_field.
      CREATE OBJECT input2
        EXPORTING
          value_fieldname = 'CARRID2'.
      DATA l_cv TYPE REF TO cl_salv_wd_cv_standard.
      CREATE OBJECT l_cv.
      l_cv->set_key( 'NOVH' ).
      l_cv->set_editor(  input2 ).
      l_column->add_cell_variant( l_cv ).
      l_column->set_sel_cell_variant_fieldname( 'CVAR' ).

  • CELL VARIANT

    Hi Experts,
    Could you provide me detailed information on how to use the cell variants in a normal table in Webdynpro ABAP (using the cell variants to make a read-only field as input field/dropdown field on the click of a button).
    Thanks in Advance,
    Mirza.

    Hi Mirza,
    Please go through this excellent [blog|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0e7461d-5e6c-2b10-dda9-9e99df4d136d] by Suman Kumar in which he explains usage of cell variants to make the cells of a column as checkboxes or textviews dynamically.
    Regards,
    Uday

  • How to allow multiple values in a single blank cell in WebI report

    Hi
             I am working in BO XIR2. I have a scenario as follows.
    In a single cell (blank cell from template) i need to display multiple contact persons. When I drag the contact person name into the blank cell, I am getting an error: MULTIVALUE). Please let me know how to use a function so that I can show two or three contact person names in a single blank cell.
    I tried to use Replace and Char function as follows to bring Carriage Return functionality to the cell.
    Replace([Contact Person]; ";" ; Char(13)) but this did not work.
    Thanks in Advance.

    BOUser11:
    I know this thread has been answered. I recently came across a scenario where I happen to populate multiple values in a single blank cell(from templates). But the only catch being that if user enters multiple values for a prompt you can show them in a single cell eg: =UserResponse("Enter value(s) for Branch:"). would be the formula for the blank cell. Afetr the user selects three values say A, B,C, webi puts it in the format of A;B;C. in a single cell.
    In your case try giving that as a prompt to the user or answer that multi prompt some how and when u use the above formula it should suffice your requirement.
    Let me know if you have tried.
    Thanks,
    karthik

  • Enhancing a standard component - Table Cell Variant

    Hi Forum,
    I am trying to enhance the standard WD component /SAPSRM/WDC_UI_SC_DOTC_BD view V_SC_DOTC_BASIC in SRM 7.0 .
    The requierment that for certain condition the Quantity cell in a row should be read only.
    Carried out the following steps:
    1. Created an enhancement
    2. In the standard table column ITEMS_TABLE_QUANTITY  [Columns] , removed the standard inputfield.
    3. Added two cell variants ZITEMS_TABLE_QUANTITY_CV1  [CellVariants]  and ZITEMS_TABLE_QUANTITY_CV2  [CellVariants]  first one contans a text view and second contains inputfield. Variant key for first one is DISPLAY and for second one is EDITABLE.
    4. Enhanced the method WDDOMODIFYVIEW with below code:
    **Read the ITEMS table
      DATA lo_nd_items TYPE REF TO if_wd_context_node.
      DATA lt_items TYPE wd_this->elements_items.
      DATA ls_item LIKE LINE OF lt_items.
      DATA lo_el_context TYPE REF TO if_wd_context_element.
      DATA ls_context TYPE wd_this->element_context.
      DATA lv_disable_quantity TYPE wd_this->element_context-enable_quantity.
      DATA lr_table_column TYPE REF TO cl_wd_table_column.
    ** navigate from <CONTEXT> to <ITEMS> via lead selection
      lo_nd_items = wd_context->path_get_node( path = `COMP_CONTEXT.ITEMS` ).
      lo_nd_items->get_static_attributes_table( IMPORTING table = lt_items ).
      lr_table_column ?= view->get_element( 'ITEMS_TABLE_QUANTITY' ).
      LOOP AT lt_items INTO ls_item .
        IF  ls_item-catalogid EQ 'VEP_Staples_D0'.
          lr_table_column->set_selected_cell_variant( value = 'DISPLAY' ).
        ELSE.
          lr_table_column->set_selected_cell_variant( value = 'EDITABLE' ).
        ENDIF.
      ENDLOOP.
    But even after the condition is true ALL cell i.e. the complete column is DISABLED or when the condition is false the COMPLETE column is enabled instead of enabling disabling ONLY THE SPECIFIC CELL.
    Is there a problem with the code in WDDOMODIFYVIEW or something else?
    Thanks,
    Anubhav

    Hi  Saravanan
    Under ITEMS node I added one more Node(cv_quantity) and one attribute(cell_variant_quantity) with in this node.
    And code in WDDOMODIFYVIEW :
    DATA lo_nd_items TYPE REF TO if_wd_context_node.
      DATA lt_items TYPE wd_this->elements_items.
      DATA ls_item LIKE LINE OF lt_items.
      DATA lo_el_context TYPE REF TO if_wd_context_element.
      DATA ls_context TYPE wd_this->element_context.
      DATA lr_table_column TYPE REF TO cl_wd_table_column.
    ** navigate from <CONTEXT> to <ITEMS> via lead selection
      lo_nd_items = wd_context->path_get_node( path = `COMP_CONTEXT.ITEMS` ).
      lo_nd_items->get_static_attributes_table( IMPORTING table = lt_items ).
      lr_table_column ?= view->get_element( 'ITEMS_TABLE_QUANTITY' ).
      DATA lo_nd_cv_quantity TYPE REF TO if_wd_context_node.
      DATA lo_el_cv_quantity TYPE REF TO if_wd_context_element.
      DATA ls_cv_quantity TYPE wd_this->element_cv_quantity.
    IF first_time EQ abap_true.
      lr_table_column->set_selected_cell_variant( value = 'EDITABLE' ).<--Initially ALL cells shoud be editable
    ELSE.
      lr_table_column->bind_selected_cell_variant( path = 'COMP_CONTEXT.ITEMS.CV_QUANTITY.CELL_VARIANT_QUANTITY' )  .
    * navigate from <CONTEXT> to <CV_QUANTITY> via lead selection
      lo_nd_cv_quantity = wd_context->path_get_node( path = `COMP_CONTEXT.ITEMS.CV_QUANTITY` ).
      IF lo_nd_cv_quantity is BOUND.
      lo_el_cv_quantity = lo_nd_cv_quantity->get_element( ).
          LOOP AT lt_items INTO ls_item .
            IF  ls_item-catalogid EQ 'VEP_Staples_D0' AND ls_item-number_int IS NOT INITIAL AND ls_item-description IS NOT INITIAL.
              lo_el_cv_quantity->set_attribute(
                                                name =  `CELL_VARIANT_QUANTITY`
                                                value = 'DISPLAY' ).
            ELSEIF ls_item-catalogid NE 'VEP_Staples_D0' OR ( ls_item-number_int  IS INITIAL AND ls_item-description IS INITIAL ) ."If the condition is not satisfied OR no item is added to that line
              lo_el_cv_quantity->set_attribute(
                                                name =  `CELL_VARIANT_QUANTITY`
                                                value = 'EDITABLE' ).
            ENDIF.
          ENDLOOP.
    ENDIF.
    ENDIF.
    Now If I add an item that DO NOT satisfy the comdition to be read only, for that row the quantity is enabled but for all the rows below it quantity cells are DISABLED.
    Hope my issue is clear?
    Thanks a lot,
    Anubhav

  • How to add cell editor to cell variant dynamically?

    Hi everyone,
      I'm developing a web dynrpo component. In one of the views , I need to modify the view dynamically
    because the data structure only can be determined at runtime. And the table column should have two
    cell variants. I don't know the exact cell variant class which should be used. I only find an abstract class about cell variant CL_WD_ABSTR_TABLE_CELL_VAR , but I can't find any method in this class which
    can add cell editor under this cell variant.
    Thanks in advance.

    Hi Sireesha,
    Thanks for link you provided.
    I am able to add Column with CommandImageLink.And onclick of that link i am able to display another popup.
    Now another problem which i am facing is when i select one row from popup and click "Ok" i have to modify some columns from Dyanamic table which is displayed on main page.
    For this.
    1)First i took the selected row from dyanamic table to update that perticular row depending upon the row which i select from popup.
    if you see the code above i am refaring the list as collection for data.So i am updating that collection but again it is refreshing to it's original value.
    because number of times getList() method of bean get's called equal to number of columns. which brings the values from database.
    Here On click of popup's Ok button I don't want to save the data for table i just want to show there in some column's .and After click on SAVE button from table i have to save it.
    Let me help how can i modify the Dynamic table's data.
    Thanks for all help.
    Jaydeep

  • Use of Cell Variant for a normal table

    Hi Experts,
    I have a requirement in a normal table where a row is first in read-only mode, then on click of edit button (given on that row),
    the row should become editable and also edit button should become invisible and two more buttons update/cancel have to be visible. How to achieve this using a cell variant for this normal table.
    A detailed reply would be appreciated.
    Thanks in Advance,
    Mirza Hyder.

    Hi Mirza,
    Cell variant property is used to chenge the cell property not for other.That means in one cell you want checkbox and in other cell you want textview like this you can change the property of cell as you want.
    Test this standard program WDR_TEST_TABLE in that test view cell varint for your understanding.
    Coming to your requirement.You can do in this way.
    Check in the below thread in that i gave code to make the entire row is editable when you click on the lead selection of row.I gave code for ALV.I hope that code is use ful for you.
    How to make all columns of alv editable
    To make tool bar buttons disable and enable:Write your logic in method handler of lead selection event like change the visible property of button to none.
    Note: In the event handler method you dont get reference of view.You only get reference of view in WDDOMODIFYVIEW only so take a global variable of type ref to if_wd_view and populate that global variable in method WDODIFYVIEW.So that you can access any view element in any method.
    For cell variant in ALV check this Article written by me.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0e7461d-5e6c-2b10-dda9-9e99df4d136d

  • Setting new cell variant for an alv table column

    Hi,
    I want to set a new cell variant for a column. Therefore I did the following steps:
    1. Create an object of CL_SALV_WD_CV_STANDARD
    2. SET_KEY( 'CELLVAR1 )
    3. set_cell_design([..]-goodvalue_medium )
    4. SET_EDITOR( lr_alv_input_field )
    After that I added the cell variant to the column by using the method "add_cell_variant".
    The last step is to call method SET_SELECTED_CELL_VARIANT.
    I checked my program by using get_selected_cell_variant( ) and the return string was okay.
    But when the table is displayed, the new cell variant isn't working. I defined an input field as the cell editor for my new cell variant but when the table is shown, it is just text - no input possible. In addition to that the selected cell design (goodvalue_medium , step 3) isn't working. So I think the cell variant is not used.
    Can you help me?
    Thanks & Regards,
    Hendrik

    Hi
    I wonder if you can help me please, I too am having issues implementing ALV cell changes in WDA?
    I am basically trying to dynamically change the individual color of a cell (not the entire column or row) dependant on certain criteria. I apologies but find that you are the closest resource for any potential information. Please see screen shot below.
    Currently my code is as follows:
    see: www.picasaweb.google.co.uk/dave.alexander69/Pictures#5244416971466907938
    data: lr_cv TYPE REF TO cl_salv_wd_cv_standard.
    loop at table 1 row data
            loop at table columns
              for the date columns only...
              IF <fs_column>-id(4) = 'CELL'.
               get and set column header dates from select option user input - done
                loop at table 2 row data (table 2 contains date ranges for row concerned)
                  MOVE: ls_zdata-variance TO lv_variance.
                  method 1 - as in sap press WD4A -:
                  lr_cv = cl_wd_table_standard_cell=>new_table_standard_cell(
                                                     view        = view
                                                    variant_key = lv_variance ).
                 as mentioned...
                  CREATE OBJECT lr_cv.
                  lr_cv->set_key( 'VARIANCE' ).
                  lr_cv->set_cell_design( '09' ).
                  lr_cv->set_editor( lr_input_field ).
                  lr_column->add_cell_variant( lr_cv ).
                  lr_column->set_cell_editor( lr_input_field ).
                  lr_column->set_sel_cell_variant_fieldname( 'VARIANCE' ).
                  lr_column->set_cell_design_fieldname( value = 'COLOR_CELL' ).
                  lr_field = lr_table->if_salv_wd_field_settings~get_field( <fs_column>-id ).
                  lr_field->if_salv_wd_sort~set_sort_allowed( abap_false ).
                  the only way I get cell coloring to work - but this is for entire column?
                  ls_zdata-color_cell = cl_wd_table_standard_cell=>e_cell_design-one.
                  MODIFY lt_zdata FROM ls_zdata..
                ENDLOOP.
              ENDIF.
              IF <fs_column>-id = 'COLOR_CELL'.
                CALL METHOD lr_column->set_visible( EXPORTING value = '00' ).
              ENDIF.
            ENDLOOP
          ENDLOOP.
    As you see I am in the dark a bit regarding cell variants and wonder if you can point me in a better direction.
    Many thanks for any help,
    Dave Alexander

  • 2 combo box on a single jtable cell

    I need to add two combo box to a single jtable cell..One for selecting the number and the other for specifying whether the number specifies daily, weekly or yearly data .Please help

    hey thank you so much....it worked..... i am adding the code .....
    this is how you add an editor to a column
               TableColumn col=jtInfo.getColumnModel().getColumn(2);
               col.setCellEditor(new ComboCellEditor());the class that extends cell editor
        public class ComboCellEditor extends JPanel implements TableCellEditor
            public Component getTableCellEditorComponent(JTable table,Object value, boolean isSelected,int row, int column)
               this.setLayout(new GridLayout(1,2));
               if(column==2)
                     jcbCombo1=new JComboBox();
                     for(int i=1;i<31;i++)
                       jcbCombo1.addItem(i);
                     jcbCombo2=new JComboBox();
                     jcbCombo2.addItem("Days");
                     jcbCombo2.addItem("Weeks");
                     jcbCombo2.addItem("Months");
                     this.add(jcbCombo1);
                     this.add(jcbCombo2);
                return this;
            public Object getCellEditorValue()
                return this;
            public boolean isCellEditable(EventObject e)
                return true;
            public boolean shouldSelectCell(EventObject e)
                return true;
            public boolean stopCellEditing()
                return false;
            public void cancelCellEditing()
            public void addCellEditorListener(CellEditorListener e)
            public void removeCellEditorListener(CellEditorListener e)
        }

  • Dynamic Cell variant assignment

    Hi
    I wish to dynamically assign a table variant with a cell editor of type checkbox and then check/uncheck/make readonly the field accordign various situations. I only wish this to happen on certain rows.
    So far I can achieve this my using context attributes and binding to these. My only concern is that there are a lot of extra attributes required as thses cell variants appear on 7 columns and then 8 tabs.
    I would prefer to achive this solution by using the view->get_element approach, but so far I have only managed to assign the cell variant to the entire column and not an individual cell.
    Any ideas?
    Cheers
    Ian
    Edited by: Ian Stubbings on Mar 10, 2008 8:52 AM

    Hi,
    In case of a checkbox, based on the value of the attribute bound to the checkbox column, the checkbox will be checked/unchecked. Anyways, you have to have a context node of cardinality 0...n, with an attribute which can be bound to the checkbox. As far as readonly property is concerned, you can have an additional attribute in the same context node, and bind that to the read-only property of the checkbox. Alternatively, I think you can use the SET_ATTRIBUTE_PROPERTY of the IF_WD_CONTEXT_ELEMENT class.
    Hope this helps.
    Regards
    Wenonah

  • Get the battery usage of single application programmatically in ios7 and later

    Get the battery usage of single application programmatically in ios7 and later

    Not natively with iOS. you might check the app store for a battery monitoring app, but to be honest, it you find one that claims to be able to do this, I'm nopt sure I would trust it.

  • Help needed with referencing single Excel cells and formatting resulting text

    In InDesign CS5 I am putting together a 20pp catalogue of about 200 products. The plan is to have the product information, SKU code, quantity etc fixed, but have the prices (there are two i.e. pack price and individual price) being linked to an Excel spreadsheet. This is so that the prices can be updated in the Excel file and the InDesign file will pull the new prices through. In case you are wondering why I don't pull the whole set of information through, this is because there are a lot of copywriting changes done to the information once it's in InDesign - it's only going to be the prices that will be updated.
    I am planning on having two single cell tables in their own text frame, duly formatted with cell style, table style and paragraph style for the two price variables. This I am then going to have to repeat 200 times making sure I link to the next row down in Excel. This is going to be a hideous task but I see know way of modifying the cell in InDesign to point it to the next row in Excel. That's my first problem.
    My second problem is this. In the Excel sheet, the prices are formatted as UK currency and are therefore like this...
    £2.00
    £0.40
    £1.43
    £9.99
    £0.99
    £0.09
    What I will require is once I import that data (and refresh the data via a newly saved Excel file) is that the prices end up like this...
    £2.00
    40p
    £1.43
    £9.99
    99p
    9p
    So if the value is lower than £1.00 it needs a trailing 'p' added  and the leading zero and '£' sign stripped off. If the value is lower than £0.10 it also needs the zero after the decimal point stripping off.
    Then formatting wise, the '£' sign needs to be superscripted and the same for the 'p'. This I am assuming could be done via GREP?
    In summary, can anyone help with the first task of referecing the Excel cells on a cell by cell basis, given that it is the same cell column each time, but the next row down, and also point me in the right direction of the price formattting issues.
    Any help will be gratefully received.

    I would do this:
    Create on line with the formatting.
    Export as InDesign tagged text (TXT)
    Read out these tags
    In Excel exists a function to connect text from several cells and predfined text, there connect the content from cells with the paragraph styling tags. Do it in a seperate sheet. (Better would be to use a database like Access, there you can link your Excel sheet).
    Export this sheet as txt file
    Place this sheet as tagged text (there is an option in one of the sialog boxes).
    In preferences  < file handling you can specify that Tablecalculation Sheets and text is not embedded but linked, turn it on.

Maybe you are looking for

  • Why can I not highlight single words in a pdf document with Adobe Reader for Android?

    I, like other users I have seen, am unable to highlight single words or phrases in pdf files.  I am using a Galaxy Note 10.1 tablet.

  • Webpages do not display correctly, but do when i uninstall certain add-ons

    i had the firefox add-ons of shaved beiber and adblocker plus. one day, websites such as blaghag, 100boatsin100days, halolz, and other websites using the design of blog posts or main text with extra links alongside, or websites such as equinox kayaks

  • Re-connect Issue

    Hi, Firstly, i'm a relative novice so please excuse me if this has been covered before. I cut and finished a few projects using Final Cut X with no problems. I since moved the project and event files to an external drive to keep them off my system dr

  • CRM2007, Fact Sheet, Long Texts (STXH/STXL)

    Hi Folks We are in the middle of an upgrade from CRM 3.1 to CRM2007. And then I am looking at the new Fact Sheets. In our old CRM 3.1 system we have a lot of self developped Info Blocks (Assignment Blocks in CRM2007). And in the new CRM2007 the users

  • How I use swf in swf (nested) ?

    Flash is case-sensitive in naming(symbols,form fields,components) ? How I use ScrollPane ? How I use swf in swf (nested) ?