cancel
Showing results for 
Search instead for 
Did you mean: 

Item Master Data Properties

Former Member
0 Kudos

Hi,

On the item master form, there is a tab named 'Properties' that contains the properties which can be used for sorting and grouping items in reports.

Now, i would like to have these values (check boxes) displayed on my addon form.

I have managed to display these properties as checkboxes on my addon form, however, the check boxes are all unchecked even when they are actually checked for that particular item on the Item Master form.

Where can i read these values from?

Kind regards,

Esau

Accepted Solutions (1)

Accepted Solutions (1)

Nussi
Active Contributor
0 Kudos

Hi,

maybe you did not use a datasource for your checkbox. when you load the form use the following code for each of your checkbox - than you should be able to select/check the box.

oForm.DataSources.UserDataSources.Add("ckBox1", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);

((SAPbouiCOM.CheckBox)(oForm.Items.Item("ckBox1").Specific)).DataBind.SetBound(true, "", "ckBox1");

EDIT:

in case you want to know how you get the Data from the Item Object via DIAPI:

oItems.get_Properties(int GroupNum)

lg David

Former Member
0 Kudos

Thank you David for your suggestion.

I have attached some screenshots of my form and related tables - I may be missing something.

The attached documents:ItemProperties_ScreenShots.txt and ItemProperties_ScreenShots.jpg

Basically, i have the properties displaying on my form - its getting the checked values for the select properties that i was not able to achieve.

Any ideas are appreciated.

Esau.

edy_simon
Active Contributor
0 Kudos

Hi Esau,

Item properties are in the OITM Table.

Field QryGroup1 .. until QryGroup64 represents Item Properties 1 until 64.

Regards

Edy

Nussi
Active Contributor
0 Kudos

Hi,

ok - you are using a matrix - the easist way is to fill the matrix with a datatable.

but than you should create the datasource in another way.

here's a sample for DataTable DataSource:

oForm.DataSources.UserDataSources.Add("dsCheck", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);

((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxUID").Specific)).Columns.Item("ColCheck").DataBind.SetBound(true, "", "dsCheck");

oForm.DataSources.DataTables.Add("LIST");

oForm.DataSources.DataTables.Item("LIST").ExecuteQuery("SELECT Field FROM Table");

((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxUID").Specific)).Columns.Item("ColCheck").DataBind.Bind("LIST", "Field");

((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxList").Specific)).Clear();

((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxList").Specific)).LoadFromDataSource();

this will fill your matrix column with the field from the query - and it should work for your checkbox column.

give it a try

lg David

Answers (1)

Answers (1)

Former Member
0 Kudos

Thank you very much guys for your assistance.

Edy, your hint saved me a bit of a headache - i was so focussed on finding an "ItemsProperties" field

David, the solution i ended up with basically matches your code sample 😉

Again, thanks!

Esau.