1 DEF VAR n
AS INTEGER INITIAL 0 EXTENT 26 NO-UNDO.
2 DEF VAR sundry-creditors
AS DECIMAL NO-UNDO INITIAL 6810.00.
3 DEF VAR ltr
AS INTEGER NO-UNDO.
4 DEF VAR m1
AS INTEGER NO-UNDO INITIAL 111.
5 DEF VAR m2
AS INTEGER NO-UNDO INITIAL 111.
6 DEF VAR offset
AS INTEGER NO-UNDO.
7 offset
= ASC( "A" ) - 1.
10 FOR EACH Creditor
WHERE Creditor.Active
NO-LOCK BY Creditor.Name
:
11 ltr
= ASC( CAPS( SUBSTRING( Creditor.Name
, 1, 1)) ) - offset.
12 FOR EACH AcctTran
NO-LOCK WHERE AcctTran.EntityType
= "C"
13 AND AcctTran.EntityCode
= Creditor.CreditorCode
14 AND AcctTran.AccountCode
= sundry-creditors
15 AND AcctTran.MonthCode
>= m1
16 AND AcctTran.MonthCode
<= m2
:
21 DISPLAY CHR( ltr
+ offset
) FORMAT "X(3)"
23 n
[ltr
] FORMAT ">>,>>9" WITH DOWN FRAME x.