Export Company Information From Tally with Address Details

Discussion in 'Tally Integration' started by Bhushan Cellica, Dec 5, 2018.

    

  1. Hello,

    I am trying to export connected Companies Information From Tally using HTTP XML request.
    And able to get Company details like Starting date, Company Number, Phone Number, Website etc.

    I want to export Companies Address information, but no success for it.
    I am using following XML,

    Code:
    <ENVELOPE>
       <HEADER>
         <VERSION>1</VERSION>
         <TALLYREQUEST>Export</TALLYREQUEST>
         <TYPE>Collection</TYPE>
         <ID>Company Collection</ID>
       </HEADER>
       <BODY>
         <DESC>
           <STATICVARIABLES>
             <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
           </STATICVARIABLES>
           <TDL>
             <TDLMESSAGE>
               <COLLECTION NAME="Company Collection" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
                 <TYPE>Company</TYPE>
                 <FETCH>*</FETCH>
               </COLLECTION>
             </TDLMESSAGE>
           </TDL>
         </DESC>
       </BODY>
    </ENVELOPE>
    
    Please guide me what change i have to do in it.

    Thanks,
    Bhushan
     



  2. Hello,

    Please provide me details about how we can export Companies Mailing Address and CIN number from Tally ERP 9 using XML request.

    Thanks,
    Bhushan
     



  3. Is anyone knows how to export these details ?
    Please reply.

    Thanks,
    Bhushan
     


  4. teja varma

    teja varma Active Member


    use this:
    xml request

    Code:
       <ENVELOPE>
       <HEADER>
        <VERSION>1</VERSION>
        <TALLYREQUEST>Export</TALLYREQUEST>
        <TYPE>Data</TYPE>
        <ID>Marvelxlrxit details</ID>
      </HEADER>
      <BODY>
        <DESC>
          <STATICVARIABLES>
            <EXPLODEFLAG>Yes</EXPLODEFLAG>
            <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
          </STATICVARIABLES>
          <TDL>
            <TDLMESSAGE>
              <REPORT NAME="Marvelxlrxit details">
                <FORMS>Marvelxlrxit details</FORMS>
                <TITLE>"Marvelxlrxit details"</TITLE>
              </REPORT>
              <FORM NAME="Marvelxlrxit details">
                <TOPPARTS>Marvelxlrxit details</TOPPARTS>
                <HEIGHT>100% Page</HEIGHT>
                <WIDTH>100% Page</WIDTH>
              </FORM>
              <PART NAME="Marvelxlrxit details">
                <TOPLINES>
                  Marvelxlrxit details info
                </TOPLINES>
                <SCROLLED>Vertical</SCROLLED>
              </PART>
              <LINE NAME="Marvelxlrxit details info">
                <LEFTFIELDS>Marvelxlrxit Name</LEFTFIELDS>
                <RIGHTFIELDS>Marvelxlrxit add1,Marvelxlrxit add2,Marvelxlrxit add3,Marvelxlrxit add4,Marvelxlrxit gstnumber,Marvelxlrxit cmpfrom</RIGHTFIELDS>
              </LINE>
              <FIELD NAME="Marvelxlrxit Name">
                <SET>$Name:Company:##SVCurrentCompany</SET>
              </FIELD>
              <FIELD NAME="Marvelxlrxit add1">
                <SET>$Address_1:Company:##SVCurrentCompany</SET>
              </FIELD>
              <FIELD NAME="Marvelxlrxit add2">
                <SET>$Address_2:Company:##SVCurrentCompany</SET>
              </FIELD>
              <FIELD NAME="Marvelxlrxit add3">
                <SET>$Address_3:Company:##SVCurrentCompany</SET>
              </FIELD>
              <FIELD NAME="Marvelxlrxit add4">
                <SET>$Address_4:Company:##SVCurrentCompany</SET>
              </FIELD>
              <FIELD NAME="Marvelxlrxit gstnumber">
                <SET>@@CMPGSTaxNumber</SET>
              </FIELD>
              <FIELD NAME="Marvelxlrxit cmpfrom">
                <SET>$StartingFrom:Company:##SVCurrentCompany</SET>
              </FIELD>
            </TDLMESSAGE>
          </TDL>
             </DESC>
                </BODY>
                   <ENVELOPE>
    
    ;''''''';:::::::::::::::::end::::::::::::::::::::::::::::
    
    xml response:
    
    
    
    <ENVELOPE>
    <MARVELXLRXITNAME>Tally Demo Data</MARVELXLRXITNAME>
    <MARVELXLRXITADD1>
    Address1
    </MARVELXLRXITADD1>
    Address2
    <MARVELXLRXITADD2>
    </MARVELXLRXITADD2>
    <MARVELXLRXITADD3>
    Address3
    </MARVELXLRXITADD3>
    <MARVELXLRXITADD4>
    Address4
    </MARVELXLRXITADD4>
    <MARVELXLRXITGSTNUMBER>1254554455555</MARVELXLRXITGSTNUMBER>
    <MARVELXLRXITCMPFROM>1-Apr-2019</MARVELXLRXITCMPFROM>
    </ENVELOPE>


    :)
     
    Last edited: Jul 21, 2019



  5. Thanks for your valuable reply.
    It works for me except for GST Number.

    It does not return Company GST Number.
    @@CMPGSTaxNumber : Whether this is field of Company or any local function.
    Please guide me to get Company GST Number from Tally ERP 9 using XML.

    Thanks again,
    Bhushan
     


  6. teja varma

    teja varma Active Member


    better modified version for getting company details

    Code:
    <ENVELOPE>
        <HEADER>
            <VERSION>1</VERSION>
            <TALLYREQUEST>Export</TALLYREQUEST>
            <TYPE>Data</TYPE>
            <ID>cmpdetails</ID>
        </HEADER>
        <BODY>
            <DESC>
                <STATICVARIABLES>
                    <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
            </STATICVARIABLES>
    <TDL>
    <TDLMESSAGE>
       <REPORT NAME="cmpdetails">
        <FORMS>cmpdetails</FORMS>
       </REPORT>
       <FORM NAME="cmpdetails">
        <TOPPARTS>cmpdetails</TOPPARTS>
        <HEIGHT>100% Page</HEIGHT>
            <WIDTH>100% Page</WIDTH>
    </FORM>
       <PART NAME="cmpdetails">
        <TOPLINES>cmpinfo</TOPLINES>
        <SCROLLED>Vertical</SCROLLED>
       </PART>
       <LINE NAME="cmpinfo">
        <LEFTFIELDS>cmpname,cmpfrom,cmpgstno,cmpaddress</LEFTFIELDS>
       </LINE>
       <FIELD NAME="cmpname">
        <SET>@@CmpMailName</SET>
       </FIELD>
        <FIELD NAME="cmpfrom">
        <SET>$StartingFrom:Company:##SvCurrentCompany</SET>
       </FIELD>
       <FIELD NAME="cmpgstno">
        <SET>@@CmpGsTaxNumber</SET>
       </FIELD>
       <FIELD NAME="cmpaddress">
        <SET>$$FullList:CompanyAddress:Address</SET>
       </FIELD>
    </TDLMESSAGE>
    </TDL>
    </DESC>
    </BODY>
    </ENVELOPE>
    


    @@CmpGsTaxNumber is system formula

    it definition is - If @@IsGSTOnAppl Then $GSTRegNumber:TaxUnit:mad:@CMPExcisePrimaryGodown Else ""
    so if gst is not applicable you wont get gst number
    please check weather gst is enabled for the company and gst is entered in statutory features

    :) happy coding
     



  7. Thanks for your quick reply.
    All GST settings are proper in Tally, but still GST Reg No not return in XML using this Request XML.
    Is there any tdl we need to load in tally for this formula ?

    can we add this formula in XML request directly instead of tdl ?

    Please guide me, because this is the most crucial task i have now.

    Thanks,
    Bhushan
     


  8. teja varma

    teja varma Active Member


    Actually it is working at my side
    so i have to figure out at your end
    if you wish please reach me at varma@apploops.com i will try to help you
     


  9. Researcher

    Researcher New Member


    The above code will not display the Address of the company. For the above request I got below response,

    Code:
    <ENVELOPE>
    <CMPNAME>Abc</CMPNAME>
    <CMPFROM>1-Apr-2007</CMPFROM>
    <CMPGSTNO></CMPGSTNO>
    <CMPADDRESS>Address</CMPADDRESS>
    </ENVELOPE>
    Always CMPADDRESS coming as "Address". How to get the address of the company through xml request?
     


  10. teja varma

    teja varma Active Member


    change "Address" to "$Address"
     


  11. Researcher

    Researcher New Member


    I was able to fetch the Address of the company.
    But, is it possible to get all the information we get using TDL-"Company Collection" along with company address?
     


Share This Page