How to retrieve GSTN of a company : Tally XML integration

Discussion in 'Tally Developer' started by Suresh Shanmugam, Sep 2, 2019.

         
Tags:
  1. Suresh Shanmugam

    Suresh Shanmugam New Member


    Trying to retrieve the GSTIN of the active company in Tally ERP. Making a POST call using the following<FETCH>Gstnotificationnumber</FETCH> command

    But no data is returned as part of the response under <DATA> output given below

    Any help would be really great!!

    Code:
    <ENVELOPE>
        <HEADER>
            <VERSION>1</VERSION>
            <TALLYREQUEST>EXPORT</TALLYREQUEST>
            <TYPE>OBJECT</TYPE>
            <SUBTYPE>COMPANY</SUBTYPE>
            <ID TYPE="Name">Example Company Name</ID>
        </HEADER>
        <BODY>
            <DESC>
                <STATICVARIABLES>
                    <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
                </STATICVARIABLES>
                <FETCHLIST>
                    <FETCH>Gstnotificationnumber</FETCH>
                </FETCHLIST>
            </DESC>
        </BODY>
    </ENVELOPE>

    Output From Tally ERP which is missing Gstnotificationnumber from the COMPANY object

    Code:
    <DATA>
        <TALLYMESSAGE>
            <COMPANY NAME="Example Company Name" RESERVEDNAME="" REQNAME="Example Company Name">
                <NAME TYPE="String">Example Company Name</NAME>
                <ISDEEMEDPOSITIVE TYPE="Logical"></ISDEEMEDPOSITIVE>
                <CANDELETE TYPE="Logical">No</CANDELETE>
                <MASTERID TYPE="Number"> 29</MASTERID>
            </COMPANY>
        </TALLYMESSAGE>
    </DATA>
     

    Attached Files:

    Last edited: Sep 3, 2019


  2. drive

    drive Active Member


    For Company Try : GSTRegNumber
    For Ledger Try : PartyGSTIN
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You need GST Notification Number ???
     


  4. Suresh Shanmugam

    Suresh Shanmugam New Member


    Thank you for correcting, have modified the question.

    Yes, i am looking to retrieve "Gstnotificationnumber"

    Based on schema it looks to me that the GSTIN/UIN of the COMPANY is available here.

    upload_2019-9-3_11-12-46.png
     
    Last edited: Sep 3, 2019


  5. Suresh Shanmugam

    Suresh Shanmugam New Member


    Company: GstRegNumber is not a valid method in the schema and it did not give any result.
    Ledger: Yes, PartyGSTIN is a valid method and it did work.

    upload_2019-9-3_11-17-44.png

    Tried the following code

    Code:
    <ENVELOPE>
        <HEADER>
            <VERSION>1</VERSION>
            <TALLYREQUEST>EXPORT</TALLYREQUEST>
            <TYPE>OBJECT</TYPE>
            <SUBTYPE>COMPANY</SUBTYPE>
            <ID TYPE="Name">Example Company Name</ID>
        </HEADER>
        <BODY>
            <DESC>
                <STATICVARIABLES>
                    <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
                </STATICVARIABLES>
                <FETCHLIST>
                    <FETCH>GSTRegNumber</FETCH>
                </FETCHLIST>
            </DESC>
        </BODY>
    </ENVELOPE>
    
     
    Last edited: Sep 3, 2019


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Try this...........
    Code:
    $GSTRegNumber:TaxUnit:@@CMPExcisePrimaryGodown
     


  7. Suresh Shanmugam

    Suresh Shanmugam New Member


    I assume the suggestion is a TDL formula. Tried below code but still throws an error

    Code:
    <ENVELOPE>
        <HEADER>
            <VERSION>1</VERSION>
            <TALLYREQUEST>EXPORT</TALLYREQUEST>
            <TYPE>OBJECT</TYPE>
            <SUBTYPE>COMPANY</SUBTYPE>
            <ID TYPE="Name">Example Company Name</ID>
        </HEADER>
        <BODY>
            <DESC>
                <STATICVARIABLES>
                    <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
                </STATICVARIABLES>
                <TDL>
                    <TDLMESSAGE>
                        <OBJECT NAME="COMPANY" ISINITIALIZE="Yes">
                            <LOCALFORMULA>
                                $GSTRegNumber:TaxUnit:@@CMPExcisePrimaryGodown
                            </LOCALFORMULA>
                        </OBJECT>
                    </TDLMESSAGE>
                </TDL>
            </DESC>
        </BODY>
    </ENVELOPE>
     


  8. teja varma

    teja varma Member


    it is better not to mess up with default objects or collections of the Tally
    it will cause memory access violation

    safe way is try like this:


    Code:
    <ENVELOPE>
        <HEADER>
            <VERSION>1</VERSION>
            <TALLYREQUEST>Export</TALLYREQUEST>
            <TYPE>Data</TYPE>
            <ID>cmpgst</ID>
        </HEADER>
        <BODY>
            <DESC>
                <STATICVARIABLES>
                    <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
           </STATICVARIABLES>
    <TDL>
    <TDLMESSAGE>
       <REPORT NAME="cmpgst">
        <FORMS>cmpgst</FORMS>
       </REPORT>
       <FORM NAME="cmpgst">
        <TOPPARTS>cmpgst</TOPPARTS>
       </FORM>
       <PART NAME="cmpgst">
        <TOPLINES>cmpgst</TOPLINES>
        <SCROLLED>Vertical</SCROLLED>
       </PART>
       <LINE NAME="cmpgst">
        <LEFTFIELDS>cmpgstregno</LEFTFIELDS>
       </LINE>
       <FIELD NAME="cmpgstregno">
        <SET>@@CMPGSTaxNumber</SET>
       </FIELD>
       </TDLMESSAGE>
    </TDL>
    </DESC>
    </BODY>
    </ENVELOPE>
    

    reply:
    Code:
    <ENVELOPE>
    <CMPGSTREGNO>37AAAAA1318R1Z3</CMPGSTREGNO>
    </ENVELOPE>
     


  9. Suresh Shanmugam

    Suresh Shanmugam New Member


     


Share This Page