Primary key failure with merge into...should not happen

I get primary key constraint fail on this MERGE INTO sql.
Why? Shouldn't the merge into take care of this?
ORA-00001: unique constraint (NCSL.SYS_C001568) violated
MERGE INTO SessionTbl2 thistbl
USING
  (SELECT 'b2cdd2f30b786c329ad2f8d04d0e79e9' sessionid FROM dual) thistbl2
  ON (thistbl2.sessionid = thistbl.sessionid AND thistbl.varname=:varname)
WHEN MATCHED THEN
  UPDATE SET thistbl.varvalue=:variablevalue,
  thistbl.only_on_page=:onlyonpage,
  thistbl.expire_tstamp=:expire_tstamp,
  thistbl.inactivity_timeout=:inactivity_timeout,
  thistbl.readonly=:readonly
WHEN NOT MATCHED THEN
  INSERT (sessionid,varname,varvalue,tstamp,
  only_on_page,expire_tstamp,inactivity_timeout,
  readonly)          
  VALUES
  (:cacheidval,:varname,:variablevalue,:nowts,
  :onlyonpage,:expire_tstamp,:inactivity_timeout,
  :readonly)

As you say, this should not give a problem then, but the only way to be sure the system is doing what you believe it should do is to use the same variables in the test and in the insert statement. The bind variable depends on the programming language you use and may pass something else than the string that oracle generates in the select from dual. I do not say it will be as such, I just want to make sure that this is not the problem. I have seen things like this before and you keep on looking in the wrong direction for a solution.
Peter

