Primary Key missing in Table OBJS
Hi,
I have a problem in establishing relationship between Course Type and Course in Training and Event Management.
Course Type is created in Active status and Course is Planned (ISTAT2).
How can I create cours ein active status?
How can I establish the relationship A020 between D and E object.
How can I see the Participant list in PSV1 , I get an Error Primary Key misisng in Table OBJS.
I am uploading the data with LSMW.
Thanks
PV
Please go through documentation of report "RHSOBJCH". Also check following SAP notes:
520488
134311
138411
Regards
Similar Messages
-
Is it possible to create many primary key for a table?
hello sir/mam.
i am selva, i am new to abap,
is it possible to create many primary key for a table?
please guide me.Hi Selva,
Many Primary Keys = Composite Key.
i.e some set of columns will enable you to identify a unique row from a set of rows in the table.
This can be achieved by checking the primary key check box in se11.
Hope it helps.
Regards,
Maheswaran.B
Message was edited by: Maheswaran B -
How to define Composite primary key for a Table
Hi ,
I am basically more into Java Programming , with little bit knowledge on Oracle as DataBase .so please excuse for my silly doubts .
Can anybody please tell me how to define a Composite Primary Key on a Table .
Thanks in advance .
Edited by: user672373773 on Sep 25, 2009 8:54 AMHere is an example right out of the Oracle documentation and the syntax for adding PK since you mention adding a composite PK.
Example creating composite index
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_indexing.htm#sthref594
Syntax for adding a PK (composite or not)
alter table oooooooo.tttttttt
add constraint tttttttt_PK
primary key (sample_column2,
sample_column1)
using index
tablespace IDXSPC
pctfree 05
initrans 04
maxtrans 08
storage (initial 16k
next 16k
maxextents 32
pctincrease 0);
-- dictionary management with restricted storage, change as desired.
HTH -- Mark D Powell -- -
How to get the PRIMARY KEY of a table at runtime ???
Hi everybody,
My requirement is to update a z-table at runtime according to the data given ata runtime. So the main difficulties for me is that whenever I tried to update the table based on the data given in UI many rows are getting updated as these fields are not unique. So I think if I can get the PRIMARY KEY along with these given fields then I can update only one row at a time.
So Can anyone suggest me how to get PRIMARY KEY of a table based on the data in UI..??
Any suggestions will be appreciated..
Thanks,
SekharU will get primary keys of transparent tables using FM "REUSE_FIELDCALATLOG_MERGE".
pass tyour table name and u will get fieldcatalog filled. In tht their is a field called "KEY" if it has 'X' then tht field is a primary key of transparent tables & if it has "space" then it is not a primary key...
Or else you can try with 'DDIF_TABT_GET'
Or try this code
PARAMETERS: p_table TYPE tabname OBLIGATORY.
DATA: go_strucdescr TYPE REF TO cl_abap_structdescr,
gt_tab_fields TYPE ddfields.
FIELD-SYMBOLS: <gwa_tab_field> TYPE dfies.
TRY .
* Get the details of the DDIC table
go_strucdescr ?= cl_abap_elemdescr=>describe_by_name( p_table ).
CATCH cx_sy_move_cast_error .
MESSAGE 'Error while casting' TYPE 'S'. RETURN.
ENDTRY.
* Check if input is a DDIC table
CHECK go_strucdescr->is_ddic_type( ) = 'X'.
* Get the details of the table fields
gt_tab_fields = go_strucdescr->get_ddic_field_list( ).
* Display the Key fields of the table
LOOP AT gt_tab_fields ASSIGNING <gwa_tab_field> WHERE keyflag = 'X'.
WRITE: / <gwa_tab_field>-fieldname.
ENDLOOP. -
How can I obtain the primary key of a table for an entity relation?
hello everybody
I am doing a consultation to a table in my data base, good this table has alone two fields, the first one is the code or pk and the second one is the description, to be presisos they are names of city and code.
From the beginning!!: This method this one in another class that is a Dialog that is going to call to the class SelecPlace ();
SelecPlace sl = new SelecPlace();
public void capturarLugar(){ // Simple void method in the mentioned class
String place = txtProcedencia.getText() ; // a JTextField
sl.executeStatement(place) ;
}ok, now we see part of the code of the class SelectPlace
public class SelecPlace extends AbstractTableModel{
Connection con = null;
Statement sentencia = null ;
ResultSet rs = null;
ResultSetMetaData rsmd = null ;
String[] nameColum = {} ;
Vector datos = new Vector() ;
public SelecPlace() { }
public void executeStatement(String query){
try{
con = DBManager.getConnection() ;
sentencia = con.createStatement(rs.TYPE_SCROLL_INSENSITIVE,
rs.CONCUR_UPDATABLE) ;
String sql = "select * from Place where descripcion like %"+query+"%'";
rs = sentencia.executeQuery(sql) ;
rsmd = rs.getMetaData();
int nroColumnas = rsmd.getColumnCount() ;
nameColum = new String[nroColumnas] ;
//obtengo los nombres de columnas en cache
for(int colum = 0; colum < nroColumnas; columna++){
nameColum[colum] = rsmd.getColumnLabel(columna + 1) ;
datos = new Vector();
while(rs.next()){
Vector newRow = new Vector();
for(int i = 0; i < getColumnCount(); i++){
newRow.addElement(rs.getObject("place_ID"));
newRow.addElement(rs.getObject("description"));
datos.addElement(nuevaFila);
fireTableChanged(null);
}catch(SQLException e){
System.err.println(e);
e.printStackTrace(System.err);
System.out.println("error in statement");
}catch(ClassNotFoundException cnfe){
System.err.println(cnfe);
}Ok, this code me works and I obtain in this case the field description of the table Place
Now my question is, how can I obtain the primary field of my table?
I need this value of this field that in the base of information in a bigint, and to take it to the first class before mentioned, for that I am working with a data base relatedCertain duffymo and everyone!!, good I give you my scheme:
And generalizing my question, I want to obtain the value of the primary key of a table in the database, I obtain more values of the same row, but I need the primary key, and you see one with the primary key I want to turn a Long and it to insert with code java in foreign clave in another table of the database
Good of this form I believe that it would not be breaking the integrity relacional of the tables -
Is there any restriction on the length of all Primary keys in a table
Hi all,
Is there any restriction on the length of all Primary keys in a data base table?
i have some 10 fields as primary key in a DB table and length exceeds 120 and getting a warning.
Please let me know will there be any problems in future with respect to the same?
With regards,
SumanthWell actually there are constraints like
Total of internal lengths of all primary key columns 1024 Bytes
Number of primary key columns per table 512
For other information about SAP database please refer to http://sapdb.org/sap_db_features.htm
Thanks & Regards,
Vivek Gaur
Alwayz in high spirits -
What is the best practice for creating primary key on fact table?
what is the best practice for primary key on fact table?
1. Using composite key
2. Create a surrogate key
3. No primary key
In document, i can only find "From a modeling standpoint, the primary key of the fact table is usually a composite key that is made up of all of its foreign keys."
http://download.oracle.com/docs/cd/E11882_01/server.112/e16579/logical.htm#i1006423
I also found a relevant thread states that primary key on fact table is necessary.
Primary Key on Fact Table.
But, if no business requires the uniqueness of the records and there is no materilized view, do we still need primary key? is there any other bad affect if there is no primary key on fact table? and any benifits from not creating primary key?Well, natural combination of dimensions connected to the fact would be a natural primary key and it would be composite.
Having an artificial PK might simplify things a bit.
Having no PK leads to a major mess. Fact should represent a business transaction, or some general event. If you're loading data you want to be able to identify the records that are processed. Also without PK if you forget to make an unique key the access to this fact table will be slow. Plus, having no PK will mean that if you want to used different tools, like Data Modeller in Jbuilder or OWB insert / update functionality it won't function, since there's no PK. Defining a PK for every table is a good practice. Not defining PK is asking for a load of problems, from performance to functionality and data quality.
Edited by: Cortanamo on 16.12.2010 07:12 -
If I have an EntityBean that mappes to two tables within one database, when I create
that EJB, whoes reponsibilty to generate the primary key in database table? The
RDBMS or EJB?
Thanks,
JWRefer to http://e-docs.bea.com/wls/docs81/faq/ejb.html/#257430
"Jingwei Zhang" <[email protected]> wrote:
>
If I have an EntityBean that mappes to two tables within one database,
when I create
that EJB, whoes reponsibilty to generate the primary key in database
table? The
RDBMS or EJB?
Thanks,
JW -
Multiple composite primary key in Master Table
Dears ,
I am try to find any solution about Multiple composite primary key by search in forum , but i didn't success ... i am try to built master detail , the master structure table built with multiple composite primary key , i know that apex 4.2 still support tow primary key , in detail table i solved the problem by depend on rowid , and now i can use multiple composite primary key in detail table , the problem with master table because it's support only tow primary key , there are any solution by manual process or any something else ?
Thanks
Abo YahyaHi,
I've never done this so all I can do is give some suggestions. It takes more effort because you are going beyond what APEX currently supports. That said, you might try searching the forum with this search string:
key AND table AND instead
Make sure the ANDs are capitailized in the search criteria. Also, look at this thread {thread:id=395870} and the forum thread asociated with this message {message:id=10542916}.
Best wishes,
Howard -
Composite primary key in oe_order_headers_all table?
Hi all
What are columns involved in composite primary key in oe_order_headers_all table? how to identify that?
(Order_number, order_type, org_id) are the combination of composite primary key or anything else ?select * From all_constraints where table_name = 'OE_ORDER_HEADERS_ALL'
SELECT AIC.* FROM ALL_INDEXES AI, ALL_IND_COLUMNS AIC
WHERE AI.TABLE_NAME='OE_ORDER_HEADERS_ALL'
AND AI.UNIQUENESS='UNIQUE'
AND AI.INDEX_NAME = AIC.INDEX_NAME
order by AI.INDEX_NAME
Hope this helps,
Sandeep Gandhi -
We are at the end of completing a project and we ran into a last minute bug. We are using two primary keys on a table to form a unique key. The problem we have is the program hangs up and gives us the following error,
ORA-20001: Error in DML: p_rowid=CUA, p_alt_rowid=SIT_ID, p_rowid2=, p_alt_rowid2=. ORA-01422: exact fetch returns more than requested number of rows,
probably meaning we only have one key setup in the DML
processing when our table has two.
we created a process with the Primary key set up in the DML but how does the secondary key column value work and is that what it's used for,because we tryed with no success. Is there a way around this problem without having to change our table by inserting only one primary key.
Thanks in advance.
GarryI am facing a similar problem , I used the two primary keys for navigating to the form page (forms with reports) so that the form page may display distinct records.
Its not posing any error but its not showing the value of other columns associated with that record.
Only the columns contained in the page item in the form page , that's are used as primary keys or that have been specified in the navigation part of the report page, are being shown ,
Like for example I have got 5 columns
a,b,c,d,e out of which a and b are my primary keys .
I am using these to fetch values in the form page of forms with reports.
We can specify three keys at the most , in my case I am having two , if in place of the third key I specify some column then in the form page it displays the correct record details of the three columns specified( 2 keys and one simple column), and it doesn't displays the value of other columns.
Please help me out of this . -
How many primary keys for one table?can we add more primary keys
In general Table have one primary key.is it possible to more than one primary key in a table?(ie is it possible to add more than one pirmary key in a table). Help me out.
pls do check this link
[http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm]
All the key fields of a table must be stored together at the beginning of the table. A non-key field may not occur between two key fields.
A maximum of 16 key fields per table is permitted. The maximum length of the table key is 255.
If the key length is greater than 120, there are restrictions when transporting table entries. The key can only be specified up to a maximum of 120 places in a transport. If the key is larger than 120, table entries must be transported generically. -
How add new field as primary key for existing table
Hi,
There is table with name REVIEWER_REUSE_EFFORT and the table has 8000 rows in it.
Now the enhacement i must do on this table is there is no primary key on this table. so i must create a ID also add values to this table of ID
Table structure is like this
Create table REVIEWER_REUSE_EFFORT
PRO_ID number,
POBJ_ID number,
TASK_ID number,
POTENTIAL_EFFORT number,
COMMENTS varchar2(1200),
CREATED_BY varchar2(100),
CREATION_DATE sysdate
UPDATED_BY varchar2(1200),
UPDATED_DATE sysdate
Please suggest me how to add values in that 8000 rows
Thanks
SudhirHi,
If you want to add a new column and update the new column with sequence of number
alter table REVIEWER_REUSE_EFFORT add (ID number);
update REVIEWER_REUSE_EFFORT set ID=rownum;Regards,
Prazy
Edited by: Prazy on Jun 21, 2010 3:13 PM -
Query to return list of all missing primary key ids from table T1
I found this query online that returns a start and stop for a range of all missing primary key id values from table T1. However i want to rewrite this query to return a whole list of all the missing primary key ids and not a start and stop range. any help plz?
select strt, stp
from (select m.id + 1 as strt,
(select min(id) - 1 from T1 x where x.id > m.id) as stp
from T1 m left outer join T1 r on m.id = r.id - 1 where r.id is null)x where stp is not nullwith t as
select 1 as id from dual union all
select 2 as id from dual union all
select 3 as id from dual union all
select 5 as id from dual union all
select 8 as id from dual union all
select 10 as id from dual union all
select 11 as id from dual union all
select 20 as id from dual
select id_start + level missing_id
from (
select id id_start,
nullif(lead(id) over(order by id) - 1, id) id_end
from t
start with id_end is not null
connect by prior id_start = id_start
and prior dbms_random.random is not null
and level <= id_end - id_start
MISSING_ID
4
6
7
9
12
13
14
15
16
17
18
MISSING_ID
19
12 rows selected.Or:
with t as
select 1 as id from dual union all
select 2 as id from dual union all
select 3 as id from dual union all
select 5 as id from dual union all
select 8 as id from dual union all
select 10 as id from dual union all
select 11 as id from dual union all
select 20 as id from dual
select id_start + level - 1 missing_id
from (
select min(id) id_start,
max(id) id_end
from t
connect by level <= id_end - id_start
minus
select id
from t
MISSING_ID
4
6
7
9
12
13
14
15
16
17
18
MISSING_ID
19
12 rows selected.SY. -
DBMS_CDC find only the columns that are changed along with the primary key in the table
Hello,
We are having a requirement to find the change data in the production environment.
We are planning to use the DBMS_CDC utility.
But for example in the create change table 1 picked emp_id,ename, address, salary,dob.
I have a sample data of
empid
ename
address
salary
DOB
1
test1
24 test street
2000
20-Jan-98
2
test2
25 test street
2500
15-Aug-97
if ename for empid 1 is changed to test1_test3 from test1.
My CDC is capturing the values in the old and new values in the 5 columns.
But i need to get only the empid (primary key of the source table) and the ename column as only that's been updated not the rest of the 3 columns.
Can i accomplish this.
Please advice.Hello,
Thanks for the information.
but if i change the change table then i will miss the other columns right?
I want to get the columns( empid and ename) only if ename is changed. i.e when ever any column in emp table changes i need to get all the columns where the data is changed along with the primary key columns empid.
Is there any way i can tweak the parameters so that i can achieve this or is there any other way using the cdc i can get this data.
Thanks
Maybe you are looking for
-
Dynamic attribute in a custom component
has anybody tried generating an attribute dynamically in a custom component e.g <cx:inputText value="" foo="footest"/> where foo is not defined in the custom inputtexttag.java can we have a hashmap which stores all the unknown attributes into the has
-
ECC6.0 WebDynpro(ABAP) - raising terminating event
Hi, in ECC6.0 I have a custom WDA application with a custom workflow. The workflow is launched via an event that is raised in the WDA application. However, at one point workflow sends a link to one of the WDA pages, whereby the user clicks a button
-
JWSDP - Where can I find 1.0 example apps?
Hi, I'm trying to learn J2EE so I downloaded the JWSDP 1.3 exe. Unfortunately, the bookstore examples use JSP 2.0, which we aren't using in our environment. We are old school. I have downloaded the 1.0 tutorial in PDF but I can't find the correspondi
-
Please help me solve DM9601 USB NIC Adapter on Mac OS X 10.4, OS x 10.5
Hello Apple users, I'm the System Administrator in a Government printing press and we are using eMacs and MacPro, there was this thunder storm and blown all the network ports and the management bought DM9601 USB NIc network adapters to be used before
-
Exchange 2010 - Accepting Messages Above the Attachment Size Limit
Recently we implemented a new Exchange 2010 server in a site. This site is in another country with very poor WAN connectivity. Our standard attachment limit is 50MB (51200 kb) . Since we have put this server in place I am seeing messages get stuck i