Significance of Body Tags

As discussed, there are two sections under the tag <BODY>:

<DESC>: Description for Request/Response

<DATA>: Data required for Request/Response

<DESC>: Description for Request/Response

The description block is used for providing description of Request / Response. Following are the different types of descriptions available inside the description tag:

StaticVariables

RepeatVariables

ComputeList

FetchList

Function ParamList

TDL

<STATICVARIABLES>

The STATICVARIABLES provides all configuration details and all global variable details. All tags inside Staticvariable would be any of the system variables. In the following example SVCurrent-Company, SVFromDate and SVToDate are the system variables. All elements inside the tag <STATICVARIABLES> would be starting with SV.

<DESC>

<STATICVARIABLES>

<SVCURRENTCOMPANY>

ABC Company Ltd

</SVCURRENTCOMPANY>

<SVFROMDATE TYPE="Date">1-Apr-2008</SVFROMDATE>

<SVTODATE TYPE="Date">31-Mar-2009</SVTODATE>

</STATICVARIABLES>

</DESC>

<REPEATVARIABLES>

REPEATVARIABLES is used to specify the details for all the repeated variable information such as Date Range, Block Range etc. All the information related to repeated variables will be enclosed within the tag <REPEATSET>. Here also the value will be enclosed with the system variables. In the following example shows the repeated usage of variables.

<REPEATVARIABLES>

<REPEATSET> <SVFROMDATE>1-Apr-2007</SVFROMDATE> <SVFROMDATE>1-Oct-2007</SVFROMDATE>

</REPEATSET>

<REPEATSET> <SVTODATE>30-Sep-2007</SVTODATE> <SVTODATE>31-Mar-2008</SVTODATE>

</REPEATSET>

</REPEATVARIABLES>

<FETCHLIST>

FETCHLIST is used to specify the list of storages to be fetched. In case of type object the methods that need to be retrieved within the <FETCHLIST> Tag using <FETCH> Tags.

<FETCHLIST>

<FETCH>TBalClosing</FETCH>

<FETCH>TBalOpening</FETCH>

<FETCH>StkClBalance</FETCH>

<FETCH>StkOpBalance</FETCH>

</FETCHLIST>

<FUNCPARAMLIST>

It is used to specify the parameters used for function execution. In the time of using Function as a type with parameters then the parameter list will come under the tag <PARAMLIST>. The structure of PARAMLIST as follows:

<FUNCPARAMLIST>

<PARAM>@@FirstParameter</PARAM>

<PARAM TYPE="Number">0.10</PARAM>

</FUNCPARAMLIST>

<TDL>

It is used to specify the TDL related information. The complete TDL to be executed in order to handle the Request; will be sent within the TDL block. TDL tag is specified, when Report, Collection, Object or Function is to be sent as a request to Tally. Tally application will respond depends on the TDL request. A TDL specification is required only when the TDL required for serving the request does not exist at the Tally end.

The TDL program is sent using TDL tag as per the following structure:

<TDL>

<TDLMESSAGE>

<REPORT NAME="TDL Report" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">

<FORMS>First TDL Form</FORMS>

</REPORT>

<FORM NAME="First TDL Form" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">

<TOPPARTS>First TDL Part</TOPPARTS>

</FORM>

.

.

.

<FIELD NAME="First TDL Field" ISMODIFY="No"ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">

<SET>"Welcome to the world of TDL"</SET>

</FIELD>

</TDLMESSAGE>

</TDL>

TDL request should be enclosed within <TDL> tags. The <TDLMESSAGE> tag is mandatory inside the <TDL> tag. Inside that we can write all the definitions and its attributes with their values. All definitions and attributes are represented as tags. Consider the following examples which demonstrate the usage of <HEADER> values:

Report specification in TDL

<HEADER>

<VERSION>1</VERSION>

<TALLYREQUEST>Export</TALLYREQUEST>

<TYPE>Data</TYPE>

