× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

Sub Routine

  • arunkv111
  • Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0

arunkv111 created the topic: Sub Routine

I need a subroutine to create a enquiry report for below scenario :

generate the enquiry report based on the given details : capture the credit and debit movement of the particular account for last one week

Can anyone suggest a routine for this??
#22513

Please Log in or Create an account to join the conversation.

  • Posts: 65
  • Thank you received: 7

silvergem replied the topic: Sub Routine

You can create an enquiry and capture the activity movement based on acct activity application. then linked that enquiry ton enquiry report application. the enquiry report can launched manually or generated during cob.

Is the routine for generating the enquiry report? or for getting the data only?
#22517

Please Log in or Create an account to join the conversation.

  • madhusudhanr1997@gmail.com
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 2

madhusudhanr1997@gmail.com replied the topic: Sub Routine

$USING EB.SystemTables
$USING EB.API
$USING EB.Service
$USING ST.AccountStatement
$USING EB.DataAccess
$USING AC.AccountOpening
$USING FT.Contract
$USING AC.EntryCreation
$USING EB.Reports

GOSUB OPEN.FILE
GOSUB OPERATION
RETURN
OPEN.FILE:
FN.CUSAC="F.CUSTOMER.ACCOUNT"
FV.CUSAC=""
EB.DataAccess.Opf(FN.CUSAC,FV.CUSAC)

FN.AC="F.ACCOUNT"
FV.AC=""
EB.DataAccess.Opf(FN.AC,FV.AC)

FN.FT="F.FUNDS.TRANSFER"
FV.FT=""
EB.DataAccess.Opf(FN.FT,FV.FT)

FN.CUS="F.CUSTOMER"
FV.CUS=""
EB.DataAccess.Opf(FN.CUS,FV.CUS)

FN.STMT="F.STMT.ENTRY"
FV.STMT=""
EB.DataAccess.Opf(FN.STMT,FV.STMT)
RETURN
OPERATION:

INPUT.FIELDS = EB.Reports.getDFields()
INPUT.VALUES = EB.Reports.getDRangeAndValue()
LOCATE "CUSTOMER" IN INPUT.FIELDS SETTING ACTION.POS THEN
CUSTOMER.ID=INPUT.VALUES<ACTION.POS>
END
EB.DataAccess.FRead(FN.CUSAC,CUSTOMER.ID,R.CUSAC,FV.CUSAC,CUSAC.ERR)
Y.AC.CNT = DCOUNT(R.CUSAC,@FM)
I=1
LOOP
WHILE I LE Y.AC.CNT
Y.AC.NO = R.CUSAC<I>
EB.DataAccess.FRead(FN.AC,Y.AC.NO,R.AC,FV.AC,AC.ERR)
Y.CAT = R.AC<AC.AccountOpening.Account.Category>
IF (Y.CAT GE 1001 AND Y.CAT LE 1999) OR (Y.CAT GE 6001 AND Y.CAT LE 6999) OR (Y.CAT GE 21000 AND Y.CAT LE 21150) THEN
Y.TDY=EB.SystemTables.getToday()
YY.TODAY=Y.TDY
EB.API.Cdt('',YY.TODAY,"-7W")

ST.AccountStatement.EbAcctEntryList(Y.AC.NO, YY.TODAY,Y.TDY, YidList, OpeningBal, Er)
Y.STMT.ID.COUNT = DCOUNT(YidList,@FM)
J=1
LOOP
WHILE J LE Y.STMT.ID.COUNT
Y.STMT.REC = YidList<J>
EB.DataAccess.FRead(FN.STMT,Y.STMT.REC,R.STMT,FV.STMT,STMT.ERR)
Y.FT.ID = R.STMT<AC.EntryCreation.CategEntry.CatTransReference>
Y.SYS.ID = R.STMT<AC.EntryCreation.StmtEntry.SteSystemId>
Y.TRNAS.AMOUNT = R.STMT<AC.EntryCreation.StmtEntry.SteAmountLcy>
EB.DataAccess.FRead(FN.FT,Y.FT.ID,R.FT,FV.FT,FT.ERR)
Y.DEBIT.THEIR.REF = R.FT<FT.Contract.FundsTransfer.DebitTheirRef>
Y.CREDIT.THIER.REF = R.FT<FT.Contract.FundsTransfer.CreditTheirRef>
FINAL.ARRAY<-1>=CUSTOMER.ID:'*':Y.AC.NO:'*':Y.CAT:'*':Y.FT.ID:'*':Y.TRNAS.AMOUNT:'*':Y.DEBIT.THEIR.REF:'*':Y.CREDIT.THIER.REF:"*":Y.SYS.ID
J++
REPEAT
END
I++
REPEAT
RETURN
END
#22518
The following user(s) said Thank You: balabharathi2144

