cancel
Showing results for 
Search instead for 
Did you mean: 

Add Data to a System Form(139) Matrix

Former Member
0 Kudos

Hi All,

I try to add in Sales Order(139), 2 lines where itemcode has the value '0001'. Although I used he following code in UDO and worked fine, in System Form it issues an error.

Any Idea?

Dim f As SAPbouiCOM.Form

Dim mInv As SAPbouiCOM.Matrix

Dim colcode As SAPbouiCOM.Column

Dim oItemCode As SAPbouiCOM.EditText

f = SBO_Application.Forms.Item(FormUID)

mInv = f.Items.Item("38").Specific

colcode = mInv.Columns.Item("1")

f.Freeze(True)

Dim i As Integer

For i = 1 To 2

mInv.AddRow()

oItemCode = colcode.Cells.Item(i).Specific

oItemCode.Value = "00001"

Next

f.Freeze(False)

Thanks in Advance,

vangelis

Edited by: Vangelis Kanellopoulos on Jun 2, 2009 5:32 PM

Edited by: Vangelis Kanellopoulos on Jun 2, 2009 5:34 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Can you write me the error!!!!!

Is there item code(0001) exist in Item Master table. If not then the system form will give you the error. It the standard SAP B1 functionality that it will check the availability of item in Item master....

-Manmath

Former Member
0 Kudos

Hi Manmath,

Yes there is a such itemcode!!!

What happens is that when I see it in debugger when it comes to line:

" oItemCode.Value = "00001"

next cursor starts aGAIN to line:

"f = SBO_Application.Forms.Item(FormUID)"

That means that doesn't cursor reach the end of loop!.

The message that comes after some period is that "the remote procedure call failed".

In "Catch ex As Exception" doesn't return anything.

Best Regards,

Vangelis