Skip to Content
0
Former Member
Nov 14, 2008 at 06:53 AM

Decimal Place in user define field

502 Views

Hi,

While creating the table through user defined field, i need to add the field with decimal place if i give the decimal point in the editsize it is throuing the error message please let me know how i can add the field with decimal value.

Dim oUserFieldsMD As SAPbobsCOM.UserField

oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)

oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)

oUserFieldsMD.TableName = "@PSSIT_PMSCCOMPPOW"

oUserFieldsMD.Name = "hrswrk"

oUserFieldsMD.Description = "Hork Hours"

oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Float

oUserFieldsMD.EditSize = 8.2

lRetCode = oUserFieldsMD.Add

If lRetCode <> 0 Then

oCompany.GetLastError(lErrCode, sErrMsg)

MsgBox(sErrMsg)

Else

MsgBox("Field: '" & oUserFieldsMD.Name & "' was added successfuly to " & oUserFieldsMD.TableName & " Table")

End If

regards

Suresh S