project QadFinancials > class BReason > method CalcAllSelectReason
query calculated fields procedure
Description
This method is used to fill the calculated fields in the SelectReason query.
Based on the values in the database, it will retrieve the translated values for Allocation Status.
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/breason.p)
assign vcAllocStatusNoAlloc = {&ALLOCSTATUS-NOALLOC}
vcAllocStatusTransAlloc = {&ALLOCSTATUS-TRANSALLOC}
vcAllocStatusAlloc = {&ALLOCSTATUS-ALLOC}
vcAllocStatusNoAllocTr = {&ALLOCSTATUS-NOALLOC-TR}
vcAllocStatusTransAllocTr = {&ALLOCSTATUS-TRANSALLOC-TR}
vcAllocStatusAllocTr = {&ALLOCSTATUS-ALLOC-TR}.
create query vhQuery in widget-pool "non-persistent".
vhQuery:set-buffers(ih_Buffer).
vhQuery:query-prepare("for each ":U + ih_Buffer:table).
vhQuery:query-open().
vhQuery:get-first().
do while not vhQuery:query-off-end:
assign {&tcReasonAllocationStatusCalc} =
if {&tcReasonAllocationStatus} = "ANY":U
then #T-1'Any':10(3487)T-1#
else if {&tcReasonAllocationStatus} = vcAllocStatusNoAlloc
then vcAllocStatusNoAllocTr
else if {&tcReasonAllocationStatus} = vcAllocStatusTransAlloc
then vcAllocStatusTransAllocTr
else if {&tcReasonAllocationStatus} = vcAllocStatusAlloc
then vcAllocStatusAllocTr
else "?":U.
vhQuery:get-next().
end.
vhQuery:query-close().
delete object vhQuery.