Please Log in or Create an account to join the conversation.

  • madhusudhanr1997@gmail.com
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 2

madhusudhanr1997@gmail.com replied the topic: Sub Routine

madhusudhanr1997@gmail.com wrote: $USING EB.SystemTables
$USING EB.API
$USING EB.Service
$USING ST.AccountStatement
$USING EB.DataAccess
$USING AC.AccountOpening
$USING FT.Contract
$USING AC.EntryCreation
$USING EB.Reports

GOSUB OPEN.FILE
GOSUB OPERATION
RETURN
OPEN.FILE:
FN.CUSAC="F.CUSTOMER.ACCOUNT"
FV.CUSAC=""
EB.DataAccess.Opf(FN.CUSAC,FV.CUSAC)

FN.AC="F.ACCOUNT"
FV.AC=""
EB.DataAccess.Opf(FN.AC,FV.AC)

FN.FT="F.FUNDS.TRANSFER"
FV.FT=""
EB.DataAccess.Opf(FN.FT,FV.FT)

FN.CUS="F.CUSTOMER"
FV.CUS=""
EB.DataAccess.Opf(FN.CUS,FV.CUS)

FN.STMT="F.STMT.ENTRY"
FV.STMT=""
EB.DataAccess.Opf(FN.STMT,FV.STMT)
RETURN
OPERATION:

INPUT.FIELDS = EB.Reports.getDFields()
INPUT.VALUES = EB.Reports.getDRangeAndValue()
LOCATE "CUSTOMER" IN INPUT.FIELDS SETTING ACTION.POS THEN
CUSTOMER.ID=INPUT.VALUES<ACTION.POS>
END
EB.DataAccess.FRead(FN.CUSAC,CUSTOMER.ID,R.CUSAC,FV.CUSAC,CUSAC.ERR)
Y.AC.CNT = DCOUNT(R.CUSAC,@FM)
I=1
LOOP
WHILE I LE Y.AC.CNT
Y.AC.NO = R.CUSAC<I>
EB.DataAccess.FRead(FN.AC,Y.AC.NO,R.AC,FV.AC,AC.ERR)
Y.CAT = R.AC<AC.AccountOpening.Account.Category>
IF (Y.CAT GE 1001 AND Y.CAT LE 1999) OR (Y.CAT GE 6001 AND Y.CAT LE 6999) OR (Y.CAT GE 21000 AND Y.CAT LE 21150) THEN
Y.TDY=EB.SystemTables.getToday()
YY.TODAY=Y.TDY
EB.API.Cdt('',YY.TODAY,"-7W")

ST.AccountStatement.EbAcctEntryList(Y.AC.NO, YY.TODAY,Y.TDY, YidList, OpeningBal, Er)
Y.STMT.ID.COUNT = DCOUNT(YidList,@FM)
J=1
LOOP
WHILE J LE Y.STMT.ID.COUNT
Y.STMT.REC = YidList<J>
EB.DataAccess.FRead(FN.STMT,Y.STMT.REC,R.STMT,FV.STMT,STMT.ERR)
Y.FT.ID = R.STMT<AC.EntryCreation.CategEntry.CatTransReference>
Y.SYS.ID = R.STMT<AC.EntryCreation.StmtEntry.SteSystemId>
Y.TRNAS.AMOUNT = R.STMT<AC.EntryCreation.StmtEntry.SteAmountLcy>
EB.DataAccess.FRead(FN.FT,Y.FT.ID,R.FT,FV.FT,FT.ERR)
Y.DEBIT.THEIR.REF = R.FT<FT.Contract.FundsTransfer.DebitTheirRef>
Y.CREDIT.THIER.REF = R.FT<FT.Contract.FundsTransfer.CreditTheirRef>
FINAL.ARRAY<-1>=CUSTOMER.ID:'*':Y.AC.NO:'*':Y.CAT:'*':Y.FT.ID:'*':Y.TRNAS.AMOUNT:'*':Y.DEBIT.THEIR.REF:'*':Y.CREDIT.THIER.REF:"*":Y.SYS.ID
J++
REPEAT
END
I++
REPEAT
RETURN
END


go through this routine
#22519
The following user(s) said Thank You: balabharathi2144

Please Log in or Create an account to join the conversation.

Time to create page: 1.080 seconds