[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] Very beginner



Sorry I was so goofy and accidently hit the sent
button by mistatke:

I took SQR class a couple of weeks ago and I'm very
much in "fuzzy" state. I'd appreciate very much if
anyone would be willing to explain it to me in plain
English these procedures: 

1. In STEP1,2,3,4: Begin-Procedure
Get-Total-PO-Amt($BUSINESS_UNIT, $PO_ID, :#tot-po-amt)
I remember in class, the instructor said something
about the ":#tot-po-amt", something with the "global"
stuff but I don't remember. Please explain the ":".

2. What is the difference between: A.PO_ID = $PO_ID
and A.PO_ID &PO_ID. 

3. Why is the ":" disappear in STEP3? 

4. STEP4 & STEP5:  I don't understand these steps.

I'd very much appreciate it if you would please
explain it in an easy term and at your convenient
time.

April


!********************** 
STEP1: Begin-Procedure
Get-Total-PO-Amt($BUSINESS_UNIT, $PO_ID, :#tot-po-amt)

begin-select SUM(A.MERCHANDISE_AMT) &A.MERCHANDISE_AMT

Let #tot-po-amt = &A.MERCHANDISE_AMT

FROM PS_PO_LINE_SHIP A

WHERE A.BUSINESS_UNIT = $BUSINESS_UNIT
      AND A.PO_ID = $PO_ID 
end-select 
End-Procedure Get-Total-PO-Amt

!**********************
STEP2: 
Begin-Procedure Get-Total-Invc-Amt($BUSINESS_UNIT,
$PO_ID, :#tot-invc-amt)

begin-select
SUM(A.MERCHANDISE_AMT) &A.MERCHANDISE_AMT 
Let #tot-invc-amt = &A.MERCHANDISE_AMT

FROM PS_VOUCHER_LINE A

WHERE A.BUSINESS_UNIT = $BUSINESS_UNIT
 AND A.PO_ID = $PO_ID 
end-select
End-Procedure Get-Total-Invc-Amt

!**********************
STEP3: 
Begin-Procedure Get-Totals

Do Get-Total-PO-Amt(&A.BUSINESS_UNIT, &A.PO_ID,
#tot-po-amt)
Do Get-Total-Invc-Amt(&A.BUSINESS_UNIT, &A.PO_ID,
#tot-invc-amt)

End-Procedure Get-Totals 

!**********************
STEP4: 
Begin-Procedure Print-Report

If $First-in = 'Y' 
Do Get-totals 
Do Get-Budget-Year
Do print-summary-line

Let $save-po-id = &A.PO_ID
Let $save-vendor-id = &d.vendor_id
Let $first-in = 'N' 

else
   if $save-po-id <> &A.PO_ID
    Do Get-totals
    Do Get-Budget-Year
    Do print-summary-line

    Let $save-po-id = &A.PO_ID
    Let $save-vendor-id = &d.vendor_id
   end-if

end-if
End-Procedure Print-Report

!**********************
STEP5:
Begin-Procedure Print-Summary-Line

if $first-in = 'Y'
 !next sentence
 else 

 if $save-vendor-id <> &d.vendor_id
   print 'Number of POs: ' (+2,65)
   print #po-cnt-subtotal (,85) edit 99,999,999 
   print 'Subtotal: ' (,112)
   print #po-amt-subtotal (,125) edit 99,999,999.99 
   print #invc-amt-subtotal (,158) edit 99,999,999.99 

   print ' ' (+1,1) 

  let #po-cnt-subtotal = 0 
  let #po-amt-subtotal = 0
  let #invc-amt-subtotal = 0 
  end-if
end-if

print $vendor-id (+1,1)
print $budget-year (,114)
print #tot-po-amt (,125) edit 99,999,999.99
print #tot-invc-amt (,158) edit 99,999,999.99

Let #po-cnt-subtotal = #po-cnt-subtotal + 1 
Let #po-amt-subtotal = #po-amt-subtotal + #tot-po-amt 
Let #invc-amt-subtotal = #invc-amt-subtotal +
#tot-invc-amt 
Let #po-cnt-grandtotal = #po-cnt-grandtotal + 1
Let #po-amt-grandtotal = #po-amt-grandtotal +
#tot-po-amt
Let #invc-amt-grandtotal = #invc-amt-grandtotal +
#tot-invc-amt 
End-Procedure Print-Summary-Line

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users