<ID>Report Name </ID>

</HEADER>

In the above header format the value of TallyRequest is Export and the Type is data. Specifying the value of ID is ReportName. This report name should come inside the tag <REPORT> within the <TDL> tag.

Example:

<TDL>

<TDLMESSAGE>

<REPORT NAME="TDL Report" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">

<FORMS>First TDL Form</FORMS>

</REPORT>

.

.

</TDLMESSAGE>

</TDL>

Collection specification in TDL

<HEADER>

<VERSION>1</VERSION>

<TALLYREQUEST>Export</TALLYREQUEST>

<TYPE>Collection</TYPE>

<ID>Collection Name</ID>

</HEADER>

In the above template the value of TallyRequest is Export and the Type is Collection. Specifying the value of ID is CollectionName. This collection name should come inside the tag <COLLECTION > within the <TDL> tag.

<TDL>

<TDLMESSAGE>

<COLLECTION NAME="Collection of Ledgers" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">

<TYPE>Ledger</TYPE>

</COLLECTION>

.

.

.

</TDLMESSAGE>

</TDL>

Object specification in TDL

<HEADER>

<VERSION>1</VERSION>

<TALLYREQUEST>Export</TALLYREQUEST>

<TYPE>Object</TYPE>

<ID>Object Name</ID>

</HEADER>

In the above template the value of TallyRequest is Export and the Type is Object. Specifying the value of ID is ObjectName. This object name should come inside the tag <OBJECT> within the <TDL> tag.

Consider the following example:

<TDL>

<TDLMESSAGE>

<OBJECT NAME="Ledger" ISINITIALIZE="Yes">

<LOCALFORMULA>

TNetBalance: $$AsPositive: $$AmountSubtract: $ClosingBalance: $OpeningBalance

</LOCALFORMULA>

</OBJECT>

</TDLMESSAGE>

</TDL>

Function specification in TDL

<HEADER>

<VERSION>1</VERSION>

<TALLYREQUEST>Export</TALLYREQUEST>

<TYPE>Function</TYPE>

<ID>Function Name</ID>

</HEADER>

In the above template the value of TallyRequest is Export and the Type is Function. Specifying the value of ID is FunctionName.

<DESC>

<FUNCPARAMLIST>

<PARAM>@@FirstParameter</PARAM>

<PARAM TYPE="Number">0.10</PARAM>

</FUNCPARAMLIST>

<TDL>

<TDLMESSAGE>

<SYSTEM TYPE="Formulae" NAME="FirstParameter">

1242849 / 1000

</SYSTEM>

</TDLMESSAGE>

</TDL>

</DESC>

In the above example, the function parameter list enclosed with the tag <FUNCPARAMLIST>. The formula which is used inside the Function parameter list is specified inside TDL Tag.

<DATA>: Data required for the Request/Response

Data contains the actual data being transferred from one system to another. If the information is retrieved then the data will be obtained inside the <DATA> tag.

<DATA>

<COLLECTION>

<OBJECT NAME="CDROM Disks 10s - Defective">

<NAME TYPE="String">CDROM Disks 10s - Defective</NAME>

</OBJECT>

<OBJECT NAME="TVS MSP 245 132 Col Printer">

<NAME TYPE="String">TVS MSP 245 132 Col Printer</NAME>

</OBJECT>

<OBJECT NAME="Assembled PIV">

<NAME TYPE="String">Assembled PIV</NAME>

</OBJECT>

</COLLECTION>

</DATA>

In the case of importing data to be sent to Tally, to be specified within the <DATA> tag.

<DATA>

<TALLYMESSAGE>

<LEDGER Action = "Create">

<NAME>ICICI Test</NAME>

<PARENT>Bank Accounts</PARENT>

<OPENINGBALANCE>13500</OPENINGBALANCE>

</LEDGER>

</TALLYMESSAGE>

<DATA>

After having a clear idea about all the important tags and their usage, will concentrate on some examples.