Skip to Content
0
Former Member
Apr 19, 2010 at 08:55 AM

Enable Matrix Row without pressing any AddLine Button

46 Views

Dear All,

I have created a User Defined Form in SAP containing a matrix with columns as :- Item Code,Item Name,Qty .

I have written the addLine code for Matrix row on the Lost Focus event of Item Code column .

Now when i am adding the data for the first time in the matrix its working properly.

But After adding the document ,when i want to update that document by entering the item code and pressing tab then a new row in matrix gets enabled and i enter the item code but when i update the data system is throwing an error Message

"This Entry Already Exists in the Table ".

May be thats happening due to the AddLine Code for matrix in the row level which i am executing on lost focus of that Item Code column

How to use the fucntionality of AddLine in matrix without using a Button to press .Just like the SAP matrix where one row gets added automatically without pressing any "Add Line" button.

Please suggest how to do it .

Code :-

oMatrix = F.Items.Item(Item).Specific

F.DataSources.DBDataSources.Item(DataSource).Clear()

Class_Purchase_Main.oMatrix.AddRow(1)

Dim x As Integer = Class_Purchase_Main.oMatrix.RowCount

Class_Purchase_Main.oMatrix.Columns.Item(ColAl).Editable = False

Class_Purchase_Main.oMatrix.Columns.Item(ColAl).Cells.Item(x).Specific.Value = x

Class_Purchase_Main.oMatrix.Columns.Item(ColVal).Cells.Item(x).Click(SAPbouiCOM.BoCellClickType.ct_Regular)

Thanks & Regards,

Amit