cancel
Showing results for 
Search instead for 
Did you mean: 

EditText on Form and in Matrix

Former Member
0 Kudos

Dear All,

I want to use EditText and Matrix on the form. How can I use both of these at the same time ?

I mean how to Read the value or set value from EditText on form or in matrix.

Please help me.

Thank you.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You can use it as follows:

1. Initialize an EditText and Matrix:

SAPbouiCOM.EditText oEditCode = (SAPbouiCOM.EditText)oForm.Items.Item("3").Specific;

SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx_0").Specific;

2. Initialize an EditText in Matrix:

SAPbouiCOM.EditText oEditItemCode = (SAPbouiCOM.EditText)oMatrix.Columns.Item("col_0").Cells.Item(RowNum).Specific;

3. Setting the Value in these EditText:

oEditCode.Value = "Any Value";

oEditItemCode.Value = "Any Value";

4. Getting Value from these EditText:

string Code = oEditCode.Value.Trim()

string ItemCode = oEditItemCode.Value.Trim()

Hope this will help you.

Thanks & Regards

Ankit Chauhan

Former Member
0 Kudos

Hi,

thanks for your reply.

But I want to ask you that what is "3", "mtx_0", "col_0" in your code. Do I need to change it or use the same as it is. ?

Regards

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Every Item on the form (EditText, Matrix, Button, ComboBox) has a unique id.

You can check the unique id as follows:

In SAP:

View->System Information Enable this option.

Now place your cursor on an item. It shows something like Item = 3 or something else.

This is what you need to use actually. Similarly for Matrix Columns you need to use Column= ColUID

Hope it helps.

Thanks & Regards

Ankit Chauhan

Former Member
0 Kudos

Hi,

Not able to understand what have you explained ? Please tell me.

Regards

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

See in the image:

Form = 139 i.e. FormType for Sales Order Form.

Item = 4 i.e. Item Unique ID for Customer/Vendor code. // You need to use this.

ORDR is the table where the value will be stored of Customer/Vendor.

CardCode is the field where the value lies for Customer/Vendor.

Same way, you can Put cursor on matrix column and Check Column = 'Some value'

Hope it helps.

Thanks & Regards

Ankit Chauhan

Former Member
0 Kudos

Hi,

Ok. I got it.

Thanks for the help.

Regards

Answers (0)