on 2008 Nov 14 6:53 AM
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
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
st_Rate --> Double format with the system's rate accuracy.
st_Sum --> Double format with the system's summery accuracy.
st_Price --> Double format with the system's price accuracy.
st_Quantity --> Double format with the system's quantity accuracy.
st_Percentage --> Double format with the system's percentage accuracy.
st_Measurement --> Double format with the system's measurement accuracy.
Dim oUserFieldsMD As SAPbobsCOM.UserField
oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
oUserFieldsMD.TableName = "@PSSIT_PMSCCOMPPOW"
oUserFieldsMD.Name = "hrswrk"
oUserFieldsMD.Description = "Hork Hours"
oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Float
oUserFieldsMD.SubType = SAPbobsCOM.BoFldSubTypes.st_Price
oUserFieldsMD.EditSize = 8.2 'Max is 19.6
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,
varma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you may try
oUserFieldsMD.SubType = SAPbobsCOM.BoFldSubTypes.st_Price
The .EditSize and .Size I use only for db_Alpha and db_Numeric fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Roland is right. Try to set the Suptype as required. Available supdtypes with decimal are:
- st_Rate --> Double format with the system's rate accuracy.
- st_Sum --> Double format with the system's summery accuracy.
- st_Price --> Double format with the system's price accuracy.
- st_Quantity --> Double format with the system's quantity accuracy.
- st_Percentage --> Double format with the system's percentage accuracy.
- st_Measurement --> Double format with the system's measurement accuracy.
Regards,
Friederike
SAP Business One Forums Team
User | Count |
---|---|
102 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.