Using custom tables in jdeveloper

Hi,
I've created a custom table using toad. I created the table in applsys and created a synonym to apps. I've also grant all the priveledges to apps as well. However, when I create a query OA to query a standard table eg. PER_ALL_PEOPLE_F, I have no problems however, using the same OA to query my custom table, I get the JBO-25017 Cannot create row for entity error.
Is someone able to help??

Why it was required to chnage your EO to abstract class?. May be your custom table doesn;t have the standard WHO columns (created_by, Creation_date etc..), and the EO doesn't compile with out a attribute setter/getter methods for these columns.
this may be the reason why you changed the class to abstract. But, EO class should not be abstract. Work around is to have empty functions for these standard columns.
HTH
Srini

Similar Messages

  • JTable column headers not displaying using custom table model

    Hi,
    I'm attempting to use a custom table model (by extending AbstractTableModel) to display the contents of a data set in a JTable. The table is displaying the data itself correctly but there are no column headers appearing. I have overridden getColumnName of the table model to return the correct header and have tried playing with the ColumnModel for the table but have not been able to get the headers to display (at all).
    Any ideas?
    Cheers

    Class PublicationTableModel:
    public class PublicationTableModel extends AbstractTableModel
        PublicationManager pubManager;
        /** Creates a new instance of PublicationTableModel */
        public PublicationTableModel(PublicationManager pm)
            super();
            pubManager = pm;
        public int getColumnCount()
            return GUISettings.getDisplayedFieldCount();
        public int getRowCount()
            return pubManager.getPublicationCount();
        public Class getColumnClass(int columnIndex)
            Object o = getValueAt(0, columnIndex);
            if (o != null) return o.getClass();
            return (new String()).getClass();
        public String getColumnName(int columnIndex)
            System.out.println("asked for column name "+columnIndex+" --> "+GUISettings.getColumnName(columnIndex));
            return GUISettings.getColumnName(columnIndex);
        public Publication getPublicationAt(int rowIndex)
            return pubManager.getPublicationAt(rowIndex);
        public Object getValueAt(int rowIndex, int columnIndex)
            Publication pub = (Publication)pubManager.getPublicationAt(rowIndex);
            String columnName = getColumnName(columnIndex);
            if (columnName.equals("Address"))
                if (pub instanceof Address) return ((Address)pub).getAddress();
                else return null;
            else if (columnName.equals("Annotation"))
                if (pub instanceof Annotation) return ((Annotation)pub).getAnnotation();
                else return null;
            etc
           else if (columnName.equals("Title"))
                return pub.getTitle();
            else if (columnName.equals("Key"))
                return pub.getKey();
            return null;
        public boolean isCellEditable(int rowIndex, int colIndex)
            return false;
        public void setValueAt(Object vValue, int rowIndex, int colIndex)
        }Class GUISettings:
    public class GUISettings {
        private static Vector fields = new Vector();
        private static Vector classes = new Vector();
        /** Creates a new instance of GUISettings */
        public GUISettings() {
        public static void setFields(Vector f)
            fields=f;
        public static int getDisplayedFieldCount()
            return fields.size();
        public static String getColumnName(int columnIndex)
            return (String)fields.elementAt(columnIndex);
        public static Vector getFields()
            return fields;
    }GUISettings.setFields has been called before table is displayed.
    Cheers,
    garsher

  • Using custom table model with the Net Beans JTable

    I am using the net beans editor to create an application. For the JTable that net beans provides, I would like to use my own Table Model instead of the default one that is provided. How do I specify to the form editor that I want to use my own TableModel instead of the DeafaultTableModel?

    I am using the net beans editor to create an application. For the JTable that net beans provides, I would like to use my own Table Model instead of the default one that is provided. How do I specify to the form editor that I want to use my own TableModel instead of the DeafaultTableModel?

  • HTTP :  404 Not found - Not able to download file using custom table

    Hi ,
    I have created the custom procedure to download the file as follows :-
    create or replace PROCEDURE "DOWNLOAD_MY_FILE" (p_file in number) as
         v_mime varchar2(255);
         v_length number;
         v_file_name varchar2(2000);
         Lob_loc BLOB;
    BEGIN
         select mime_type, blob_content, file_name,dbms_lob.getlength(blob_content)
              into v_mime,lob_loc,v_file_name,v_length
              from consultant_feedback_header
              where file_id = p_file;
    owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    htp.p('Content-length: ' || v_length);
    -- htp.p('Content-Disposition: attachment; filename="' || v_file_name || '"');
              owa_util.http_header_close;
              wpg_docload.download_file( Lob_loc );
    end download_my_file;
    I have followed the following steps :-
    1) Log in into SQL COMMAND as SYS
    2) alter session current_schema=FLOWS_XXXXXX;
    3) compile the procedure with my pl/sql procedure :
    CREATE OR REPLACE FUNCTION
    wwv_flow_epg_include_mod_local(
    PROCEDURE_NAME IN VARCHAR2)
    RETURN BOOLEAN
    IS
    BEGIN
    IF UPPER(procedure_name) IN (
    ' DOWNLOAD_MY_FILE') THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    END wwv_flow_epg_include_mod_local;
    I don´t know what am I do wrong?
    Regards
    Naveen

    Check whether you are using a path on the Application Server.
    OPEN DATASET cannot process files on presentation server. I guess, the path you are using is present on your PC or some other server that is not the SAP application server.

  • How to create change pointers for IT6 when custom table Z777A changes?

    Situation: We are using custom table Z777A (copied T777A and added fields) to store building locations. Employee's IT6 subtype 92 retrieves valid work address building locations from table Z777A.
    Problem: Whenever there are updates to Z777A, we need to find all IT6 subtype 92 records that use the changed building location from Z777A and create IDOC's The change pointer entry will need to be for the IT6 subtype 92 row that is affected.
    Question: Can anyone give me specific details as to how this can be accomplished? Thanks.

    Hi,
    MASTER DATA CHANGES DISTRIBUTION BY CHANGE POINTER TECHNIQUE:
    Step 1: Creating change document object in SCDO transaction.
    Step 2:Assigning tables to the change document object.
    Step 3:Specifying change document items in transaction BD52.
    Step 4: Activating change pointers for the message type HRMD_ABA in transaction BD50.
    Step 5:Activating change pointers globally.
    Step 6:Executing program RBDMIDOC  in SE38, Specifying message type HRMD_ABA.
    with regards,
    M.Sreeram.

  • Query list on particular customer table

    Dear gurus
    I want to know queries(or inforset) which are used by particular customer table.
    Do you have any idea?
    I thought that I can know via SE11's "where-used list" function,
    but it seems that query is not included in this function.
    BR
    Y.Kaneko

    Dear Alex
    >Hi, you mean InfoSet which use customer table?
    >If so go to SQ02 and you'll see in DataSourse column
    I know that I can see the datasource on SQ02,
    but on SQ02, I can see only one table.
    If two table are joined in one infoset, I cannt see.
    So, if there is any way that I can see multiple table name on SQ02,
    that is ok for me.
    BR
    Y.Kaneko

  • How to use customer extension table for schedule line for shopping cart ?

    Dear Experts,
    One of our client wants to have schedule lines in shopping cart item. I am thinking of using customer extension table at item level for shopping cart. Could you please help me on  how I should proceed with the appending the structures so that the end user can fill the shopping cart schedule line details?
    Which fields should I consider in such cases?
    Thanks and regards,
    Ranjan

    Hi.
    I guess you use SRM 7.0. Please go to IMG.
    SRM -> SRM Server -> Cross-Application Basic Settings -> Extensions and Field Control (Personalization) -> Create Table Extensions and Supply with Data
    Regards,
    Masa

  • Declare Types using a custom table

    Hi,
    I am creating a new structure in my program in ABAP Editor. The fields of this table will be all the fields in a custom table plus an additional field which is not a part of this table. The table has some 150 fields so I need to include it in my structure. I am using it in this way but its giving error:
    TYPES: BEGIN OF t_struct,
                 INCLUDE TYPE zcustom_table,
                 zzfield      TYPE c,
                 END OF t_struct.
    This structure is getting created but giving an error when I am creating a table of this type as:
    DATA : i_tab  TYPE STANDARD TABLE OF t_struct WITH HEADER LINE.
    Please suggest me how can get rid if this error.
    Thanks,
    Abhishek

    Hi,
    the syntax you declared is wrong,
    check the below code , it will solve your problem
    TYPES: BEGIN OF t_struct.
    INCLUDE TYPE zcustom_table.
    types : zzfield TYPE c.
    types : END OF t_struct.
    DATA : i_tab TYPE STANDARD TABLE OF t_struct WITH HEADER LINE.
    regards
    prasanth

  • F4 help for custom table field - to be used when populating data thru SM30

    Hi,
    I have a custom table with 5 fields - say A, B, C, D and E. While populating data to the table through SM30, I need to create a F4 help for the field C. A  custom function module needs to be used.
    I have created a module for the same in the event PROCESS ON VALUE-REQUEST of the function group of the table.
    But the F4 for field C depends on the values put in fields A and B.
    I am not able to get the values of fields A and B from within the module PROCESS ON VALUE-REQUEST.
    Please help me to create the F4 help.

    hii,
    This is the piece of code i have used in one of my SM30 to get f4. mopdify according to ur need and use.
    revert back for further help.
    w_dynpread-fieldname = 'ZSITEDCDATA-SITE'.
      APPEND w_dynpread TO i_dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = 'SAPLZSITEDCDATA'
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = i_dynpread
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE i_dynpread INTO w_dynpread INDEX 1.
      IF sy-subrc IS INITIAL.
        SELECT land1 FROM t001w
          INTO TABLE i_site
          WHERE werks EQ w_dynpread-fieldvalue.
        IF i_site[] IS NOT INITIAL.
          DATA: lv_line TYPE i.
          CLEAR lv_line.
          DESCRIBE TABLE i_site LINES lv_line.
          IF lv_line GT 1.
            CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
              EXPORTING
                retfield        = 'ZSITEDCDATA-SITE_COUNTRY'
                dynpprog        = 'SAPLZSITEDCDATA'
                dynpnr          = sy-dynnr
                window_title    = 'Site Country'
                value_org       = 'S'
              TABLES
                value_tab       = i_site[]
                return_tab      = i_return
              EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ELSE.
              READ TABLE i_return INTO w_return INDEX 1.
              IF sy-subrc IS INITIAL.
                zsitedcdata-site_country = w_return-fieldval.
              ENDIF.
            ENDIF.
    Thanks ,
    Gaurav

  • File to SAP R/3 custom table using PI

    Hi ,
    Any once can help me with File to Custom table updation possibilities using PI.
    Regards,
    Kiran

    Hi Kiran,
    You can do like I mentioned in the above blog.
    Also would suggest not to write to the database directly from PI. Ask an abaper or yourself write a code like an ZBAPI through which you can send data to the table. Then in that case you need to send data to ZBAPI like file - xi - rfc scenario.
    One more possibility is you can create a proxy and then send data to proxy and then let the proxy upload the data in the ztable.
    If you have any specific questions you can ask here.
    Regards,
    ---Satish

  • How to update flag in multiple tables using custom sql DB adapter

    hi all,
    I have a scenario: I want to update flags in multiple tables in DB2. I have used toplink update only to update all tabless after creating relationships between them. But that approach is not working as it couldnot detect emmisions with DB2 and update the complete record with blank values in other columns.
    So, i want to use custom sql now. Can anybody help in resolving the issue or in writing the custom sql.
    Regards
    Richa

    Dear SeánMacGC thanks for reply,
    But "a.changed" is not a field in GNMT_CUSTOMER_MASTER_CHG. what i am doing in this procedure is i am collecting bulck data and validating field by field from GNMT_CUSTOMER_MASTER_CHG with GNMT_CUSTOMER_MASTER table as their structure is same.. if v_name is not same as v_name_chg then i am setting changed flag to "Y" changed is "changed dbms_sql.varchar2_table" and updating GNMT_CUSTOMER_MASTER in bluck where changed flag ='Y'...
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    *changed dbms_sql.varchar2_table*
    i cannot use simple SQL as i need to validate field for each records with GNMT_CUSTOMER_MASTER_CHG and insert into log file as well.....
    to run this procedure:
    execute DO_DC_NAME_UPDATE_OTHER_TAB.DO_NAME_UPDATE_OTHER_TAB;
    Thanks...

  • Custom table model, table sorter, and cell renderer to use hidden columns

    Hello,
    I'm having a hard time figuring out the best way to go about this. I currently have a JTable with an custom table model to make the cells immutable. Furthermore, I have a "hidden" column in the table model so that I can access the items selected from a database by their recid, and then another hidden column that keeps track of the appropriate color for a custom cell renderer.
    Subject -- Sender -- Date hidden rec id color
    Hello Pete Jan 15, 2003 2900 blue
    Basically, when a row is selected, it grabs the record id from the hidden column. This essentially allows me to have a data[][] object independent of the one that is used to display the JTable. Instinctively, this does not seem right, but I don't know how else to do it. I know that the DefaultTableModel uses a Vector even when it's constructed with an array and I've read elsewhere that it's not a good idea to do what I'm trying to do.
    The other complication is that I have a table sorter as well. So, when it sorts the objects in the table, I have it recreate the data array and then set the data array of the ImmutableTableModel when it has rearranged all of the items in the array.
    On top of this, I have a custom cell renderer as well. This checks yet another hidden field and displays the row accordingly. So, not only does the table sort need to inform the table model of a change in the data structure, but also the cell renderer.
    Is there a better way to keep the data in sync between all of these?

    To the OP, having hidden columns is just fine, I do that all the time.. Nothing says you have to display ALL the info you have..
    Now, the column appears to be sorting properly
    whenever a new row is added. However, when I attempt
    to remove the selected row, it now removes a seemingly
    random row and I am left with an unselectable blank
    line in my JTable.I have a class that uses an int[] to index the data.. The table model displays rows in order of the index, not the actual order of the data (in my case a Vector of Object[]'s).. Saves a lotta work when sorting..
    If you're using a similar indexing scheme: If you're deleting a row, you have to delete the data in the vector at the INDEX table.getSelectedRow(), not the actual data contained at
    vector.elementAt(table.getSelectedRow()). This would account for a seemingly 'random' row getting deleted, instead of the row you intend.
    Because the row is unselectable, it sounds like you have a null in your model where you should have a row of data.. When you do
    vector.removeElementAt(int), the Vector class packs itself. An array does not. If you have an array, when you delete the row you must make sure you dont have that gap.. Make a new array of
    (old array length-1), populate it, and give it back to your model.. Using Vectors makes this automatic.
    Also, you must make sure your model knows the data changed:
    model.fireTableDataChanged(); otherwise it has no idea anything happened..
    IDK if that's how you're doing it, but it sounds remarkably similar to what I went thru when I put all this together..

  • Internal table value checking in custom table using SQL...

    I have a table which has following fields:
    X1 TABLE (ZCONfig custom table)     
    LIFNR  land1                   
    123      br                    
    234      br                     
    456      br                     
    567      Gr
    and
    X2 TABLE: (Internal table)
    LIFNR:
    234
    567
    123
    Now I want to see if all the field values of LIFNR in internal table X2 (X2-LIFNR) are present in X1 or not.
    Raise error if it is not.
    How do I do this using SQL ? I guess I have to use read statement.
    Please help. Points will be awarded.
    Thanks.
    Regards

    Hi Tushar,
    1 Ya u are right , we need to use READ statement.
    2. Populate X1 (all records)
       in an internal table.
    3. Then Loop at X2
       and compare with X1.
      ( u can also keep an extra field in X2
        of type c, so that if a record is found,
       mark it as X )
    4. try this code (just copy paste)
    REPORT abc.
    DATA : BEGIN OF itab OCCURS 0,
           bukrs LIKE t001-bukrs,
           present TYPE c,
           END OF itab.
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    itab-bukrs = '1000'.
    APPEND itab.
    itab-bukrs = 'X000'.
    APPEND itab.
    SELECT * FROM t001 INTO TABLE t001.
    LOOP AT itab.
      READ TABLE t001 with key bukrs = itab-bukrs.
      IF sy-subrc = 0.
        itab-present = 'X'.
        MODIFY itab.
      ENDIF.
    ENDLOOP.
    BREAK-POINT.
    regards,
    amit m.
    Message was edited by: Amit Mittal

  • Need a table which all custom tables used in the program

    HI to all experts.
    I need a table  which contains  all the custom table used in the program . Or any other method which can accomplish this.

    hi max,
    thanks for u r reply . if we use the statement tables in the report and write some tables
    for example: tables: zf020
                                    zf023
    is there any table which stores this .

  • Custom table can be displayed and not maintainable using SE16n.

    Hi Gurus,
    I have created a custom table with DATA BROWSER/TABLE VIEW MAINT. equal to 'N' (Display/Maintainance not allowed) in SAP ECC 6. The the requirment is, this custom table can be displayed using the transaction SE16n.
    This requirement is existing in ECC 5. with same setting DATA BROWSER/TABLE VIEW MAINT. equal to 'N' (Display/Maintainance not allowed) and this table can be viewed using transaction SE16n.
    would there be possible that this requirement be implemented in SAP ECC6? would this be due to the version?
    Please help.
    Thank you..
    Regards,
    SAI

    Hi Kiran,
    Thanks for your answer but unfortunately this is not what I'm looking for. Iam also familiar with &SAP_EDIT.
    Well, my problem is, the custom table setting Data browser/Table view Maint. is set to "N Display / Maintainance not Allowed" ( under Delivery and Maintainance Tab). Also there is no table maintainance generator setup.
    So basically with this setting, in transaction SE11 'Contents' is disabled. And with transaction SE16n, when you execute and tried to view the table, error "You cannot display zcustom_table with standard tool". (checkboxs are hidden)
    What the requirement is looking, the custom table can be viewed (this is with the same setting above but can be viewed using SE16n and the checkbox maintain entries is automatically tick but when executed "auth failed" so, basically to view the entries, untick the checkbox then entries can now be viewed.)

Maybe you are looking for