Sachin
Sachin

Reputation: 2148

How we can add TDL code into Tally XML request

I have one TCP file and I want to include that code in my Tally XML request to get data in response of the XML request. So that I don't have to be dependent that user has installed that TCP file or not..

Is this possible ? I have read that some where. But I am not able to get success in this. Any help is appreciated. Thanks in Advance.

Upvotes: 1

Views: 2224

Answers (2)

Mitalee Rao
Mitalee Rao

Reputation: 191

If you can get the tdl version (the uncompiled source code), enclose it within the <TDL></TDL> tag. You could also use Tally Developer to convert the tdl source code into XML by right-clicking on the file and then clicking 'Convert to XML'.

Here's a small request example that features a collection of ledgers that belong only to the Sundry Debtors Group.

In TDL, it would be a simple 4-line code as follows:

[Collection: SundryDebtorsLedgers]
    Type: Ledger
    Child Of: $$GroupSundryDebtors
    Fetch: Name, Parent, ClosingBalance

In XML, the same request would be:

<ENVELOPE>
    <HEADER>
        <VERSION>1</VERSION>
        <TALLYREQUEST>EXPORT</TALLYREQUEST>
        <TYPE>COLLECTION</TYPE>
        <ID>SundryDebtorsLedgers</ID>
    </HEADER>
    <BODY>
        <DESC>
            <TDL>
                <TDLMESSAGE>
                    <COLLECTION NAME="SundryDebtorsLedgers">
                        <TYPE>Ledger</TYPE>
                        <CHILDOF>$$GroupSundryDebtors</CHILDOF>
                        <FETCH>Name, Parent, ClosingBalance</FETCH>
                    </COLLECTION>
                </TDLMESSAGE>   
            </TDL>
        </DESC>
    </BODY>
</ENVELOPE>

Upvotes: 4

Laxman Tandon
Laxman Tandon

Reputation: 66

Tcp file is an encrypted file, you can not include it in your xml requests unless you have source code.

Tcp file can only be read by tally platform, there several ways to load tcp with tally

1 using command line 2 using tally account tdl 3 tdl code written in xml format

Upvotes: 1

Related Questions