powerh-l Digest, Vol 160, Issue 1
ken weiland
ken_weiland at yahoo.com
Wed Oct 27 21:13:24 CDT 2021
QTP has input phase, sort phase, output phase
defines are evaluated again in all phases
- so every time there is a reference to a define - it is re-evaluated in all phases
- QTP assumes a define is changeable
try changing the qtp to the following
put temps before the sort
- the temps will be initialized to 0
- change define to use temp - this will then be fixed value for a given record
TEMP QPD-DTL-AMT ZONED SIZE 14
ITEM QPD-DTL-AMT = ROUND((AMOUNT OF TRANDETL * 100),0,NEAR))
TEMP QPT-DTL-AMT ZONED SIZE 14
TEMP QPT-DTL-CR ZONED SIZE 14
TEMP QPT-DTL-DR ZONED SIZE 14
SORT ON ACCOUNT-NUMBER OF ACCOUNTS &
ON TRANS-IDENT OF TRANSACTIONS &
ON TRANS-IDENT OF TRANDETL
ITEM QPT-DTL-AMT SUBTOTAL QPD-DTL-AMT &
RESET AT TRANS-IDENT OF TRANDETL
ITEM QPT-DTL-CR SUBTOTAL QPD-DTL-AMT &
IF TRANS-TYPE OF TRANACCT EQ "AP" &
OR TRANS-TYPE OF TRANACCT EQ "CA" &
RESET AT TRANS-IDENT OF TRANDETL
ITEM QPT-DTL-DR SUBTOTAL QPD-DTL-AMT &
IF TRANS-TYPE OF TRANACCT EQ "CQ" &
OR TRANS-TYPE OF TRANACCT EQ "DA" &
RESET AT TRANS-IDENT OF TRANDETL
OUTPUT TRANSACTIONS UPDATE AT TRANS-IDENT OF TRANDETL &
ON ERRORS REPORT &
IF QPG-UPDATE EQ "Y"
ITEM AMOUNT OF TRANSACTIONS FINAL &
ROUND(((QPT-DTL-AMT) / 100),2,NEAR)
ITEM CREDIT-AMOUNT OF TRANSACTIONS FINAL &
ROUND(((QPT-DTL-CR) / 100),2,NEAR)
ITEM DEBIT-AMOUNT OF TRANSACTIONS FINAL &
ROUND(((QPT-DTL-DR) / 100),2,NEAR)
SUBFILE QPAPBLT1 AT TRANS-IDENT OF TRANDETL KEEP &
INCLUDE &
TRANSACTIONS, &
QPT-DTL-AMT, QPT-DTL-DR, QPT-DT
On Wednesday, October 27, 2021, 10:37:11 a.m. PDT, <powerh-l-request at lists.sowder.com> wrote:
Send powerh-l mailing list submissions to
powerh-l at lists.sowder.com
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sowder.com/mailman/listinfo/powerh-l
or, via email, send a message with subject or body 'help' to
powerh-l-request at lists.sowder.com
You can reach the person managing the list at
powerh-l-owner at lists.sowder.com
When replying, please edit your Subject line so it is more specific
than "Re: Contents of powerh-l digest..."
Today's Topics:
1. Certain transactions not updated on final item (James B. Byrne)
----------------------------------------------------------------------
Message: 1
Date: Wed, 27 Oct 2021 11:58:00 -0400
From: "James B. Byrne" <byrnejb at harte-lyne.ca>
To: powerh-l at lists.sowder.com
Subject: Certain transactions not updated on final item
Message-ID:
<cde4cebd689c30ec752d45cb8f51dc77.squirrel at webmail.harte-lyne.ca>
Content-Type: text/plain;charset=iso-8859-1
I have a QTP process that selects all the transaction detail lines for a
specific account and recalculates the transaction totals.
SORT ON ACCOUNT-NUMBER OF ACCOUNTS &
ON TRANS-IDENT OF TRANSACTIONS &
ON TRANS-IDENT OF TRANDETL
DEFINE QPD-DTL-AMT ZONED SIZE 14 = ( &
ROUND((AMOUNT OF TRANDETL * 100),0,NEAR))
TEMP QPT-DTL-AMT ZONED SIZE 14
ITEM QPT-DTL-AMT SUBTOTAL QPD-DTL-AMT &
RESET AT TRANS-IDENT OF TRANDETL
TEMP QPT-DTL-CR ZONED SIZE 14
ITEM QPT-DTL-CR SUBTOTAL QPD-DTL-AMT &
IF TRANS-TYPE OF TRANACCT EQ "AP" &
OR TRANS-TYPE OF TRANACCT EQ "CA" &
RESET AT TRANS-IDENT OF TRANDETL
TEMP QPT-DTL-DR ZONED SIZE 14
ITEM QPT-DTL-DR SUBTOTAL QPD-DTL-AMT &
IF TRANS-TYPE OF TRANACCT EQ "CQ" &
OR TRANS-TYPE OF TRANACCT EQ "DA" &
RESET AT TRANS-IDENT OF TRANDETL
OUTPUT TRANSACTIONS UPDATE AT TRANS-IDENT OF TRANDETL &
ON ERRORS REPORT &
IF QPG-UPDATE EQ "Y"
ITEM AMOUNT OF TRANSACTIONS FINAL &
ROUND(((QPT-DTL-AMT) / 100),2,NEAR)
ITEM CREDIT-AMOUNT OF TRANSACTIONS FINAL &
ROUND(((QPT-DTL-CR) / 100),2,NEAR)
ITEM DEBIT-AMOUNT OF TRANSACTIONS FINAL &
ROUND(((QPT-DTL-DR) / 100),2,NEAR)
SUBFILE QPAPBLT1 AT TRANS-IDENT OF TRANDETL KEEP &
INCLUDE &
TRANSACTIONS, &
QPT-DTL-AMT, QPT-DTL-DR, QPT-DTL-CR
The problem is that not all transactions are updated as expected:
Quiz reports this in QPAPBLT1:
Transaction Amount QPT-DTL-AMT Credit QPT-DTL-CR Debit QPT-DTL-DR
AP036531 485.52 48552 485.52CR 48552 0.00DB 0
AP036532 1171.79 117179 1171.79CR 117179 0.00DB 0
CA016586 1.20 120 1.20CR 120 0.00DB 0
CQ217386 0.00 117179 0.00CR 0 1171.79DB 117179
DA019461 0.00 48672 0.00CR 0 486.72DB 48672
The last two transactions do not get the AMOUNT set properly, but the
DEBIT-AMOUNT is set. I am at a loss as to why. All three accumulators sum up
correctly. But the FINAL clause does not seem to apply to AMOUNT field of the
debit transactions.
What am I missing?
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Unencrypted messages have no legal claim to privacy
Do NOT open attachments nor follow links sent by e-Mail
James B. Byrne mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
------------------------------
Subject: Digest Footer
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
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
https://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 powerh-l' to your search terms to search the list archive at Google.
------------------------------
End of powerh-l Digest, Vol 160, Issue 1
****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20211028/d08fe721/attachment.html>
More information about the powerh-l
mailing list