Skip to Content

Sales Order sorted by item code before add

Good morning,

In B1 and in the Sales Order form, I would like sort the item codes in the matrix before the users adds the SO. I would like to get the same behaviuor that when we do a double click in the Item Code header column.

I tried this code but it doesn't work because it also orders the order the "empty line"

Dim Matrix AsMatrix = CType(form.Items.Item("38").Specific, Matrix)

' Get Column object

Dim Column AsColumn = Matrix.Columns.Item("1")

' Ascending sort order

Column.TitleObject.Sort(SAPbouiCOM.BoGridSortType.gst_Ascending)

Example

Line 1 item A005

Line 2 item A002

Line 3 item empty (ready to insert a new item)

When I run this code the matrix becomes

Line 1 item empty

Line 2 item A002

Line 3 Item A005

Any help will be appreciated.

Best regards,

Augusto Silva

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 13 at 07:43 AM

    Hi Augusto,

    Can you delete the first line on the grid after you've ordered it?

    Pedro Magueija

    LinkedIn | Twitter | Blog

    Add comment
    10|10000 characters needed characters exceeded