Similar Messages

  • Problem with Merge into stmt

    Dears,
    I m using 10g XE.
    I am using merge into stmt, to inesrt non matched records and to update matched records with respect to primary key.
    I have two uers in oracle. (TMP and REAL)
    I have n number of tables with same definition in both users.
    I will always merge all the tables into "REAL" from TMP uesr
    Each and very table may contain more than 200000 records.
    while merging some of the records got deleted from the REAL user which already available in REAL user.
    i.e records available in TEMP.A is not available in REAL.A
    if i re rerun the merge qry once again, the missing records inserted into REAL.A
    how it happens? is ther is any bug with merge into stmt while processing huge amount of rows.
    Sample Qry:
    MERGE INTO REAL.med_stock_sales B
    USING (
    SELECT 1 AS RETAIL_OUTLET_ID,mss_id,MSS_ITEMCODE,MSS_TRAN_DATE,MSS_TRAN_TYPE,MSS_REF_NO,MSS_TRANS_QTY,MSS_FREE_QTY,MSS_PUR_RATE,MSS_SELLING,MSS_TAG,MSS_BNO,MSS_CAT1,MSS_CAT2,MSS_CAT3,MSS_CAT4,MSS_CAT5,MSS_CAT6,MSS_CAT7,MSS_CAT8,MSS_CAT9,MSS_CAT10,MSS_compid,MSS_diviid,MSS_locaid,TS,MSS_BAGS FROM TMP.med_stock_sales) E
    ON (B.RETAIL_OUTLET_ID = E.RETAIL_OUTLET_ID AND B.MSS_ID = E.mss_id )
    WHEN MATCHED THEN
    UPDATE SET B.MSS_ITEMCODE = E.MSS_ITEMCODE , B.MSS_TRAN_DATE = E.MSS_TRAN_DATE , B.MSS_TRAN_TYPE = E.MSS_TRAN_TYPE , B.MSS_REF_NO = E.MSS_REF_NO , B.MSS_TRANS_QTY = E.MSS_TRANS_QTY , B.MSS_FREE_QTY = E.MSS_FREE_QTY , B.MSS_PUR_RATE = E.MSS_PUR_RATE , B.MSS_SELLING = E.MSS_SELLING , B.MSS_TAG = E.MSS_TAG , B.MSS_BNO = E.MSS_BNO , B.MSS_CAT1 = E.MSS_CAT1 , B.MSS_CAT2 = E.MSS_CAT2 , B.MSS_CAT3 = E.MSS_CAT3 , B.MSS_CAT4 = E.MSS_CAT4 , B.MSS_CAT5 = E.MSS_CAT5 , B.MSS_CAT6 = E.MSS_CAT6 , B.MSS_CAT7 = E.MSS_CAT7 , B.MSS_CAT8 = E.MSS_CAT8 , B.MSS_CAT9 = E.MSS_CAT9 , B.MSS_CAT10 = E.MSS_CAT10 , B.MSS_compid = E.MSS_compid , B.MSS_diviid = E.MSS_diviid , B.MSS_locaid = E.MSS_locaid , B.TS = E.TS , B.MSS_BAGS = E.MSS_BAGS
    WHEN NOT MATCHED THEN
    INSERT (B.RETAIL_OUTLET_ID , B.MSS_ID , B.MSS_ITEMCODE , B.MSS_TRAN_DATE , B.MSS_TRAN_TYPE , B.MSS_REF_NO , B.MSS_TRANS_QTY , B.MSS_FREE_QTY , B.MSS_PUR_RATE , B.MSS_SELLING , B.MSS_TAG , B.MSS_BNO , B.MSS_CAT1 , B.MSS_CAT2 , B.MSS_CAT3 , B.MSS_CAT4 , B.MSS_CAT5 , B.MSS_CAT6 , B.MSS_CAT7 , B.MSS_CAT8 , B.MSS_CAT9 , B.MSS_CAT10 , B.MSS_compid , B.MSS_diviid , B.MSS_locaid , B.TS , B.MSS_BAGS )
    VALUES (E.RETAIL_OUTLET_ID , E.mss_id , E.MSS_ITEMCODE , E.MSS_TRAN_DATE , E.MSS_TRAN_TYPE , E.MSS_REF_NO , E.MSS_TRANS_QTY , E.MSS_FREE_QTY , E.MSS_PUR_RATE , E.MSS_SELLING , E.MSS_TAG , E.MSS_BNO , E.MSS_CAT1 , E.MSS_CAT2 , E.MSS_CAT3 , E.MSS_CAT4 , E.MSS_CAT5 , E.MSS_CAT6 , E.MSS_CAT7 , E.MSS_CAT8 , E.MSS_CAT9 , E.MSS_CAT10 , E.MSS_compid , E.MSS_diviid , E.MSS_locaid , E.TS , E.MSS_BAGS )

    Hi
    if i re rerun the merge qry once again, the missing records inserted into REAL.AThat's exactly what you would expect. Your SQL will insert into REAL.med_stock_sales any records that are in the TEMP table but not in the REAL table - assuming the primary key is (RETAIL_OUTLET_ID, MSS_ID). So if you delete records from REAL, they will keep being repopulated from TEMP - and matching records in REAL will be updated from TEMP
    If you want to be able to delete records from REAL without this happening, you have a couple of options:
    1) when you delete from REAL, also delete from TEMP (eg using a trigger). This is simplest.
    2) when you delete from REAL, don't actually delete, just update a DELETED_YN flag
    3) when you delete from REAL, add the primary key to a DELETED_STOCK table. Then change your merge to exclude "deleted" records
    MERGE INTO REAL.med_stock_sales B
    USING (
    SELECT 1 AS RETAIL_OUTLET_ID,mss_id,MSS_ITEMCODE
       ,MSS_TRAN_DATE,MSS_TRAN_TYPE,MSS_REF_NO,MSS_TRANS_QTY,MSS_FREE_QTY
       ,MSS_PUR_RATE,MSS_SELLING,MSS_TAG,MSS_BNO
       ,MSS_CAT1,MSS_CAT2,MSS_CAT3,MSS_CAT4,MSS_CAT5,MSS_CAT6,MSS_CAT7,MSS_CAT8,MSS_CAT9,MSS_CAT10
       ,MSS_compid,MSS_diviid,MSS_locaid,TS,MSS_BAGS
    FROM TMP.med_stock_sales ss
    WHERE not exists (
        SELECT 1 FROM REAL.DELETED_STOCK ds
        WHERE ds.RETAIL_OUTLET_ID = ss.RETAIL_OUTLET_ID AND ds.MSS_ID = ss.mss_id
    ) E
    ON (B.RETAIL_OUTLET_ID = E.RETAIL_OUTLET_ID AND B.MSS_ID = E.mss_id )
    WHEN MATCHED THEN ...Hope that helps
    Regards Nigel

  • I keep getting this message and PSCC will not open:Unable to start your subscription for Adobe Photoshop CC.  I keep trying again with no results.  I am on automatic pay system.  This should not happen.

    I keep getting this message and PSCC will not open:Unable to start your subscription for Adobe Photoshop CC.  I keep trying again with no results.  I am on automatic pay system.  This should not happen.
    I had it open a few minutes ago.  Closed it and went to reopen to no avail. How can I open and continue to work?

    Does your Cloud subscription properly show on your account page?
    If you have more than one email, are you sure you are using the correct Adobe ID?
    https://www.adobe.com/account.html for subscriptions on your Adobe page
    If yes
    Some general information for a Cloud subscription
    Cloud programs do not use serial numbers... you log in to your paid Cloud account to download & install & activate... you MAY need to log out of the Cloud and restart your computer and log back in to the Cloud for things to work
    Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
    -Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
    -ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp
    If no
    This is an open forum, not Adobe support... you need Adobe staff to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • When we click on the copy botton record with same name should not be saved

    Hi,
    Copy button will copy the record with the same name and will save it.our requirement is when we click on the copy botton ,record with same name should not be saved
    we are performing this task in custom object 12 and exposed Opportunity Name in the layout.
    Records with same Opportunity Name should not save ..when we copy the record
    Can we perform any field validation on Opportunity Name field?
    Please help
    please email me @ [email protected]
    Thanks
    Srinivas Merugu

    Opportunities that are assoicated to the same account cannot have the same name. You cannot make this unique for your whole instance. The only way that you could do this would be to create a webservice application that checks this before you save the record.
    What about defaulting the name each time this could make the record unique?

  • JWSDP1.5: wscompile error: "(should not happen): tie.generator.002

    Hi all,
    I'm working with a doc/lit webservice; I have a WSDL and I'm attempting to generate Java artefacts with wscompile. I'm using JWSDP1.5. I've had a range of errors (I'm updating an old WSDL for the Tentative Hold Protocol, see http://www.w3.org/TR/tenthold-2/). The latest, though, is problematic. The final error message is:
    error: generator error: internal error (should not happen): tie.generator.002I have included the full output from wscompile at the end of this posting; I'll post the full WSDL in a reply. Any advice would be much appreciated!
    Cheers,
    --Tim West
    Full output (from wscompile Ant task) - added linebreaks for readability
    Buildfile: C:\common\eclipse-projects\thp\build.xml
    wscompile-init:
    ANEW-generate-server-binding:
    [wscompile] command line: wscompile -d C:\common\eclipse-projects\thp\zant-build \
    -features:documentliteral,wsi -g -gen:server -keep -verbose \
    C:\common\eclipse-projects\thp\server-wscompile-config.xml -classpath (path omitted for readability)
    [wscompile] [CustomClassGenerator: generating JavaClass for: userDefinedBody]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdRequestHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdHeader]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdRequestAckHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdModifyRequestHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdModifyResponseChoiceHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdModifyGrantHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdGrantHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdModifyDenialHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdDenialHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdCancellationRequestHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdCancellationResponseHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdStatusQueryHdr]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdStatusResponseBody]
    [wscompile] [CustomClassGenerator: generating JavaClass for: statusStructure]
    [wscompile] [CustomClassGenerator: generating JavaClass for: holdStatusResponseHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: userDefinedBody]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdHeader]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdRequestHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdRequestAckHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdModifyRequestHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdGrantHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdModifyGrantHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdDenialHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdModifyDenialHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdModifyResponseChoiceHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdCancellationRequestHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdCancellationResponseHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdStatusQueryHdr]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: statusStructure]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdStatusResponseBody]
    [wscompile] [LiteralObjectSerializerGenerator: writing  serializer/deserializer for: holdStatusResponseHdr]
    [wscompile] error: generator error: internal error (should not happen): tie.generator.002
    BUILD FAILED: C:\common\eclipse-projects\thp\build.xml:342: wscompile failed
    Total time: 2 seconds

    Hi again,
    The offending WSDL is below. I should add that I Googled this and couldn't find anything useful. Axis is happy with the WSDL, as is the validator at http://www.soapclient.com/SoapTools.html (though I'm not sure of its quality). I'm now downloading IBM Websphere 6 to see how that goes.
    Thanks again,
    -Tim West
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
        name="TentativeHold"
        targetNamespace="http://www.w3.org/2001/08/thp/definitions"
        xmlns:tns="http://www.w3.org/2001/08/thp/definitions"
        xmlns:holdSchema="http://www.w3.org/2001/08/thp/schemas"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns="http://schemas.xmlsoap.org/wsdl/">
      <types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema"
            xmlns:holdSchema="http://www.w3.org/2001/08/thp/schemas"
            targetNamespace="http://www.w3.org/2001/08/thp/schemas">
          <!-- =================================================================== -->
          <!-- Item - holdHeader -->
          <!-- Note - This information is required in all the Tentative Hold Protocol
                      communications. -->
          <!-- Fields- holdID - UUID. -->
          <!--             customerID - account number or other identifier -->
          <!--             replyTo - could be a unique locator such as a URI or an
                              email address depending on the communication protocol
                              to be used. -->
          <!-- comment - space for trading partner defined info. -->
          <!-- =================================================================== -->
          <complexType name="holdHeader">
            <sequence>
              <element name="holdID" type="int"/>
              <element name="customerID" type="string"/>
              <element name="replyTo" type="string"/>
              <element name="comment" type="string"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - userDefinedBody -->
          <!-- Note - This will carry any domain-specific information  (e.g., product
                ID and quantity). An implementation shall probably have many
                different userDefinedBody's (one for holdRequest, holdRequestAck,
                ...). This body is used in all messages. -->
          <!-- Fields - Trading partner to trading partner specific or an agreed
             - standard (e.g., RosettaNet PIP). -->
          <!-- =================================================================== -->
            <!-- TIM: Just junk here for now, must fix later -->
          <complexType name="userDefinedBody">
            <sequence>
              <element name="someRequestField" type="string"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdRequestHdr -->
          <!-- Note - Specifies the Tentative Hold Protocol header for messages
             - requesting a tentative hold. -->
          <!-- Fields - Same as holdHeader -->
          <!-- =================================================================== -->
          <complexType name="holdRequestHdr">
            <sequence>
              <element name="baseHeader" type="holdSchema:holdHeader"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdRequestAckHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader + timeUntilResponse - a indication of the time it
             - will take the resource provider to process the request. -->
          <!-- =================================================================== -->
          <complexType name="holdRequestAckHdr">
            <sequence>
              <element name="baseHeader" type="holdSchema:holdHeader"/>
              <element name="timeUntilResponse" type="duration"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdGrantHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader + holdDuration - the agreed to length of the hold
             - on the resource requested. -->
          <!-- =================================================================== -->
          <complexType name="holdGrantHdr">
            <sequence>
              <element name="baseHeader" type="holdSchema:holdHeader"/>
              <element name="holdDuration" type="duration"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdDenialHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader + reason - a description of the reason for the
             - denial. The implementation may choose to use reason codes or just
             - textual descriptions. -->
          <!-- =================================================================== -->
          <complexType name="holdDenialHdr">
            <sequence>
              <element name="baseHeader" type="holdSchema:holdHeader"/>
              <element name="reason" type="string"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdModifyRequestHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader -->
          <!-- =================================================================== -->
          <complexType name="holdModifyRequestHdr">
            <sequence>
              <element name="modifiedHoldRequest" type="holdSchema:holdHeader"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdModifyGrantHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader + holdDuration - the agreed to length of the hold
             - on the resource requested. -->
          <!-- =================================================================== -->
          <complexType name="holdModifyGrantHdr">
            <sequence>
              <element name="modifiedHoldRequest" type="holdSchema:holdGrantHdr"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdModifyDenialHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader + reason - a description of the reason for the denial.
             - The implementation may choose to use reason codes or just textual
             - descriptions.-->
          <!-- =================================================================== -->
          <complexType name="holdModifyDenialHdr">
            <sequence>
              <element name="modifiedHoldRequest" type="holdSchema:holdDenialHdr"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdModifyResponseChoiceHdr -->
          <!-- Note - The use of a single type for this response was to facilitate a
             - synchronous request/response for the modify request without preventing
             - asynchronous.-->
          <!-- Fields - Either holdModifyGrantHdr or holdModifyDenialHdr -->
          <!-- =================================================================== -->
          <!-- TIM: JWSDP does not support xsd:choice, so I'm turning this into a sequence.
             -      The implementor is now responsible for ensuring exactly one of these
                    is present.
            -->
          <complexType name="holdModifyResponseChoiceHdr">
            <sequence>
              <element name="grant" type="holdSchema:holdModifyGrantHdr"/>
              <element name="deny" type="holdSchema:holdModifyDenialHdr"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdCancellationRequestHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader + customerReason - a description of or a code for
             - the reason why the hold is being cancelled. -->
          <!-- =================================================================== -->
          <complexType name="holdCancellationRequestHdr">
            <sequence>
              <element name="customerHold" type="holdSchema:holdHeader"/>
              <element name="customerReason" type="string"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdCancellationResponseHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader -->
          <!-- =================================================================== -->
          <complexType name="holdCancellationResponseHdr">
            <sequence>
              <element name="customerHold" type="holdSchema:holdHeader"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdCancellationNotificationHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader + cancellationReason - a description of or a code
             -for the reason the vendor is cancelling the hold. -->
          <!-- =================================================================== -->
          <complexType name="holdCancellationNotificationHdr">
            <sequence>
              <element name="customerHold" type="holdSchema:holdHeader"/>
              <element name="cancellationReason" type="string"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdStatusQueryHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader -->
          <!-- =================================================================== -->
          <complexType name="holdStatusQueryHdr">
            <sequence>
              <element name="customerHold" type="holdSchema:holdHeader"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdStatusResponseHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader -->
          <!-- =================================================================== -->
          <complexType name="holdStatusResponseHdr">
            <sequence>
              <element name="baseHeader" type="holdSchema:holdHeader"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - statusStructure -->
          <!-- Note - -->
          <!-- Fields - holdHeader + holdState - a description of the state of the hold.
             - Possible values currently defined are: responding, in process, active,
             - and inactive. The definition is left open (not restricted) for future or
             - user refinement of the useful values. -->
          <!-- =================================================================== -->
          <complexType name="statusStructure">
            <sequence>
              <element name="itemHeader" type="holdSchema:holdHeader"/>
              <element name="holdState" type="string"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdStatusResponseBody -->
          <!-- Note - -->
          <!-- Fields - holdItemsCount - the number of holds matching the holdStatusQuery. -->
          <!--             itemList - The header and state of the holds that match the query. -->
          <!-- =================================================================== -->
          <complexType name="holdStatusResponseBody">
            <sequence>
              <element name="holdItemsCount" type="int"/>
              <element name="itemList" type="holdSchema:statusStructure" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
          </complexType>
          <!-- =================================================================== -->
          <!-- Item - holdErrorHdr -->
          <!-- Note - -->
          <!-- Fields - holdHeader -->
          <!-- =================================================================== -->
          <!-- TIM: Combined old "holdErrorHdr" and "holdErrorBody" as a fault must
             - have only a single part (see WSDL sec 3.6).
            -->
          <complexType name="holdError">
            <sequence>
              <element name="baseHeader" type="holdSchema:holdHeader"/>
              <element name="holdErrorType" type="int"/>
              <element name="holdErrorDesc" type="string"/>
            </sequence>
          </complexType>
          <!-- TIM: To use doc/lit, we need <element> tags here to reference from WSDL -->
          <element name="userDefinedBody" type="holdSchema:userDefinedBody"/>
          <element name="holdRequestHdr" type="holdSchema:holdRequestHdr"/>
          <element name="holdRequestAckHdr" type="holdSchema:holdRequestAckHdr"/>
          <element name="holdGrantHdr" type="holdSchema:holdGrantHdr"/>
          <element name="holdDenialHdr" type="holdSchema:holdDenialHdr"/>
          <element name="holdModifyRequestHdr" type="holdSchema:holdModifyRequestHdr"/>
          <element name="holdModifyGrantHdr" type="holdSchema:holdModifyGrantHdr"/>
          <element name="holdModifyDenialHdr" type="holdSchema:holdModifyDenialHdr"/>
          <element name="holdModifyResponseChoiceHdr" type="holdSchema:holdModifyResponseChoiceHdr"/>
          <element name="holdCancellationRequestHdr" type="holdSchema:holdCancellationRequestHdr"/>
          <element name="holdCancellationResponseHdr" type="holdSchema:holdCancellationResponseHdr"/>
          <element name="holdCancellationNotificationHdr" type="holdSchema:holdCancellationNotificationHdr"/>
          <element name="holdStatusQueryHdr" type="holdSchema:holdStatusQueryHdr"/>
          <element name="holdStatusResponseHdr" type="holdSchema:holdStatusResponseHdr"/>
          <element name="holdStatusResponseBody" type="holdSchema:holdStatusResponseBody"/>
          <element name="holdError" type="holdSchema:holdError"/>
        </schema>
      </types>
      <message name="HoldRequest">
        <part name="headerHoldRequest" element="holdSchema:holdRequestHdr"/>
        <part name="bodyHoldRequest" element="holdSchema:userDefinedBody"/>
      </message>
      <message name="HoldRequestAck">
        <part name="headerHoldRequestAck" element="holdSchema:holdRequestAckHdr"/>
        <part name="bodyHoldRequestAck" element="holdSchema:userDefinedBody"/>
      </message>
      <message name="HoldGrantResponse">
        <part name="headerHoldGrantResponse" element="holdSchema:holdGrantHdr"/>
        <part name="bodyHoldGrantResponse" element="holdSchema:userDefinedBody"/>
      </message>
      <message name="HoldDenialResponse">
        <part name="headerHoldDenialResponse" element="holdSchema:holdDenialHdr"/>
        <part name="bodyHoldDenialResponse" element="holdSchema:userDefinedBody"/>
      </message>
      <message name="HoldModifyRequest">
        <part name="headerHoldModifyRequest" element="holdSchema:holdModifyRequestHdr"/>
        <part name="bodyHoldModifyRequest" element="holdSchema:userDefinedBody"/>
      </message>
      <message name="HoldModifyResponse">
        <part name="headerHoldModifyResponse" element="holdSchema:holdModifyResponseChoiceHdr"/>
        <part name="bodyHoldModifyResponse" element="holdSchema:userDefinedBody"/>
      </message>
      <message name="HoldCancellationRequest">
        <part name="headerHoldCancellationRequest" element="holdSchema:holdCancellationRequestHdr"/>
        <part name="bodyHoldCancellationRequest" element="holdSchema:userDefinedBody"/>
      </message>
      <message name="HoldCancellationResponse">
        <part name="headerHoldCancellationResponse" element="holdSchema:holdCancellationResponseHdr"/>
        <part name="bodyHoldCancellationResponse" element="holdSchema:userDefinedBody"/>
      </message>
      <message name="HoldCancellationNotification">
        <part name="header" element="holdSchema:holdCancellationNotificationHdr"/>
        <part name="body" element="holdSchema:userDefinedBody"/>
      </message>
      <message name="HoldStatusQueryRequest">
        <part name="headerHoldStatusQueryRequest" element="holdSchema:holdStatusQueryHdr"/>
        <part name="bodyHoldStatusQueryRequest" element="holdSchema:userDefinedBody"/>
      </message>
      <message name="HoldStatusResponse">
        <part name="headerHoldStatusResponse" element="holdSchema:holdStatusResponseHdr"/>
        <part name="bodyHoldStatusResponse" element="holdSchema:holdStatusResponseBody"/>
      </message>
      <message name="HoldErrorResponse">
        <!-- TIM: altered to be consistent with updated schema - the
           - fault body must have only one part
          -->
        <part name="bodyHoldErrorResponse" element="holdSchema:holdError"/>
      </message>
      <portType name="TentativeHoldServicePortType">
        <operation name="InitiateHold">
          <input message="tns:HoldRequest"/>
          <output message="tns:HoldRequestAck"/>
          <!--
          <fault name="HoldErrorResponse" message="tns:HoldErrorResponse"/>
          -->
        </operation>
        <operation name="InitiateHoldModify">
          <input message="tns:HoldModifyRequest"/>
          <output message="tns:HoldModifyResponse"/>
          <!--
          <fault name="HoldErrorResponse" message="tns:HoldErrorResponse"/>
          -->
        </operation>
        <operation name="InitiateHoldCancellation">
          <input message="tns:HoldCancellationRequest"/>
          <output message="tns:HoldCancellationResponse"/>
          <!--
          <fault name="HoldErrorResponse" message="tns:HoldErrorResponse"/>
          -->
        </operation>
        <operation name="InitiateStatusQuery">
          <input message="tns:HoldStatusQueryRequest"/>
          <output message="tns:HoldStatusResponse"/>
          <!--
          <fault name="HoldErrorResponse" message="tns:HoldErrorResponse"/>
          -->
        </operation>
      </portType>
      <portType name="TentativeHoldNotificationServicePortType">
        <operation name="NotifyHoldGranted">
          <output message="tns:HoldGrantResponse"/>
        </operation>
        <operation name="NotifyHoldDenied">
          <output message="tns:HoldDenialResponse"/>
        </operation>
        <operation name="NotifyServerHoldCancellation">
          <output message="tns:HoldCancellationNotification"/>
        </operation>
      </portType>
      <binding name="TentativeHoldSoapBinding" type="tns:TentativeHoldServicePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
          <operation name="InitiateHold">
            <soap:operation soapAction="http://www.w3.org/2001/08/thp/InitiateHold"/>
            <input>
              <soap:body use="literal"/>
            </input>
            <output>
              <soap:body use="literal"/>
            </output>
            <!--
            <fault name="HoldErrorResponse">
              <soap:fault name="HoldErrorResponse" use="literal"/>
            </fault>
            -->
          </operation>
          <operation name="InitiateHoldModify">
            <soap:operation soapAction="http://www.w3.org/2001/08/thp/InitiateHoldModify"/>
            <input>
              <soap:body use="literal"/>
            </input>
            <output>
              <soap:body use="literal"/>
            </output>
            <!--
            <fault name="HoldErrorResponse">
              <soap:fault name="HoldErrorResponse" use="literal"/>
            </fault>
            -->
          </operation>
          <operation name="InitiateHoldCancellation">
            <soap:operation soapAction="http://www.w3.org/2001/08/thp/InitiateHoldCancellation"/>
            <input>
              <soap:body use="literal"/>
            </input>
            <output>
              <soap:body use="literal"/>
            </output>
            <!--
            <fault name="HoldErrorResponse">
              <soap:fault name="HoldErrorResponse" use="literal"/>
            </fault>
            -->
          </operation>
          <operation name="InitiateStatusQuery">
            <soap:operation soapAction="http://www.w3.org/2001/08/thp/InitiateStatusQuery"/>
            <input>
              <soap:body use="literal"/>
            </input>
            <output>
              <soap:body use="literal"/>
            </output>
            <!--
            <fault name="HoldErrorResponse">
              <soap:fault name="HoldErrorResponse" use="literal"/>
            </fault>
            -->
          </operation>
      </binding>
      <service name="TentativeHoldService">
        <documentation> Mythical Tentative Hold Web service</documentation>
        <port name="TentativeHoldPort" binding="tns:TentativeHoldSoapBinding">
          <soap:address location="http://xyz.com/tentativeHold/"/>
        </port>
      </service>
      <service name="TentativeHoldNotificationService">
        <port name="NotificationPort" binding="tns:TentativeHoldSoapBinding">
          <soap:address location="http://xyz.com/tentativeHoldNotification"/>
        </port>
      </service>
    </definitions>

  • Update should not happen in the name of WF-BATCH

    Hi All,
    I have a requirement to change the WF-BATCH to the other user id.
    The task completion or update should not happen in the name of WF-BATCH, instead it should happen with the name of the other user id.
    Please can anybody suggest on this..
    Thanks and Best Regards,
    Sushmitha

    Hello Sushmitha,
    Like I said, it is only working if a previous step was a dialog step for the same user.
    Then when all steps have advance with dialog it will automatically execute the "background" step (which is now dialog).
    If the "background" step is the first to be executed then this scenario does not work.
    It will only work if the agent has a previous work item AND is the one you want as the changed_by user.
    A work around would be to either
    a) check what the method does. If it executes a FM and if that FM has a parameter for changed by you can create a new method where you pass the changed_by user
    b) check if a bapi/fm exists which allows you to change the user
    c) create a program to execute the same logic as the method. Now you must create a new method where you can schedule this program as a background job with another user as the person who executes it.
    Kind regards, Rob Dielemans

  • Should not happen unless default context failed to deploy

              Can somebody please throw some light on this error?
              <Mar 5, 2001 10:07:26 AM EST> <Error> <HTTP> <HttpServer5173817,null
              default ctx,POSDev01) found no context for "GET /classes/ringout_statelessSession3@/RingoutSessionBeanHomeImpl_WLStub.class
              HTTP/1.0". This should not happen unless the default context failed
              to deploy.>
              Myself and lot of other people in my team are getting this error
              when using beans in a cluster.
              I am getting this error consistently whenever I make some code
              changes in my bean class (not interface changes) and redeploy it
              and try to lookup through a stand-alone client.
              The only way I could find to overcome this problem is:
              1) edit config.xml to remove the Application element completely
              corresponding to the bean
              2) remove jar files from the applications directory
              3) re-deploy and run the client again.
              Thanks a lot
              Kiran Ganuthula
              

    Partly it could be WLS problem also. Under any circumstances default webapp should be able
              to deploy. I have seen somebody else also reported the same problem. The current problem is
              if you delete anything from apps dir, the corresponding entry is not being deleted from config.xml
              So next time when you boot the server, it tries to deploy the webapp and eventually it fails.
              I 'm not sure if this is the situation in your case.
              In anycase somehow Targets tag is not being picking up. That's why i asked you add
              "WebServers" tag. I think we have done some major changes in SP1, to make sure that
              default webapp deploys all the times.
              If you still have problems, post it to servlet or management group, we will discuss there.
              Kumar
              Kiran G wrote:
              > I edited the config.xml ONLY after getting this error. And, it worked.
              >
              > BTW, can you please be more specific about the changes to config.xml
              > to solve the problem?
              > If possible, can you give pertinent portion(s) of config.xml, highlighting
              > the changes.
              >
              > Thanks
              > Kiran G
              >
              > Kumar Allamraju <[email protected]> wrote:
              > >
              > >
              > >It appears your "default webapp" failed to deploy.
              > >Did you messed up with the config.xml?.
              > >
              > >Add the following to your default webapp tag?
              > >
              > ><Application
              > > Deployed="true"
              > > Name="DefaultWebApp_vindev1"
              > > Path="./config/vindev1/applications"
              > > >
              > > <WebAppComponent
              > > Name="DefaultWebApp_vindev1"
              > > Targets="vindev1"
              > > WebServers="vindev1"
              > > URI="DefaultWebApp_vindev1"
              > > />
              > > </Application>
              > >
              > >
              > >Here vindev1 is my domain's name..
              > >
              > >BTW, this is not a clustering question. So you better
              > >post it to servlet newsgroup where you get much
              > >better answers..
              > >
              > >Kiran G wrote:
              > >
              > >> I forgot to give these details about the problem.
              > >> I am running this cluster using WebLogic 6.0 on a SUN
              > >sparc machine.
              > >>
              > >> The error text given in my original posting appears
              > >in the managed
              > >> weblogic server's log. The exception that the client
              > >receives while
              > >> lookup is :
              > >>
              > >> javax.naming.CommunicationException. Root exception
              > >is java.rmi.UnmarshalException:
              > >> failed to unmarshal class java.lang.Object; nested exception
              > >is:
              > >> java.lang.ClassNotFoundException: RingoutSessionBeanHomeImpl_WLStub
              > >> java.lang.ClassNotFoundException: RingoutSessionBeanHomeImpl_WLStub
              > >>
              > >> "Kiran G" <[email protected]> wrote:
              > >> >
              > >> >Can somebody please throw some light on this error?
              > >> >
              > >> ><Mar 5, 2001 10:07:26 AM EST> <Error> <HTTP> <HttpServer5173817,null
              > >> >default ctx,POSDev01) found no context for "GET /classes/ringout_statelessSession3@/RingoutSessionBeanHomeImpl_WLStub.class
              > >> >HTTP/1.0". This should not happen unless the default
              > >context
              > >> >failed
              > >> >to deploy.>
              > >> >
              > >> >Myself and lot of other people in my team are getting
              > >> >this error
              > >> >when using beans in a cluster.
              > >> >
              > >> >I am getting this error consistently whenever I make
              > >some
              > >> >code
              > >> >changes in my bean class (not interface changes) and
              > >redeploy
              > >> >it
              > >> >and try to lookup through a stand-alone client.
              > >> >
              > >> >The only way I could find to overcome this problem
              > >is:
              > >> >1) edit config.xml to remove the Application element
              > >completely
              > >> >corresponding to the bean
              > >> >2) remove jar files from the applications directory
              > >> >3) re-deploy and run the client again.
              > >> >
              > >> >Thanks a lot
              > >> >Kiran Ganuthula
              > >> >
              > >> >
              > >> >
              > >> >
              > >> >
              > >
              > >
              > ><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
              > ><html>
              > >It appears your "default webapp" failed to deploy.
              > ><br>Did you messed up with the config.xml?.
              > ><p>Add the following to your default webapp tag?
              > ><p><Application
              > ><br> Deployed="true"
              > ><br> Name="DefaultWebApp_vindev1"
              > ><br> Path="./config/vindev1/applications"
              > ><br> >
              > ><br> <WebAppComponent
              > ><br> Name="DefaultWebApp_vindev1"
              > ><br> Targets="vindev1"
              > ><br> <b><font color="#CC0000">
              > >WebServers="vindev1"</font></b>
              > ><br> URI="DefaultWebApp_vindev1"
              > ><br> />
              > ><br> </Application>
              > ><br>
              > ><p>Here vindev1 is my domain's name..
              > ><br><br>
              > >BTW, this is not a clustering question. So you better
              > >post it to servlet
              > >newsgroup where you get much
              > ><br>better answers..
              > ><p>Kiran G wrote:
              > ><blockquote TYPE=CITE>I forgot to give these details about
              > >the problem.
              > ><br>I am running this cluster using WebLogic 6.0 on a
              > >SUN sparc machine.
              > ><p>The error text given in my original posting appears
              > >in the managed
              > ><br>weblogic server's log. The exception that the client
              > >receives while
              > ><br>lookup is :
              > ><p>javax.naming.CommunicationException. Root exception
              > >is java.rmi.UnmarshalException:
              > ><br>failed to unmarshal class java.lang.Object; nested
              > >exception is:
              > ><br> java.lang.ClassNotFoundException:
              > >RingoutSessionBeanHomeImpl_WLStub
              > ><br>java.lang.ClassNotFoundException: RingoutSessionBeanHomeImpl_WLStub
              > ><p>"Kiran G" <[email protected]> wrote:
              > ><br>>
              > ><br>>Can somebody please throw some light on this error?
              > ><br>>
              > ><br>><Mar 5, 2001 10:07:26 AM EST> <Error> <HTTP>
              > ><HttpServer5173817,null
              > ><br>>default ctx,POSDev01) found no context for "GET /classes/ringout_statelessSession3@/RingoutSessionBeanHomeImpl_WLStub.class
              > ><br>>HTTP/1.0". This should not happen unless the default
              > >context
              > ><br>>failed
              > ><br>>to deploy.>
              > ><br>>
              > ><br>>Myself and lot of other people in my team are getting
              > ><br>>this error
              > ><br>>when using beans in a cluster.
              > ><br>>
              > ><br>>I am getting this error consistently whenever I make
              > >some
              > ><br>>code
              > ><br>>changes in my bean class (not interface changes)
              > >and redeploy
              > ><br>>it
              > ><br>>and try to lookup through a stand-alone client.
              > ><br>>
              > ><br>>The only way I could find to overcome this problem
              > >is:
              > ><br>>1) edit config.xml to remove the Application element
              > >completely
              > ><br>>corresponding to the bean
              > ><br>>2) remove jar files from the applications directory
              > ><br>>3) re-deploy and run the client again.
              > ><br>>
              > ><br>>Thanks a lot
              > ><br>>Kiran Ganuthula
              > ><br>>
              > ><br>>
              > ><br>>
              > ><br>>
              > ><br>></blockquote>
              > ></html>
              > >
              > >
              [att1.html]
              

  • Firefox has detected the server is redirecting the request for this address in a way that will never complete. This is happening in my email program with comcast but does not happen with IE e

    Question
    firefox has detected the server is redirecting the request for this address in a way that will never complete. This is happening in my email program with comcast but does not happen with IE e edit

    Thanks to cor-el for the suggestion given in the link. Sadly I have to report:
    1) It is not a bookmark problem and it makes no difference whether I put
    www.adobe.com or 192.150.18.117 in the address bar.
    2) Cookies are allowed and there are no exceptions set
    3) All cookies have been deleted
    4) network.http.sendRefererHeader is already set to 2
    That deals with the items in the linked document.
    Additional information:
    5) I can get into the adobe site from a clean "in memory" installation of PuppyLinux using Seamonkey using the same router and dhcp setup.
    6) un-installing all Mozilla products - rebooting and re-installing makes no difference even when I remove the mozilla folder from docs&settings.
    so as I said in previous post (as annonymous) not a lot makes sense.
    Bear in mind that I have no problem running tracert in a command window
    Tracing route to www.adobe.com [192.150.18.117] over a maximum of 30 hops:
    1 11 ms 10 ms 9 ms 10.0.0.1
    2 13 ms 12 ms 11 ms glo-2-dsl.as9105.net [212.74.111.191]
    3 13 ms 12 ms 11 ms ge1-2-27.glo0.as9105.net [212.74.106.106]
    4 14 ms 12 ms 13 ms pos0-0.bri1.as9105.net [212.74.108.162]
    5 17 ms 16 ms 17 ms ge0-0-0.he-lon0.as9105.net [212.74.109.14]
    6 17 ms 17 ms 16 ms 10.72.11.75
    7 16 ms 17 ms 17 ms xe-0-3-0-10.lon20.ip4.tinet.net [213.200.77.177]
    8 91 ms 92 ms 99 ms xe-5-1-0.was12.ip4.tinet.net [89.149.184.34]
    9 92 ms 92 ms 93 ms xe-0.equinix.asbnva01.us.bb.gin.ntt.net [206.223.115.12]
    10 162 ms 170 ms 162 ms as-3.r20.snjsca04.us.bb.gin.ntt.net [129.250.2.167]
    11 166 ms 166 ms 165 ms ae-1.r07.snjsca04.us.bb.gin.ntt.net [129.250.5.53]
    12 162 ms 163 ms 161 ms xe-0-2-0-3.r07.snjsca04.us.ce.gin.ntt.net [128.241.219.86]
    13 166 ms 163 ms 161 ms 192.150.18.11
    14 166 ms 166 ms 165 ms www.adobe.com [192.150.18.117]
    Trace complete.
    and I can ping the site.
    so where now ?

  • PR to PO conversion should not happen in case of expired pricing condition in Info Record

    Hi All,
    Issue – PR to PO conversion should not happen in case of expired pricing condition in Info Record.
    In case of creation of PR/ PO, the Price is pulled out from the Info Record of the material. In our case if the Price in the Info Record is expired, it should give the Error Message & should pick the Price from the last PO created for the same combination of Plant, Vendor, Company code.
    Request you to please let us know if there is any way out.
    Regards,
    Karthick.V

    Hi,
    As per your requirement if info record price is not valid and in auto PO creation from PR, price should get picked from last PO, this is standard behavior and it will happen.
    If you check in customization MM - Purchasing - Environment Data - Define Default Values for Buyers -Settings for default values
    Default values if you check under price adoption , it has to be Always copy ( copying of conditions from last PO) . Pls check

  • Reversal of a reversed document should not happen

    Dears
    In our system, user is able to reverse an already reversed document, which should not happen.
    In the Message Control F5 361, nothing has been changed to make this warning or information.
    Hence the standard is 'error'. But why the system is allowing the reversal of  a reversed document then ?
    Could you please provide inputs ?

    Hello Nikitha,
    Please create one validation according to your requirement. PFB the relevant T codes to create validation.
    GGB0 - Create Validation
    OB28 - Activation of FI validations
    GCT9 - Transport: Validations
    Please let us know do you still require any more information
    Thanks & Regards,
    Lakshmi S

  • Order is showing in T code# VKM3, which should not happen.

    Client using automatic credit check. Customer maintained credit master data for which system is doing credit check.  As per client requirement the future orders created for this customer system should not do a credit check.
    For this we have created a new risk category and in the T code #ova8 , unchecked all the settings for this combination of credit control area,  risk category  and credit group. We maintained the new risk category in the credit master data of that customer, and created a new order and found that the system is not doing any credit check and system is allowing for the billing. However when but this order is showing in T code# VKM3, which should not happen.

    Hi- SAP always shows orders in VKM3 even though they do not have credit hold... SAP lists all orders which have item cat deliver or billing relevant..
    Reg
    Siva

  • Purchase order printout should not happen without release of PO

    I have made all the settings for PO release strategy and printout settings. But printout can be taken even before final release. I checked the settings and this printout should not happen before release. Please help me out.
    Thanks in advance.

    Hi,
    Thank ypu for your reply. PO was not released. Printout wa snot able to be taken in ME9F. But Printout can be taken using Print preview in Tcode ME22N. Can we avoid such printing using Print preview option.
    Thank you in advance

  • For the Primary Key Field with the combination of other fields

    Hai
    I Have a problem in creating trigger for the following
    the problem goes like this..
    i have a table with the fields
    fld1 (varchar2(6) fld2(varchar2(20)) fld3 (number)
    the fld1 is a primary key.
    here in this table i am inserting the values ..
    At the time of inserting the fld1 should get the part value of fld2
    say if new value for fld2 is "SAM & CO" then
    it should take the first letter and then followed by the sequence..
    i.e., the fld1 is the combination of a
    letter + firt letter of the fld2 + sequence
    fld1 fld2 fld3
    CS001 SSSSS 324234
    CP001 PPPPP 5345435
    CS002 SSSS 53543543
    Here the Sequence should vary depending on the alphabet of the fld1
    if P the the Sequence should be the next number of fld1 to P
    i.e.,
    if i add the value like this
    insert into tname(fld2,fld3) values('PQQQQ',34343)
    then it should be inserted as
    CP002 PQQQQ 34343
    I need the solution for this..
    Thanx
    Gaya3
    thanx
    gaya3

    There are not enough details to be sure since you have not provided the mappings. From just the error, it looks like you are using the tableC.tableA_ID field as the foreign key in the ManyToOne relationship to A, but have marked it as insertable=false, writeable=false, meaning that it cannot be updated or used for inserts.
    Either make it writable (set the settings to true), or add another basic mapping/attribute in the entity for TableC that maps to the field which you can use to set when you insert a new tableC entity. A simple example is available at
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/2.0/DerivedIdentifiers
    Best Regards,
    Chris

  • Unable to enforce Primary Key constraint with my code

    Hi Guys
    I have a table that contains 2 columns: code and description (defined as not null). I am using oracle forms 10g, if I inset a new row both the columns: code and description should have data e.g. code: 001 and description: Main Store...
    So on forms I have an on-update trigger on block level that handles the error messages but if the user has to update the description this trigger blocks him because the value for the code i.e. 001 is already on the database but if I remove the piece of code (the first IF block on my code together with a cursor and the entire declaration section)then the primary key constraint is violated: the code is as follows:
    declare
    v_store_code store_types.code%type;
    cursor store_codes is
    select a.code
    from store_types a
    where a.code = :b1.code;
    begin
    open store_codes;
    fetch store_codes into v_store_code;
    if ( store_codes%found ) then
    Message('The Store Code you have entered already exists on the Store_Types table, please enter another code!');
    Message('The Store Code you have entered already exists on the Store_Types table, please enter another code!');
    close store_codes;
    raise form_trigger_failure;
    end if;
    close store_codes;
    if :b1.code is not null and :b1.description is null then
         message('If the Store Code has been captured, then the Store Description must be captured!');
         message('If the Store Code has been captured, then the Store Description must be captured!');
    raise form_trigger_failure;
    end if;
    if :b1.description is not null and :b1.code is null then
         message('If the Store Description has been captured, then the Store code must be captured!');
         message('If the Store Description has been captured, then the Store code must be captured!');
         raise form_trigger_failure;
    end if;
    exception
              when others then
                   message(sqlerrm);
                   raise form_trigger_failure;
    end;
    My main intention here is: the user should be able to update the description field and save the changes without violating primary key on the column: code ...... please help me guys...

    ICM
    Sir as far I could understand , your problem is that your wanna allow the end users to update the Store_description , and Store_code..
    So on forms I have an on-update trigger on block level that handles the error messages but if the user has to update the description this trigger blocks him because the value for the code i.e. 001 is already on the databaseif it's right then why don't you have unique key constraints Store_description?
    alter the tables and apply unique key constraint...
    and no need to write this code
    f :b1.code is not null and :b1.description is null then
    message('If the Store Code has been captured, then the Store Description must be captured!');
    message('If the Store Code has been captured, then the Store Description must be captured!');
    raise form_trigger_failure;
    end if;because as you mentioned
    code and description (defined as not null)if they are already under not null constraints then no need to handle this in coding..
    he/she must be able to change the description and save the changes without affecting the code i.e.:Sir I think updation in records can only be performed when the forms is in query mode e.g execute query, have all/desired records and then make changes
    (1)description is in unique key constraint it can't be duplicated ..
    (2)code is PK it can never be duplicated...
    for this I would suggest you to have a update button on forms , when-button-pressed trigger sets property of block (update_allowed, property_true);
    and check the code of unique key violation code from oracle form's help , when that error code raise up you can show those message
    Message('The Store Code you have entered already exists on the Store_Types table, please enter another code!');
    Message('The Store Code you have entered already exists on the Store_Types table, please enter another code!');I hope it could do something for you
    thanks
    regards:
    usman noshahi

  • ADF BC Primary key generation with SQL Server DB

    Hi,
    I am using ADF 11.1.1.6 to develop a small application that will do some very basic CRUD operations on a SQL Server DB.
    I read through http://www.oracle.com/technetwork/developer-tools/jdev/multidatabaseapp-085183.html before I'm starting to implement the Entity objects.
    This document describes a way to do primary key generation using a table created in the DB and instructs to create an application connection to the Database :
    +2. Create a Connection to the Table+
    In your application, create a database connection named ROWIDAM_DB that points to the database containing your S_ROW_ID table. Alternatively, edit your BC project's properties and add the following Java option to the project's run configuration:
    -Djbo.rowid_am_conn_name= appconnection
    where appconnection is the name of a database connection that points to the S_ROW_ID table.
    My question is how do we do this when we mve to a production environment ?
    Also I'll be interested to hear if anyone has any pointers for developing ADF apps with SQL Server. (gotchas, performance pitfalls etc. )
    -Jeevan
    Upadte : This is SQL Server 2005
    Edited by: Jeevan Joseph on May 2, 2012 9:04 AM

    my apologies to everyone ... This should have been very simple. I just need to provide the config in my AM configuration(bc4j.xml)
    jbo.rowid_am_conn_name* should be set to the connection name you create. For production deployments, theres a similar
    jbo.rowid_am_datasource_name* that should work just fine (though I havent tried if it has any hiccups).
    I'd like to point out one thing though, for whoever might stumble upon this thread and find it useful later on...
    After I did the steps above, everything seemed to work when I tested the app from the AM tester. But when I built a UI for it in ADF Faces, I started getting an exception on Create/CreateInsert :
    java.lang.ClassCastException: com.microsoft.sqlserver.jdbc.SQLServerConnection cannot be cast to oracle.jdbc.OracleConnection
         at oracle.jbo.server.OracleSQLBuilderImpl.setSessionTimeZone(OracleSQLBuilderImpl.java:5533)
         at oracle.jbo.server.DBTransactionImpl.refreshConnectionMetadata(DBTransactionImpl.java:5311)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1194)
         at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6826)
         at oracle.jbo.server.DBTransactionImpl2.connect(DBTransactionImpl2.java:136)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:213)The trouble is that the ADF Faces adf-config.xml overrides the AM configuration. Oracle is the default, and it overrides the SQL flavor I set when initializing the Model project.
    This was not mentioned in the original document probably because ADF faces was out of scope for that document.
    I also found this thread extremely useful, and its what reminded me of the ADF Faces AM config overrides : Re: Locking mode 'optupdate' with SQL92
    Cheers !
    Jeevan

Maybe you are looking for

  • Install on 2 Different Macs?

    Is it ok to install one Retail version of FCE 4 on 2 separate Macs? I use 2 to accomplish many tasks, sometimes multi-tasking, and they are connected via a home LAN. Do I need to Register one, and then the other will just work fine. I got I could not

  • Updating User NetID

    I posted this via google groups and it never showed up.. so at some point, there might be a dupe, but here we are... I'm trying my first foray into GroupWise programming and I'm attempting to update a user's netID, which is essentially the dn of the

  • How do I implement smart print ?

    I need step by step on how to use smart print. Thanks

  • Two sites, two Macs?

    I know you can't edit the same site on two different Macs without a lot of fuss, but is it possible to have two sites on two different Macs both uploading to the same .Mac account? Or will they delete each other when uploading?

  • I keep getting the message install flashplayer when i already installed the latest flash player

    hello please helo me i use windows 7 pro 64 bit and i already install flash player 11 .. shockwave and adobe air also.. but none in vain when people send me video on msn i get this message thats is install flash player.. i have install it like 100 ti