Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

System Field Deletion

Hi,

I have created a user defined table using coding with single field "typedesc". When i see in the SQL server

there are two fields "Code" and "Name" is available.

But now i need to delete the field "Name" which has been created by the system automatically.

Please let me know how can i delete the Ssytem Field "Name" using coding. (or) i need to make this field as non mandatory.

Try

oUserFieldsMD = Nothing

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

oUserFieldsMD.TableName = "@PSSIT_PMWCTYPE"

oUserFieldsMD.Name = "typedesc"

oUserFieldsMD.Description = "Type Desc"

oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha

' oUserFieldsMD.SubType = SAPbobsCOM.BoFldSubTypes.st_Quantity

oUserFieldsMD.EditSize = 60

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

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try

regards

Suresh S

Former Member
Not what you were looking for? View more on this topic or Ask a question