Cell(Row) Selection not display in OOPS ALV

Hi all,
I am not able to get the cell(row) selection in the oops ALV when i called it second time.
I am displaying some information using oops alv  in 100 screen. After user action on 100 screen i am calling 200 screen with different information which is also display in oops alv. When i displaying information in second time the cell(row) selection is not getting displayed.
For both ALV the fieldcatelog is different.
Initially i tried using same container but i face same problem, so i am trying to call second alv in new screen.
But problem remain same.
Can anyone help me to solve this problem ?
Regards
Nilesh

hi,
can u send ur report  so dat i can look furhter to it.and help u out

Similar Messages

  • Make particular cell as mandatory(not complete column) in ALV

    hello experts,
    i have a requirement to make particular cell as mandatory(not complete column) in ALV .
    could any body tel me how to acheive this functionality.
    Thanks in adv!!

    Hi Rakshar,
    inside the loop write your condition and then call
    CALL METHOD lr_column->set_cell_editor
    EXPORTING
    value = lr_input.
    *Now loop the columns table and change the cell editor of a column
    LOOP AT lt_columns INTO ls_columns.
    lr_column = ls_columns-r_column.
    lv_tabix = sy-tabix.
    READ TABLE lt_name INTO ls_name INDEX lv_tabix.
    CREATE OBJECT lr_input
    EXPORTING
    value_fieldname = ls_name-name.
    CALL METHOD lr_column->set_cell_editor
    EXPORTING
    value = lr_input.
    And go through the bellow link..
    link : http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoeditconditionallyrowofaALVtableinWebDynprofor+ABAP

  • Cell wise and row wise check box in oops alv

    Normally column wise check box are possible in oops alv but how to possible check box in first row only in oops alv and Cell wise check box in oops alv?

    Hi,
    Try like changing  this
    insted of
    g_layout-f2code = ' '.
    use this
    g_layout-f2code = 'DISP'. " Sets fcode for when double
    and
    g_layout-f2code = '&ETA'. " it will display POPUP screen
    Best Regards
    Ranga
    Edited by: Ranga Swamy on Nov 1, 2008 11:07 PM
    Edited by: Ranga Swamy on Nov 1, 2008 11:17 PM

  • ALV selection not displayed/shown

    Hello,
    I have a question concerning the ALV:
    In NW 7.0 everything was fine and working, as of EhP1 the selection for one ALV is not displayed.
    ...the selection is done alright and also corresponding events are raised. Nevertheless there is no visual representation for a selection - meaning the yellow/orange highlighting of a selected line. It is neither done for the lead selection nor for "normal" selections.
    Other ALV in the same application (though different component) work fine and as far as I can tell all are initilized similarly.
    Does anyone know this effect and - most important - how to correct it?
    Regards,
    Robert

    Hello all,
    We were able to solve the issue of selections not being visible - although they are correctly set in ALV/context.
    -> The default view of the window has to be set to the ALV usage!
    Don't ask me why, but in case the default setting is on the empty view, no selections will be visible on the UI. As soon as you set the ALV usage as default, the selections will be visible again.
    Kind Regards,
    Robert

  • Toolbar in alv display using oops alv

    i have written code for displaying toolbar in alv display using oops, but it is not displaying please find the below code and let me know reason.
    *& Report  ZTRANSFER_ORDER2                                            *
    REPORT  ZTRANSFER_ORDER2   .
    *& Report  ZTRANSFER_ORDER                                             *
       TABLES:sflight.
       TYPE-POOLS : icon.
      * G L O B A L   I N T E R N  A L   T A B L E S
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    types : begin of ty_mara,
            matnr type matnr,
            mtart type mtart,
            mbrsh type mbrsh,
            matkl type matkl,
            bismt type bismt,
            meins type meins,
            end of ty_mara.
      DATA: t_mara type STANDARD TABLE OF ty_mara.
      * G L O B A L   D A T A
       DATA: ok_code LIKE sy-ucomm,
             g_wa_mara type ty_mara.
        DATA : t_fcat type LVC_T_FCAT.
      DATA  : l_VAR TYPE disvariant.
      DATA :  gs_layout type lvc_s_layo.
      * Declare reference variables to the ALV grid and the container
    G L O B A L   D A T A
      DATA: ok_code LIKE sy-ucomm.
    Declare reference variables to the ALV grid and the container
       DATA:
         go_grid             TYPE REF TO cl_gui_alv_grid,
         go_custom_container TYPE REF TO cl_gui_custom_container.
      data :  it_toolbar  TYPE stb_button,
      event_receiver TYPE REF TO lcl_event_receiver.
      * S T A R T - O F - S E L E C T I O N.
       START-OF-SELECTION.
        CALL SCREEN 100   .
    *CLASS lcl_event_receiver DEFINITION.
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
        CLASS-METHODS:
    *handling toolbar for interactive
         handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
                IMPORTING e_object e_interactive,
    *handling menu button
         handle_menu_button
            FOR EVENT menu_button OF cl_gui_alv_grid
                IMPORTING e_object e_ucomm,
    *On click of the menu button
        handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
                IMPORTING e_ucomm.
        PRIVATE SECTION.
        ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION.
    METHOD handle_toolbar.
    handle toolbar
    CLEAR it_toolbar.
    MOVE 'DETAIL' TO it_toolbar-function.
        MOVE icon_detail TO it_toolbar-icon.
        MOVE 2 TO it_toolbar-butn_type.
        APPEND it_toolbar TO e_object->mt_toolbar.
        ENDMETHOD.                    "handle_toolbar
        METHOD handle_menu_button.
    handle own menubuttons
        IF e_ucomm = 'DETAIL'.
          CALL METHOD e_object->add_function
            EXPORTING
              fcode = 'DISPLAY'
              text  = 'DISPLAY'.
        ENDIF.
      ENDMETHOD.                    "handle_menu_button
      METHOD handle_user_command.
    *On click
        CASE e_ucomm.
          WHEN 'DISPLAY'.
            MESSAGE 'Menu Clicked' TYPE 'I'.
        ENDCASE.
      ENDMETHOD.                           "handle_user_command
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
      *&      Module  USER_COMMAND_0100  INPUT
      MODULE user_command_0100 INPUT.
        CASE ok_code.
          WHEN 'EXIT'.
            LEAVE TO SCREEN 0.
        ENDCASE.
      ENDMODULE.                 " USER_COMMAND_0100  INPUT
      *&      Module  STATUS_0100  OUTPUT
       MODULE status_0100 OUTPUT.
        sET PF-STATUS 'STATUS'.
    Create objects
         IF go_custom_container IS INITIAL.
           CREATE OBJECT go_custom_container
             EXPORTING container_name = 'ALV_CONTAINER'.
           CREATE OBJECT go_grid
             EXPORTING
               i_parent = go_custom_container.
           PERFORM load_data_into_grid.
         ENDIF.
       ENDMODULE.                 " STATUS_0100  OUTPUT
      *&      Form  load_data_into_grid
       FORM load_data_into_grid.
    Read data from table SFLIGHT
         SELECT matnr mtart mbrsh matkl bismt meins
           FROM mara
           INTO corresponding fields of TABLE t_mara.
       PERFORM fld_cate changing T_fcat.
        l_var-report = sy-repid.
      gs_layout-grid_title = 'Analysis Report'.
    gs_layout-NO_TOOLBAR = 'X'.
    gs_layout-BOX_FNAME = 'Selection'.
    Load data into the grid and display them
            caLL METHOD go_grid->set_table_for_first_display
            EXPORTING
            i_structure_name = 'S_MVKE'
              i_save          = 'A'
               is_variant       = l_var
                is_layout             = gs_layout
           CHANGING
             it_outtab        = t_mara[]
             it_fieldcatalog  = t_fcat.
      endform.
    *&      Module  pai  INPUT
          text
    MODULE pai INPUT.
    data: l_valid type c.
       clear ok_code.
       break-point.
       ok_code = sy-ucomm.
           CASE ok_code.
           WHEN 'EXIT'.
             LEAVE TO SCREEN 0.
           WHEN 'BACK'.
             call method go_grid->check_changed_data
                 importing
                    e_valid = l_valid.
            loop at t_mara into g_wa_mara.
            endloop.
         ENDCASE.
    ENDMODULE.                 " pai  INPUT
    *&      Form  fld_cate
          text
         <--P_T_FCAT  text
    FORM fld_cate  CHANGING P_T_FCAT  TYPE lvc_t_fcat.
    DATA : s_fcat type LVC_S_FCAT .
    REFRESH: t_fcat.
      CLEAR s_fcat.
    s_fcat-fieldname = 'BOX1'.
    s_fcat-coltext =   'Box1'.
    s_fcat-seltext =   'Box1'.
    s_fcat-CHECKBOX = 'X'.
    s_fcat-EDIT = 'X'.
    APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
      s_fcat-row_pos = 1.
      s_fcat-col_pos = 1.
      s_fcat-fieldname = 'MATNR'.
      s_fcat-ref_field = 'MATNR'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Material'.
      s_fcat-seltext =   'Material'.
    s_fcat-EDIT = 'X'.
      APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
       s_fcat-row_pos = 2.
      s_fcat-col_pos = 2.
      s_fcat-fieldname = 'MTART'.
      s_fcat-ref_field = 'MTART'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Material type'.
      s_fcat-seltext =   'Material type'.
      APPEND s_fcat TO P_T_FCAT.
    CLEAR s_fcat.
    s_fcat-fieldname = 'BOX2'.
    s_fcat-coltext =   'Box2'.
    s_fcat-seltext =   'Box2'.
    s_fcat-CHECKBOX = 'X'.
    s_fcat-EDIT = 'X'.
    APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
      s_fcat-row_pos = 3.
      s_fcat-col_pos = 3.
      s_fcat-fieldname = 'MBRSH'.
      s_fcat-ref_field = 'MBRSH'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Industry Sector'.
      s_fcat-seltext =   'Industry Sector'.
      APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
        s_fcat-row_pos = 4.
      s_fcat-col_pos = 4.
      s_fcat-fieldname = 'MATKL'.
      s_fcat-ref_field = 'MATKL'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Material Group'.
      s_fcat-seltext =   'Material Group'.
      APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
        s_fcat-row_pos = 5.
      s_fcat-col_pos = 5.
      s_fcat-fieldname = 'BISMT'.
      s_fcat-ref_field = 'BISMT'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Old material number'.
      s_fcat-seltext =   'Old material number'.
      APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
        s_fcat-row_pos = 6.
      s_fcat-col_pos = 6.
      s_fcat-fieldname = 'MEINS'.
      s_fcat-ref_field = 'MEINS'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Base Unit of Measure'.
      s_fcat-seltext =   'Base Unit of Measure'.
      APPEND s_fcat TO P_T_FCAT.
    CLEAR s_fcat.
    s_fcat-fieldname = 'BOX3'.
    s_fcat-coltext =   'Box3'.
    s_fcat-seltext =   'Box3'.
    s_fcat-CHECKBOX = 'X'.
    s_fcat-EDIT = 'X'.
    APPEND s_fcat TO P_T_FCAT.
    ENDFORM.                    " fld_cate                     .

    MOVE 2 TO it_toolbar-butn_type.
    Try changing the 2 (menu) to 0 (button) and see if that helps
    also you need to set the event handler after you create your alv object
    set handler handle_toolbar for [whatever object is called].
    Edited by: Kev Mycock on Jul 24, 2008 7:59 AM

  • List not showing in oops alv .

    Hi expert
    I am new in oops ,I have tried to show the list in oops alv from bkpf table and  followed all steps but could not got any solution.
    While I will give the debugger point after call screen 1010 .It directly shows the screen .
    I can not understand ,what value filled up in fieldcat .
    Please help me ,it's urgent .
    I have paste exact code is in bellow .
    TABLES: bkpf.
    TYPE-POOLS: slis, icon.
    TYPES: BEGIN OF ty_bkpf,
       bukrs TYPE bukrs ,
       belnr TYPE belnr_d ,
       gjahr TYPE gjahr ,
       END OF ty_bkpf .
    DATA : wa_bkpf TYPE ty_bkpf.
    DATA : it_bkpf TYPE STANDARD TABLE OF ty_bkpf.
    DATA: container TYPE REF TO cl_gui_custom_container,
           alv_grid TYPE REF TO cl_gui_alv_grid,
           ok_code LIKE sy-ucomm,
           fieldcat TYPE lvc_t_fcat,
           ls_fcat TYPE lvc_s_fcat.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE t1.
    PARAMETERS:p_bukrs TYPE bukrs .
    SELECTION-SCREEN END OF BLOCK b1 .
    START-OF-SELECTION .
       SELECT bukrs
              belnr
              gjahr
         INTO TABLE it_bkpf
         FROM bkpf
         WHERE bukrs = p_bukrs .
       CALL SCREEN 1010 .
    * Create Controls
       CREATE OBJECT container
              EXPORTING container_name = 'CUSTOM'.
       CREATE OBJECT alv_grid
              EXPORTING  i_parent =  container.
       PERFORM display_fieldcat .
       CALL METHOD alv_grid->set_table_for_first_display
         CHANGING
           it_outtab       = it_bkpf
           it_fieldcatalog = fieldcat.
    FORM display_fieldcat .
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'BUKRS'.
       ls_fcat-fieldname  = 'BUKRS'.
       ls_fcat-ref_table  = 'it_bkpf'.
       ls_fcat-outputlen  = '18'.
       APPEND ls_fcat TO fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'BELNR'.
       ls_fcat-fieldname  = 'BELNR'.
       ls_fcat-ref_table  = 'it_bkpf'.
       ls_fcat-outputlen  = '18'.
       APPEND ls_fcat TO fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'GJAHR'.
       ls_fcat-fieldname  = 'GJAHR'.
       ls_fcat-ref_table  = 'it_bkpf'.
       ls_fcat-outputlen  = '18'.
       APPEND ls_fcat TO fieldcat.
    ENDFORM.                    " display_fieldcat
    module STATUS_1010 output.
    SET PF-STATUS 'ZTEST_SCREEN'.
       SET TITLEBAR text-002.
    endmodule.                 " STATUS_1010  OUTPUT
    *&      Module  USER_COMMAND_1010  INPUT
    *       text
    module USER_COMMAND_1010 input.
       CASE sy-ucomm.
         WHEN 'BACK'.
           LEAVE PROGRAM .
         WHEN 'CANCEL'.
           LEAVE PROGRAM .
         WHEN OTHERS.
       ENDCASE.
    endmodule.                 " USER_COMMAND_1010  INPUT

    Hi,
    dont dispaly data directly,after  creating the both objects for containers and code for fcat and lay out ,
    then execute the report , if you able tos see small grid in corner, u can dispaly internal table by using settable_for_first_display.
    Thanks
    Srini

  • Table cells/graphics do not display properly

    I'm trying to integrate some HTML code (developed outside of
    RoboHelp) for a somewhat complex table used to display a sliced
    graphic, background colors, etc. It looks fine in Dreamweaver, but
    when I paste the code into RoboHelp (true code pane), some of the
    graphic slices do not display properly, e.g., the slices in the
    bottom rows are offset slight and get repeated multiple times if I
    resize the window. I notice that RoboHelp seems to add a bunch of
    its own styles to my code, which might be part of the problem. Is
    this a known issue with RoboHelp? Should I not bother using outside
    HTML if it has some complexity to it?

    quote:
    Originally posted by:
    MergeThis
    ...and just what the heck is "a sliced graphic"?
    Hey, how can you learn, day after day, if you don't ask,
    right?
    I'm not an expert, mind you, but since I originated this
    post, I'll take a stab at it... "Slicing" a graphic is a technique
    used by Web desigers to design and display graphics more
    efficiently or more flexibly. It involves slicing up an image into
    several pieces like a jigsaw puzzle (often by using a program like
    Fireworks). The slices are chosen logically based on function,
    e.g., a designer might create a "banner" graphic to be used as a
    page header with navigation elements (buttons, text, etc) designed
    into the graphic. The graphic might be sliced up so that the
    navigation buttons are separate slices. This allows you to easily
    add hyperllinks to those individual slices. The part that gets
    tricky is that an HTML table must be generated along with the
    slices (with each slice in its own table cell) so that the pieces
    are displayed correctly, giving the appearance of one large
    graphic.

  • Selections not displaying in Photoshop CC

    When using any selection tool in Photoshop CC it will not display the selection - it will only dosplay the sele ction when I go to the Edit option on the Toolbar.
    I'm using a HP Envy Laptop running Windows 8.1. 
    Any ideas as to what might be going on?

    Yes follow the instracktion.

  • Dynamic Selection not displayed from tcode ZME5A but from se93 yes

    I have made a copy of standard program RM06BA00 and transaction ZME5A.
    Everything works except Dynamic selection which is not displayed.
    When I run transaction from SE93 Dynamic selections show up.
    Do you know why this happens and how to fix it?

    Hi,
    You problem probably is related with the "container" of this screen. Check if it still in the screen 1000, because this program is a report and if you change some screen parameter, the screen is recreated and elements inserted by user may be lost.
    Also, check the program names link, like:
    CALL SUBSCREEN %_SUBSCREEN_%_SUB%_CONTAINER  INCLUDING 'SAPLSSEL' '2001' .
    Best regards,
    Mengue
    Do not consider this above if the button is not displayed ****
    Edited by: Leandro Mengue on Oct 15, 2010 7:56 PM

  • Not displaying documents in alv mode

    Hi Experts,
        I had developed service tax report for particular gl while excecuting the report , when i run report on alv display 4 doucment 1100001408, 1100001409 , 1100001410, 1100001412 , these documents are not displayed in ALV  mode,for fiscal year 2010 and 2011
    for both the fiscal year only these documents are not dislpayed, when i debugged it ,its coming to final internal table i.e it_final[]
    still it is not displaying in repot if it is ALV mode . But these same document is displaying in normal view mode.
    Thanks in Advance,
    Ashish

    Hi,
      are you sure in the final internal table your getting the records? check the filter option.
    For that ALV output they use any filter option and save into one layout variant. Please check any filter option they did or not?
    Regards,
    Dhina..

  • ME2L : still to be delivered is not displayed correctly in ALV report

    Dear All,
    The still to be delivered and still to be invoiced quantity is not being displayed correctly in ME2L report. In BEST format the report displayes the correct values. In the ALV form the quantity is same as the ordered quantity.
    can anyone he

    If the selection is the same for BEST layout and ALV layout then the results should equal.
    if a field in ALV display has a different value than in the old list display, then it pretty much looks like a bug, and bugs can only be erased by program changes from SAP via OSS notes.
    Check SAPNet for notes, open a message yourself to SAP if you dont find any.

  • JTable - row selection not working + change the text format

    Hi All,
    I have written a code to display Jtable with 2 columns, 1 column to display image+text and other is multiline.
    I have used 2 different cell renderer for achiveing the same.
    Please advice on the following:
    @ When I click on row, only one column gets selected. How to fix this?
    @ Data to be displayed in rows is fetched from database. And on some STATUS value row should be in bold text or plain text. I have achieved this but withou logic to iterate over it.
    @ When user right clicks on the row allow them to set text in the row as bold or plain.(Just like we do with mails in outlook box)
    Below is the code:
    Hi All,
    I have written a code to display Jtable with 2 columns, 1 column to display image+text and other is multiline.
    I have used 2 different cell renderer for achiveing the same.
    Please advice on the following:
    @ When I click on row, only one column gets selected. How to fix this?
    @ Data to be displayed in rows is fetched from database. And on some STATUS value row should be in bold text or plain text. I have achieved this but withou logic to iterate over it.
    @ When user right clicks on the row allow them to set text in the row as bold or plain.(Just like we do with mails in outlook box)
    Below is the code:package jtab;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.util.Vector;
    import javax.swing.ImageIcon;
    import javax.swing.JEditorPane;
    import javax.swing.JFrame;
    import javax.swing.JMenuItem;
    import javax.swing.JOptionPane;
    import javax.swing.JPopupMenu;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellRenderer;
    import jtab.TestIcon.iconRenderer;
    public class SampleJtable {
         JFrame frame;
         JTable table;
         JScrollPane panel;
         JPopupMenu popupMenu ;
         public static void main(String[] args) {
              SampleJtable sample = new SampleJtable();
              sample.loadGUI();
         public void loadGUI(){
              frame = new JFrame("Sample Program for Font and ImageIcons");
              frame.setContentPane(panel);
              frame.setSize(550,250);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setVisible(true);
         public SampleJtable(){
              BufferedImage images[] = new BufferedImage[1];
              try{
                   images[0] = javax.imageio.ImageIO.read(new File("C:/go.gif"));
              }catch(Exception e){
                   e.printStackTrace();
              final Object data [][] = {{"Auftrag \n test \n 777,Abdherhalden Josef, \n 1957,Grenchen Kaufe \n P",new ImageStore(images[0],"Bourquin Rene")},
                        {"Auftrag \n test \n \n 1957,Grenchen Kaufe \n N",new ImageStore(images[0],"Bourquin Rene")}};
              String colIds [] ={"Beschrebung","Von"};
              DefaultTableModel model = new DefaultTableModel(data, colIds) {  
    public Class getColumnClass(int column) {  
    return data[0][column].getClass();
              /*Vector<Object> rowData1 = new Vector(2);
              rowData1.add("Auftrag \n test \n 777,Abdherhalden Josef, \n 1957,Grenchen Kaufe");
              rowData1.add(new ImageStore(images[0],"Bourquin Rene"));
              Vector<Object> rowData2 = new Vector(2);
              rowData2.add("Auftrag \n test \n 777,Abdherhalden Josef, \n 1957,Grenchen Kaufe");
              rowData2.add(new ImageStore(images[0],"Bourquin Rene"));
              Vector<Vector> rowData = new Vector<Vector>();
         rowData.addElement(rowData1);
         rowData.addElement(rowData2);
              Vector<String> columnNames = new Vector<String>();
         columnNames.addElement("Beschrebung");
         columnNames.addElement("Von");     
              DefaultTableModel model = new DefaultTableModel(rowData, columnNames) {  
              table = new JTable(model);
              table.setDefaultRenderer(ImageStore.class, new ImageRenderer());          
              table.getTableHeader().getColumnModel().getColumn(0).setCellRenderer(new LineCellRenderer());
              table.setRowHeight(84);
              panel = new JScrollPane(table);
              panel.setOpaque(true);
         class ImageRenderer extends DefaultTableCellRenderer {  
         public Component getTableCellRendererComponent(JTable table,
         Object value,
         boolean isSelected,
         boolean hasFocus,
         int row, int column) {  
         super.getTableCellRendererComponent(table, value, isSelected,
         hasFocus, row, column);
         ImageStore store = (ImageStore)value;
         setIcon(store.getIcon());
         setText(store.text);
         return this;
         class ImageStore {  
         ImageIcon icons;
         String text;
         int showingIndex;
         public ImageStore(BufferedImage image1,String s) {
         icons = new ImageIcon(image1);
         showingIndex = 0;
         text = s;
         public ImageIcon getIcon() {  
         return icons;
         public void toggleIndex() {  
         showingIndex = (showingIndex == 0) ? 1 : 0;
         class LineCellRenderer extends JEditorPane implements TableCellRenderer {
              public LineCellRenderer() {           
              setOpaque(true);
              setContentType("text/html");          
              public Component getTableCellRendererComponent(JTable table, Object value,
              boolean isSelected, boolean hasFocus, int row, int column) {
              //System.out.println("Whats in value = "+ value.toString());
              String [] strArray = value.toString().split("\n");
              String rtStr = null ;
              System.out.println("TYPE+ "+ strArray[strArray.length-1].toString());
              String val = strArray[strArray.length-1].toString().trim();
              if (val.equalsIgnoreCase("N")){
                   System.out.println("TYPE+ IS NEW");
                   rtStr = "<html><head></head><body><b><div style=\"color:#FF0000;font-weight:bold;\">" + strArray[0] + "</div>" +
                             " <div style=\"color:#0000FF;font-weight:bold;\">" + strArray[1] + "</div>" +
                             "<div style=\"color:#0000FF;font-weight:bold;\">" + strArray[2] + "</div>" +
                             "<div style=\"color:#0000FF;font-weight:bold;\">" + strArray[3] + "</div>" +
                             "</b></body></html>";
              else {
                   System.out.println("TYPE+ IS PENDING");
                   rtStr = "<html><head></head><body><div style=\"color:#FF0000;\">" + strArray[0] + "</div>" +
                   " <div style=\"color:#0000FF;\">" + strArray[1] + "</div>" +
                   "<div style=\"color:#0000FF;\">" + strArray[2] + "</div>" +
                   "<div style=\"color:#0000FF;\">" + strArray[3] + "</div>" +
                   "</body></html>";
              setText(rtStr);
              return this;

    Posting code again........
    package jtab;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.util.Vector;
    import javax.swing.ImageIcon;
    import javax.swing.JEditorPane;
    import javax.swing.JFrame;
    import javax.swing.JMenuItem;
    import javax.swing.JOptionPane;
    import javax.swing.JPopupMenu;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellRenderer;
    import jtab.TestIcon.iconRenderer;
    public class SampleJtable {
    JFrame frame;
    JTable table;
    JScrollPane panel;
    JPopupMenu popupMenu ;
    public static void main(String[] args) {
    SampleJtable sample = new SampleJtable();
    sample.loadGUI();
    public void loadGUI(){
    frame = new JFrame("Sample Program for Font and ImageIcons");
    frame.setContentPane(panel);
    frame.setSize(550,250);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
    public SampleJtable(){
    BufferedImage images[] = new BufferedImage[1];
    try{
    images[0] = javax.imageio.ImageIO.read(new File("C:/go.gif"));
    }catch(Exception e){
    e.printStackTrace();
    final Object data [][] = {{"Auftrag \n test \n 777,Abdherhalden Josef, \n 1957,Grenchen Kaufe \n P",new ImageStore(images[0],"Bourquin Rene")},
    {"Auftrag \n test \n \n 1957,Grenchen Kaufe \n N",new ImageStore(images[0],"Bourquin Rene")}};
    String colIds [] ={"Beschrebung","Von"};
    DefaultTableModel model = new DefaultTableModel(data, colIds) {
    public Class getColumnClass(int column) {
    return data[0][column].getClass();
    /Vector<Object> rowData1 = new Vector(2);
    rowData1.add("Auftrag \n test \n 777,Abdherhalden Josef, \n 1957,Grenchen Kaufe");
    rowData1.add(new ImageStore(images[0],"Bourquin Rene"));
    Vector<Object> rowData2 = new Vector(2);
    rowData2.add("Auftrag \n test \n 777,Abdherhalden Josef, \n 1957,Grenchen Kaufe");
    rowData2.add(new ImageStore(images[0],"Bourquin Rene"));
    Vector<Vector> rowData = new Vector<Vector>();
    rowData.addElement(rowData1);
    rowData.addElement(rowData2);
    Vector<String> columnNames = new Vector<String>();
    columnNames.addElement("Beschrebung");
    columnNames.addElement("Von");
    DefaultTableModel model = new DefaultTableModel(rowData, columnNames) {
    table = new JTable(model);
    table.setDefaultRenderer(ImageStore.class, new ImageRenderer());
    table.getTableHeader().getColumnModel().getColumn(0).setCellRenderer(new LineCellRenderer());
    table.setRowHeight(84);
    panel = new JScrollPane(table);
    panel.setOpaque(true);
    class ImageRenderer extends DefaultTableCellRenderer {
    public Component getTableCellRendererComponent(JTable table,
    Object value,
    boolean isSelected,
    boolean hasFocus,
    int row, int column) {
    super.getTableCellRendererComponent(table, value, isSelected,
    hasFocus, row, column);
    ImageStore store = (ImageStore)value;
    setIcon(store.getIcon());
    setText(store.text);
    return this;
    class ImageStore {
    ImageIcon icons;
    String text;
    int showingIndex;
    public ImageStore(BufferedImage image1,String s) {
    icons = new ImageIcon(image1);
    showingIndex = 0;
    text = s;
    public ImageIcon getIcon() {
    return icons;
    public void toggleIndex() {
    showingIndex = (showingIndex == 0) ? 1 : 0;
    class LineCellRenderer extends JEditorPane implements TableCellRenderer {
    public LineCellRenderer() {
    setOpaque(true);
    setContentType("text/html");
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus, int row, int column) {
    //System.out.println("Whats in value = " value.toString());
    String [] strArray = value.toString().split("\n");
    String rtStr = null ;
    System.out.println("TYPE " strArray[strArray.length-1].toString());
    String val = strArray[strArray.length-1].toString().trim();
    if (val.equalsIgnoreCase("N")){
    System.out.println("TYPE IS NEW");
    rtStr = "<html><head></head><body><b><div style=\"color:#FF0000;font-weight:bold;\">" strArray[0] "</div>"
    " <div style=\"color:#0000FF;font-weight:bold;\">" strArray[1] "</div>"
    "<div style=\"color:#0000FF;font-weight:bold;\">" strArray[2] "</div>"
    "<div style=\"color:#0000FF;font-weight:bold;\">" strArray[3] "</div>"
    "</b></body></html>";
    else {
    System.out.println("TYPE+ IS PENDING");
    rtStr = "<html><head></head><body><div style=\"color:#FF0000;\">" strArray[0] "</div>"
    " <div style=\"color:#0000FF;\">" strArray[1] "</div>"
    "<div style=\"color:#0000FF;\">" strArray[2] "</div>"
    "<div style=\"color:#0000FF;\">" strArray[3] "</div>"
    "</body></html>";
    setText(rtStr);
    return this;
    }

  • Table row selection not working

    Hi,
    I have a context node for a table of value nodes - APTDATES2 (  superclass CL_BSP_WD_CONTEXT_NODE_TV ),  bound to a custom controller context node,
    which I am displaying via the following on the .htm  page :
      <chtmlb:configTable
                           xml                   = "<%= lv_xml %>"
                           id="appt2"
                           headerText = "Available Appointments"
                           navigationMode="BYPAGE"
                           table="//APTDATES2/Table"
                           visibleRowCount = "12"
                           allRowsEditable = "TRUE"
                           downloadToExcel = "FALSE"
                           personalizable = "FALSE"
                           onRowSelection        = "select"
                           selectionMode   = "<%= APTDATES2->selection_mode %>"
                           selectedRowIndex      = "<%= APTDATES2->selected_index %>"
                           selectedRowIndexTable = "<%= APTDATES2->selection_tab %>"
                           showNoMatchText = "TRUE"
                           width="100%"
                           visibleFirstRow       = "<%= APTDATES2->visible_first_row_index %>"
                           HEIGHT = "10"/>
    My problem is that I cannot click in the left-hand column to select a row on the table - it is not  triggering any events (not even triggering a round-trip  - confirmed this by putting a break-point in the view implementation DO_HANDLE_DATA ).   Have similarly checked that APTDATES2->SELECTION_MODE
    contains SINGLESELECT.
    What am I missing ?

    I am able to fix it using a managed variable for the selectionState. Here is the code:
    <af:table emptyText="No items were found"
    value="#{backing_UpdateResult.resultList}"
    var="row"
    rows="10"
    binding="#{backing_UpdateResult.resultsTable}"
    selectionState="="#{backing_UpdateResult.tableSelectionState}"
    id="resultsTable"
    >
    In the backing bean I have a property variable like:
    private RowKeySet tableSelectionState;
    public RowKeySet getTableSelectionState() {
    if (tableSelectionState == null) {
    tableSelectionState = new RowKeySet();
    tableSelectionState.getKeySet().add("0");
    return tableSelectionState;
    }

  • 0ACCNT_ASGN_TEXT - 0LANGU Selection not displayed

    Hello all,
    How r u ?
    We are extracting 0ACCNT_ASGN_TEXT data to ZACCASGN InfoObject. I wonder why the selection for 0LANGU is displayed in the InfoPackage -> Data Selection Tab.
    The Selection Check box is checked in the DataSource/Trans. Structure Tab. I could see the same in the R/3 - RSA3 also. There I entered the selection and viewed the data.
    There are records with many languages, but we require only data related to one Language.
    How to make this out ?
    Best Regards....
    Sankar Kumar
    +91 98403 47141

    Hi Paolo,
    We are not loading 0ACCNT_ASGN, but a Z.... IO.
    Also, I deleted the data in Z.... IO before loading.
    I shall paste the complete code in the start routine here,
    PROGRAM CONVERSION_ROUTINE.
    Type pools used by conversion program
    TYPE-POOLS: RS, RSARC, RSARR, SBIWA, RSSM.
    Declaration of transfer structure (selected fields only)
    TYPES: BEGIN OF TRANSFER_STRUCTURE ,
      Record number to be filled in case of adding row(s)
      to enable 'error handling'
        record      TYPE rsarecord,
      InfoObject 0LANGU: LANG - 000001
        LANGU(000001) TYPE C,
      InfoObject ZCV_BUCAT: CHAR - 000060
        KEY1(000060) TYPE C,
      InfoObject 0TXTSH: CHAR - 000020
        TXTSH(000020) TYPE C,
    END OF TRANSFER_STRUCTURE .
    Declaration of Datapackage
    TYPES: TAB_TRANSTRU type table of TRANSFER_STRUCTURE.
    Global code used by conversion rules
    $$ begin of global - insert your declaration only below this line  -
    TABLES:
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    FORM STARTROUTINE
      USING    G_S_MINFO TYPE RSSM_S_MINFO
      CHANGING DATAPAK type TAB_TRANSTRU
               G_T_ERRORLOG TYPE rssm_t_errorlog_int
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage
    $$ begin of routine - insert your code only below this line        -
    DATA: l_s_datapak_line type TRANSFER_STRUCTURE,
          l_s_errorlog TYPE rssm_s_errorlog_int.
    abort <> 0 means skip whole data package !!!
      DELETE DATAPAK WHERE LANGU <> 'NL'.
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Sankar

  • Planning book Cell colours are not displayed correctly in upgarded SCM 7.0

    Hi All
    WE have recently upgarded SCM 4.1 to SCM 7.0 system and I am testing new system. I am stuck in one issue . We have some keys figure rows which are open of inout/output. WE have macros for this key figures to close for certian period. After closing we defined cell Background colour to be same as default colour of other rows in planning book. For SCM 4.1 we used colour no 9 for this.
    But in New System SCM 7.0 looks like colour numbers have changed. So I changed macros for background colour , we have an option when changing system gives colour palett and we can select, I tested the whole pallett fo matching colour with default planning book celllc colours- no colour is matching , when I look at palett it looks same but when I  select that in macro the shade looks diferent . 
    Can some one advice how can we get exact colout number to match defult colour of palnning book cells.
    Thanks
    KV

    Hi Kristin,
    You can always change the cell color to default by using 0 as argument of the macro function. For instance, the following macro change the color of cell to red if the corresponding prop factor value is negative. On the other hand, for a positive value or zero, the default background color is retained.
    Thanks,
    Rajesh

Maybe you are looking for

  • Query taking much time to execute

    The following query is taking more than 4hrs to execute. select  l_extendedprice , count(l_extendedprice) from dbo.lineitem group by  l_extendedprice Cardinality of table : 6001215 ( > 6 million) Index on l_extendedprice is there ReadAheadLobThreshol

  • How much Hard drive space lion uses

    How do I find out how HD space my upgraded Lion OS and Apps are using?  I am purchasing a new iMac with 256GB SSD for the main drive and 1 TB for the secondary drive, but I want to make sure that 1. My current apps and lion will fit on the new HD as

  • SubmitGenerateReportAsync Issue. Await operator can only be used with Async Method

    Hi, I am trying to submit a request to download keyword performance report using following .  var reportId =await SubmitGenerateReportAsync(reportRequest); its giving me error  The 'await' operator can only be used within an async method. Consider ma

  • [SOLVED] Mac OS X/Arch dual boot Missing Operating System GRUB problem

    I am attempting to dual boot Mac OS X.5 and Arch on my "unibody" macbook pro. I am getting the "Missing Operating System" error over and over. I have followed the Macbook install guide in the wiki and the Beginners install guide. I've also read all t

  • JAX-WS and JAXB 2.0 for ComplexTypes

    I have a simple web service method that returns a string. I want to enhance this method to return a Java object. Do I have to explicitly use JAXB and have the web service method return the marshalled data string? And then unmarshall on the client sid