on 07-31-2007 11:33 AM
Hi,
I have developend an add on using vb.net. I call the load xml function to display the forms in sap b1. Now when i try to package it and create an .ard file i get a file not found exception. Now i know the problem is because im not including the xml files. My question is how do i do it? I have used the sample addONInstaller provided by sap and iv also used the ard generator. But each time i run the setup i get the file not found error. Can someone please help me with this issue
Thanks and Regards
Aris.
Hi Aristotle
What function are you using to load the srf (xml) files? I used a function this function to load the files. See what happens is that at development time .NET runs the executable in the ../bin directory. inside the source code folder. But when you install your add-on, the executable won't be on such directory. Try this function a made a little change to.
Public Function loadFromXML(ByRef FileName As String, Optional ByVal strSubdirectories As String = "") As String
'********************************
' loads content of the XML File
'********************************
Dim oXmlDoc As Xml.XmlDocument
Try
oXmlDoc = New Xml.XmlDocument
Dim strPath As String = System.Windows.Forms.Application.StartupPath
If Right(strPath, 3) = "bin" Then strPath.Remove(strPath.Length - 3, 3)
oXmlDoc.Load(strPath & "" & strSubdirectories & "" & FileName)
Return (oXmlDoc.InnerXml) ' load form to SBO application in one batch
Catch
System.Windows.Forms.MessageBox.Show("Error loading data from XML file")
End Try
End Function
To run successfully in development environment tough you have to include your xml files inside the bin directory (you might be already doing this)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neftali
Thanks alot it got the problem solved:)
Regards
Aris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.