Yet Again, QTP Failure: OUTPUT --> ADD UPDATE
Deskin, Bob
Bob.Deskin at Cognos.COM
Tue Oct 30 08:06:33 CDT 2007
Not knowing the exact data content and record structures make this a
series of guesses.
First off, the message is very specific. You are attempting to add the
same record more than once. The fact that you have only one record in
the subfile may be beside the point since that data will be duplicated
for each record complex.
Saying SORTED does not guarantee a proper sort sequence. QTP believes
you, so if your actual data is not in the proper sequence, results may
not be as expected. Do you get the same results if you use SORT?
I would suggest that you attempt to simplify the request. Your SORTED is
quite complex. Is it really required? There are obviously other
statements in the request.
You know what the linkitem value is that's causing the problem. Run the
input and SORTED statements through QUIZ and select on that value so you
can see how many record complexes are being constructed and what order
they're in.
Bob
________________________________
From: vamsi krishna [mailto:vamsi.coe at gmail.com]
Sent: October 29, 2007 6:11 pm
To: Deskin, Bob
Cc: Guy Werry; powerh-l at lists.sowder.com
Subject: Re: Yet Again, QTP Failure: OUTPUT --> ADD UPDATE
Hello Bob,
Here's the failure extract:
Attempt to add a duplicate value when UNIQUE KEY/INDEX was
specified. [8182]
File: SPOIINP1-UPD
Linkitem: SPOIINP1-KEY
93169029301EURL
Action Taken: Run terminated.
------------------------------------------------------------------------
-------
Records read:
IPWSPRI2_S 11,613
SPOIINP1 5,422
PPMINSCP 5,596
Transactions processed: 8,182
SPOIINP1 5,422
PPMINSCP 5,596
Transactions processed: 8,182
Records processed: Added Updated
Unchanged Deleted
SPOIINP1-UPD 124 4,085
0 0
PPMINSCP-UPD 0 90
4,119 0
IPWSPRI3_S 2 0
0 0
Finished.
And Here's the code part:
ACCESS *$IPWSPRI2_S LINK &
RJ(GM-PART) + &
TEMP-NSC + &
PRIC-LIST + &
CURR-CODE +&
OUTLET_1 TO &
SPOIINP1-KEY OF SPOIINP1 OPTIONAL AND &
RJ(GM-PART) , &
TEMP-NSC , &
PRIC-LIST , &
CURR-CODE TO &
GM-PART , &
NSC-CODE , &
PRIC-LIST-NUM , &
PRIC-CURR OF PPMINSCP OPTIONAL
TEMPORARY TEMP-UNIT INTEGER * 9 SIGNED SIZE 4 BYTES
TEMPORARY TEMP-COST INTEGER * 16 SIGNED SIZE 8 BYTES
TEMPORARY TEMP-VALU INTEGER * 16 SIGNED SIZE 8 BYTES
SORTED ON GM-PART OF IPWSPRI2_S, &
TEMP-NSC OF IPWSPRI2_S, &
PRIC-LIST OF IPWSPRI2_S, &
CURR-CODE OF IPWSPRI2_S, &
OUTLET_1 OF IPWSPRI2_S
ITEM TEMP-UNIT SUBTOTAL PART-QTY RESET AT OUTLET_1
ITEM TEMP-COST SUBTOTAL PLAN-PRIC RESET AT OUTLET_1 ;L0001
ITEM TEMP-VALU SUBTOTAL NET-AMOU-LOC RESET AT OUTLET_1 ;L0001
OUTPUT SPOIINP1 ADD UPDATE ALIAS SPOIINP1-UPD AT OUTLET_1 &
IF RECORD PPMINSCP EXIST
ITEM ................
In the input subfile, there was only one record corresponding to
Unique Key value.
But the data, which was attempted to add, it was exactly the
same record which existed in the file.
So, Is there a possibility that it failed "while adding (unique
key) +updating record with same values" ??
It's just a wild guess :-)
Let me know if you need more details
Regards,
Vamsi
On 10/30/07, Deskin, Bob <Bob.Deskin at cognos.com> wrote:
On an ADD UPDATE, QTP attempts to retrieve during the
initialization phase. If no record is retrieved, it will attempt to add
during the output phase. If a record was retrieved, it will attempt to
update.
Guy's suggestion is one possible (and common) cause of
an add failure. And he's right, sending the code will help us isolate
the problem or at least suggest some very specific possible causes.
Bob
________________________________
From:
powerh-l-bounces+bob.deskin=cognos.com at lists.sowder.com [mailto:
powerh-l-bounces+bob.deskin=cognos.com at lists.sowder.com] On Behalf Of
Guy Werry
Sent: October 29, 2007 3:34 pm
To: powerh-l at lists.sowder.com
Subject: RE: Yet Again, QTP Failure: OUTPUT -->
ADD UPDATE
Vamshi,
I believe that I have had a similar problem when
the input phase returns MORE THAN ONE record complex.
It would be very helpful if you could include a
screen shot of the code and error. That might make it easier to
diagnose.
Thanks,
Guy L. Werry
Senior Systems Analyst
Hudson Bay Mining & Smelting Co., Limited.
________________________________
From:
powerh-l-bounces+guy.werry=hbms.ca at lists.sowder.com [mailto:
powerh-l-bounces+guy.werry=hbms.ca at lists.sowder.com
<mailto:powerh-l-bounces+guy.werry=hbms.ca at lists.sowder.com> ] On Behalf
Of vamsi krishna
Sent: Monday, October 29, 2007 2:12 PM
To: powerh-l at lists.sowder.com
Subject: Yet Again, QTP Failure: OUTPUT --> ADD
UPDATE
Hello All,
I'd seen a case where the QTP program failed .
It was something like
Output xyz add update
how a QTP can fail with error message "Failed to
add when a Unique Key/Index was specified"
What I understand from OUTPUT --->Add Update is
QTP tries to add first, if the records exists, it updates the record
with new values, and if this is the case, how could such a QTP Fail!
Please let me know if you if it's something
else.
Thanks in advance :-D
Regards,
Vamsi
--
"Nothing is impossible as impossible itself says
i m possible" The information in this e-mail and any attachments is
confidential and may be subject to legal professional privilege. It is
intended solely for the attention and use of the named addressee(s). If
you are not the intended recipient, or person responsible for delivering
this information to the intended recipient, please notify the sender
immediately. Unless you are the intended recipient or his/her
representative you are not authorised to, and must not, read, copy,
distribute, use or retain this message or any part of it.
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to
powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe <password>" in
message body to powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must
be a subscriber.
Add 'site: lists.sowder.com <http://lists.sowder.com/>
powerh-l' to your search terms to search the list archive at Google.
--
"Nothing is impossible as impossible itself says i m possible"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20071030/48be957b/attachment.htm
More information about the powerh-l
mailing list