on 12-29-2004 9:01 AM
Hi,
I'm trying to connect UDO object with a form created with Screen Painter. How can I do it??? Is there any example available???
Thanks.
You should set the property <i>ObjectType</i> with the UID of your UDO object.
You can set it using the ScreenPainter form properties or by code into the FormCreationParams object.
Hope it helps
Trinidad.
Please reward points to this answer if your problem is solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm trying this:
creationPackage = New SAPbouiCOM.FormCreationParams
creationPackage.FormUID = "Area"
creationPackage.Type = "2000000000"
creationPackage.ObjectType = "Area"
creationPackage.WindowType = SAPbouiCOM.BoFormTypes.ft_Fixed
oForm = SBO_Application.Forms.AddEx(creationPackage)
But when it's running I get next error: "No valid property use".
Is "Area" the code of your UDO object?
Is the UDO already created?
You must also create the ForCreationParams using SBO_Application.CreateObject
before asigning its properties (and not with a New).
Here you have a sample:
creationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
creationPackage.FormType = "MyFormType"
creationPackage.ObjectType = "MyUDOCode" 'UDO Object code
creationPackage.UniqueID = "MyFormUID"
oForm = SBO_Application.Forms.AddEx(creationPackage)
Now I'm trying this,
Dim creationPackage As SAPbouiCOM.FormCreationParams
creationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
creationPackage.FormType = "2000000000"
creationPackage.ObjectType = "Area" 'UDO Object code
creationPackage.uniqueID = "Area"
creationPackage.XmlData = oXMLDoc.xml
oForm = SBO_Application.Forms.AddEx(creationPackage)
But I've got the same error.
The Area is the Code of my UDO object. This information is got from debugger infromation Form = Area.
The UDO object is already created through the SBO Wizard.
The FormType is from ScreenPainter property (is doesn't let change it...is always 2000000000 or I don't know how to do it)
The UniqueID is from ScreenPainter property as well.
Perhaps I'm doing something wrong with these properties.
Regards.
I will sugest to create a simple form (with only one edit text or something) with the code (not using xml) and try to asign the UDO object to this form. Then see if everything is ok.
After that you can save your form in an xml file and reload it into a FormCreationPackage object.
If this two steps work then create the same simple form usign ScreenPainter and test it one more time.
Compare xml files of the differents ways and try to find the problem.
In the code I cannot find anything wrong.
It closes the aplicacion of SBO and you execute it again.
The error itself due to that you execute your application go, creates the Form , and after , error gives you.
The form is created but there is not visible.
I also Trying to create a Form from an object UDO.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.