Skip to Content

how to change la PurPackUn of mi item

hi i try to change mi PurPackUn in my item with sdk and vb.net but i cant

I'm trying with this code

Try
            Dim vPay As SAPbobsCOM.Items
            Dim RetVal As Long
            Dim ErrCode As Long
            Dim ErrMsg As String
            Dim nErr As Long
            vPay = vCompany.GetBusinessObject(BoObjectTypes.oItems)
            If vPay.GetByKey(ItemCode) Then
                vPay.BarCode = CodBarras //here i change my codebar and work fine

                vPay.Pack = Emp // here it is my problem

                'Attempt to update the business partner  
                RetVal = vPay.Update
                If RetVal <> 0 Then
                    'The update failed  
                    Dim errI As Integer = 0
                    Dim errS As String = String.Empty
                    'Check why the update failed  
                    vCompany.GetLastError(errI, errS)
                    MsgBox("Update failed because: " & errI.ToString & " " & errS)
                    Return 1
                Else
                    Return 0
                    'Success, perform any follow-up tasks here  
                End If
            Else
                MsgBox("Update failed because: ")
                Return 1
            End If


            Return 0
        Catch ex As Exception
            Return 1
        End Try
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers