cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Grid and Matrix in UI

Former Member
0 Kudos

Hello,

I am newer to UI Development in SBO.

can someone explain the difference?

Is that documented? Where?

When is it necessary/better to use one or the other?

Thank you

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello

matrix is the historical item of SAP B1. (you see in marketing documents where you enter positions). it is very good for data editing

it can be

- connected to any data sources (UDO, User Defined datasource, System related datasources, datatables) and for UDOs can be managed automatically the savings.

- robust, can can be managed fully (validations, data editing etc).

- column visiblity and edit purposes can be managed by Form Settings

I use this 80%, especially when i has to save data into the database (UDO, UDT, UDF, ETC).

Grid is a newer object in SAP B1, is it very good for visualization (you see in MRP Wizard, expand / Hide )

- very fast, can be loaded from datatable

- can be hierarchical (expanding / Groupping/ etc).

I use this for reports, or just for presenting a result of a Query for Hierarchical purposes, not so comfortable for editing/ saving data

each 2 objects is well documented in the SDK help, and you can find samples in the installed help application

C:Program FilesSAPSAP Business One SDKSamplesCOM UIVB.NET06.MatrixAndDataSources

C:Program FilesSAPSAP Business One SDKSamplesCOM UIVB.NET19.Grid

regards

János

Former Member
0 Kudos

Hello,

thank you very much for your reply.

I discovered that Grid Object was read only and now we are trying to develop using Matrix.

All the code to read/insert/update the data in a table must be written by hand?

Nothing of that can be done via screen painter.

I also tried to make an UDO via Object Registration Wizard but then I don't know how to run/open/execute it.

There are a lot of help, manuals, documentation but found nothing that explain these parts.

Thank you very much

Andrea

Former Member
0 Kudos

Hello Andrea,

If you use UDO and Matrix : it will be saved automaically the data, you do not have to program anyting.

here is an example:


Dim oForm As SAPbouiCOM.Form
        Dim creationPackage As SAPbouiCOM.FormCreationParams
        creationPackage = sbo_application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)

        creationPackage.UniqueID = "UDO_TEST"
        creationPackage.FormType = "UDO_TEST"
        creationPackage.ObjectType = "UDO_TEST"
        creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
        oForm = sbo_application.Forms.AddEx(creationPackage)

        oForm.Visible = True
        oForm.Width = 300
        oForm.Height = 400

        Dim oItem As SAPbouiCOM.Item
        oItem = oForm.Items.Add("1", BoFormItemTypes.it_BUTTON)
        oItem.Top = 336
        oItem.Left = 5

        oItem = oForm.Items.Add("2", BoFormItemTypes.it_BUTTON)
        oItem.Top = 336
        oItem.Left = 80

        oItem = oForm.Items.Add("3", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oItem.Top = 5
        oItem.Left = 100
        oItem.Width = 100

        oItem = oForm.Items.Add("30", SAPbouiCOM.BoFormItemTypes.it_STATIC)
        oItem.Top = 5
        oItem.Left = 5
        oItem.Width = 90
        oItem.Specific.caption = "Code"

        oItem = oForm.Items.Add("30", SAPbouiCOM.BoFormItemTypes.it_STATIC)
        oItem.Top = 5
        oItem.Left = 5
        oItem.Width = 90
        oItem.Specific.caption = "Code"


        oItem = oForm.Items.Add("4", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oItem.Top = 20
        oItem.Left = 100
        oItem.Width = 100

        oItem = oForm.Items.Add("40", SAPbouiCOM.BoFormItemTypes.it_STATIC)
        oItem.Top = 20
        oItem.Left = 5
        oItem.Width = 90
        oItem.Specific.caption = "Country"

        oItem = oForm.Items.Add("5", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oItem.Top = 35
        oItem.Left = 100
        oItem.Width = 100

        oItem = oForm.Items.Add("50", SAPbouiCOM.BoFormItemTypes.it_STATIC)
        oItem.Top = 35
        oItem.Left = 5
        oItem.Width = 90
        oItem.Specific.caption = "Phone"

        oItem = oForm.Items.Add("6", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oItem.Top = 50
        oItem.Left = 100
        oItem.Width = 100

        oItem = oForm.Items.Add("60", SAPbouiCOM.BoFormItemTypes.it_STATIC)
        oItem.Top = 50
        oItem.Left = 5
        oItem.Width = 90
        oItem.Specific.caption = "Email"

        oForm.Items.Item("3").Specific.DataBind.SetBound(True, "@UDO_TEST", "Code")
        oForm.Items.Item("4").Specific.DataBind.SetBound(True, "@UDO_TEST", "U_COUNTRY")
        oForm.Items.Item("5").Specific.DataBind.SetBound(True, "@UDO_TEST", "U_PHONE")
        oForm.Items.Item("6").Specific.DataBind.SetBound(True, "@UDO_TEST", "U_EMAIL")

        oForm.DataBrowser.BrowseBy = "3" ' for code field

        oForm.Menu.Add("5898", "Base Document", BoMenuType.mt_STRING, oForm.Menu.Count)
        oForm.EnableMenu("5898", True)

UDO name: UDO_TEST

fields in UDO: COUNTRY, PHONE, EMAIL

Regards

János

Edited by: János Nagy on Aug 25, 2010 2:49 PM

Former Member
0 Kudos

Click on send mail icon if you cannot see the code in formatted phase.

Former Member
0 Kudos

But UDO is created by Customization Tools -> Object registration wizard? Or is there another method?

In this wizard there is not a choice to use the matrix object.

How can I view the UDO created by the wizard?

Where is generated the code you write in the message?

Sorry, but I don't understand very well.

Thank you very much.

Former Member
0 Kudos

We are using Sap Business One 8.8 PL13.

Thank you.

Former Member
0 Kudos

I understood that I should flag 'Create Default Form' to have the form

I also see the pdf (Creating a UDO of document type.pps) in folder C:\Program Files\SAP\SAP Business One SDK\Help where it used screen painter to design the form.

It is not clear how to link the srf to UDO.

Thank you.

Former Member
0 Kudos

Dear Andrea,

SAP B1 2007 and 8.8 uses the same logic to create UDOs / call forms, ETC.

>It is not clear how to link the srf to UDO.

sfr you define the object type property and you should write an addon for load it.

Regards

János

Ps: learn this simple code i have sent ... you will understand

Former Member
0 Kudos

Hi

There can be two ways of generating your screen from your UDO...One is through screen painter you manually design the screen and bound the each table column of your UDO in Alias property.....another way is you can generate your form htrough UDO form generator utility which is B1 Development Environment Setup for SAP Business One SDK ....you can download it from sap site...

Thanks

Former Member
0 Kudos

I ask you if B1DE 2.1 for SAP Business One 8.8 (New) - Visual Studio 2005/2008

http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/a175fb62-0c01-0010-a8b5-fa58a13b1cf7 [original link is broken]

is supported also in Visual Studio 2010 or is there something to do?

Thank you

Former Member
0 Kudos

I could install B1DE 2.1 in Visual Studio 2010 after recompiling all source projects and seems ok.

If I want to create a form with a matrix is it necessary to create a master data/master row or document / document row UDO with at least two table (father and child). Can you confirm this?

Can't I create a matrix with Sap Business One UDO Form Generator with a single table?

In the matrix generated with an UDO having 2 table, the functionality to add new lines / delete them is to develop by code ad hoc? Are the 2 buttons (add line, delete line) without functionality?

Thank you

Former Member
0 Kudos

Hi,

You may check this:

Thanks,

Gordon