RTSLINK DLL utility is for Programmers / Software developers who have developed their own software and wish to link it with Tally.
What does "Linking with Tally" mean ?
Suppose, you do a Payment Voucher entry (or any other voucher) in your program. Automatic Posting of this entry into the Tally software is what we call "Linking with Tally". In other words, any entry added / modifed or deleted in your software must be automatically reflected in Tally. (Note: Tally software must be running in background)
Can I post data from my software into Tally directly ?
Yes. This is already dicussed in the previous point.
How do I link my software with Tally ?
You will have to modify the SAVE module of all the Entry/Transactions screens in your program. Although this is not very difficult, but it may take few days/weeks as there may be several modules in your program. You will be linking only the "Accounts & Inventory" modules of your program with Tally.
Proper planning and a systematic approach can ease this task. Let us try to understand what needs to be done in the SAVE modules of your software.
STEP 1: SAVE module of your program
Data entered by the User is to be saved into the database.
It is presummed that the developer has a functional program with complete module to SAVE the data into the database. We shall move to the Step 2 of the SAVE module which is generating Tally supported XML tags.
STEP 2: SAVE module of your program
At the end of the SAVE module, write code to generate Tally supported XML tags. These tags will be different for each module.
Generating the XML tags
The first thing you must do is to refer the Tally supported XML Tags for the module you wish to link. Suppose you wish to link GROUP Master module of your software with Tally, you need to have the XML tags for the GROUP master. You can get this from the Tally Software itself using option "Display -> List of Accounts -> Export" or you may download it from www.rtslink.com/downloads.html
We are providing sample XML Tags for GROUP master.
<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> |
Having seen the XML tags, you need to write code for it. We are herewith providing VISUAL BASIC code that stores the GROUP MASTER XML Tags into a string variable. This string variable is passed as a parameter in the Send() function.
Visual Basic code
Dim strRequestXML As String Dim strAction As String strAction="Create" strRequestXML = _ "<ENVELOPE>" & _ " <HEADER><TALLYREQUEST>Import Data</TALLYREQUEST></HEADER>" & _ " <BODY>" & _ " <IMPORTDATA>" & _ " <REQUESTDESC>" & _ " <REPORTNAME>All Masters</REPORTNAME>" & _ " </REQUESTDESC>" & _ " <REQUESTDATA>" & _ " <TALLYMESSAGE>" & _ " <GROUP NAME=" & Form1.txtName.Text & "ACTION=" & strACTION & ">" & _ " <NAME.LIST>" & _ " <NAME>" & Form1.txtName.Text & "</NAME>" & _ " </NAME.LIST>" & _ " <PARENT>" & Form1.cmbParent.Text & "</PARENT>" & _ " </GROUP>" & _ " </TALLYMESSAGE>" & _ " </REQUESTDATA>" & _ " </IMPORTDATA>" & _ " </BODY></ENVELOPE>" |
Notes:
You will have to subsitute the object names "Form1", "txtname", "cmbParent" etc in your code.
STEP 3: SAVE module of your program
- Connect to the Tally Server using Open() function of RTSLINK DLL.
- Invoke RTSLINK Send() function to send the XML tags (string) to the Tally server.
Notes:
1) Please refer the Visual basic Example 1 given in www.rtslink.com/visualbasic.html for the syntax to use RTSLINK DLL functions.
2) You will have to declare RTSLINK DLL functions before you can use them. This is covered in the Example 1 in www.rtslink.com/visualbasic.html
CONCLUSION
You have seen how to link GROUP MASTER module of your Software with Tally Software. The most critical thing in linking with Tally is to create the XML Tags and store it in a STRING variable.
You may try creating XML Tags for other Masters on the same lines. Creating XML tags for Vouchers (transactions) is comparatively difficult as compared to Masters. We would suggest that you complete all the MASTERS linking and then proceed with the Transactions.
FINAL WORDS
We would request programmers / software developers to provide sample code written in other programming languages for linking with Tally. The code will be put on this blogspot for the benefit of all interested programmers.
No comments:
Post a Comment