on 10-06-2009 8:01 AM
Hello
My scenario which I would like to achieve is this:
I have two udo objects. I created them with B1 DE.
From withing one form I (which is based on udo1) I would like to programmaticaly open another form (which is based on udo2).
This newly created form should be in add mode. Then I would like to copy some of the data from udo1 data table (in database)
to udo2 data sources (like data tables, dbdatasources).
This is important - data that is already in database in udo1 should be copied first to udo2 data sources and then eventually to database.
How to achieve this?
Thanks
Kamil
HI
copy using data sources
strQuery5 = "SELECT * FROM [yourfitstudo]
objRec = objMain.objUtilities.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
objRec.DoQuery(strQuery5)
If objRec.RecordCount > 0 Then
objSecondUDO= bForm.DataSources.DBDataSources.Item("@SecondUDO_TABLE")
objSecondUDO.SetValue("U_EnvItmCd", objSecondUDO.Offset, objRecSet.Fields.Item("U_EnvItmCd").Value)
end if
Rgds
Micheal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI ,
1) in the button click of first form
'''a sample code
Dim bForm As SAPbouiCOM.Form
Dim objImpEx As ClsImportExport
objImpEx = New ClsImportExport
bForm = objImpEx.LoadFormRef
2) This is the event being calle din second form
Public Function LoadFormRef() As SAPbouiCOM.Form
objForm = RefLoadForm()
Call LoadValidvaluesToForm(objForm.UniqueID)
Return objForm
End Function
Public Function RefLoadForm() As SAPbouiCOM.Form
Call objMain.objUtilities.LoadForm("Import Export Application.xml", "IMPE", ResourceType.Embeded)
objForm = gApplication.Forms.ActiveForm
objMain.objUtilities.MatrixAddRow(objForm.UniqueID, "109")
objForm.DataBrowser.BrowseBy = "12"
Return objForm
End Function
Rgds
Micheal
User | Count |
---|---|
94 | |
11 | |
9 | |
5 | |
3 | |
3 | |
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.