on 04-24-2013 5:14 AM
hi..
i want to enter some values into the no object table so
used below code..
but exactly code i am getting the error exception from hresult..
i tried 1 nemeric values allso but still error is comming..
how can i solve this one.
Try
'//Initialize objects
oUserTable = ocompany.UserTables.Item("TI_NOBJECT")
'//Get Next RowNumber from UDT
'maxrow = g_GetMaxRow("TI_NOBJECT")
Dim coe As String = 1
'//Set UDT fields value
oUserTable.Code = "one"
oUserTable.Name = "two"
oUserTable.UserFields.Fields.Item("U_CC").Value = "OIN"
'//Add data to UDT
intRetCode = oUserTable.Add()
'//Check if data added or not
If intRetCode <> 0 Then
BubbleEvent = False
ocompany.GetLastError(intRetCode, strErrMsg)
'SBO_Application.StatusBar.SetText(strErrMsg, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error)
End If '//If intRetCode <> 0 Then
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTable)
oUserTable = Nothing
Catch ex As Exception
'// update error log
BubbleEvent = False
' SBO_Application.StatusBar.SetText(ex.Message.ToString, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error)
Finally
'//Clean-Up
GC.Collect()
End Try
Hi,
Try to remove your UDF code line or closed your SAP and open it again. This error due to you've add UDF and you didn't refresh your SAP Client. I've always encountering this error.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
Can you run a query on the user table and check if it has already contain "one" in the code field ?
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,,
Thanks for your reply ...both Edy and Bryan..
Actually there is no records in the table...
Empty table..
Just created table...
I am Wondering how ..
1 day before it is not working..
Yesterday i had not made any changes..
just run it it is working..
...
Any reasons... for this behave..
one thing
i had not made any changes...
User | Count |
---|---|
103 | |
13 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.