Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Reg Error in form Load

Hi All,

When i trying to load a form thru the folowing code i am getting the error . The error message is

<b>"Object Reference not set to an instance of an object" </b>

Private Sub LoadFromXML(ByRef FileName As String)

Try

Dim oXmlDoc As Xml.XmlDocument

oXmlDoc = New Xml.XmlDocument

'// load the content of the XML File

Dim sPath As String

sPath = IO.Directory.GetParent(Application.StartupPath).ToString

oXmlDoc.Load(sPath & "\Forms\" & FileName)

'// load the form to the SBO application in one batch

SBO_Application.LoadBatchActions(oXmlDoc.InnerXml)

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try

End Sub

So what can i do on this?

Pl somebody can help me on this to solve

Regards

Suresh R

Former Member
Former Member replied

hi suresh,

In statement

SBO_Application.LoadBatchActions(oXmlDoc.InnerXml)

u have pass the oXmlDoc.InnerXml. this is wrong with ur code. u have to pass the reference of xml string.

oXmlDoc.Load( sPath + "
" + FileName );

// load the form to the SBO application in one batch

string sXML = oXmlDoc.InnerXml.ToString();

SBO_Application.LoadBatchActions(ref sXML);

hope this will help u.

if satisfied, rewards points

regards

nirdesh panwar

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question