Search code examples
tally

xml format for creating cost centre in tally


What is the xml format for creating a single new cost centre in tally under Primary group.

For eg. XML tags to Create a Group named 'My Debtors' under 'Sundry Debtors' is as below:

<!--XML tags to create a Group named My Debtors under Sundry Debtors-->
<ENVELOPE>
    <HEADER>
        <TALLYREQUEST>Import Data</TALLYREQUEST>
    </HEADER>
    <BODY>
        <IMPORTDATA>
            <REQUESTDESC>
                <REPORTNAME>All Masters</REPORTNAME>
            </REQUESTDESC>
            <REQUESTDATA>
                <TALLYMESSAGE xmlns:UDF="TallyUDF">
                    <GROUP NAME="My Debtors" ACTION="Create">
                        <NAME.LIST>
                            <NAME>My Debtors</NAME>
                        </NAME.LIST>
                        <PARENT>Sundry Debtors</PARENT>
                        <ISSUBLEDGER>No</ISSUBLEDGER>
                        <ISBILLWISEON>No</ISBILLWISEON>
                        <ISCOSTCENTRESON>No</ISCOSTCENTRESON>
                    </GROUP>
                </TALLYMESSAGE>
            </REQUESTDATA>
        </IMPORTDATA>
    </BODY>
</ENVELOPE>

Solution

  • I got it finally:

    <ENVELOPE>
        <HEADER>
            <TALLYREQUEST>Import Data</TALLYREQUEST>
        </HEADER>
        <BODY>
            <IMPORTDATA>
                <REQUESTDESC>
                    <REPORTNAME>All Masters</REPORTNAME>
                </REQUESTDESC>
                <REQUESTDATA>
                    <TALLYMESSAGE xmlns:UDF="TallyUDF">
                        <COSTCENTRE NAME="NewCostCentre">
                            <NAME>NewCostCentre</NAME>
                        </COSTCENTRE>
                    </TALLYMESSAGE>
                </REQUESTDATA>
            </IMPORTDATA>
        </BODY>
    </ENVELOPE>