on 10-24-2007 10:57 AM
HI,
IS IT POSSIBLE TO CREATE A MASTER FORM HAVING A MATRIX LIKE PURCHASE ORDER WHERE ITEM DETAILS CAN BE ENTERED ?
AND WHEN I CREATE A MATRIX, ROW CAN'T BE SELECTED. I WROTE CODE AS FOLLOWS WHEN MATRIX DEFINED-------
'//***************************
'// Adding a Matrix item
'//***************************
oItem = oForm.Items.Add("Matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
oItem.Left = 5
oItem.Width = 550 '350
oItem.Top = 80
oItem.Height = 320 '150
oMatrix = oItem.Specific
oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single
oColumns = oMatrix.Columns
Subrata,
Did i get u r not i dont knw. I think u want to add the data's from matrix to database.
For that u have to do is
If it is Predefined Screen u have to write in FormDataEvent.
If u add any fields and add to database mean u write as follows
If (BusinessObjectInfo.FormTypeEx.Equals("141")) And ((BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD) Or (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE)) And (BusinessObjectInfo.ActionSuccess = True) Then
Try
BubbleEvent = False
Dim Doc As SAPbobsCOM.Documents
Doc = com.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices)
Doc.Browser.GetByKeys(BusinessObjectInfo.ObjectKey)
Doc.UserFields.Fields.Item("U_Gpno").Value = CStr(API_Frm.DataSources.UserDataSources.Item("grno").Value)
Doc.Update()
BubbleEvent = True
Catch ex As Exception
app.MessageBox(ex.Message)
End Try
End If
Here instead of using oPurchaseInvoice u use the Purchase Order
If this helps give reward points,
Regards,
Anitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes,.. You can do this...
if u want to selected row... then use this code...Like..
if (oMatrix.IsRowSelected(k))
{
val = ((SAPbouiCOM.EditText)oMatrix.Columns.Item(ClsConstant.ColPROFAMCode).Cells.Item(k).Specific).Value;
Sval = ((SAPbouiCOM.EditText)oMatrix.Columns.Item(ClsConstant.ColSCode).Cells.Item(k).Specific).Value;
}
by this you can get sellected row and value of columns.
You can also write code for single line selected or multiline selected and if u want that No rows selected.. For this you can write more property (Not selected) of this..
rgds
deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think sir, u didn't get my question.
Basically the question is ---
I've seen maximum examples of matrix to show the data from the database, not to insert the data in the database. Do u know the code of how to insert data from matrix to database?
And in the Purchase Order form after choosing the BP name, matrix is activated. But I can't do? Do u know how is it possible?
I need the code of it.
regards
Subrata
Hi Subrata,
Yes it can be done.
There is an example in the SDK Sample files to show you how to add and manage a matrix.
it is under:
C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\06.MatrixAndDataSources
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
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.