unmapped is Always shown in Primary Table Field
Hello Everyone....
I'm working on a project using j2ee 1.4 platform edition (The Latest Release),
my project uses CMP,I capture the database schema using cpture-schema tool but when using the .dbschema I always get an <unmapped> instead of a table name in the Primary Table field in the sun-specific settings dialog.I went throug the operation many times but it doesn't work please help.
hi
i also have the same problem... i have already set the primary key field for the table but it still doesn't show up. strange, i had this problem before. i started with one table, and everything was ok. then i added a second one and couldn't see it in the mappings. i managed to fix it but the only problem is that it was some time ago and i can't remember what i did... so now when i added the third table to my database i have the same problem.
suggestions ?
Similar Messages
-
Default Primary Key Field of any database table
hi,
I am working on a database in which the data in the tables is generated from some other modules. I have to add, view and update functionalities to this table in the database. Unfortunately there is no primary key field for the table i am working on and as some existing modules are using this table i am not allowed to change the design of the table at this stage.
Without primary i think its not possible to do updates. Because if all fields can have their values changed, then there will be a breakdown if the field value changes in the mid time when i had already retrieved the data to show on the screen, but not yet updated the value in the database. I hope you understood my problem.
Please suggest solutions. I am not sure, but i think i read somewhere that every table created has a default primary associated whose value is always incresing with a new addtion of recored and its value never decreases. But i am unable to recollect the field name...i think it is some thing like[b] OID .... But i checked there is no such field name by OID. So please help me with some alternative solution...or by telling the default primary key field name.
ThanxAll the databases I know (namely Informix, PostgreSQL, SQL Server, even Access) have a row id column generated automatically.
PostgreSQL example
There is a way to read the value of this column; for example with PostgreSQL let�s say you have the following:
CREATE TABLE no_id_column (
column_one varchar(80),
column_two varchar(80)
INSERT INTO no_id_column(column_one, column_two) VALUES (�red�, �pink�);
INSERT INTO no_id_column(column_one, column_two) VALUES (�yellow�, �orange�);Certainly, if we executed:
SELECT * FROM no_id_column;Would obtain:
column_one column_two
red pink
yellow orangeBut if we modify the query
SELECT oid, * FROM no_id_column;We magically obtain a row identificator
oid column_one column_two
21569 red pink
21570 yellow orangeThe data in the oid column is generated automatically by the database manager. Every time we insert a row we�ll have a different one. Just take into account that if the database contains a large amount of data, the oid could cycle. -
How to add a new data element for existing table filed(Primary key field)
Hi Experts,
How to add a new data element for existing table field(Primary key field)
For this filed ther is no foreign key relation ships and even check table.
while activating table it is giving message like below.
can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)
Primary key change not permitted for value table /TC/VENDOR
Check on table /TC/VENDOR resulted in errors
Thanks
RaviHi,
Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
Maybe there are other ways, but this works.
Success,
Rob -
Problems deleting a primary key field in a table.
Hello Guys,
I deleted a primary key field in a custom table by clicking 'delete row' icon and then tried activating it through se14 - database utility. It is throwing an error saying 'Primary key change not permited for the value table zxxxx'. What is the problem???
How can I delete a primary key in a table??
Please help.
Thanks,
NarenI am pasting the detail explaination over that error.
Primary key change not permitted for value table ZTV_RANGE_NUMBER
Message no. AD 300
Diagnosis
This table is defined as a check table. For reasons of consistency, changes to the primary key of the table are not allowed.
Procedure
If it is essential that you change the primary key, you must delete the relevant foreign keys. Refer to the where-used list to find all tables containing a field that is checked against this table. Delete the foreign keys for these fields.
If necessary, maintain the deleted foreign keys again. -
Adding 2 new fields as Primary Key field in a Z Table which is existing PRD
Hi Friends,
I have to add two new fields as primary key fields in a Z TABLE, which is existing in Quality and Production Systems with Data.
If I incorporate these two new fields (Primary Key fields) in development and if the TR is moved to Quality and Production sytems, is there any possibility of loss in data will happen at Quality and Prd systems?
At present, Table is having 20 fields with 2 primary key fields and i have to add 2 more primary key fields.
I have checked in SCN and not find relevant threads.
Please help me out.
Regards,
Suresh.NO . It wont be a problem .
For ex :
If you have VBELN , POSNR are key fields now , you have an unique reord with that combination .
If you add one other field in it fo ex VKBUR then records will be like this
VBELN POSNR VKBUR MATERIAL QTY
10020 10 abcxyz 1
10020 10 1234 abcxyz 1
So your previous records before adding new primary keys , will have new fields balnk , and the new records will have data filled up in all primary key fields .
However , if you try to update the existing records that will be in existing PRIMARYKEY combination only .
for example if you try update record 1 above with VKBUR value 85858 , it creates a new record , it wont be updated in existing record.
Hope this helps , Pls let me know if u have any more doubts. -
Updation of Primary Key field in HR Tables (PA2001 and PA2002) - Urgent
Can anyone please tell me how to update a primary key field in HR Tables (PA2001 and PA2002).
I need to update sprps field in both the tables. I used HR_Infotype_Operation function module, but still it is not updating the field.
Pls find the following code snippet for the table PA2001 and let me know if any discrepancies :
TABLES: pa2001.
DATA: it_pa2001 TYPE TABLE OF pa2001,
wa_pa2001 LIKE LINE OF it_pa2001,
DATA: date TYPE d.
date = sy-datum - 100.
SELECT pernr sprps begda endda FROM PA2001 INTO CORRESPONDING FIELDS OF TABLE it_pa2001
WHERE begda BETWEEN date and sy-datum.
WRITE:/.
WRITE:/ 'PA 2001 Records'.
if sy-subrc <> 0.
WRITE:/ 'No Data Exists'.
else.
LOOP AT it_pa2001 INTO wa_pa2001.
WRITE:/ wa_pa2001-pernr, wa_pa2001-sprps, wa_pa2001-begda, wa_pa2001-endda.
ENDLOOP.
endif.
LOOP AT it_pa2001 INTO wa_pa2001.
wa_pa2001-sprps = 'X'.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '2001'
number = wa_pa2001-pernr
SUBTYPE =
OBJECTID =
LOCKINDICATOR =
VALIDITYEND =
VALIDITYBEGIN =
RECORDNUMBER =
record = wa_pa2001
operation = 'MOD'
TCLAS = 'A'
DIALOG_MODE = '0'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
RETURN =
KEY =
ENDLOOP.
if sy-subrc = 0.
write:/ 'SY-subrc is zero'.
write:/ ' Rows modified = ', sy-dbcnt.
else.
write:/ 'No Record(s) updated'.
endif.
commit work.
WRITE: / 'Updated Records in the Internal Table IT_PA2001'.
SELECT pernr sprps begda endda FROM PA2001 INTO CORRESPONDING FIELDS OF TABLE it_pa2001
WHERE begda BETWEEN date AND sy-datum..
LOOP AT it_pa2001 INTO wa_pa2001.
WRITE:/ wa_pa2001-pernr, wa_pa2001-sprps, wa_pa2001-begda, wa_pa2001-endda.
ENDLOOP.Thanks Kiran.
But I need to change this field as we need to lock the records, as soon as the employee fills his/her time sheets which will be sent for HR Payroll, later on.
When I am updating directly the field the database table PA2001, its not updating but for table PA2002, only few records are being updated.
Is there any other alternative for this problem?
Pls reply.
Thanks,
Harish -
Concatenate Primary Key Fields of an internal table into a String.
Hi,
I have a dynamic internal table created.
In the dynamic internal table,
How to concatenate all the primary keys of that row concatenated into a string and non primary keys into a different string.
Can some one help me on this.
E.g:
Itab1 has 3 Primary fields and 3 Non primary key fields and it has 2 records.
Table col1 col2 col3 col4 col5 col6
Row1 AA AB AC 1 2 3
Row2 ZA ZB ZC 1 2 3
The following is needed.
Itab2 will have the concatenate strings
Key Nkey
Row1 AAABAC 010203
Row2 ZAZBZC 010203
Thanks,
ChaithanyaC,
Try something like this - Use an ASSIGN in a LOOP:
data: lv_PK type string.
data: lv_non_PK type string.
field-symbols: lv_str type string.
assign local copy of initial line of gt_table to <ls_table>.
loop at gt_table. " this is your table.
do n times. " n = 6 in your case
if n < 4.
assign component sy-index of structure <ls_table> to <lv_str>.
concatenate <lv_str> to lv_PK.
else.
assign component sy-index of structure <ls_table> to <lv_str>.
concatenate <lv_str> to lv_Non_PK.
endif.
enddo.
append <ls_table> to <gt_table>.
endloop. -
How many primary key fields allowed for one table?
hi,
when i creating a table , how many primary key fields are allowed for one table.
please any one give ans
thanksJust checked it, Its 255, not 155. You can have as many key fields as you want, but you can not go over the 255 byte length for the total of all key fields. You will get a warning for over 120, as it says that there is limited functionality with a key over 120 in length.
Again, this is a total length of all key fields.
Regards,
Rich Heilman -
Unable to access the data and table fields from handheld
Hi,
I've created a Testing.sdf file on the local pc using SQL Server Management Studio, creating table, fields and insert some data. in local pc i can access the the data as normal. the problem is after i moved the file to handheld device i
cannot access the data within the table, it shown error 'Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)' . I tried to google it, but still got no solution.
Thanks,'Name Space
Imports System.Data.SqlServerCe
'String Connection
'Data Source = D:\SKUDWN3 .sdf'
Public Sub CreateDB(ByVal StrConn As String)
'Declaration
Dim cn As SqlCeConnection = Nothing
Dim cm As SqlCeCommand = Nothing
Dim SQLEngine As SqlCeEngine = Nothing
Dim rs As SqlCeResultSet = Nothing
Dim rec As SqlServerCe.SqlCeUpdatableRecord = Nothing
'Tables -
Const TB_SKUDWN3 As String = "SKUDWN3"
'Fields TB_SKUDWN3
Const FL_SKUDWN3_UPC As String = "UPC"
Const FL_SKUDWN3_SKU As String = "SKU"
Const FL_SKUDWN3_LD As String = "LD"
Const FL_SKUDWN3_SD As String = "SD"
Const FL_SKUDWN3_AN As String = "AN"
Const FL_SKUDWN3_Price As String = "Price"
Const FL_SKUDWN3_GST_FLAG As String = "GSTFLAG"
'Create Database
SQLEngine = New SqlCeEngine(StrConn)
SQLEngine.CreateDatabase()
SQLEngine.Dispose()
'Open Connection
If IsNothing(cn) Then cn = New SqlCeConnection(StrConn)
If cn.State = Data.ConnectionState.Closed Then cn.Open()
cm = cn.CreateCommand
'Create Table, Fields
cm.CommandText = "CREATE TABLE " & TB_SKUDWN3 & " (" & FL_SKUDWN3_UPC & " NVARCHAR (13)," & _
" " & FL_SKUDWN3_SKU & " NVARCHAR (9), " & FL_SKUDWN3_LD & " NVARCHAR(30)," & _
" " & FL_SKUDWN3_SD & " NVARCHAR (18), " & FL_SKUDWN3_AN & " NVARCHAR(15), " & _
" " & FL_SKUDWN3_Price & " NVARCHAR (10), " & FL_SKUDWN3_GST_FLAG & " BIT)"
cm.ExecuteNonQuery()
'Close Connection
cm = Nothing
If Not IsNothing(cn) Then
If cn.State = ConnectionState.Open Then cn.Close()
cn.Close()
cn.Dispose()
End If
End Sub
'The DB was successfully created, but after moving to Handheld the fields of table can't be accessed -
How to populate custom table field value into standard DFF
Hi Gurus
I am newbie to the OAF
I have a requirement to populate the custom table field value into standard DFF. we enabled the DFF in ReqDistDFFOnAcct(po_req_distributions_all). On the requisition tab as soon as i click on the checkout button, the custom field value has to be shown in the requisition distributions DFF field along with the standard Columns like charge account, percent, qty and when we click on the next button, it has to hit the base table ie., po_req_distributions_all.
the standard columns data is showing the screen. how to acheive this requirement programatically
There is a EO for the req distributions table. please help me how to achevie this requirement.
Any help woud be greatly appreciated.
Thank You!
KrishnaThanks Aj. Finally i made some progress....but i am getting an error in the inst_top OPMN folder 10/10/08 15:37:14 Error: <connector name="OracleASjms" path="OracleASjms.rar" /> will not be bootstrapped since corresponding module declaration was not found in application.xml. I cleared the cache, bounced the webserver. Could not able to understand what is this error
Following is the code that i have written. I am not able to find out what is the error. please help me how to fix this error. there is no changes in the page and the value is not auto populating. the page is having the normal behaviour as the standard one.
Thanks in Advance for your help...
public class xxCheckoutDistsCO extends CheckoutDistsCO
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
String UnitId="";
//First get the Application Module
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject vo = (OAViewObject)am.findViewObject("PoRequisitionLinesVO");
String Reqlineid="";
String Linenum="";
String DeliverLoc="";
if(vo.first() !=null)
Reqlineid= vo.first().getAttribute("RequisitionLineId").toString();
Linenum = vo.first().getAttribute("LineNum").toString();
DeliverLoc = vo.first().getAttribute("DeliverToLocationId").toString();
// if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
// pageContext.writeDiagnostics("TEST >", Reqlineid,1);
// pageContext.writeDiagnostics("TEST >", Linenum,2);
// pageContext.writeDiagnostics("TEST >", DeliverLoc,3);
UnitId=null;
String Querry="select amli_icx_oaf_utils.get_blding_unit_id (?,?,?) from dual";
try
PreparedStatement ps=am.getOADBTransaction().getJdbcConnection().prepareStatement(Querry);
ps.setInt(1,Integer.parseInt(Reqlineid));
ps.setInt(2,Integer.parseInt(Linenum));
ps.setInt(3,Integer.parseInt(DeliverLoc));
ResultSet rs=ps.executeQuery();
// ps.execute();
// am.getOADBTransaction().commit();
while (rs.next())
System.out.println(" Query Results ");
UnitId= rs.getString(1);
System.out.println(" first > ");
rs.close();
ps.close();
catch(SQLException a)
System.out.println(" Error "+a);
System.out.println(" Second > ");
System.out.println(" Third > "); ----the program is executing upto here...it is not setting the value after this.
OAViewObject povo = (OAViewObject)am.findViewObject("PoReqDistributionsVO");
if(povo.getCurrentRow()!=null ) --------If i remove this condition i am getting the nullpointer exception in page.....
System.out.println(" Fourth > ");
povo.getCurrentRow().setAttribute("Attribute12",UnitId);
// if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
// pageContext.writeDiagnostics("TEST >", UnitId, 1);
Thanks
krishna -
Problems with BC4J input select tag when its bounded to a primary key field
HI..
I have an jsp BC4J edit form. This form uses a BC4J input select tag. This component is mapping one of the primary key Entity fields.
When im working with this component and it doesnt map a primary key field it shows the default "none" value when im inserting a record(thats Ok). but when it maps a primary key field the default value is a database value so it is not advisable.. How can i do in order to fix that?
Thank youThe none value is only shown when the field accepts null values.
-
Primary key field problem in DBSchema Wizard
Hi,
I am using Sun ONE studio 4 update 1, EE.
I have generated schema using the Database Schema Wizard.
The generated table representations does not recognise the primary key fields so I can not map my CMP to any table :-(
Is this a bug?
because I have generated schemas from 3 different databases (IBM, MySQL, SAP) and the tables have primary key fields.
When I get a connection in Runtime Pane under Database node, I can see the primary fields are highlighted with red color.
However, when I obtain the schema using, New->Database->Database Schema, there are no primary key fields generated.
Anyone have any ideas, work around?
Thanks
Tex...First, thanks for posting the code that lets us reproduce your test. That is essential for issues like this.
Because the primary key is global you will not be able to use
INCLUDING INDEXES
WITH VALIDATION;And you will need to add the primary key to the temp table
ALTER TABLE DEMO_INTERVAL_DATA_LOAD_Y ADD CONSTRAINT IDX_DEMO_ROLL_Y PRIMARY KEY (ROLL_NUM);The the exchange will work. You will need to rebuild the primary key after the exchange. -
Multi-table mapping is not inserting into the primary table first.
I have an inheritance mapping where the children are mapped to the parent table oids with the "Multi-Table Info" tab.
One of children is not inserting properly. Its insert is attempting to insert into one of the tables from the "Additional Tables" of "Multi-Table Info" instead of the primary table that it is mapped to.
The other children insert correctly. This child is not much different from those.
I looked through the forums, but found nothing similiar.I would expect the Children to be inserted into both the primary table and the Additional Table? Is the object in question inserted into the primary table at all? Is the problem that it is being inserted into the Additional Table first? If it is, are the primary key names different? Is it a foreign key relationship?
If the object in question has no fields in the additional table is it mapped to the additional table? (it should not be)
Perhaps providing the deployment XML will help determine the problem,
--Gordon -
Table & Field Name for Plan Data in CO
Hi All,
Can anyone tell me the table & field name where we can get the planned data in Cost Center Accounting and Profit Center Accounting.
I checked out the COSP(which is Totals) and COEP tables for CCA but i could find the fields only for actual data and not planned data.
Same for PCA...i checked out the GLPCT & GLPCA tables but in vain.
Regards & Thanks
Piyush Kothari.Hi,
Thanks for the reply but COKL is only for Activity Type which contains Allocation Cost Elements.
I would like to have the Table & Field name for Plan data of Primary Cost Element.
Piyush -
How to map primary table for CMP?
I am using the SunONE studio EE and trying to deploy a CMP Entity bean and get the following error:
Validation failed for board.ejb.user.UserBean. Verify that all fields are mapped.
CMP Mapping Error in bean User:: Warning: The bean pcImpl0.moduleComp0.board.ejb.user.User is not mapped.
Set the primary table for the bean.
I have the CMP resou4rce set to the JNDI name of my database connection but I can't figure out hpw to set the primary table for the bean. Any help would be apprecieated.You will need to do the mapping via the UI available on the bean (in the context of the module).
If you expand the ejb-module, you can select a bean that is in that module.
There are two SunONE App Server specific tabs added to the property sheet for a vselected CMP bean.
Entering data for these properties will do the mapping and resolve the error you are encountering.
Note: The current implementation does not conjure up tables for the entity beans (unlike the RI).
Maybe you are looking for
-
Open link in new window Webapps
Hi All, I wonder if you can help. I have created a directory site, with web apps. When you get to the listings page it has a link to there website but the links do not open in the same window.] A link to a page is here so you can see what I mean Air
-
i synced my phone to another computer to get the update and when i went to restore it, all my music was earased, but everything else was normal. how do i get my music back? I enabled the backup, but when i went to use the backup, the phone recovered
-
Hi there, Not an urgent question, however I would like some help. EA Games ran a great promotion over the holidays that offered free iphone/ipod and ipad games. I won a few but have not been able to access the games due a weird bug. Everytime I attem
-
Help - clueless about new external hard drive
Sorry I am a bit clueless. I Have an iMac G5 and just purchased a Western Digital elements external HD to store my music and photos on. I plugged it in and see the icon -now what? do I just start dragging things over? Once I drag thing over should I
-
Jerky Playback & asset replacement issue
Hi, Just downloaded the trial version in order to see if it corrects some things I needed on 1.5 So appart from the better responce and added features wich are great I have 2 problems (so far!). Problem No1 is that the playback of the mpeg (*.m2v) fi