Try This one ..
Dim oUDF As SAPbobsCOM.UserFieldsMD
oUDF = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
oUDF.TableName = "OPOR"
oUDF.Name = "TB1_Course"
oUDF.Description = "Course UDF"
oUDF.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
oUDF.EditSize = 20
retVal = oUDF.Add
If retVal <> 0 Then
oCompany.GetLastError(retVal, retStr)
2-130
MsgBox("Error " & retVal & " " & retStr)
Else
MsgBox("UDF Added")
End If
oUDF = Nothing