Tooltip for single ALV cell

Hi,
is it possible to add a tooltip (text appearing when mouse is moved over) to a single cell in an ALV grid created with FUNCTION 'REUSE_ALV_GRID_DISPLAY'?
Please restrict your answers to the question, thank you.
Regards,
Clemens

Hi,
Tool tips are possible only at Column heading level unless you declare your column as a exception column / ICON / SYMBOL columns.
Regards,
Ravi
Note :Please mark the helpful answers
Message was edited by: Ravikumar Allampallam

Similar Messages

  • 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' ).

  • Tooltip for datagrid's cells

    I know how to create a tooltip for datagrid and/or its
    columns. Is it possible to create a tooltip (or something similar)
    for each cell? So whenever the mouse is over a certain cell, a tip
    would be shown for that cell that depends on the value of the cell.
    Similar functionality can often be seen in web-based database apps:
    an Ajax query gets related data from a database on mouseOver.
    My need and idea is to
    - show a simple text list as a tooltip
    - the text would be fetched from a database via a web service
    - the fetch would be based on datagrid's (hidden) rowid and
    each column's (hidden) column id (which are real database columns)
    - the database structure is an n:m relation i.e. one
    rowid+colid can refer to several items that are then used in the
    tooltip
    Use case: A number is displayed in the datagrid. The need is
    to display 0-n references related to that specific figure (e.g.
    book names, notes etc) in the tooltip. Next cell's tooltip would be
    showing different references.
    Anybody any ideas or suggestions? Thanks!

    Hi,
    Did you try creating a custom itemRenderer and handling the
    mouse events for that item renderer component. There is also a
    property called dataTipFunction, please check that too.
    Hope this helps.

  • 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.

  • Tooltip for a particular cell in a Jtable

    Hi all
    I want to put a tooltip only for the cell (0,0) in my JTable.can anyone send the piece of code through which i can do it.Also i want to make this cell non-editable after or before giving the tool tip
    Prasad

    Look here
    /Patrick

  • Cell tooltip for ALV

    Hello experts,
    I am new to ALV development. I have created an ALV grid report which displays data fetching from DDIC tables.
    I want to display tooltip for each individual cell of the ALV, I know about using field category property SELTEXT_M but its used for entire column tooltip. My requirement is to display tooltip for individual cell in the grid.
    Please provide me simple explanation to use tooltip for cell in ALV.
    Simple example code would be appreciated.
    Thanks in advance.
    Regards,
    Viral Patel

    Hi,
    If you are using OOPS ALV then, there is a field available in the field catalogue : TOOLTIP which you can use to display the tooltip for the column header.
    try this:
    wa_fcat-TOOLTIP = '-tooltip--'.
    I hope it helps you.
    Thanks & Regards,
    Radhika

  • How to assign a tooltip for a field in ALV editable grid?

    I have to display some instructions ( 50 chars long) for an editable field in alv.
    How to do this?
    BCALV_DEMO_TOOLTIP tells about assiging tooltip to an icon or symbol.
    Thanks,
    Ven..

    Neither of these two example programs help much in regards to tooltips against any field of any row. Both of these examples use tooltips for Icons. I have also been looking for a single example of tooltips usage outside of these two programs, and have found nothing in SAP, or on the internet, so far.
    Having said that, I have tried to implement the same method used by the later example, but have not got this to work. What I think we need is an example of this functionality where these Icons are not used!. I believe.
    Gary King

  • Issue regarding cell action in webdynpro for abap alv

    hello gurus,
           i have one requirement in webdynpro for abap alv.i have one alv table in that i have one coloun employee name.
    for that i have provided F4 help and that is editable field.if i select value from F4 help it is getting value correctly and it is showing properly at the same time it is allowing values entered manually insted of from F4 help.but as per my requiremnet it should not allow any manually entered values.how can i get this functinality. i am not aware indepth od WDA.
    could you go through my isssue and could you revert me some solution.
    thanks in advance.

    Hi,
       I dont think this is possible because when you can change the value using F4 then it would obviously be
       possible to enter manually.
       You can try using a drop down instead because in drop down you cannot enter values manually,
       But this would be good if the values that can be shown in drop down are very low, if the values are more
       then again user will face problems selecting values.
       Else you can try out what srinivas suggested, But dont know whether we can have two cell editors at a time
       inside a single cell of ALV. Please post the answer if you have found any other way to do it.

  • Tooltip in alv cell

    Hi All,
    I have an abap web dynpro application yje use alv control,
    I need to create a tooltip for a cell (not a column) in the alv.
    Is it possible?
    Thanks,
    Naama

    Hello Sadiq,
    1. Create an attribute by name 'Tooltip' in the context node that is passed to the ALV component
    2. Populate the data for this attribute based on your requirement
    3. write the following code in the INIT method of the view controller./component controller
      data lo_cmp_usage type ref to if_wd_component_usage.
      data lo_interfacecontroller type ref to iwci_salv_wd_table .
      data lr_value type ref to cl_salv_wd_config_table.
    "Initialise the used Component .. in the code sample used component name is ALV. replace this accordingly
      lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
      if lo_cmp_usage->has_active_component( ) is initial.
        lo_cmp_usage->create_component( ).
      endif.
    " get the ALV model from the Used Component's interface controller
      lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      lr_value = lo_interfacecontroller->get_model( ).
      data: lr_column_settings type ref to if_salv_wd_column_settings,
            lr_column type ref to cl_salv_wd_column,
            lr_column_cell_editor type ref to cl_salv_wd_uie,
            lr_input_field type ref to cl_salv_wd_uie_input_field.
    "Delete the column that is corresponding to the TOOLTIP attribute
      lr_column_settings ?= lr_value.
      lr_column_settings->delete_column( 'TOOLTIP' ).
    "Retrieve the column for which you want the tooltip
      lr_column = lr_column_settings->get_column( <Context attribute name for which you want the tooltip> ).
      lr_column_cell_editor = lr_column->get_cell_editor( ).
      lr_column_cell_editor->set_tooltip_fieldname( 'TOOLTIP' ).
    BR, Saravanan

  • Multiple Lines in a Single ALV Grid Cell

    Is there any way to Display Multiple Lines in a Single ALV Grid Cell.
    This can be accomplished by Sorting the First 3 fields and Make it Looks like below displayed format.
    But My problem is while downloading also it should be Displayed in the same format.
    All inputs are highly appreciated.

    there was a post similar to this some days back... search it..
    any ways...
    what u can do is...
    arrange ur final internal table so that it will look like same line...
    like...lets say ur internal table is :
    A1 B1 C1 D1 123
    A1 B1 C2 D2 123
    A1 B2 C1 D1 123
    A1 B2 C2 D2 123
    and u can rearrange ur table to be like
    A1 B1 C1 D1 123
          C2 D2 123
    A1 B2 C1 D1 123
          C2 D2 123
    what i mean to say is dont pass the fields if they are same in the previous line... try it out..
    and then pass it two ur ALV.
    it will look like they are in one line
    Edited by: soumya prakash mishra on Jun 17, 2009 1:31 PM

  • How to Open new screen for single click on ALV icon.

    Hi All,
    Can any body help me regarding the below ALV requirement.
    I need to create a executable program ZPROGRAM with a table having field to store long text.The ALV report should display records according to the selection screen parameters with a icon in each record when clicked should open a new screen with present data in the field and must be able to save the entered long text.
    Can any body give me the idea after displaying the simple ALV in the output,
    How to open new screen(not the Pop-up’s) after single click on the icon,
    in that I should be able to modify & save the long text in my ZTABLE and
    able to retrieve the same text for single clicked icon record.
    which function modules/Classes/Methods can we use for this requirement.
    And how retrieve the same text for this record.
    Thanks in advance.
    Regards,
    Kalam A.

    *& Report  ZTEST_ALV
    REPORT  ZTEST_ALV.
    TYPE-POOLS slis.
    DATA: gt_fieldcat TYPE TABLE OF slis_fieldcat_alv .
    DATA: gs_layout  TYPE slis_layout_alv.
    DATA: gt_list_top_of_page TYPE slis_t_listheader.
    DATA: gt_sortinfo_alv   TYPE  slis_t_sortinfo_alv.
    DATA: gs_print_alv TYPE slis_print_alv.
    DATA: gs_grid TYPE lvc_s_glay.
    DATA: gt_event TYPE slis_t_event.
    DATA: gs_event TYPE slis_alv_event.
    DATA: BEGIN OF GT_DISPLAY OCCURS 100.
       INCLUDE STRUCTURE MARA.
       DATA: BOX.
    DATA: END OF GT_DISPLAY.
    START-OF-SELECTION.
    SELECT * FROM MARA UP TO 50 ROWS
      INTO CORRESPONDING FIELDS OF TABLE GT_DISPLAY.
    End-of-Selection.
      PERFORM build_alv.
      PERFORM display_screen .
    FORM build_alv .
      DATA: ls_fieldcat LIKE LINE OF gt_fieldcat.
      DATA: ls_top TYPE LINE OF slis_t_listheader.
      DATA: ls_sort TYPE slis_sortinfo_alv.
      CLEAR: ls_fieldcat, gt_fieldcat[], ls_top,gt_list_top_of_page[],
             ls_sort,gs_grid,gs_print_alv,gt_sortinfo_alv[].
    *&-----gs_layout definition.
    gs_layout-zebra = 'X'.
    gs_layout-detail_popup = 'X'.          "ÊÇ·ñµ¯³öÏêϸÐÅÏ¢´°¿Ú
    gs_layout-f2code = '&ETA'.             "ÉèÖô¥·¢µ¯³öÏêϸÐÅÏ¢´°¿ÚµÄ¹¦ÄÜÂë,ÕâÀïÊÇË«»÷
      gs_layout-no_vline = ' '.              "ÉèÖÃÁмä¸ôÏß
      gs_layout-colwidth_optimize = 'X'.     "ÓÅ»¯Áпí
      gs_layout-detail_initial_lines = 'X'.
    gs_layout-coltab_fieldname = 'LINE_COLOR'. "Line_colorΪgt_displayµÄÒ»¸ö×Ö¶Î,¾ßÌåÑÕÉ«ÉèÖüûÏÂÃæ˵Ã÷.
      gs_layout-hotspot_fieldname = 'MATNR'.
    gs_layout-detail_titlebar = 'ÏêϸÄÚÈÝ'. "ÉèÖõ¯³ö´°¿ÚµÄ±êÌâÀ¸
    gs_layout-group_change_edit = 'X'.
    *&-----gs_grid definition.
      gs_grid-top_p_only = 'X'.
    *&-----gs_print_alv definition.
      gs_print_alv-prnt_title = 'X'.
      gs_print_alv-prnt_info = 'X'.
    *&-----gt_sortinfo_alv definition. С¼Æ
      ls_sort-fieldname = 'MTART'.
      ls_sort-tabname =  'GT_DISPLAY'.
      ls_sort-subtot = 'X'.
      ls_sort-spos      = 1.
      ls_sort-up        = 'X'.
    ls_sort-group = 'UL'.
      APPEND ls_sort TO gt_sortinfo_alv.
      ls_sort-fieldname = 'AENAM'.
      ls_sort-tabname =  'GT_DISPLAY'.
      ls_sort-subtot = 'X'.
      ls_sort-spos      = 1.
      ls_sort-up        = 'X'.
    ls_sort-group = 'UL'.
      APPEND ls_sort TO gt_sortinfo_alv.
    *&-----slis_t_listheader definition. title.
      CLEAR  ls_top.
      ls_top-key  = 'µ±Ç°ÈÕÆÚ:'.
      ls_top-typ  = 'S'.  " H = Header, S = Selection, A = Action
      CONCATENATE  sy-datum0(4)   '-' sy-datum4(2) '-' sy-datum+6(2) INTO ls_top-info .
      APPEND ls_top TO gt_list_top_of_page.
      CLEAR  ls_top.
      ls_top-key  = 'title'.
      ls_top-typ  = 'S'.  " H = Header, S = Selection, A = Action
      ls_top-info = space.
      APPEND ls_top TO gt_list_top_of_page.
    *&-----gs_print_alv definition.
      gs_print_alv-prnt_title = 'X'.
      gs_print_alv-prnt_info = 'X'.
    *&-----gt_fieldcat definition.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name     = sy-repid
         i_internal_tabname = 'GT_DISPLAY'
          i_structure_name = 'MARA'
          I_CLIENT_NEVER_DISPLAY = 'X'
         i_inclname         = sy-repid
       CHANGING
         ct_fieldcat        = gt_fieldcat[]
       EXCEPTIONS
         inconsistent_interface = 1
         program_error          = 2
         OTHERS                 = 3.
      ls_fieldcat-hotspot = 'X'.
      MODIFY gt_fieldcat FROM ls_fieldcat INDEX 2.
    **-1. definition with macro.
      DEFINE macro.
       col_pos = col_pos + 1.
       ls_fieldcat-tabname   = 'it_typ_data'.
        ls_fieldcat-fieldname = '&1'.
        ls_fieldcat-seltext_l =  &2.
       ls_fieldcat-col_pos   =  col_pos.
        ls_fieldcat-outputlen =  '&3'.
       ls_fieldcat-datatype  =  '&4'.
       ls_fieldcat-do_sum    =  &5.
       ls_fieldcat-edit    =   &6.
       ls_fieldcat-checkbox  =   &7.
       ls_fieldcat-key   =   &9.
       ls_fieldcat-fix_column =  &10.
       ls_fieldcat-no_out =  &11.
        ls_fieldcat-ref_fieldname = &4.    " System F4 Effect.
        ls_fieldcat-ref_tabname   =  &5.   " System F4 Effect.
        ls_fieldcat-hotspot   =   &6.
        append ls_fieldcat to gt_fieldcat.
        clear ls_fieldcat.
      END-OF-DEFINITION.
      macro matnr     'matnr'            18   'MATNR'   'MARA'  'X'.
      macro MTART     'MTART'            18      'MTART' 'MARA'  ''.
      macro  AENAM    'AENAM'            18       'MAENAM'  'MARA'   ''.
    **-2. definition one-by-one.
    CLEAR ls_fieldcat.
    ls_fieldcat-fieldname = 'MATNR'.
    ls_fieldcat-seltext_s = 'ÎïÁÏ'.
    ls_fieldcat-ref_fieldname = 'ROLLNAME'.
    ls_fieldcat-ref_tabname   =  'DD03L'.
    APPEND ls_fieldcat TO gt_fieldcat.
    ENDFORM.                    "build_alv
    FORM display_screen .
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         i_list_type     = 0
       IMPORTING
         et_events       = gt_event
       EXCEPTIONS
         list_type_wrong = 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.
    READ TABLE gt_event INTO gs_event WITH KEY name = 'TOP_OF_PAGE'.
    IF sy-subrc EQ 0.
       gs_event-form = 'TOP_OF_PAGE'.
       MODIFY gt_event FROM gs_event INDEX sy-tabix.
    ENDIF.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = sy-repid
        i_callback_pf_status_set          = 'PF_STATUS_SET '
         i_callback_user_command           = 'USER_COMMAND'
        i_callback_top_of_page            = 'TOP_OF_PAGE'
       I_CALLBACK_HTML_TOP_OF_PAGE       = 'HTML_TOP_OF_PAGE'
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
        I_BACKGROUND_ID                   = 'ALV_BACKGROUND'    "When top-of-page is initial.
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
         is_layout                         = gs_layout
         it_fieldcat                       = gt_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
        it_sort                           =  gt_sortinfo_alv[]
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
       I_SAVE                            = 'A'
      IS_VARIANT                        =
      IT_EVENTS                         = gt_event
      IT_EVENT_EXIT                     =
       IS_PRINT                          = gs_print_alv
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = gt_display
    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_screen
    FORM user_command          USING ucomm LIKE sy-ucomm
                               selfield TYPE slis_selfield.
    Data ref1 type ref to cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR' "Check Box need fieldcat-checkbox, input and edit.
         IMPORTING
           E_GRID = ref1.
      CASE ucomm.
        WHEN '&IC1'. " SAP standard code for double-clicking
    READ TABLE gt_display INTO gs_display INDEX  slis_selfield-tabindex.
    CHECK sy-subrc = 0.
         CASE  selfield-fieldname  .
           WHEN 'PLNUM'.
             SET PARAMETER ID 'PAF' FIELD gs_display-plnum.
             CALL TRANSACTION 'MD12' AND SKIP FIRST SCREEN.
           WHEN  'POSNR'.
           SUBMIT  rvscd100 USING SELECTION-SCREEN '1000' WITH vbeln = gs_display-vbeln
                                                          WITH posnr = gs_display-posnr
                                                          WITH zinfo = 'X'
                                                          AND RETURN.
         ENDCASE.
       IF selfield-sel_tab_field = 'OUT_ITAB-PI_SL'. " Line detail.
           READ TABLE i_output INTO pisl_itab INDEX selfield-tabindex.
           IF sy-subrc EQ 0.
       ENDIF.
        WHEN 'CHANGE'.
         CALL METHOD ref1->check_changed_data.
         CALL METHOD ref1->refresh_table_display.
    *5´Ë´¦´úÂë×èÖ¹'REUSE_ALV_GRID_DISPLAY´´½¨ÐµÄÆÁÄ»£¬Ôì³ÉÆÁÄ»¶à²ã
         selfield-refresh = 'X'.
        WHEN 'SWITCH'.
         PERFORM switch_edit_mode.
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                    "user_command
    Add your code in user_command form.
    WHEN you click matnr ucomm eq '&IC1'.
    Message was edited by:
            Chunhai Hu

  • In dreamweaver CS4, I can't make border for single cell

    Hi folks,
    Having given up trying to make a single cell border in the dreamweaver CS4 template, I reverted to an html page and put in my own header, 2 columns and footer as cells in the html table. I know there's html code for adding borders to single cell, but I can't find it. I hope someone can give me a sample line of html code for giving a cell a border on left side and on right side, including 1px solid color border. Anyone?

    Not sure if this is what you want, at least it will give you an example
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <style>
    body {width: 980px; margin: auto; background: #FEE49A;}
    #header {height: 120px; background: #060;}
    #article {height: 400px; width: 749px; float: right; background: #FFF; border-right: 1px solid #060;}
    #aside {height: 400px; width: 228px;    float: left; border-right: 1px solid #060; border-left: 1px solid #060; background: #CCC;}
    #footer {height: 50px; background: #060; clear: both;}
    </style>
    </head>
    <body>
    <div id="header"></div>
    <div id="aside"></div>
    <div id="article"></div>
    <div id="footer"></div>
    </body>
    </html>
    Gramps

  • ALV  List  in the same Column for the row  CELL  i need button or value

    Hi,
    In my ALV list  for the same column I need Button or  Value for the different rows (CELL) depending upon my condition.
    as well as I have to make  read only of 3 rd column CELL based on my first column dropdown value CELL for this Row Only.
    Depends upon the value in  column 1 /  row 2   I have to  read only  the CELL of   column 5 / row 2   ie for the same row.
    Depends upon the value in Column 1/ row 3    I have to   EDITABLE  or   Button   the CELL  of column 5 / row 3 ie for the same row
    How to do the logic for this.
    I tried and got it for the entire column only.
    But my requirement is for the sepecific cell in the column.
    Kindly help to proceed further.
    Thanks in advance.
    Dav

    Here is how you can make a particular cell in the row read-only based on certain conditions.
    In my example I am displaying the flight details in an ALV. Here I am checking the airline id and if it is "AA' I am making the cell in the column airline id as readonly. In my example I am putting a check and readonly on the same column. However you can do this for different columns as well.
    In order to achieve this you need to add a new context attribute 'READONLY' of type abap_bool to the context node which is bound to data node of ALV.
    The method where I populate the node has the following code to populate the data.
      data: lr_input_node type ref to if_wd_context_node,
            lr_flight_node type ref to if_wd_context_node,
            lv_cityfrom   type s_from_cit,
            lv_cityto     type s_to_city,
            ls_from       type bapisfldst,
            ls_to         type bapisfldst,
            lt_flights    type table of bapisfldat,
            ls_flights    type bapisfldat.
      data: lt_final type if_mainview=>elements_node_flighttab,
            ls_final type if_mainview=>element_node_flighttab.
    * Instantiate the variable lr_input_note to the node NODE_FLIGHT
      lr_input_node  = wd_context->get_child_node( name = 'NODE_FLIGHT' ).
    * Instantiate the variable lr_flight_note to the node NODE_FLIGHTTAB
      lr_flight_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' )
    * Get the attributes CityFrom und CityTo
      lr_input_node->get_attribute( exporting name = 'CITYFROM'
                                    importing value = lv_cityfrom ).
      lr_input_node->get_attribute( exporting name = 'CITYTO'
                                    importing value = lv_cityto ).
    * Fill the stuctures ls_from and ls_to
      ls_from-city = lv_cityfrom.
      ls_to-city   = lv_cityto.
    * Call the function BAPI_FLIGHT_GETLIST
      call function 'BAPI_FLIGHT_GETLIST'
       exporting
         destination_from       = ls_from
         destination_to         = ls_to
       tables
         flight_list            = lt_flights.
    Now I am going to check if the airline id is 'AA' and based on that I will fill the readonly context attribute.
    loop at lt_flights into ls_flights.
        MOVE-CORRESPONDING ls_flights to ls_final.
        if ls_flights-airlineid = 'AA'.
          ls_final-readonly = abap_true.
        else.
          ls_final-readonly = abap_false.
        endif.
        append ls_final to  lt_final.
      endloop.
    Finally bind the data to the context node.
    * Bind the data to the node NODE_FLIGHTTAB
      lr_flight_node->bind_elements( lt_final ).
    Now you need to do the ALV configuration settings.
    * create an instance of ALV component
      DATA:
        lr_salv_wd_table_usage TYPE REF TO if_wd_component_usage.
      lr_salv_wd_table_usage = wd_this->wd_cpuse_alv( ).
      IF lr_salv_wd_table_usage->has_active_component( ) IS INITIAL.
        lr_salv_wd_table_usage->create_component( ).
      ENDIF.
    * get ALV component
      DATA:
        lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.
      lr_salv_wd_table = wd_this->wd_cpifc_alv( ).
      wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
      CALL METHOD wd_this->alv_config_table->if_salv_wd_table_settings~set_read_only
        EXPORTING
          VALUE  = ABAP_FALSE
    * set visible row count
      DATA:
        lr_table_settings TYPE REF TO if_salv_wd_table_settings.
      lr_table_settings ?= wd_this->alv_config_table.
      lr_table_settings->set_visible_row_count( '10' ).
      DATA:
        lr_column_settings TYPE REF TO if_salv_wd_column_settings,
        lr_column          TYPE REF TO cl_salv_wd_column.
      lr_column_settings ?= wd_this->alv_config_table.
      DATA: lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
      lr_column = lr_column_settings->get_column( 'AIRLINEID' ).
      CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'AIRLINEID'.
      lr_column->set_cell_editor( lr_input_field ).
      lr_input_field->set_read_only_fieldname( value = 'READONLY' ).
      CALL METHOD lr_column_settings->delete_column
        EXPORTING
          id     = 'READONLY'

  • 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

  • Set_cell_Editor for single cells rather then complete column

    Is it possible to set a cell editor (eg a link) only for single cells of a column.
    Regards
    Rene

    hi rene.....
            you cannot do that......
            may be you can have an extral column called enabled or disabled and bind that property to the enabled property of the cell editor so that only one cell will be enabled while others disabled.
    ---regards,
       alex b justin

Maybe you are looking for

  • How to get all data from nokia to i5s

    how to get all data from nokia E71 to i5s???

  • Windows xp won't install

    I have a brand new Macbook Pro. I partitioned the drive with Bootcamp. I have a retail box of Windows XP SP2 that I would like to install. When Bootcamp tries to install it I get a blank screen with the message "Setup is checking you computer's hardw

  • How access an element using getElementById() without absolute path?

    hello, Currently I'm working on a JSF woodstock project. I'm trying to acceess the different components used the JSF page inside a javascript by using document.getElementById() this is a part of code in my JSF file. please have a look on it. <webuijs

  • WriteMultiSamplePort is slow

    Using WriteMultiSamplePort() (in C# and .NET3.5) to output an array of ints to the 4 digital output lines of a USB-6211 is very slow. (It's thankfully a lot faster than my first attempt, which used WriteSingleSampleSingleLine() in nested loops .) The

  • MGE Management of global employees

    Hi all, It would be great if you could send me the documents related to global employees in my e-mail at [email protected] I really appreciate your help. Thanks, Rashmi