Skip to Content
author's profile photo Former Member
Former Member

Item Master Data Properties

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jul 26, 2012 at 12:47 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • author's profile photo Former Member
    Former Member
    Posted on Jul 31, 2012 at 12:49 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.