Hi all.
I created form and matrix in it. the first column has linked button.
When I click linked button an UDO form(created with screen painter) opens and I begin to fill data to the form.
Data that will be show in textboxes or comboboxes, they work good.
But for matrix it does not work and data not show in it.
I dont know what is the problem.
Thanks in advance.
These are parts of my code:
if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED & pVal.ColUID == "Instance" & pVal.BeforeAction == false)
{
string Instance = oMatrix.Columns.Item("Instance").Cells.Item(pVal.Row).Specific.Value;
SBO_Application.ActivateMenuItem("47630"); // opens udo form
SAPbouiCOM.Form oDrawingForm = SBO_Application.Forms.ActiveForm;
SAPbouiCOM.Matrix oDrawQM = (SAPbouiCOM.Matrix)oDrawingForm.Items.Item("0_U_G").Specific; // 0_U_G is matrix in Materials (look at picture)
string DrawQMQuery = "SELECT T0.\"U_itemcode\" FROM \"DEV\".\"@AQADRAWMAT\" T0 WHERE \"LogInst\" = " + Instance;
SAPbouiCOM.DataTable AQM = oDrawingForm.DataSources.DataTables.Add("AQM");
AQM.ExecuteQuery(DrawQMQuery);
oDrawQM.Columns.Item("C_0_1").DataBind.Bind("AQM", "U_itemcode"); //C_0_1 is Item code column id in the matrix. (look at picture)
oDrawQM.AutoResizeColumns();
oDrawQM.LoadFromDataSourceEx();
}
I click linked button, with instance 161 and it shows nothing in matrix (instance is column in form I created):
In SAP HANA the query works and it show 1 and 2 for U_itemcode: