Use of custom primary key using OSM Activation Tasks

Hi,
We are using OSM Activations Task to interact with ASAP. By default it uses OSM_ORDER_ID.HIST_ID as the corelation key and same as primary key while sending the request to ASAP. Is there a way we can customize this logic so as to send a custom value as the primary key to ASAP.

Navid,
A dropdown list can have only one value, so this is not possible. As a (dirty) work around you could introduce a transient attribute that concatenates the two PK values with for example a dash separating the two values, and base your drop down list on this transient attribute. In the setter method of this attribute you can then extract the two values and call the setters of the two PK attrs.
Steven Davelaar,
JHeadstart Team.

Similar Messages

  • Composite Primary Key using  cmp

    How can an Entity Bean with Composite Primary Key using Container Managed Persistance (CMP) be Deployed using in WebLogic Server 8.1
    pls help me

    Your text is a bit confusing, but I think the answer is yes (it can be used).  However, it would help to see the DDL that you are using (or that you propose to use) to avoid any misunderstandings. And please be specific about whether you are referring
    to COLUMNS that are part of a primary key versus the primary key itself (whether it is composed of one column or multiple columns).
    Lastly, why not just try it and see.

  • How many primary keys use in one table

    Hi,
    Please help me. Maximum How many primary keys use with in one table
    Regards,
    Sunil Kumar.T

    Hi,
    For my knowledge, It depends on the Database & version u r working.. Right..
    This is a sample description what I seen for a Database...
    Technical Specification of SAP DB Version 7.4
    Description                            Maximum Value
    Database size                    32 TB (with 8 KB page size)
    Number of files/volumes per database64...4096, specified by a configuration parameter
    File/volume size (data)      518 ...8 GB (dependent on operating system limitations)
    File/volume size (log)1      6 TB (dependent on operating system limitations)
    SQL statement length>=  16 KB (Default value 64 KB, specified by a system variable)
    SQL character string lengthSpecified by a system variable
    Identifier length                32 characters
    Numeric precision              38 places
    Number of tables unlimited
    Number of columns per table (with KEY)  1024
    Number of columns per table (without KEY)  1023
    Number of primary key columns per table  512
    Number of columns in an index  16
    Reward Points if useful

  • Identify columns to use as a primary key

    Good Afternoon,
    Is there a way using dynamic SQL to scan a table to identify the columns to use as the primary key?.
    Thank you in advance.
    Steve

    I converted
    Prashanth's query to dynamic sql:
    DECLARE @SQLString nvarchar(500)
    DECLARE @YourTableName nvarchar(128)
    SET @YourTableName = 'YourTableName'
    SET @SQLString =
    SELECT
    TAb.TABLE_NAME,
    Col.Column_Name,
    Constraint_Type
    from
    INFORMATION_SCHEMA.TABLE_CONSTRAINTS Tab,
    INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE Col
    WHERE
    Col.Constraint_Name = Tab.Constraint_Name
    AND Col.Table_Name = Tab.Table_Name
    AND Constraint_Type = ''PRIMARY KEY''
    AND Tab.Table_Name = ''' + @YourTableName + '''
    --PRINT @SQLString
    EXECUTE sp_executesql @SQLString
    GO
    A Fan of SSIS, SSRS and SSAS
    Didnt understand why you need to make it dynamic here
    There's nothing which requires the query to be dynamic as per the above
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How do I obtain the next number for a Primary Key using an ADF View Object?

    I have two separate View Objects (A & B) for the same Entity Object. View Object A does a SELECT on all of the fields in the table. This View Object is where I execute my adds and updates. View Object B is only used to retrieve the next number for the primary key. This is done so that when I add a row to the database, I always get the max number of the primary key and add one to it. I accomplished this by setting the SQL mode to Expert and using the SQL: "SELECT MAX(NBR) AS MAX_NUMBER FROM TABLE_1". This may be overkill having a seperate View Object for this, but so far this is the only way I have found to obtain the next number. However, I have discovered that this way does not always work.
    The problem I'm running into is when I try to add multiple records to View Object A without committing the transaction between each add. Because View Object B is disconnected from View Object A, the MAX_NUMBER of View Object B comes back with the same number for each add I do on View Object A. So I know I must retrieve the MAX_NUMBER from View Object A.
    I've tried using the following code in my Table1ViewImpl class:
    this.setQuery("SELECT MAX(Table1.NBR) AS MAX_NUMBER FROM TABLE_1 Table1");
    this.executeQuery();
    The view object now has what I want, but I have yet to figure a way to extract the MAX_NUMBER out of the View Object. I've also looked into using the method addDynamicAttribute() but I can't figure out any way to set the attribute with the MAX_NUMBER.
    I can't be the only one trying to retrieve the next number from a database table using ADF. Can anyone help me with this? FYI - I'm using JDev 10.1.3 EA.

    You missing the point.
    On a multi-user db knowing the next highest number doesn't guarantee the number will be available when it comes time to commit the record. You can prove this to yourself by opening two instances of your app and do whatever you do to add a new record to your VO. Both will assume the same number, and when you commit an error will be generated
    You must use sequences to avoid the possibility of duplicate keys. If you are trying to avoid gaps in your numbering then you need to convince yourself why this is necessary.

  • HOW TO  GET COUNT IN OF COMPOSITE PRIMARY KEYS USING ECLIPSELINK

    Hi all,
    We are currently migrating our application form oracle 10g to 11 g and hence migrating from toplink to eclipselink.
    we are unable to fire the count query and getting the following exception ...
    Error Code: 909
    Call: SELECT COUNT() FROM T_USER_MESSAGE t0, T_USER t2, T_MESSAGE_RECIPIENT t1 WHERE ((((t2.PERSISTENT_ID = ?) AND (t2.SITE_CODE = ?)) AND (t1.DELETED_BY_RECIPIENT = ?)) AND (((t2.PERSISTENT_ID = t1.RECIPIENT_ID) AND (t2.SITE_CODE = t1.RECIPIENT_SITE)) AND ((t0.PERSISTENT_ID = t1.MESSAGE_ID) AND (t0.SITE_CODE = t1.MESSAGE_SITE))))
         bind => [13398610, 1, F]
    please advise .
    we suspect that this could be because of the composite primary key in one of the tables .
    any pointers to specify how count(*) could be used in this scenario would be of great help ..
    Thanks in advance

    What is the query being used, include the JPQL/expression code.
    What is the error message (I assume this is a database error?).
    What version are you using, can you try the latest EclipseLink 2.1 release.
    James : http://www.eclipselink.org

  • Creating a script for a PRIMARY KEY USING INDEX SORT doesn't work

    Probably a bug.
    h1. Environment
    Application: Oracle SQL Developer Data Modeler
    Version: 3.0.0.655
    h1. Test Case:
    1. Create a new table TRANSACTIONS with some columns.
    2. Mark one of numeric columns as the primary key - PK_TRANSACTIONS.
    3. Go to Physical Models and create new Oracle Database 11g.
    4. Go to Physical Models -> Oracle Database 11g -> Tables -> TRANSACTIONS -> Primary Keys -> PK_TRANSACTIONS -> Properties:
    a) on General tab set Using Index to BY INDEX NAME
    b) on Using Index tab choose a tablespace
    c) on Using Index tab set Index Sort to SORTED.
    5. Export the schema to DDL script. For the primary key you will get something like this:
    ALTER TABLE TRANSACTION
    ADD CONSTRAINT PK_TRANSACTION PRIMARY KEY ( TRAN_ID ) DEFERRABLE
    USING INDEX
    PCTFREE 10
    MAXTRANS 255
    TABLESPACE TBSPC_INDX
    LOGGING
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    PCTINCREASE 0
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    ) SORTED
    h1. Reason of failure
    The script will fail because SORTED is not allowed here. It should be SORT.
    Additionally, the default behaviour for Data Modeler is to set Index Sort to NO but default setting for Oracle database 11g is SORT. Shouldn't Data Modeler use SORT as the default value?
    Edited by: user7420841 on 2011-05-07 03:15

    Hi,
    Thanks for reporting this problem. As you say, it should be SORT rather than SORTED. I have logged a bug on this.
    I also agree that, for consistency with the database default, it would be better to have SORT as the default in Data Modeler.
    David

  • Populating custom foreign key using EIM Import

    Hi,
    This is regarding a requirement wherein we are trying to populate the custom foreign key in the siebel base table using the EIM import.
    The table being used are as .
    S_CL_PTCL_LS ----> having vanilla PRDINT_ID foreing key to S_PROD_INT
    S_CL_PTCL_LSXM--> Created custom colum x_prod_id as foreing key to S_PROD_INT
    using EIM_CL_PTCL_LS ---> Created mapping for the custom foreign key field to resolve the UK cols.(NAME,BU_ID,VENDR_OU_ID)
    When we are executing the EIM import PRDINT_ID column foreing key to S_PROD_INT is getting resolved properly; however the custom column x_prod_id as foreing key to S_PROD_INT in S_CL_PTCL_LSXM is not getting resolved.
    The data for the resolution is same for both the mappings.
    Can some let me know if it is possible to do such import for custom foreign keys/this import is only possible for the vanilla foreign key refrences.
    Warm Regards,
    Ashutosh

    Hi,
    I think the custom FK may be a mistake.
    PAR_ROW_ID is the foreign key from S_CL_PTCL_LSXM to S_CL_PTCL_LS. You don’t have to create your own FK to do something that Siebel provides OOTB.
    Please check that you really need the custom FK. I don't think you do. You should simply join to S_CL_PTCL_LS and then to S_PROD_INT. This is Siebel Tools 101 but I have seen this mistake many times.
    Robert
    Robert Ponder
    Lead Architect and Director
    Ponder Pro Serve
    cell: 770.490.2767
    fax: 770.412.8259
    email: [email protected]
    web: www.ponderproserve.com
    Edited by: Robert Ponder on Dec 27, 2010 8:48 AM
    Edited by: Robert Ponder on Dec 27, 2010 8:50 AM

  • How do u automatically generate a primary key using JDBC?

    ok, basically i'm given a simple schema
    with 5 fields, one of these are made as a constraint made for primary keys.
    I am programming under Oracle, using JDBC, and everytime i insert a new record into the table using an INSERT statement it says it cant make the id null, well yeah, then how exactly do i make it generate a new ID?
    Thanks guys.

    In the table schema, the cid field is a INTEGER
    type.
    Ok i must of accidentally typed an extra digit, it's
    working now hmmm but i'm starting from this digit now
    : 1000000016
    If i go more higher and it truncates again, is there
    anyway to fix that?No. You can however write your code to verify it.
    Noting of course that the problem will next occur after 1 billion records have been added. So I would question at what rate you think that that table is going to grow.
    Of course you could create your own id but that would require modifying the table.

  • Fast Refresh using two non-primary key tables

    Hi,
    I have a materialized view based on two tables with an outer join clause. Both the tables do not have a primary key so I had created materialized view log with row-id on each of them but still I am not able to bring out the fast refresh option for the materialized view. My question is can I have a fast refresh option for materialized view built from two tables without primary keys and having an outer join clause????. If possible please send me some sample scripts for quicker understanding.
    Thanks and Regards,
    Sudhakar

    I was able to create a fast-refreshable MV, on tables without any PK. Unfortunately, I can't complete all the steps since my setup is a multi-master advanced replication (which ABSOLUTELY requires the tables to have PK's). Here are anyway the steps I took. Note that ORA102 is my (definition) master site, and MVDB is my MV site. The tables were created under user HR, and my master group is called "hr_repg". Here are my steps:
    HR on ora102 >create table countries_no_pk as select * from countries;
    Table created.
    HR on ora102 >create table regions_no_pk as select * from regions;
    Table created.
    HR on ora102 >create materialized view log on countries_no_pk with rowid;
    Materialized view log created.
    HR on ora102 >create materialized view log on regions_no_pk with rowid;
    Materialized view log created.
    REPADMIN on ora102 >exec dbms_repcat.suspend_master_activity('hr_repg')
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:02.68
    REPADMIN on ora102 >BEGIN
    2 DBMS_REPCAT.CREATE_MASTER_REPOBJECT (
    3 gname => 'hr_repg',
    4 type => 'TABLE',
    5 oname => 'countries_no_pk',
    6 sname => 'hr',
    7 use_existing_object => TRUE,
    8 copy_rows => FALSE);
    9 END;
    10 /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:05.19
    REPADMIN on ora102 >set timing off
    REPADMIN on ora102 >BEGIN
    2 DBMS_REPCAT.CREATE_MASTER_REPOBJECT (
    3 gname => 'hr_repg',
    4 type => 'TABLE',
    5 oname => 'regions_no_pk',
    6 sname => 'hr',
    7 use_existing_object => TRUE,
    8 copy_rows => FALSE);
    9 END;
    10 /
    PL/SQL procedure successfully completed.
    (note that you ABSOLUTELY need the rowid's in your select statement for an MV with joins):
    MVIEWADMIN on mvdb >CREATE MATERIALIZED VIEW hr.complex_mv refresh fast as
    2 select c.rowid "C_ROW_ID", r.rowid "R_ROW_ID", c.COUNTRY_ID, c.COUNTRY_NAME,
    3 c.REGION_ID, r.REGION_NAME from hr.regions_no_pk@ora102 r, hr.countries_no_pk@ora102 c
    4 where c.region_id = r.region_id (+);
    Materialized view created.
    MVIEWADMIN on mvdb >BEGIN
    2 DBMS_REPCAT.CREATE_MVIEW_REPOBJECT (
    3 gname => 'hr_repg',
    4 sname => 'hr',
    5 oname => 'complex_mv',
    6 type => 'SNAPSHOT',
    7 min_communication => TRUE);
    8 END;
    9 /
    PL/SQL procedure successfully completed.
    REPADMIN on ora102 >BEGIN
    2 DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT (
    3 sname => 'hr',
    4 oname => 'countries_no_pk',
    5 type => 'TABLE',
    6 min_communication => TRUE);
    7 END;
    8 /
    PL/SQL procedure successfully completed.
    (wait when the entries in DBA_REPCATLOG is empty)
    REPADMIN on ora102 >exec dbms_repcat.resume_master_activity('hr_repg')
    Hope that can help you. If that doesn't work, tell us where it bombs.
    Daniel

  • USE ROWID AS PRIMARY KEY OF ENTITY ON EJB3

    When we launch the Create Entities from Tables wizard, and create JPA (Java Persistence API) entities from existing database tables, if the table has no primary key and unique key field, you will get a warning. When you run, you will get the following information:
    Caused by: Exception [TOPLINK-7161] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: Entity class [class model.Test] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass.
    Actually, every row of oracle table has a ROWID field , I think it is a good “primary key field”. Add it into Entity Java bean file as following:
    @Id
    private ROWID rowid;
    And generate accessors, ok, run……
    GOOD, No problem.
    But when you insert a new row, got an exception:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00928: missing SELECT keyword
    Error Code: 928
    Call:INSERT INTO TEST (ROWID, B, A) VALUES (?, ?, ?)
         bind => [null, 555, 555]
    Query:InsertObjectQuery(model.Test@40979b)
    555~~~, what happened?! Somebody builds a wrong SQL …
    Don’t worry! I know (…) where is the “bug”.
    Find out the class
    oracle.toplink.essentials.internal.expressions. SQLInsertStatement
    which is included in the toplink-essentials.jar,
    decompile… , fix…, compile, and jar it back.
    Fix
    if(field.getTable().equals(getTable()) || !field.hasTableName())
    to
    if((field.getTable().equals(getTable()) || !field.hasTableName()) && !field.getName().equalsIgnoreCase("ROWID"))
    OK, it is running well.
    I suggest ORACLE fix it into his next version. Do you think it is a good idea?

    Do you think it is a good idea? Not really, but that's just my two cents.

  • Query not using remote table primary key.

    Hello all,
    My following query is not using the PK of remote database. vem_business_event_attribute is having a PK on ATTRIBUTE_TYPE_ID and business_event_id. The table is last analyzed on 04-dec-2010. It has around 5 milloin rows.
    select /*+ DRIVING_SITE(ve) */
    ve.ATTRIBUTE_TYPE_ID ,
    ve.BUSINESS_EVENT_ID ,
    ve.ATTRIBUTE_VALUE ,
    ve.ATTRIBUTE_AS_NUMBER
    from
    vem_business_event_attribute@hello ve,
    vem_attribute_types@hello va,
    delta_insert_businessevent de
    where
         ve.ATTRIBUTE_TYPE_ID = va.ATTRIBUTE_TYPE_ID
    ve.business_event_id = de.business_event_id
         and de.business_event_id < 90000000;
    Pls help.
    Regards

    If you need to move 150 million rows from one database to another, it is going to take some time, and a full scan would definitely be the most efficient sql way to do it. I would be surprised if 15 inserts of 10 million rows each would be faster than a single insert of 150 million rows.
    Depending on your exact requirements, it might be faster to use datapump to export the rows from the remote database and import them on the local database, but you will still be moving those 150 million rows across the network. You might get some advantage from the export/ftp/import option if you compress the dump file before the ftp, and uncompress it on the target, but that would depend on the additional time required to compress and uncompress.
    John

  • Using a custom PL/SQL to populate the primary key in a tabular form

    I want to use a Custom PL/SQL Function to populate the primary key when I insert a new record into a tabular form. I want to get the value from a hidden page Item. The code I am using for the primary key source is:
    BEGIN
    INSERT INTO TEAM_MEMBERS(TEAM_ID)
    VALUES(:P75_TEAM_ID);
    END;
    When I try to insert a new record I get the following error:
    Error      ERR-1904 Unable to compute item default: type = Function Body computation_type= BEGIN INSERT INTO TEAM_MEMBERS(TEAM_ID) VALUES(:P75_TEAM_ID); END; .
    ORA-06550: line 5, column 2: PLS-00103: Encountered the symbol ";" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe The symbol "exit" was substit
    Any ideas what I am doing wrong?
    Thanks!

    Brian - Sometimes whitespace at the end of the block causes this. Be sure to trim everything after the last semicolon including tabs and newlines.
    Scott

  • How can I use the SQL to create a primary key for a existing table?

    create table a(bm number,mc varchar2(20));
    when the table was created,i want to make the column bm as
    the primary key and my SQL is "alter table a enable primary key bm",the system show
    me error,how can I write the right one?

    create table a(bm number,mc varchar2(20));
    when the table was created,i want to make the column bm as
    the primary key and my SQL is "alter table a enable primary key bm",the system show
    me error,how can I write the right one? You do not have any primary key defined on your table yet, so, it does not make sense to enable it (if at all possible) !
    You need to add PRIMARY KEY using something like this:
    SQL> alter table a add constraint pk_a_bm primary key (bm) ;

  • Primary key problem using with oc4j

    Hi everyone
    I have deployed my entity bean in the oc4j container without any problem.But when I use the search->primary key in the console,no results display.
    detail:
    Step1I open the oc4j console by typing java -jar orion.jar -console
    the oc4j container is successfully built
    and in the left part of my console I see my entity bean
    step2 I click my entity bean and in the right of the console in the search->primary key I type the a number which exists in my table in the database.
    but no results display.
    the following is my datasource-file anf orion-ejb-jar file
    data-sources.xml
    <?xml version="1.0"?>
    <!DOCTYPE data-sources PUBLIC "-//Evermind//- Data-sources configuration" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
    <data-sources>
         <data-source
              class="com.evermind.sql.DriverManagerDataSource"
              name="jdbc/OracleDSCore"
              location="jdbc/OracleDSCore"
              pooled-location="jdbc/OracleDSPooled"
              xa-location="jdbc/xa/OracleDSXA"
              connection-driver="oracle.jdbc.driver.OracleDriver"
              username="SCOTT"
              password="TIGER"
              url="jdbc:oracle:thin:@localhost:1521:b2b"
         />
    </data-sources>
    orion-ejb-jar.xml
    <?xml version = '1.0' encoding = 'GBK'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar>
    <enterprise-beans>
    <entity-deployment name="EMP" data-source="jdbc/OracleDSCore" table="EMP" >
    <primkey-mapping>
    <cmp-field-mapping>
    <fields>
    <cmp-field-mapping name="EMPNO"
    persistence-name="EMPNO" persistence-type="VARCHAR2(4)"/>
    </fields>
    </cmp-field-mapping>
    </primkey-mapping>
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="&lt;default-ejb-caller-role>" impliesAll="true"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    Any answer is welcome. Thankou in advance!

    Fernando,
    I see you suffer a lot with ADF...write me at [email protected] and let´s keep in touch.
    Maybe we can do a Brazilian list for JDev/ADF.
    Regards,
    Marcelo Alcantara

Maybe you are looking for

  • Error in Post Processing Action for a Conc-Request

    Hi, I am using XMLP 5.5 and facing the following issue with a particular report. The issue is not encountered when tested in the XMLP 5.5 Desktop Viewer, but gives the following error when run EBS 11i10. The following is the OPP log: [1/23/06 12:31:0

  • SID error in XI sysytem

    hai friends iam trying to create 2 SID's in one single system . 1 for devlopment 2nd for production . is it posible to create 2 sid's for one single system if it is posible pls tell me how to do this one . OR any other way to maintain this devlopment

  • Removal of af:form element

    Hi all, JDeveloper 11.1.1.6.0 We're in the process of implementing a credit card processing page that will be performing a cross domain form action via jQuery or some other means. One of our primary requirements is to guarantee that form data on this

  • What to do if the activated pc is reformatted without deactivation?

    I had installed CS4 on a pc, and then there were some registry problems (lost the touch screen drivers) which required me to reformat the system drive and reinstall. Now when I try to activate, Adobe correctly notes that I didn't deactivate their rec

  • K7NG-ILSR 13 multiplier doesn't apear to work

    Well, do fully in part to this forums advise I searched the internet for a company that was selling B core Thoroughbred. I found one that people where saying they where getting good luck with so I gave it a shot. Sure enough I got one. Very happy. An