cancel
Showing results for 
Search instead for 
Did you mean: 

loading up a Matrix from a usertable on a new pane on Business partners frm

Former Member
0 Kudos

Hi there,

I've been looking on the portal and couldn't find any VB solution for my requirement.

basically i need to be able to load up the matrix from the user table and save data back to the userdefined table.

Could you please help.

Many thanks,

Maryam.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Maryam,

Your requirement is very straight forward the way you pen it. It just goes this way.

1. Create a separate pane and a matrix inside that.

2. Bind the matrix using dbDataSource to the respective table in the back end.

3. During Add / Update mode, fill in datas there manually.

4. During Add / Update button press, if its dbDataSource bound, it will automatically load the values in the table in backend.

5. If its User Data Source bound, you might have to write an Insert or Update query and load the table in backend.

Guess I have answered your question.

Regards,

Satish.

Former Member
0 Kudos

Hi Satish,

Thanks for the reply,

re item2:

if i use :

Private oDBDataSource As SAPbouiCOM.DataTable

the following line is get parsed,

1) oDBDataSource = oBPForm.DataSources.DataTables.Add("@Usertable")

but i throws an error when i try to bound the matrix column to the table fields on the following line.

2) Column = oColumns.Add("U_cardcode", SAPbouiCOM.BoFormItemTypes.it_EDIT)

if I instead use Private oDBDataSource As SAPbouiCOM.dbdatasource

it throws File not found error on the line 1.

Thanks,

Maryam .

Former Member
0 Kudos

Hi Maryam,

You need to use DBDatasource for this kind of operation.

You need to declare it as,

SAPbouiCOM.DBDataSource oDBDataSource;

In the above statement you were right, but taking it further, while binding it to a table, you were actually calling a DataTable, which is wrong, rather, it should be as follows.

oDBDataSource = oForm.DataSources.DBDataSources.Add("@My_Table");

Later, binding it to the corresponding column is as follows.

SAPbouiCOM.EditText txt;
            txt = (SAPbouiCOM.EditText)oForm.Items.Item("txtEditText").Specific;
            txt.DataBind.SetBound(true, "@My_Table", "U_MY_Column");

Hope this helps.

Regards,

Satish.

Former Member
0 Kudos

Satish,

As i mentioned earlier on if i use the following code,

oDBDataSource = oForm.DataSources.DBDataSources.Add("@My_Table");

it throws an error saying table is not found.

thats why i ended up trying the datatable instead. Any advice would be much appriciated.

Thanks,

Maryam.