Change Attributes of a single Cell

Dear Gurus ,
I made an ALV using OO . In one field i said to field catalogue to be as a Button Style .
My requirement now is when a value of my itab is something not to be as a button style .
For example
a    button style
b    button style
c    no button style
a    button style
Can i do it ?
Look the code that i make my field as a button .
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
  DATA LS_FCAT TYPE LVC_S_FCAT .
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      I_PROGRAM_NAME     = SY-REPID
      I_INTERNAL_TABNAME = 'ITAB'
      I_INCLNAME         = SY-REPID
    CHANGING
      CT_FIELDCAT        = IT_FIELDCAT.
  IF SY-SUBRC = 0.
   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'LVC_TRANSFER_FROM_SLIS'
    EXPORTING
      IT_FIELDCAT_ALV = IT_FIELDCAT
    IMPORTING
      ET_FIELDCAT_LVC = GT_FIELDCAT " IT_LVCFCAT
    TABLES
      IT_DATA         = ITAB.
  IF SY-SUBRC =  0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  LOOP AT GT_FIELDCAT INTO LS_FCAT .
    CASE LS_FCAT-FIELDNAME .
      WHEN 'BELNR' .
        LS_FCAT-OUTPUTLEN = '10' .
        LS_FCAT-STYLE = ALV_STYLE_BUTTON.
        MODIFY GT_FIELDCAT FROM LS_FCAT .
    ENDCASE .
  ENDLOOP .
ENDFORM .                    "prepare_field_catalog

hi.....
do as follows :
1.Add   celltab type lvc_t_styl to ur internal tables structure.
2.after preapring the field catlog perform loop  on your internal table
  loop at <internal table> into <work area> where <your condtition>.
clear ls_celltab.
    ls_celltab-fieldname = '<your field name which u want to convert into button>'.
    ls_celltab-style = cl_gui_alv_grid=>MC_STYLE_BUTTON.
    insert ls_celltab into table <work-area>-celltab.
modify <internal table > from <work area>
endloop.
regards
vivek

Similar Messages

  • Modify the attributes of a single cell in a Mobile Table

    I am very new to JAVA and especially to NetBeans Mobility, and I am having trouble changing the attributes of one cell in a Table.
    Can someone tell me how to change 1) the font to bold for one cell, or 2) the font color for one cell, or 3) the background color for one cell, or 4) the border color or thickness for one cell or 5) all of the above? I am trying to set apart a specific cell for the user to identify.
    I have seen examples where the content of a cell has been changed, but not the attributes. Any help on this would be greatly appreciated.
    Updated on May 12, 2009:
    Can anyone help me with this? Even if it's to tell me that it's not possible. Or even if its to tell me someone else to enter this type of request. I have submitted a request for a new feature on the NetBeans site, but I'm not sure if that is even where that should go.
    Any assistance would be greatly appreciated.
    Edited by: meltimsav on May 12, 2009 6:29 PM

    Okay, so I assume that this is not possible at this time. I have entered a request for a change in the NetBeans Issue Tracking System. I have moved on and used the Canvas to do what I wanted to do.
    Thank you to all how at least pondered this issue.

  • How do I change the background of a single cell or a row in a table?

    How do I change the background of a single cell or a row in a
    table? I doesn't seem to be letting me do that.

    Are you using the latest DW? If so, then it isn't letting you
    because
    bgcolor is deprecated and shouldn't be used.
    The correct way is to use css to define the background of a
    cell
    CSS:
    .blackcell {background-color: black;}
    HTML:
    <td class="blackcell">whatever in the cell</td>
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Template Customization ~
    http://www.csstemplates.com.au
    Spry Widget Examples
    http://www.dreamweaverresources.com/spry-widgets/
    "dm25" <[email protected]> wrote in message
    news:f4jr5h$luu$[email protected]..
    > for some reason that doesn't always work. When I click
    inside a cell, it
    > doesn't give me an option to change the background
    color.

  • Trying to change the color of a single cell

    hi, I am trying to change the color of a single cell when mouse moves over it, but couldn't do it. i even tried my own renderer, but it doesn't work. can anybody help ?

    Here is what I am trying to do. I am displaying some data in a java JTable retrieved from a table in database. What is needed is when user moves his mouse over any cell in the third column, the cursor should change to hand cursor and possibly the background color should also change, to indicate the user that this cell is clickable. I have to show some other report when user clicks any cell in column three. The code follows as
    import java.awt.*;
    import java.sql.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.sql.rowset.*;
    import javax.swing.table.*;
    public class MouseMotionInTable extends JFrame
    public static void main(String[] args)
      MouseMotionInTable f = new MouseMotionInTable();
      Toolkit tk = Toolkit.getDefaultToolkit();
      Dimension dim = tk.getScreenSize();
      int w = dim.width;
      int h = dim.height;
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      f.setBounds((w-600)/2, (h-300)/2, 600, 300);
      f.setVisible(true);
    MouseMotionInTable()
      Connection con = null;
      CachedRowSet crs = null;
      try
       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
       con = DriverManager.getConnection("jdbc:odbc:FMS", "", "");
       Statement st = con.createStatement();
       String query = "SELECT ItemName, Alias, ItemReOrderQuty, ItemMeasure FROM ItemInfo";
       ResultSet rs = st.executeQuery(query);
       crs = new com.sun.rowset.CachedRowSetImpl();
       crs.populate(rs);
       st.close();
      catch (SQLException e)
       e.printStackTrace();
      catch (ClassNotFoundException e)
       e.printStackTrace();
      finally
       if(con != null)
        try
         con.close();
        catch (SQLException e)
         e.printStackTrace();
      DBTableModel model = new DBTableModel(crs);
      table = new JTable(model);
      JPanel center = new JPanel();
      center.setLayout(new BorderLayout());
      center.add(new JScrollPane(table), BorderLayout.CENTER);
      add(center, BorderLayout.CENTER);
      table.addMouseMotionListener(new MouseMotionAdapter()
       public void mouseMoved(MouseEvent me)
        int col = table.columnAtPoint(new Point(me.getX(), me.getY()));
        int row = table.rowAtPoint(new Point(me.getX(), me.getY()));
        if(col == 2)
         Object val = table.getValueAt(row, col);
         boolean isSelect = table.isCellSelected(row, col);
         boolean focus = table.isCellSelected(row, col);
         TableCellRenderer cellRender = table.getCellRenderer(row, col);
         Component comp = cellRender.getTableCellRendererComponent(table, val, isSelect, focus, row, col);
         comp.setCursor(new Cursor(Cursor.HAND_CURSOR));
         comp.setBackground(Color.yellow);
    private JTable table;
    class DBTableModel extends AbstractTableModel
    ResultSet rs;
    ResultSetMetaData rsMeta;
    DBTableModel(ResultSet rs)
      try
       this.rs = rs;
       rsMeta = rs.getMetaData();
      catch(SQLException e)
       e.printStackTrace();
    public int getColumnCount()
      try
       return rsMeta.getColumnCount();  
      catch(SQLException e)
       e.printStackTrace();
      return -1;
    public String getColumnName(int c)
      try
       return rsMeta.getColumnName(c+1);
      catch(SQLException e)
       e.printStackTrace();
      return "";
    public int getRowCount()
      try
       rs.last();
       return rs.getRow();
      catch(SQLException e)
       e.printStackTrace();
      return -1;
    public Object getValueAt(int r, int c)
      try
       rs.absolute(r+1);
       return rs.getObject(c+1);
      catch(SQLException e)
       e.printStackTrace();
      return "";
    public boolean isCellEditable(int r, int c)
      return false;
    public Class getColumnClass(int c)
      return getValueAt(0,c).getClass();
    }

  • How to set a single cell editable in alv Webdynpro Abap

    I am trying to edit a single cell on lead selection. here the steps i did to achive this.
    1. I added a Attribute READ_ONLY  inside my node of type WDY_BOOLEAN.
    2. i am conditionally making this Attribute - READ_ONLY = 'X'.
    3. i am binding my node with new values.
    4. for ALV here is the code i have added.
    DATA :lo_cmp_usage TYPE REF TO if_wd_component_usage,
            lr_column    TYPE REF TO cl_salv_wd_column,
            lr_table_settings TYPE REF TO if_salv_wd_table_settings,
            lt_columns TYPE salv_wd_t_column_ref,
            ls_columns TYPE salv_wd_s_column_ref,
            lr_input_field TYPE REF TO cl_salv_wd_uie_input_field,
            lo_interfacecontroller TYPE REF TO iwci_salv_wd_table ,
            lv_value TYPE REF TO cl_salv_wd_config_table.
    *Taking reference of the Component Usage
      lo_cmp_usage =   wd_this->wd_cpuse_cu_alv( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
      lo_interfacecontroller =   wd_this->wd_cpifc_cu_alv( ).
      lv_value = lo_interfacecontroller->get_model( ).
      CALL METHOD lv_value->if_salv_wd_column_settings~get_columns
        RECEIVING
          value = lt_columns.
      LOOP AT lt_columns INTO ls_columns.
        lr_column = ls_columns-r_column.
        CASE ls_columns-id.
          WHEN 'USR_ACT_RT'.
            CREATE OBJECT lr_input_field
              EXPORTING
                value_fieldname = ls_columns-id.
            lr_column->set_cell_editor( value = lr_input_field ).
            lr_input_field->set_read_only_fieldname( value = 'READ_ONLY' ).
        ENDCASE.
      ENDLOOP.
      lr_table_settings ?= lv_value.
      lr_table_settings->set_read_only( abap_false ).
      lv_value->if_salv_wd_column_settings~delete_column( id = 'READ_ONLY' ).
    but instead of changing the particular cell where i have marked READ_ONLY = 'X' it is changing whole column 'USR_ACT_RT'  data as editable .
    If anybody can  please help ASAP

    Hi Tashi,
    Thanks for your reply,i have did the same way u are doing here for setting the READ_ONLY Attribute conditionally.
    here is my code for setting the read only attribute .
    IF NOT lo_nd_nd_cost_rate IS INITIAL.
        lo_nd_nd_cost_rate->get_static_attributes_table( IMPORTING table = lt_nd_cost_rate ).
      ENDIF.
      IF NOT lo_el_nd_cost_rate IS INITIAL.
    * get all declared attributes
        lo_el_nd_cost_rate->get_static_attributes(
          IMPORTING
            static_attributes = ls_nd_cost_rate_sel ).
      ENDIF.
      lv_datum = sy-datum.
      lv_month = lv_datum+4(2).
    ** @TODO handle non existant child
      LOOP AT lt_nd_cost_rate INTO ls_nd_cost_rate WHERE quarter = ls_nd_cost_rate_sel-quarter.
        IF ls_nd_cost_rate-quarter = 'Q1'.
          IF ( lv_month  EQ '01' OR lv_month  EQ '02' OR lv_month  EQ '03' ).
            ls_nd_cost_rate-read_only = 'X'.
          ELSE.
            ls_nd_cost_rate-read_only = ''.
    *   report message
            CALL METHOD lo_message_manager->report_warning
              EXPORTING
                message_text = lv_text.
          ENDIF.
        ELSEIF ls_nd_cost_rate-quarter = 'Q2'.
          IF ( lv_month  EQ '04' OR lv_month  EQ '05' OR lv_month  EQ '06' ).
            ls_nd_cost_rate-read_only = 'X'.
          ELSE.
            ls_nd_cost_rate-read_only = ''.
    *   report message
            CALL METHOD lo_message_manager->report_warning
              EXPORTING
                message_text = lv_text.
          ENDIF.
        ELSEIF ls_nd_cost_rate-quarter = 'Q3'.
          IF ( lv_month  EQ '07' OR lv_month  EQ '08' OR lv_month  EQ '09' ).
            ls_nd_cost_rate-read_only = 'X'.
          ELSE.
            ls_nd_cost_rate-read_only = ''.
    *   report message
            CALL METHOD lo_message_manager->report_warning
              EXPORTING
                message_text = lv_text.
          ENDIF.
        ELSEIF ls_nd_cost_rate-quarter = 'Q4'.
          IF ( lv_month  EQ '10' OR lv_month  EQ '11' OR lv_month  EQ '12' ).
            ls_nd_cost_rate-read_only = 'X'.
          ELSE.
            ls_nd_cost_rate-read_only = ''.
    *   report message
            CALL METHOD lo_message_manager->report_warning
              EXPORTING
                message_text = lv_text.
          ENDIF.
        ENDIF.
        MODIFY lt_nd_cost_rate FROM ls_nd_cost_rate INDEX sy-tabix TRANSPORTING read_only .
        CLEAR ls_nd_cost_rate.
      ENDLOOP.
      lo_nd_nd_cost_rate->bind_table( lt_nd_cost_rate ).
    please see in the below sceen shot the last two cells are editable in the User Actual Rate Column whlie the selected rows cell is not editable. Please revert if u have any input for same.

  • How to disable single cell in table control.

    Hi my requirement is to disable single cell in the table control. Please let me know How to do this.
    If possible please provide good module pool examples.
    Harish

    Hi,
    I´m not quite sure if this is gonna work. You have to make a loop over the screen and then you can change some characteristics of it, which includes the Input option:
      LOOP AT SCREEN.
        IF screen-group1 = 'ABC'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    I´ve used this code for selection screens but could help you. Check in SE11 all options for SCREEN.

  • I see people from different ages at my work and every month I need to count how many people from each age I've seen that month. How can I do to give the entries to numbers in a single cell and make numbers count them for me?

    I see people from different ages at my work and every month I need to count how many people from each age I've seen that month. How can I do to give the entries to numbers in a single cell and make numbers count them for me? The final result would be a spreadsheet telling there were 8 people from 20 to 39 years old, 14 peolple from 40 to 59 and so on...

    jpqcampos wrote:
    This appears to be an 'input form' using 'Radio Buttons' to select the category. Neither of these features are supported in Numbers '09.
    You can input the data on one table and summarize it on a second table, but the input table will continue to hold data for each event.
    And by using the Reorganize button, you can hide all but two rows of that table to approximate the appearance and performance of an input form.
    Here are the two tables, Data on the left and Summary on the right. Notes below.
    The grey-filled columns in both tables are 'working' columns, and may be hidden (as shown in the image below).
    Data table:
    D1 contains the word "TRUE" (in capital letters). (This row is always shown.)
    D2 is empty, or may contain any value except "TRUE" (This row is always hidden under the Reorganize rule.)The rest of Row 2 of this table requires the data shown: a number outside the range to be counted (999), and two checkboxes, both checked.
    D3 (and filled down the rest of column D):   =AND(OR(B2,C2),NOT(OR(B3,C3)))
    The formula returns TRUE only for the first unused row in the table (ie. the first row for which neither checkbox has been checked)
    Summary table:
    Column A contains labels for the age ranges to be counted.
    Column B contains the same information in the form necessary for the formulas in columns C and D. They need a numeric value, and that value must be the largest acceptable value in the range to be counted.
    C2 (and filled right to column D, then both filled down to row 5):
        =COUNTIFS(Data :: $A,"<="&$B,Data :: B,TRUE)-SUM(C$1:C1)
    Two changes from the previous example:
    COUNTIFS is used to separate the Native and Foreign counts as well as the age range to be counted.
    The amount subtracted from each result is the SUM of the earlier results, and includes the text value in the first cell of the column (which is interpreted by SUM as a zero).
    See note below regarding my earlier formula.
    When the greyed columns are hidden and the checkbox in the Reorganize pane is checked, the two tables will appear as shown below:
    Close the reorganize pane, and the 'data entry form' is ready to use.
    To use, enter the age first, then check one of the boxes.
    As soon as one box is checked, the row will be hidden, and the next (unused) row will be shown.
    Regards,
    Barry
    Note regarding formula in my earlier post:
    The earlier formula will give erroneous results as it subtracts only the count directly above it from its count of persons in the age range 0-n.
    In E2 of that table, replace "-E1" with "-SUM(E1:E$1)
    Fill down to E8.
    Ignore the instructions (in that post) following "Fill down to E8."
    B

  • How to find multiple keys in single cell using Numbers?

    I'm trying to add functionality to one of my Numbers tables where want to check a single cell for multiple keywords from a list. The hole thing works perfectly fine in Excel but it behaves differently in Numbers.
    The formula I am using is:
    =IF(ISERROR(LOOKUP(2^15;FIND($E$2:$E$11;A2)));"not found";"found")
    The following screenshots show that it correctly finds the keys in the cell when using Excel but not in Numbers. Although, it seems to work if the key is in the same row as the input cell.
    Excel table using the formula I posted in the C column:
    Numbers table using the formula I posted in the C column:
    Would be really happy if somebody knows how I could accomplish that!
    Cheers,
    Maik

    If you are working in Numbers you can do this efficiently with a small AppleScript without going back to Excel or clone. One click and you get the following result:
    This script works with Numbers 2.3, which your screenshot suggests you are using. If you are using Numbers 3 it needs a very small adjustment.
    This is the script:
    --https://discussions.apple.com/thread/6315365?tstart=30
    property inputCol : 1 --> col A, as in example
    property resultCol : 3 --> col C, as in example
    property keysCol : 5 --> col E, as in example
    property targDoc : 1 --> 1 is front document; can change to "MyDocName"
    property targSheet : 1 --> 1 is first sheet; can change to "MySheetName"
    property targTable : 1 --> 1 is first table; can change to "MyTableName"
    tell application "Numbers"
              set t to document targDoc's sheet targSheet's table targTable
              set keysList to t's column keysCol's cells's value
              repeat with i from 2 to t's row count -- assumes 1 Header Row
                        set inputVal to t's row i's cell inputCol's value
                        if inputVal is not 0 then --skip blank cells; Numbers 2 reads blanks as 0
                                  --check if Input matches a key:
                                  if inputVal is in keysList then
                                            set t's row i's cell resultCol's value to "found"
                                  else
                                            set t's row i's cell resultCol's value to "not found"
                                  end if
                                  --check if Input contains a key:
                                  repeat with aKey in keysList
                                            if inputVal contains aKey then set t's row i's cell resultCol's value to "found"
                                  end repeat
                        end if
              end repeat
    end tell
    --end of script
    To run, copy into AppleScript Editor, change the properties if needed, and click the green triangle 'Run' botton.
    SG

  • Error : Attribute pwdaccountlockedtime is single valued users try pwdchange

    Hi,
    I am using OID 90220 and the OS is Solaris 9. When the users try to change their passowrds from the application they are receiving an error : Attribute pwdaccountlockedtime is single valued. When I try to modify the password from OID as orcladmin it gives me :
    Attribute or value already exists.
    I have set password lockout if the users tries wrong password thrice and he cannot use the old password until the next 20 times and the password lockout duration to be 1 day.
    Any clue what the error is all about?? In the OID admin dco I have seen "pwdaccountlockedtime" is not be changed and I have never changed it.
    Any body if you can please help.
    Regards,
    Ramana

    Use "Create Like" to create a duplicate account with a new DN. Delete the original account. Use "Create Like" to create a new account the original DN from the duplicate. The new account should now work. Delete the duplicate.

  • Changing font size within a cell.

    There doesn't seem to be any way to change the font size within a single cell. Hitting the i button doesn't bring up any options to make this change. Is this correct?
    Message was edited by: jng65

    Another solution is to create a new table and format the row or column as you want it and then drag it into place onto the original table. Ensure that the row and column dimensions are the same so it fits seamlessly.
    You can use this technique, henceforth known as the Simmonds Method, for text, headers and footers and, of course, any number or date. In other words, anything.
    That solves the problem of the current restriction on table style. Of course, I'm sure that it would be easier if each cell were individually formattable, like we expect, but until this is updated, this workaround (the Simmonds Method Workaround) will have to do!

  • Modifying single cell in ALV Grid via OO

    Hi All,
    Got a problem I hope someone can assist me with.  I have a custom program generating an editable ALV grid.  The users want to update a single cell in a row with value from a custom drop down.  I've got the dropdown working, but I can't work out how to get the value back into the field.  My attempts result in a 'GETWA_NOT_ASSIGNED' short dump.
    I'm using the CL_GUI_ALV_GRID->get_selected_cells_id method to get the reference for the field to be modified, but I don't know where to go from here. 
    Any thoughts would be greatly appreciated.  Btw, my knowledge of OO is passable, but not great, so any explanations of what the code is doing in a proposed solution would be greatly appreciated.
    points will be rewarded.
    Cheers,
    Stephen

    Hello Stephen
    Since your dropdown list restrict the already allowed values there should be no special need to validate the selected values.
    Simply "grab" the data from the editable ALV into your internal itab in the ABAP report.
    I have copied sample report BCALV_EDIT_07 into ZUS_SDN_BCALV_EDIT_07 and modified the report to show how to retrieve the dropdown values (which is simple). Please note that I added the GUI-function 'SAVE' to the GUI-status MAIN100.
    *       MODULE PAI INPUT                                              *
    MODULE pai INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      "$TMP
      g_grid->check_changed_data( ). " retrieve changes from editable grid
      CASE save_ok.
        WHEN 'EXIT'.
          PERFORM exit_program.
        "$TMP
        WHEN 'SAVE'.
          PERFORM save_data.
        WHEN OTHERS.
    *     do nothing
      ENDCASE.
    ENDMODULE.                    "pai INPUT
    *&      Form  SAVE_DATA
    *       text
    FORM save_data.  "$TMP
    * define local data
      data: ls_fcat   type lvc_s_fcat,
            lt_fcat   type lvc_t_fcat.
      lt_fcat = gt_fieldcat.
      ls_fcat-edit = ' '.
      modify lt_fcat from ls_fcat
          TRANSPORTING edit
        where ( edit = 'X' ).  " display ALV should be not editable
      " Simulate saving of data
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                =
    *     I_BUFFER_ACTIVE                   =
    *     I_CALLBACK_PROGRAM                = ' '
    *     I_CALLBACK_PF_STATUS_SET          = ' '
    *     I_CALLBACK_USER_COMMAND           = ' '
    *     I_CALLBACK_TOP_OF_PAGE            = ' '
    *     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *     I_CALLBACK_HTML_END_OF_LIST       = ' '
    *     I_STRUCTURE_NAME                  =
    *     I_BACKGROUND_ID                   = ' '
          I_GRID_TITLE                      = 'Display modified list data'
    *     I_GRID_SETTINGS                   =
    *     IS_LAYOUT_LVC                     =
          IT_FIELDCAT_LVC                   = lt_fcat
    *     IT_EXCLUDING                      =
    *     IT_SPECIAL_GROUPS_LVC             =
    *     IT_SORT_LVC                       =
    *     IT_FILTER_LVC                     =
    *     IT_HYPERLINK                      =
    *     IS_SEL_HIDE                       =
    *     I_DEFAULT                         = 'X'
    *     I_SAVE                            = ' '
    *     IS_VARIANT                        =
    *     IT_EVENTS                         =
    *     IT_EVENT_EXIT                     =
    *     IS_PRINT_LVC                      =
    *     IS_REPREP_ID_LVC                  =
          I_SCREEN_START_COLUMN             = 5
          I_SCREEN_START_LINE               = 5
          I_SCREEN_END_COLUMN               = 120
          I_SCREEN_END_LINE                 = 20
    *     I_HTML_HEIGHT_TOP                 =
    *     I_HTML_HEIGHT_END                 =
    *     IT_EXCEPT_QINFO_LVC               =
    *     IR_SALV_FULLSCREEN_ADAPTER        =
        TABLES
          t_outtab                          = gt_outtab
        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.                    "SAVE_DATA
    And here is the entire coding: In order to find the modified parts of the coding simply search for $TMP.
    PROGRAM zus_sdn_bcalv_edit_07.
    * Purpose:
    * ~~~~~~~~
    * This example shows how to define dropdown listboxes for
    * particular cells of your output table.
    * To check program behavior
    * ~~~~~~~~~~~~~~~~~~~~~~~~~
    * Conceive that customers are only allowed to smoke in the
    * first class. For this reason, if the customer is a smoker
    * only the first class (F) can be chosen in column 'CLASS',
    * otherwise all classes.
    * Essential steps (search for '§')
    * ~~~~~~~~~~~~~~~
    * 1.Define an extra field in your output table
    * 2.Define a dropdown table and pass it to ALV.
    * 3.Set your dropdown field editable and assign the fieldname of the
    *   corresponding additional field to DRDN_FIELD of the fieldcatalog.
    * 4.Set the handle of your additional field of your output
    *   table according to the listbox that shall be displayed.
    DATA: ok_code LIKE sy-ucomm,
          save_ok LIKE sy-ucomm,
          g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
          g_grid  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          gt_fieldcat TYPE lvc_t_fcat,
          gs_layout TYPE lvc_s_layo,
          g_max TYPE i VALUE 100.
    *§1.Define an extra field in your output table
    *   for each column where you want to use drop down listboxes.
    *   (One additional field refers to cells of one column).
    DATA: BEGIN OF gt_outtab OCCURS 0.
            INCLUDE STRUCTURE sbook.
    DATA: drop_down_handle TYPE int4.
    DATA: END OF gt_outtab.
    *       MAIN                                                          *
    END-OF-SELECTION.
      CALL SCREEN 100.
    *       MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF g_custom_container IS INITIAL.
        PERFORM create_and_init_alv CHANGING gt_outtab[]
                                             gt_fieldcat.
      ENDIF.
    ENDMODULE.                    "pbo OUTPUT
    *       MODULE PAI INPUT                                              *
    MODULE pai INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      "$TMP
      g_grid->check_changed_data( ). " retrieve changes from editable grid
      CASE save_ok.
        WHEN 'EXIT'.
          PERFORM exit_program.
        "$TMP
        WHEN 'SAVE'.
          PERFORM save_data.
        WHEN OTHERS.
    *     do nothing
      ENDCASE.
    ENDMODULE.                    "pai INPUT
    *       FORM EXIT_PROGRAM                                             *
    FORM exit_program.
      LEAVE PROGRAM.
    ENDFORM.                    "exit_program
    *&      Form  SAVE_DATA
    *       text
    FORM save_data.  "$TMP
    * define local data
      data: ls_fcat   type lvc_s_fcat,
            lt_fcat   type lvc_t_fcat.
      lt_fcat = gt_fieldcat.
      ls_fcat-edit = ' '.
      modify lt_fcat from ls_fcat
          TRANSPORTING edit
        where ( edit = 'X' ).  " display ALV should be not editable
      " Simulate saving of data
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                =
    *     I_BUFFER_ACTIVE                   =
    *     I_CALLBACK_PROGRAM                = ' '
    *     I_CALLBACK_PF_STATUS_SET          = ' '
    *     I_CALLBACK_USER_COMMAND           = ' '
    *     I_CALLBACK_TOP_OF_PAGE            = ' '
    *     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *     I_CALLBACK_HTML_END_OF_LIST       = ' '
    *     I_STRUCTURE_NAME                  =
    *     I_BACKGROUND_ID                   = ' '
          I_GRID_TITLE                      = 'Display modified list data'
    *     I_GRID_SETTINGS                   =
    *     IS_LAYOUT_LVC                     =
          IT_FIELDCAT_LVC                   = lt_fcat
    *     IT_EXCLUDING                      =
    *     IT_SPECIAL_GROUPS_LVC             =
    *     IT_SORT_LVC                       =
    *     IT_FILTER_LVC                     =
    *     IT_HYPERLINK                      =
    *     IS_SEL_HIDE                       =
    *     I_DEFAULT                         = 'X'
    *     I_SAVE                            = ' '
    *     IS_VARIANT                        =
    *     IT_EVENTS                         =
    *     IT_EVENT_EXIT                     =
    *     IS_PRINT_LVC                      =
    *     IS_REPREP_ID_LVC                  =
          I_SCREEN_START_COLUMN             = 5
          I_SCREEN_START_LINE               = 5
          I_SCREEN_END_COLUMN               = 120
          I_SCREEN_END_LINE                 = 20
    *     I_HTML_HEIGHT_TOP                 =
    *     I_HTML_HEIGHT_END                 =
    *     IT_EXCEPT_QINFO_LVC               =
    *     IR_SALV_FULLSCREEN_ADAPTER        =
        TABLES
          t_outtab                          = gt_outtab
        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.                    "SAVE_DATA
    *&      Form  BUILD_FIELDCAT
    *       text
    *      <--P_GT_FIELDCAT  text
    FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
      DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'SBOOK'
        CHANGING
          ct_fieldcat      = pt_fieldcat.
      LOOP AT pt_fieldcat INTO ls_fcat.
    * Exchange smoker field with invoice field - just to
    * make the dependance between SMOKER and CLASS more transparent
    * (Smoking is only allowed in the first class).
        IF ls_fcat-fieldname EQ 'SMOKER'.
          ls_fcat-col_pos = 11.
          ls_fcat-outputlen = 10.
          MODIFY pt_fieldcat FROM ls_fcat.
        ELSEIF ls_fcat-fieldname EQ 'INVOICE'.
          ls_fcat-col_pos = 7.
          MODIFY pt_fieldcat FROM ls_fcat.
        ELSEIF    ls_fcat-fieldname EQ 'CLASS'.
    *§3.Set your dropdown field editable and assign the fieldname of the
    *   corresponding additional field to DRDN_FIELD of the fieldcatalog.
          ls_fcat-edit = 'X'.
          ls_fcat-drdn_field = 'DROP_DOWN_HANDLE'.
          ls_fcat-outputlen = 5.
    * Field 'checktable' is set to avoid shortdumps that are caused
    * by inconsistend data in check tables. You may comment this out
    * when the test data of the flight model is consistent in your system.
          ls_fcat-checktable = '!'.        "do not check foreign keys
          MODIFY pt_fieldcat FROM ls_fcat.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "build_fieldcat
    *&      Form  CREATE_AND_INIT_ALV
    *       text
    *      <--P_GT_OUTTAB  text
    *      <--P_GT_FIELDCAT  text
    *      <--P_GS_LAYOUT  text
    FORM create_and_init_alv CHANGING pt_outtab TYPE STANDARD TABLE
                                      pt_fieldcat TYPE lvc_t_fcat.
      DATA: lt_exclude TYPE ui_functions.
      CREATE OBJECT g_custom_container
        EXPORTING
          container_name = g_container.
      CREATE OBJECT g_grid
        EXPORTING
          i_parent = g_custom_container.
      PERFORM build_fieldcat CHANGING pt_fieldcat.
    * Optionally restrict generic functions to 'change only'.
    *   (The user shall not be able to add new lines).
      PERFORM exclude_tb_functions CHANGING lt_exclude.
      PERFORM set_drdn_table.
      PERFORM build_data CHANGING pt_outtab.
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          it_toolbar_excluding = lt_exclude
        CHANGING
          it_fieldcatalog      = pt_fieldcat
          it_outtab            = pt_outtab[].
    * Set editable cells to ready for input initially
      CALL METHOD g_grid->set_ready_for_input
        EXPORTING
          i_ready_for_input = 1.
    ENDFORM.                               "CREATE_AND_INIT_ALV
    *&      Form  EXCLUDE_TB_FUNCTIONS
    *       text
    *      <--P_LT_EXCLUDE  text
    FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
    * Only allow to change data not to create new entries (exclude
    * generic functions).
      DATA ls_exclude TYPE ui_func.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
      APPEND ls_exclude TO pt_exclude.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  set_drdn_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM set_drdn_table.
    *§2.Define a dropdown table and pass it to ALV.
    *   One listbox is referenced by a handle, e.g., '1'.
    *   For each entry that shall appear in this listbox
    *   you have to append a line to the dropdown table
    *   with handle '1'.
    *   This handle can be assigned to several columns
    *   of the output table using the field catalog.
      DATA: lt_dropdown TYPE lvc_t_drop,
            ls_dropdown TYPE lvc_s_drop.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = 'F'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = 'F'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = 'C'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = 'Y'.
      APPEND ls_dropdown TO lt_dropdown.
      CALL METHOD g_grid->set_drop_down_table
        EXPORTING
          it_drop_down = lt_dropdown.
    ENDFORM.                               " set_drdn_table
    *&      Form  build_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_data CHANGING pt_outtab TYPE STANDARD TABLE.
      DATA: lt_sbook TYPE TABLE OF sbook,
            ls_sbook TYPE sbook,
            l_index TYPE i,
            ls_outtab LIKE LINE OF gt_outtab.
      SELECT * FROM sbook INTO TABLE lt_sbook UP TO g_max ROWS."#EC CI_NOWHERE
      IF sy-subrc NE 0.
        PERFORM generate_entries CHANGING lt_sbook.
      ENDIF.
    *§4.Set the handle of your additional field of your output
    *   table according to the listbox that shall be displayed.
      LOOP AT lt_sbook INTO ls_sbook.
        l_index = sy-tabix.
        MOVE-CORRESPONDING ls_sbook TO ls_outtab.
        CLEAR ls_outtab-class.
    * Alternate between smoker and non smoker to make
    * it more obvious what this example is about
        l_index = l_index MOD 2.
        IF l_index EQ 1.
          ls_outtab-smoker = 'X'.
        ELSE.
          ls_outtab-smoker = ' '.
        ENDIF.
        IF ls_outtab-smoker EQ 'X'.
          ls_outtab-drop_down_handle = '1'.
        ELSE.
          ls_outtab-drop_down_handle = '2'.
        ENDIF.
        APPEND ls_outtab TO pt_outtab.
      ENDLOOP.
    ENDFORM.                               " build_data
    *&      Form  generate_entries
    *       text
    *      <--P_LT_SLFIGHT  text
    FORM generate_entries CHANGING pt_sbook TYPE STANDARD TABLE.
      DATA: ls_sbook TYPE sbook,
            l_month(2) TYPE c,
            l_day(2) TYPE c,
            l_date(8) TYPE c,
      l_prebookid TYPE i.
      ls_sbook-carrid = 'LH'.
      ls_sbook-connid = '0400'.
      ls_sbook-forcurkey = 'DEM'.
      ls_sbook-loccurkey = 'USD'.
      ls_sbook-custtype = 'B'.
      DO 110 TIMES.
        l_prebookid = sy-index.
        ls_sbook-forcuram = sy-index * 10.
        ls_sbook-loccuram = ls_sbook-loccuram * 2.
        ls_sbook-customid = sy-index.
        ls_sbook-counter = 18.
        ls_sbook-agencynum = 11.
        l_month = sy-index / 10 + 1.
        DO 2 TIMES.
          l_day = 3 + l_month + sy-index * 2.
          l_date+0(4) = '2000'.
          l_date+4(2) = l_month.
          l_date+6(2) = l_day.
          ls_sbook-fldate = l_date.
          SUBTRACT 3 FROM l_day.
          ls_sbook-order_date+0(6) = l_date+0(6).
          ls_sbook-order_date+6(2) = l_day.
          ls_sbook-bookid = l_prebookid * 2 + sy-index.
          IF sy-index EQ 1.
            ls_sbook-smoker = 'X'.
          ELSE.
            ls_sbook-smoker = space.
          ENDIF.
          ls_sbook-luggweight = l_prebookid * 10.
          IF ls_sbook-luggweight GE 1000.
            ls_sbook-wunit = 'G'.
            ls_sbook-class = 'C'.
          ELSE.
            ls_sbook-wunit = 'KG'.
            ls_sbook-class = 'Y'.
          ENDIF.
          IF ls_sbook-bookid > 40 AND ls_sbook-wunit EQ 'KG'.
            ls_sbook-invoice = 'X'.
          ENDIF.
          IF ls_sbook-bookid EQ 2.
            ls_sbook-cancelled = 'X'.
            ls_sbook-class = 'F'.
          ENDIF.
          APPEND ls_sbook TO pt_sbook.
        ENDDO.
      ENDDO.
    ENDFORM.                               " generate_entries
    Regards
      Uwe

  • Concatenation of Data from 4 infoobjects into a single cell in Bex Report

    Hi,
    I have loaded ODS with the description data. The source system for loading the ODS is the flat file. The ODS data should be a replica of the flat file.
    In the flat file, there is a description field corresponding to a particular ID. This Description is greater than the standard 60 char length. So, I had to split the description while loading the flat file using single line routine in the Transfer Structure.
    So, while loading different  the data, I split the description field data from the flat file into 4 infoobjects and the flat file data was loaded into the ODS.
    Now, from the reporting point of view, I need to display the entire description data from the 4 info-objects into a single cell in the Bex report.
    Please suggest a solution for this.
    <b>****Points will be awarded***</b>

    Hi Vineet,
    Thanks for the response.
    Could you please help me out with the VBA script(code) that needs to be written in the macro.
    Thanks in Advance.
    <i><b>****Points will be awarded****</b></i>
    Regards,
    Hitesh Shetty.

  • Manager is not able to change attribute

    Hello SRM Guru,
    As per my knowledge Managers can change the attributes defined for their organizational unit(s) or for users in their organizational unit(s) using the Web application Changing Attributes BBPATTRMAINT. In my case manager is only able to only change attributes defined for their organizational unit(s) not for the users in the organizational unit(s).
    Could you please suggest what could be the setting I am missing? I have also tried with standrad manager and administrator role.
    Thanks,
    Jack

    Jack
    It seems that you are trying to change the attribute value which is inherited.
    If the user attributes are inherited from the parent org unit level, then you cannot change them at user level. You need to go to the parent level where attributes are set and change there. This will affect to all levels down the line wherever inherited. Be careful while doing this.
    If you do not want those attributes to get inherited down the line then remove the value at parent level. Then you can add new value to that attribute at the user level.
    Regards
    Jagdish

  • Multiple values in a single cell in report !!

    Hello,
    I want to display multiple values in a single cell, each value separated by comma.
    Ex: I have Employee and Department.
    If a employee works for many departments, all the Department names should be displayed in the same cell in the report.
    Please help !

    Thanks for your replies !
    Is there any other way to achieve this ?
    There is 1 InfoObject which has 2 fields Employee and Department.
    Employee     Department
    001                A
    001                B
    001                C
    In the report there should be 1 row for Employee 001 with all the Departments displayed in the same cell separated by commas.
    Can this be done in the backend through a ABAP code?

  • Is there a way to add multiple borders to a single cell with one click or do I have to add one border at a time for example, one cell with borders on three sides?

    I would like to know if there is a way to add multiple borders to a single cell or selection of cells in one click.  At this time, if i want to add for example a top border and a bottom border to a single cell I have to do this in two steps: first select the top border, style, thickness, and color, and then next select the bottom border, style, thickness, and color.  Is there a way to select the top and bottom border of a cell in one click?  Clicking on the top border then holding down the command key while selecting the bottom border does not work, nor does holding down the option key, the control key, or the shift key work. Thanks for your help.

    Thank you for the suggestion but this did not work for my Mac.  When a cell is selected for which I want borders, the entire cell is lit up.  Then when I go to the border tool and select style, thickness, and color, the entire lit up cell takes on the border, that is the Outside Edges of the cell now have a border.  So selecting the style, thickness, and color first doesn't work.
    If I select the top border first (or any border), the drop down goes away and I can't select multiple borders - I get to choose one at a time.  After selecting one border, style, thickness, and color, said border is now on the spreadsheet.  Then I go back to the border selection and pick another border and the the previously selected style, thickness, and color reverts to null, so I start over with the new border style, thickness, and color.  Yes, it is tedious.
    The Fix would allow the user to select multiple borders, say left and right, before the drop down goes away after selecting only one border
    Does it have something to do with Allow or Disallow border selection?
    I have Numbers '09 version 2.1 (436)

Maybe you are looking for

  • Getting imessages sent to other people

    I'm having repeated issues with my i messaging receiving messages incorrectly. A few weeks ago, I texted (iMessaged) a friend of mine. He received it but the message also popped up on my mom's phone but as if she had sent it. How weird?! When she rep

  • I want to buy Mac OS X 10.5 Leopard but i can't seem to find reseller??

    I'm a virgin Apple user so first I bought a second hand iBook G4 I wanted to install the latest version of iTunes so that i can syn my iBook with my iPhone, because the current version of iTunes can only access iPods.

  • Help with starting raid on the k9a2 platnium

    ok well i just got a k9a2 platnium specs- amd 9950 BE edition 4gb of 800mhz ddr2 cas 3 2x 80 gb hard drives 1x 640gb hard drive ati hd 4870 k9a2 platnium 750 watt corsair psu ok. i finished my computer. and i wanted to raid the two 80's. but for some

  • Download my 22Gig iPhone 4S image to a computer...

    I need to download my 22 Gig Iphone 4s image to my computer.  I have wasted 2 days already trying to "let it finish" the Icloud restore process.  It makes it about 1/3 of the way thru the 8 hour process!  Is there anyone besides the "Hackers" that ca

  • Custom mail stationery missing...

    While I have the stationery in Mail, it does not appear to be where it should be. I read the following article: http://www.jdempsey.com/how-to-create-customized-osx-mail-stationery-in-leopard/ The thing is none of the stationery templates are anywher