Tally ERP 9 | Tally 9 | Tally 8.1 | Tally 7.2 | Tally 6.3 | Learn Tally TDL

Wednesday, July 4, 2007

Passing parameters to TDL procedures

This post illustrates how to pass parameters to TDL procedures. TDL31 program retreives Payment Vouchers

Download TDL31

;; PRODUCT: TDL31.TXT
;; PRODUCT-ID: cr405yfa-3e7f-5d9a-52h6-acr80a55436e
;; AUTHOR: Shweta Computers
;;=========================================================================

;; Collection-name that begins with an underscore is a Procedure
[Collection: _MyVouchers]

;;Based on the Voucher Object
Type : Voucher

;;Requires ONe parameter i.e. VoucherType Name
SQLParms : pVchType

;;Data that is returned to the calling program
SQLValues : Voucher Date : $Date
SQLValues : Voucher Number : $VoucherNumber
SQLValues : Voucher Reference : $VoucherReference
SQLValues : Voucher Amount : $Amount
SQLValues : Voucher Type : $VoucherTypeName

;;Filters out the Collection for Object that match the given condition
Filters : MyVchTypeFilter


[System: Formula]
;;Used as Filter condition
MyVchTypeFilter : $VoucherTypeName = #pVchType

[Variable: pVchType]
Type: String

[System: Variable]
pVchType: ""

Notes:-
Procedures can be invoked using SQLRequest() function of RTSlink DLL
as given below:

Syntax:-
SQLRequest("Call _MyVouchers('Payment')")

Tally; Tally Developer and Tally Definition Language are trademarks or registered trademarks of "Tally Solutions FZ LLC", Bangalore.