Skip to Content

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

Data Binding Issue

Hello,

I am trying to figure out how to Bind Data to a Custom form I created in Screen Painter. I would like to have all of the functionality(Add/Update/Find) of a standard form. I beleive this needs to be a UDO, but seem to be missing some key concepts in getting this to work. In programming this I am getting a "File Not Found" error when trying to bind the fields to my User Defined Table.

Below is the code I am attempting to do. The Form works and everything is fine until I attempt to Bind the Data at that point it throws an exception.

Dim CP As SAPbouiCOM.FormCreationParams

Dim oEdit As SAPbouiCOM.EditText

Dim SBOXMLDoc As System.Xml.XmlDocument

Dim SBOFormCreationParam As SAPbouiCOM.FormCreationParams

Dim SBOForm As SAPbouiCOM.Form

SBOXMLDoc = New Xml.XmlDocument()

SBOXMLDoc.Load("C:\WorkForm.srf")

SBOFormCreationParam = applic.CreateObject_(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)

SBOFormCreationParam.XmlData = SBOXMLDoc.InnerXml

SBOForm = pApp.Forms.AddEx(SBOFormCreationParams)

SBOForm.Freeze(True)

Try

'5 is the UID of the Text Field I am trying to bind

'@AB_OWCT is an existing User Defined Table

'U_WorkID is an existing field in that Table

oEdit = SBOForm.Items.Item("5").Specific

oEdit.DataBind.SetBound(True, "@AB_OWCT", "U_WorkID")

Catch

' Err.Desc = "File Not Found'

End Try

SBOForm.DataBrowser.BrowseBy = "5"

SBOForm.Freeze(False)

I have tried to look at the Source code of the UDO Examples but have not had much luck in figuring out what I am missing.

Thank You in Advance

Paul

Former Member
Not what you were looking for? View more on this topic or Ask a question