on 04-15-2009 10:16 AM
Hello,
how can I create an UDF e.g. Description with more than 254 characters, I search for it an there are an solution with a Strukture as text, but how could I create an UDF with the API Object and an Structure Text?
This is my Code today:
Set oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
With oUserFieldsMD
.TableName = "B1C_CRYV"
.Name = "Select"
.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
.EditSize = 11
.Description = "Select"
.Add
End With
thx for regards
thx to all people hows help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the Solution
Set oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
With oUserFieldsMD
.TableName = "B1C_CRYV"
.Name = "Select"
.Type = SAPbobsCOM.BoFieldTypes.db_Memo
.EditSize = 32767
.Description = "Select"
'.SubType = db_Memo
'.Add
End With
lRetCode = oUserFieldsMD.Add
If lRetCode <> 0 Then
oCompany.GetLastError lErrCode, sErrMsg
MsgBox lErrCode & ", " & sErrMsg
End If
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thats the Error Code SAP Throw:
Invalid item code '1' in Enum 'BoFldSubTypes'. The valid codes are '0'-'', '63'-'?', '35'-'#', '84'-'T', '82'-'R', '83'-'S', '80'-'P', '81'-'Q', '37'-'%', '77'-'M', '66'-'B', '73'-'I'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Alpha is limited to 254 char.
For more use type Memo
regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It solved the Problem not to 100% because I don't know whitch property I should take
I occurs an Error when I´m trying to set the EditSize above 254 Charcters
This is the message SAP throw:
- Feldgröße weicht vom zulässigen Bereich ab (1...254)
thx for other regards
Edited by: Gerald Schwarz on Apr 15, 2009 1:32 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may use code you have already and set .EditSize to max 32767.
If you need structure as text, use .SubType property.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.