Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SBO 2007 PL41 issue - matrix or purchase order

Hi,

Im fighting for 2 weeks with PL41 and Im crazy for this already.

My scenario is:

I have user form, on this form is one matrix and lines of this matrix are itemcode, qty, warehouse, user1, user2.

User select rows in matrix (more lines) and click on button. By clicking is creating purchase order for selected rows (itemcodes) in matrix.

The system of creation of purchase order is:

in for next cycle Im going through all matrix lines and Im checking, if matrix row is selected, if yes, I add line in purchase order.

The part of code is:

obj = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)

obj.CardCode = kod_dod

obj.RequriedDate = dtNejpoz

obj.DocDueDate = dtPom2

For i = 1 To oMatrix.RowCount

If oMatrix.IsRowSelected(i) Then

...

...

If bAddLine Then

obj.Lines.Add()

Else

bAddLine = True

End If

obj.Lines.ItemCode = code

obj.Lines.Quantity = qty

obj.Lines.WarehouseCode = whs

obj.Lines.UserFields.Fields.Item("U_ZAK").Value = zak

obj.Lines.UserFields.Fields.Item("U__ID").Value = id

oMatrix.SelectRow(i, False, True)

end if

next i

err_code = obj.Add()

The problem is, that when user run this, the table CHEN is locked for other users during creation of order.

With

oMatrix.SelectRow(i, False, True)

I can see in SBO app. that each row takes about 10 seccond to proceed. There only 2 possibilities: isrowselected is problem or line adding. Before was there PL30 and it works without problems, but with 41 it is too slow.

I will check PL42, but I will glad for your comments.

thanks

Edited by: Petr Verner on Oct 8, 2008 4:15 PM

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question