cancel
Showing results for 
Search instead for 
Did you mean: 

How to fast load Bulk Data to matrx using sap b1 addon

narasimha_chary2
Explorer
0 Kudos
296

I have 1000 records of data.I am loading the data to matrix it will take 20 min of time.How to reduce the time to load data to matrix in sap business one

former_member233854
Active Contributor
0 Kudos

Do you need just to show the data or you will need to save somewhere?

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

If it is a matrix on the User Form which is bound to the UDO, you can use something as below:

SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx_0000").Specific;
oMatrix.Clear();
oForm.DataSources.DBDataSources.Item("@LINETABLENAME").Clear();
SAPbouiCOM.DBDataSource oDB = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@LINETABLENAME");
oForm.DataSources.DBDataSources.Item("@LINETABLENAME").InsertRecord(oDB.Size);
oDB.SetValue("U_LineID", oDB.Size - 1, Convert.ToString(oRecSet.Fields.Item("LineID").Value));
oDB.SetValue("U_Code", oDB.Size - 1, Convert.ToString(oRecSet.Fields.Item("Code").Value));
oDB.SetValue("U_Name", oDB.Size - 1, Convert.ToString(oRecSet.Fields.Item("Name").Value));
oMatrix.LoadFromDataSource();

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP SME Support