How to extend BUT000 table

Hi Experts,
I need to add some custom fields to BUT000 Table. Can any body please tell me how we can extend table BUT000 to add custom fields.
Any pointers would be highly appreciated.
Regards,
Amit

Hi,
I have looked into your query.
Take a look at this note 864222 which will be helpful for enhancing any table using EEWB.
I hope this helps.
Regards,
Venkat

Similar Messages

  • How to extend the table control of ME22N ?

    Can somebody tell how to add a field to the tablecontrol of ME22N ? I think that it is not possible to do it via classic enhancements (ME22N). I suppose the wright way is via an BADI. But how, which one, adding the field via an ci-include via customizing or how ? How of you has experience with this issue and will help me by replaying.
    Thanx in advance folks.

    Hi,
    User-exits are not the best solutions for the Enjoy transaction.
    You have to look for BADIs instead of exits.
    To search BADi go to customizing (SPRO transaction) - Material Management - Purchasing - Business Add In for purchasing - Enjoy...
    Here click on the documentation icon.
    Use the following transaction to hadle BADi-s: SE19
    Use the following transaction to handle classes: SE24
    You have to create an instance. Always copy the instance from the original and add a "Z" letter befor it.
    You have to copy all relevant objects from its original (FM-s, etc) and write the modifications into it.
    This is very "deep water" will took a long time until you will be finished
    Regards
    Sudheer

  • How do we extend the table EKET ??

    Hi all,
    My requirement the the EKET to add few more columns . Is there any user exit available for this ?
    Are there any OSS notes which will explain the process on how to extend the table EKET  ?
    Please help me with this .
    Regards,
    Varun .

    Hi Varun,
    Please try this ... it worked for me for updating EKET append structure and I used user exits EXIT_SAPMM06E_012.
    DATA : WA_TABLE(100) TYPE C,
                T_ETT                TYPE STANDARD TABLE OF BEKET,
               WA_ETT             TYPE BEKET.
    FIELD-SYMBOLS: <FS_ETT> TYPE ANY TABLE.
    IF SY-TCODE = 'ME21N' OR
        SY-TCODE = 'ME22N'.
       WA_TABLE = '(SAPLMEPO)ETT[]'.
    ELSEIF SY-TCODE = 'ME21' OR
                SY-TCODE = 'ME22'.
       WA_TABLE = '(SAPMM06E)ETT[]'.
    ELSE.
       EXIT.
    ENDIF.
    ASSIGN (WA_TABLE) TO <FS_ETT>.
    T_ETT[] = <FS_ETT>[].
                                                                                    LOOP AT T_ETT INTO WA_ETT.
      IF SY-TCODE(4) = 'ME21'.
        WA_ETT-ZZDATE = SY-DATUM.
      ELSEIF SY-TCODE(4) = 'ME22'.
        WA_ETT-ZZDATE = SY-DATUM.
        WA_ETT-UPDKZ  = 'U'.
      ENDIF.
      MODIFY T_ETT FROM WA_ETT.
    ENDLOOP.
                                                                                    <FS_ETT>[] = T_ETT[].
    UNASSIGN <FS_ETT>.
    Regards,
    Ferry Lianto

  • How to Extend TableSpace USERS

    Hi,
    Any good advice on how to extend the table space? Thanks.
    ORA-01654: unable to extend index <TABLE.Primary Key> by 1024 in tablespace USERS

    You can add a datafile or resize existing datafile(s). Issue:
    SQL> column file_name format a50
    SQL> select file_name,bytes/1024/1024 mb,autoextensible,maxbytes/1024/1024 maxmb
      2    from dba_data_files
      3    where tablespace_name = 'USERS'
      4  /
    FILE_NAME                                                  MB AUT      MAXMB
    C:\APP\SY\ORADATA\ORCL\USERS01.DBF                126.25 YES 32767.9844
    SQL> If autoextensible is YES, issue:
    (substitute file name and maxsize with proper values)
    SQL> alter database datafile 'C:\APP\SY\ORADATA\ORCL\USERS01.DBF' autoextend on maxsize 3g
      2  /
    Database altered.
    SQL> Otherwise issue:
    alter database datafile 'C:\APP\SY\ORADATA\ORCL\USERS01.DBF' resize 3G;SY.

  • How can i extend the table control while transfering the data

    hi
    how can i extend the table control while transfering the data.

    Hi,
    For table control we have to handle the page down (P+, or what ever function codes are assigned to that activity) activity with our coding.
    Just check out this code:
    This is the bdc to update the XK01 transaction code (Vendor Creation).
    Here we will use table controls for bankings. Here Iam sending the coding and text files.
    Coding
    REPORT zprataptable2
    NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA : BEGIN OF itab OCCURS 0,
    i1 TYPE i,
    lifnr LIKE rf02k-lifnr,
    bukrs LIKE rf02k-bukrs,
    ekorg LIKE rf02k-ekorg,
    ktokk LIKE rf02k-ktokk,
    anred LIKE lfa1-anred,
    name1 LIKE lfa1-name1,
    sortl LIKE lfa1-sortl,
    land1 LIKE lfa1-land1,
    akont LIKE lfb1-akont,
    fdgrv LIKE lfb1-fdgrv,
    waers LIKE lfm1-waers,
    END OF itab.
    DATA : BEGIN OF jtab OCCURS 0,
    j1 TYPE i,
    banks LIKE lfbk-banks,
    bankl LIKE lfbk-bankl,
    bankn LIKE lfbk-bankn,
    END OF jtab.
    DATA : cnt(4) TYPE n.
    DATA : fdt(20) TYPE c.
    DATA : c TYPE i.
    INCLUDE bdcrecx1.
    START-OF-SELECTION.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = 'C:\first1.txt'
    filetype = 'DAT'
    TABLES
    data_tab = itab.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = 'C:\second.txt'
    filetype = 'DAT'
    TABLES
    data_tab = jtab.
    LOOP AT itab.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RF02K-KTOKK'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'RF02K-LIFNR'
    itab-lifnr.
    PERFORM bdc_field USING 'RF02K-BUKRS'
    itab-bukrs.
    PERFORM bdc_field USING 'RF02K-EKORG'
    itab-ekorg.
    PERFORM bdc_field USING 'RF02K-KTOKK'
    itab-ktokk.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFA1-LAND1'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFA1-ANRED'
    itab-anred.
    PERFORM bdc_field USING 'LFA1-NAME1'
    itab-name1.
    PERFORM bdc_field USING 'LFA1-SORTL'
    itab-sortl.
    PERFORM bdc_field USING 'LFA1-LAND1'
    itab-land1.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFA1-KUNNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKN(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    cnt = 0.
    LOOP AT jtab WHERE j1 = itab-i1.
    cnt = cnt + 1.
    CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-banks.
    CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-bankl.
    CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-bankn.
    IF cnt = 5.
    cnt = 0.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=P+'.  " Page down activity
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKN(02)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    ENDIF.
    ENDLOOP.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-FDGRV'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFB1-AKONT'
    itab-akont.
    PERFORM bdc_field USING 'LFB1-FDGRV'
    itab-fdgrv.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-ZTERM'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB5-MAHNA'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFM1-WAERS'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFM1-WAERS'
    itab-waers.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RF02K-LIFNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=YES'.
    PERFORM bdc_transaction USING 'XK01'.
    ENDLOOP.
    PERFORM close_group.
    **Flat files for the above code***
    Intial screen data file.
    1 63190 0001 0001 0001 mr bal188 b in 31000 a1 inr
    2 63191 0001 0001 0001 mr bal189 b in 31000 a1 inr
    Table control Data:
    1 in sb 11000
    1 in sb 12000
    1 in sb 13000
    1 in sb 14000
    1 in sb 15000
    1 in sb 16000
    1 in sb 17000
    1 in sb 18000
    1 in sb 19000
    1 in sb 20000
    1 in sb 21000
    1 in sb 22000
    2 in sb 21000
    2 in sb 22000
    Regards,
    Kumar.

  • How to Extend the count of item code in IC_ITEM_MST table

    Hi Friends.
    Recently we used 10 count of IC_ITEM_MST table . But we want to extend the count 15. How to define pls help me.
    Regards
    Babu.J

    Duplicate post -- How to Extend the count of item code in IC_ITEM_MST table

  • How to extend an address of a BP  with more fields ???? EEWB??

    Hi Gurus,
    I need to extend the address of a BP with some customer fields. I have tried to do it using EEWB but when you have to choose a Business Object for the new extension, the reasonable only possibility is to choose BUPA Object. Thus, the DB table BUT000 is extended with a custom include that contains the customer fields, but what I want to do is extending ADRC DB table. There is some way that I do not know of achieve this in which the system creates automatically all the FM for the BDT events????
    If it is not possible, which would be the procedure to do that with my own development???
    Thanks in Advance.
    Regards,
    Rosa

    Rosa, you can only extend table BUP000 and not the actual address table. Sorry for that for more details on how to extend the BP itself refer to my WeBLOG I wrote on this. Have fun and let me know whether you need more help, Tiest.
    Also do not forget to award points to useful responses.
    <a href="/people/tiest.vangool/blog/2005/07/24/pc-ui-and-easy-enhancement-workbench-eew-integration and Easy Enhancement Workbench (EEW) Integration</a>

  • How to get the table of value field? and can we expand the technical limits

    Dear
    I have created value field in COPA with KEA6. And now, I need the table which the value fields are saved. Yet, I have tried a lot to find it and get failure? Can any guy help me? Please tell me how to get the table of a value field.
    And another question is that, can we extend the technical limits for the number of value field for ECC6.0?
    We have a note for R.4.x Please see below:
    OSS note 160892
    You can display the length of a data record using Transaction KEA0 ('Maintain Operating Concern'). After you have navigated to the 'Characteristics Screen' or to the 'Value field Screen' choose menu path 'Extras -> Technical Limits'.
    The maximum displayed here under 'Length in bytes on the DB' is the maximum length permitted by the Dictionary. The reserve required for the release upgrade must be subtracted from this value.
    To increase the allowed number of the value fields, increase the value that is assigned to field ikcge-bas_max_cnt (FORM init_ikcge_ke USING fm_subrc, approx. line 165) in Include FKCGNF20. It specifies the number of the possible value fields. The corresponding part of the source code is attached to the note as a correction.
    David Sun
    Regards!

    how to extend the limit of value numbers? please see the original question.

  • How to add a table(from TableRenderDemo) to a JFrame again

    Hello again:
    Thanks for stephen andrews's adivice, I follow your adivice to add code (it is in
    EventHandeler of DrawCalendar class, and they indicated by ???????????), but it still not work, please check for me why, Thanks.
    My problem
    Please run my coding first, and get some view from my coding.
    At the movement, I got a problem, I have not idea how to add a table(it is from TableRenderDemo) to JFrame when I click on the button(from DrawCalendar) of the numer 20, and I want the table disply under the buttons(from DrawCalendar).
    Please help me to solve this problem, thanks.
    *This program for add some buttons and a table on JFrame
    import java.awt.*;
    import javax.swing.*;public class TestMain extends JFrame{
    private static TableRenderDemo tRD;
    private static TestMain tM;
    protected static Container c;
    private static DrawCalendar dC;
    public static void main(String[] args){
    tM = new TestMain();
    tM.setVisible(true);
         public TestMain(){
         super(" Test");
         setSize(800,600);
    //set up layoutManager
    c=getContentPane();
    c.setLayout ( new GridLayout(3,1));
    tRD=new TableRenderDemo();
    dC=new DrawCalendar();
    addItems();//add Buttons to JFrame
    private void addItems(){
         c.add(dC); //add Buttons to JFrame
         //c.add(tRD); //add Table to JFrame     
    *This program for add some buttons to JPanel
    *and add listeners to each button
    *I want to display myTable under the buttons,
    *when I click on number 20, but why it doesn't
    *work, The coding for these part are indicated by ??????????????
    [import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.GridLayout;
    public class DrawCalendar extends JPanel {
         private static DrawCalendar dC;
         private static TestMain tM;
         private static TableRenderDemo myTable;
         private static GridLayout gL;
         private static final int nlen = 35;
        private static String names[] = new String[nlen];
    private static JButton buttons[] = new JButton[nlen];
         public DrawCalendar(){
              gL=new GridLayout(5,7,0,0);
              setLayout(gL);
              assignValues();
              addJButton();
              registerListener();
    //assign values to each button
         private void assignValues(){
              names = new String[35];
         for(int i = 0; i < names.length; i++)
         names[i] = Integer.toString(i + 1);
    //create buttons and add them to Jpanel
    private void addJButton(){
         buttons=new JButton[names.length];
         for (int i=0; i<names.length; i++){
         buttons=new JButton(names[i]);
         buttons[i].setBorder(null);
         buttons[i].setBackground(Color.white);
         buttons[i].setFont(new Font ("Palatino", 0,8));
    add(buttons[i]);
    //add listeners to each button
    private void registerListener(){
         for(int i=0; i<35; i++)
              buttons[i].addActionListener(new EventHandler());          
    //I want to display myTable under the buttons,
    //when I click on number 20, but why it doesn't
    //work
    private class EventHandler implements ActionListener{
         public void actionPerformed(ActionEvent e){
         for(int i=0; i<35; i++){
         if(i==20){                  //????????????????????
              tM=new TestMain(); //I want to display myTable under the buttons,
              tM.c.removeAll(); //when I click on number 20, but why it doesn't
              tM.c.add(dC); //work
              tM.c.add(myTable); //???????????????????????????????????????
              tM.validate();
         if(e.getSource()==buttons[i]){
         System.out.println("testing " + names[i]);
         break;
    *This program create a table with some data
    [import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableColumn;
    import javax.swing.DefaultCellEditor;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TableRenderDemo extends JScrollPane {
        private boolean DEBUG = true;
        public TableRenderDemo() {
          //  super("TableRenderDemo");
            MyTableModel myModel = new MyTableModel();
            JTable table = new JTable(myModel);
            table.setPreferredScrollableViewportSize(new Dimension(700, 70));//500,70
             //Create the scroll pane and add the table to it.
             setViewportView(table);
            //Set up column sizes.
            initColumnSizes(table, myModel);
            //Fiddle with the Sport column's cell editors/renderers.
            setUpSportColumn(table.getColumnModel().getColumn(2));
    * This method picks good column sizes.
    * If all column heads are wider than the column's cells'
    * contents, then you can just use column.sizeWidthToFit().
    private void initColumnSizes(JTable table, MyTableModel model) {
    TableColumn column = null;
    Component comp = null;
    int headerWidth = 0;
    int cellWidth = 0;
    Object[] longValues = model.longValues;
    for (int i = 0; i < 5; i++) {
    column = table.getColumnModel().getColumn(i);
    try {
    comp = column.getHeaderRenderer().
    getTableCellRendererComponent(
    null, column.getHeaderValue(),
    false, false, 0, 0);
    headerWidth = comp.getPreferredSize().width;
    } catch (NullPointerException e) {
    System.err.println("Null pointer exception!");
    System.err.println(" getHeaderRenderer returns null in 1.3.");
    System.err.println(" The replacement is getDefaultRenderer.");
    comp = table.getDefaultRenderer(model.getColumnClass(i)).
    getTableCellRendererComponent(
    table, longValues[i],
    false, false, 0, i);
    cellWidth = comp.getPreferredSize().width;
    if (DEBUG) {
    System.out.println("Initializing width of column "
    + i + ". "
    + "headerWidth = " + headerWidth
    + "; cellWidth = " + cellWidth);
    //XXX: Before Swing 1.1 Beta 2, use setMinWidth instead.
    column.setPreferredWidth(Math.max(headerWidth, cellWidth));
    public void setUpSportColumn(TableColumn sportColumn) {
    //Set up the editor for the sport cells.
    JComboBox comboBox = new JComboBox();
    comboBox.addItem("Snowboarding");
    comboBox.addItem("Rowing");
    comboBox.addItem("Chasing toddlers");
    comboBox.addItem("Speed reading");
    comboBox.addItem("Teaching high school");
    comboBox.addItem("None");
    sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
    //Set up tool tips for the sport cells.
    DefaultTableCellRenderer renderer =
    new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for combo box");
    sportColumn.setCellRenderer(renderer);
    //Set up tool tip for the sport column header.
    TableCellRenderer headerRenderer = sportColumn.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer) {
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the sport to see a list of choices");
    class MyTableModel extends AbstractTableModel {
    final String[] columnNames = {"First Name",
    "Last Name",
    "Sport",
    "# of Years",
    "Vegetarian"};
    final Object[][] data = {
    {"Mary ", "Campione",
    "Snowboarding", new Integer(5), new Boolean(false)},
    {"Alison", "Huml",
    "Rowing", new Integer(3), new Boolean(true)},
    {"Kathy", "Walrath",
    "Chasing toddlers", new Integer(2), new Boolean(false)},
    {"Sharon", "Zakhour",
    "Speed reading", new Integer(20), new Boolean(true)},
    {"Angela", "Lih",
    "Teaching high school", new Integer(4), new Boolean(false)}
    public final Object[] longValues = {"Angela", "Andrews",
    "Teaching high school",
    new Integer(20), Boolean.TRUE};
    public int getColumnCount() {
    return columnNames.length;
    public int getRowCount() {
    return data.length;
    public String getColumnName(int col) {
    return columnNames[col];
    public Object getValueAt(int row, int col) {
    return data[row][col];
    * JTable uses this method to determine the default renderer/
    * editor for each cell. If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    public Class getColumnClass(int c) {
    return getValueAt(0, c).getClass();
    * Don't need to implement this method unless your table's
    * editable.
    public boolean isCellEditable(int row, int col) {
    //Note that the data/cell address is constant,
    //no matter where the cell appears onscreen.
    if (col < 2) {
    return false;
    } else {
    return true;
    * Don't need to implement this method unless your table's
    * data can change.
    public void setValueAt(Object value, int row, int col) {
    if (DEBUG) {
    System.out.println("Setting value at " + row + "," + col
    + " to " + value
    + " (an instance of "
    + value.getClass() + ")");
    if (data[0][col] instanceof Integer
    && !(value instanceof Integer)) {
    //With JFC/Swing 1.1 and JDK 1.2, we need to create
    //an Integer from the value; otherwise, the column
    //switches to contain Strings. Starting with v 1.3,
    //the table automatically converts value to an Integer,
    //so you only need the code in the 'else' part of this
    //'if' block.
    try {
    data[row][col] = new Integer(value.toString());
    fireTableCellUpdated(row, col);
    } catch (NumberFormatException e) {
    JOptionPane.showMessageDialog(TableRenderDemo.this,
    "The \"" + getColumnName(col)
    + "\" column accepts only integer values.");
    } else {
    data[row][col] = value;
    fireTableCellUpdated(row, col);
    if (DEBUG) {
    System.out.println("New value of data:");
    printDebugData();
    private void printDebugData() {
    int numRows = getRowCount();
    int numCols = getColumnCount();
    for (int i=0; i < numRows; i++) {
    System.out.print(" row " + i + ":");
    for (int j=0; j < numCols; j++) {
    System.out.print(" " + data[i][j]);
    System.out.println();
    System.out.println("--------------------------");

    http://forum.java.sun.com/faq.jsp#format

  • How to add a table(from TableRenderDemo) to a JFrame?

    Hello:
    Please run my coding first, and get some idea what's going on for my coding.
    At the movement, I got a problem, I have not idea how to add a table(it is from TableRenderDemo) to JFrame when I click on the button(from DrawCalendar) of the numer 20, and I want the table disply under the buttons(from DrawCalendar).
    Please help me to solve this problem, thanks.
    /* this program for adding some Button to JPanel, and also adding some listeners to each button
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.GridLayout;
    public class DrawCalendar extends JPanel {
    private static DrawCalendar dC;
    private static GridLayout gL;
    private static Container c;
    private static String names[]={"1","2","3","4","5","6","7","8","9","10","11","12","13","14",
    "15","16","17","18","19","20","21","22","23","24","25","26",
    "27","28","29","30","31","32","33","34","35"};
    private static String num;
    private static JButton buttons[];
    public DrawCalendar(){
    gL=new GridLayout(5,7,0,0);
    setLayout(gL);
    addJButton(); //add buttons to Panel
    registerListener();//add Listener to buttons
    //add Buttons to JButtons and put the label for each button
    private void addJButton(){
    buttons=new JButton[names.length];
    for (int i=0; i<names.length; i++){
    buttons=new JButton(names);
    buttons.setBorder(null);
    buttons.setBackground(Color.white);
    buttons.setFont(new Font ("Palatino", 0,8));
    add(buttons);
    private void registerListener(){
    for(int i=0; i<35; i++)
    buttons.addActionListener(new EventHandler());//add EventHandler to each button
    private class EventHandler implements ActionListener{
    public void actionPerformed(ActionEvent e){
    for(int i=0; i<35; i++){
    if(e.getSource()==buttons){
    System.out.println("testing " + names);
    break;
    /*The program for adding a table to JPanel
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableColumn;
    import javax.swing.DefaultCellEditor;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.JScrollPane;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.SwingUtilities;
    import javax.swing.JOptionPane;
    import java.awt.*;
    import java.awt.event.*;
    public class TableRenderDemo extends JScrollPane {
    private boolean DEBUG = true;
    public TableRenderDemo() {
    // super("TableRenderDemo");
    MyTableModel myModel = new MyTableModel();
    JTable table = new JTable(myModel);
    table.setPreferredScrollableViewportSize(new Dimension(700, 70));//500,70
    //Create the scroll pane and add the table to it.
    //JScrollPane scrollPane = new JScrollPane(table);
    setViewportView(table);
    //Set up column sizes.
    initColumnSizes(table, myModel);
    //Fiddle with the Sport column's cell editors/renderers.
    setUpSportColumn(table.getColumnModel().getColumn(2));
    //Add the scroll pane to this window.
    //getContentPane().add(scrollPane, BorderLayout.CENTER);
    // addWindowListener(new WindowAdapter() {
    // public void windowClosing(WindowEvent e) {
    // System.exit(0);
    * This method picks good column sizes.
    * If all column heads are wider than the column's cells'
    * contents, then you can just use column.sizeWidthToFit().
    private void initColumnSizes(JTable table, MyTableModel model) {
    TableColumn column = null;
    Component comp = null;
    int headerWidth = 0;
    int cellWidth = 0;
    Object[] longValues = model.longValues;
    for (int i = 0; i < 5; i++) {
    column = table.getColumnModel().getColumn(i);
    try {
    comp = column.getHeaderRenderer().
    getTableCellRendererComponent(
    null, column.getHeaderValue(),
    false, false, 0, 0);
    headerWidth = comp.getPreferredSize().width;
    } catch (NullPointerException e) {
    System.err.println("Null pointer exception!");
    System.err.println(" getHeaderRenderer returns null in 1.3.");
    System.err.println(" The replacement is getDefaultRenderer.");
    comp = table.getDefaultRenderer(model.getColumnClass(i)).
    getTableCellRendererComponent(
    table, longValues,
    false, false, 0, i);
    cellWidth = comp.getPreferredSize().width;
    if (DEBUG) {
    System.out.println("Initializing width of column "
    + i + ". "
    + "headerWidth = " + headerWidth
    + "; cellWidth = " + cellWidth);
    //XXX: Before Swing 1.1 Beta 2, use setMinWidth instead.
    column.setPreferredWidth(Math.max(headerWidth, cellWidth));
    public void setUpSportColumn(TableColumn sportColumn) {
    //Set up the editor for the sport cells.
    JComboBox comboBox = new JComboBox();
    comboBox.addItem("Snowboarding");
    comboBox.addItem("Rowing");
    comboBox.addItem("Chasing toddlers");
    comboBox.addItem("Speed reading");
    comboBox.addItem("Teaching high school");
    comboBox.addItem("None");
    sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
    //Set up tool tips for the sport cells.
    DefaultTableCellRenderer renderer =
    new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for combo box");
    sportColumn.setCellRenderer(renderer);
    //Set up tool tip for the sport column header.
    TableCellRenderer headerRenderer = sportColumn.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer) {
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the sport to see a list of choices");
    class MyTableModel extends AbstractTableModel {
    final String[] columnNames = {"First Name",
    "Last Name",
    "Sport",
    "# of Years",
    "Vegetarian"};
    final Object[][] data = {
    {"Mary ", "Campione",
    "Snowboarding", new Integer(5), new Boolean(false)},
    {"Alison", "Huml",
    "Rowing", new Integer(3), new Boolean(true)},
    {"Kathy", "Walrath",
    "Chasing toddlers", new Integer(2), new Boolean(false)},
    {"Sharon", "Zakhour",
    "Speed reading", new Integer(20), new Boolean(true)},
    {"Angela", "Lih",
    "Teaching high school", new Integer(4), new Boolean(false)}
    public final Object[] longValues = {"Angela", "Andrews",
    "Teaching high school",
    new Integer(20), Boolean.TRUE};
    public int getColumnCount() {
    return columnNames.length;
    public int getRowCount() {
    return data.length;
    public String getColumnName(int col) {
    return columnNames[col];
    public Object getValueAt(int row, int col) {
    return data[row][col];
    * JTable uses this method to determine the default renderer/
    * editor for each cell. If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    public Class getColumnClass(int c) {
    return getValueAt(0, c).getClass();
    * Don't need to implement this method unless your table's
    * editable.
    public boolean isCellEditable(int row, int col) {
    //Note that the data/cell address is constant,
    //no matter where the cell appears onscreen.
    if (col < 2) {
    return false;
    } else {
    return true;
    * Don't need to implement this method unless your table's
    * data can change.
    public void setValueAt(Object value, int row, int col) {
    if (DEBUG) {
    System.out.println("Setting value at " + row + "," + col
    + " to " + value
    + " (an instance of "
    + value.getClass() + ")");
    if (data[0][col] instanceof Integer
    && !(value instanceof Integer)) {
    //With JFC/Swing 1.1 and JDK 1.2, we need to create
    //an Integer from the value; otherwise, the column
    //switches to contain Strings. Starting with v 1.3,
    //the table automatically converts value to an Integer,
    //so you only need the code in the 'else' part of this
    //'if' block.
    try {
    data[row][col] = new Integer(value.toString());
    fireTableCellUpdated(row, col);
    } catch (NumberFormatException e) {
    JOptionPane.showMessageDialog(TableRenderDemo.this,
    "The \"" + getColumnName(col)
    + "\" column accepts only integer values.");
    } else {
    data[row][col] = value;
    fireTableCellUpdated(row, col);
    if (DEBUG) {
    System.out.println("New value of data:");
    printDebugData();
    private void printDebugData() {
    int numRows = getRowCount();
    int numCols = getColumnCount();
    for (int i=0; i < numRows; i++) {
    System.out.print(" row " + i + ":");
    for (int j=0; j < numCols; j++) {
    System.out.print(" " + data[j]);
    System.out.println();
    System.out.println("--------------------------");
    *This is a main progarm, it is for adding some buttons to Frame
    import java.awt.*;
    import javax.swing.*;
    public class TestMain extends JFrame{
    private static TableRenderDemo tRD;
    private static TestMain tM;
    private static Container c;
    private static DrawCalendar dC;
    public static void main(String[] args){
    tM = new TestMain();
    tM.setVisible(true);
    public TestMain(){
    super(" Test");
    setSize(800,600);
    //set up layoutManager
    c=getContentPane();
    c.setLayout ( new GridLayout(3,1));
    tRD=new TableRenderDemo();
    dC=new DrawCalendar();
    addItems();//add Buttons to JFrame
    private void addItems(){
    //c.add(dC); //add Buttons to JFrame
    c.add(tRD); //add Table to JFrame

    http://forum.java.sun.com/faq.jsp#format

  • How to extend business partner number length

    My legacy business partner id is 13 digits long. But SAP business partner is only 10 digits long at maximum.
    Please tell me how to extend this constraint?
    Giang

    Hi Giang,
    Unfortunately, this is not possible - you cannot extend the length of BP number.
    But there's a simpler way - there is a field called BPEXT in BUT000, this is the external BP number, and can store 20 digits.
    You can transfer the BP number of legacy system into BPEXT field on the SAP system. This is a standard practice and is used by most people.
    Regards,
    Rishu.

  • How to extend an Bapi_po_change

    hi,
         How to extend bapi_po_change useing  extensionin and  extensionout.

    when i execute the program, the debugger is not stooping at the above mentioned exit.
    the below is the code.
    data: lt_poaccount like bapimepoaccount occurs 0 with header line,
          lt_poaccountx like bapimepoaccountx occurs 0 with header line,
          return type bapiret2 occurs 0 with header line,
          poitem like bapimepoitem occurs 0 with header line,
          poitemx like bapimepoitem occurs 0 with header line,
          extin like bapiparex occurs 0 with header line,
          extou like bapiparex occurs 0 with header line.
      poitem-po_item = '0010'.
      poitemx-po_item = '0010'.
      poitem-vendrbatch = 12322.
      poitemx-vendrbatch = 'X'.
      poitem-ematerial = 'TEST'.
      poitemx-ematerial = 'X'.
      poitem-grant_nbr = 'GRANT_NBR'.
      poitemx-grant_nbr = 'X'.
      poitem-no_more_gr = 'NO_MORE'.
      poitemx-no_more_gr = 'X'.
       append poitem.
       append poitemx.
       extin-structure = 'BAPI_TE_MEPOITEM'.
       extin-valuepart1 = 'EAN_UPC'.
       append extin.
      lt_poaccount-po_item = '0010'.
      lt_poaccountx-po_item = '0010'.
      lt_poaccount-serial_no = '0001'.
      lt_poaccountx-serial_no = '0001'.
      lt_poaccount-gr_rcpt = '176'.
      lt_poaccountx-gr_rcpt = 'X'.
        append lt_poaccount.
        append lt_poaccountx.
    data: po_num type ebeln.
    po_num = 7600000285.
    call function 'BAPI_PO_CHANGE'
      exporting
        purchaseorder = po_num
      tables
        return        = return
        poitem        = poitem
        poitemx       = poitemx
        poaccount     = lt_poaccount
        poaccountx    = lt_poaccountx
        extensionin   = extin
        extensionout  = extou
    if sy-subrc eq 0.
        call function 'BAPI_TRANSACTION_COMMIT'.
      endif.
    write :/ 'a'.

  • How to extend data viewing for LCHR

    Hi all
    I have one field of a table which using LCHR data type. I want to view the whole data in the field. However currently SAP truncated to partial char only for viewing with message "Field Generic structure is too wide to display (field will be truncated)".
    Do anyone knows how to extend it?
    Thanks.
    Ala

    You have a limitation of 255 characters on every alv that you use to show the results.
    So you have to export the data from the database table.
    Let's try to explain:
    You have a database table with 2 fields (e.g.)
    LENT TYPE INT2 (2 Byte Integer (Signed)), this field itis used for save the length of the LCHR field
    ERROR_MESSAGE TYPE SMO_1500 LCHR (character 1500), this field it's used for save the string value with 1500 character.
    You can't read this data with the TCODE SE16 or SE16N or SE11, because exist a limitation of 255 character on ALV tables.
    Create a report like that to export the data to a file:
      SELECT *
         FROM zsrm_wlu_004
         INTO TABLE lt_zsrm_wlu_004
        WHERE wi IN s_wi AND
              ano IN s_ano AND
              wi_aagent IN s_agent .
    CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
           filename                        = p_file_download
          filetype                        = 'ASC'
         TABLES
           data_tab                        = lt_zsrm_wlu_004

  • How to Extend BUPA_MAIN BDOC

    HEllo Friends,
    I got a requirement to extend BUPA BDOC. I need to send company details to R/3 system.
    Can anybody send me the steps how to extend BDOC and the remaining mappings and functionmodule.
    Note. I cannot extend R3 system tables.
    I need to map existing fields of R3 to EEWB fields of CRM.
    I am new to this Middleware.
    Regards
    Satish

    Hi Satish,
    This is very simple.
    Follow the steps below:
    1. Create custom fields using EEWB and check R/3 check box during the EEWB run.
    2. The BDoc will be updated automatically by EEWB
    3. Write a Mpping exit on CRM side: SMOUTIL2. In this exit you insert a new line in BAPIMTCS for you fields
    4. Write a Mapping exit on ECC side: CRM0_100. Here you read the line from BAPIMTCS  and store into respective ECC fields.
    You can also find stuff on how to implement the above Exits on sap help or service market place.
    Please let me know if it helps.
    Regards,
    Sharif.

  • How come extend is the physical structure ? Can some one explain.

    How come extend is the physical structure ? Can some one explain.
    thanks
    siva

    "Tablespaces physically group schema objects for administration convenience. They bridge physical structures, such as datafiles or extents, and logical structures, such as tables and indexes. Tablespaces can store zero or more segments. Segments are schema objects that require storage outside the data dictionary. Tables and indexes are examples of segments. Constraints and sequences are examples of schema objects that do not store data outside the data dictionary and are therefore not segments." - Study Guide.
    Read above, it reads "physical structures, such as datafiles or extents", this is where I got confused ?
    thanks
    siva

Maybe you are looking for

  • How do I fix my Pen Tool/Delete Anchor Point Tool in Illustrator?

    Problem One - I'm trying to change the form of my shape, and all of a sudden my Delete Anchor Point Tool isn't working. I'm clicking (and zoomed in A LOT) and it's not clicking on or deleting any of my anchor points. Problem Two - I'm not sure if it'

  • Avoid Commit after every Insert that requires a SELECT

    Hi everybody, Here is the problem: I have a table of generator alarms which is populated daily. On daily basis there are approximately 50,000 rows to be inserted in it. Currently i have one month's data in it ... Approximately 900,000 rows. here goes

  • HT1349 why wont my itunes open?

    why wont my itunes open on my PC

  • Simple Custom Identity Service running on windows OK, but not on linux, y?

    In <Oracle® BPEL Process Manager Developer's Guide 10g Release 2 (10.1.2) B14448-03>, Part III, 16<Oracle BPEL Process Manager Workflow Services, Identity Service, Creating a Custom Identity Service Plug-in> My pc, OS:windows 2003+BPEL PM Server10.1.

  • Need to import expenses as unapproved

    We have a requirement to import some expenditure transactions to Oracle Projects. However, users would like to import expenditures as unapproved. They would review the expenditures before it can be approved and distributed. By default Oracle Projects