Sets or returns the account number when account segmentation is defined in SAP Business One.
Field name: FormatCode.
Length: 210 characters.
Mandatory field in SAP Business One when working with account segmentation
| Visual Basic |
|---|
Public Property FormatCode() As String |
Retrieving an account that operates with account segmentation
When working with segmentation, SAP Business One ignores the account Code and uses only the FormatCode that its value represents the account number in Chart Of Accounts.
To retrieve an account that operates with account segmentation:
1. Find the account key using the method GetObjectKeyBySingleValue.
2. Use the returned Recordset to retrieve the value of the key (for example, _SYS00000000010).
3. Call the method GetByKey with this value (for example, _SYS00000000010) to retrieve the account.
FormatCode Structure
The FormatCode can include up to 10 segments. The default account segmentation format in US databases includes four segments as follows:
- Natural account - 8 numbers (for example: 11100000)
- Division - 2 numbers (for example: 01)
- Region - 3 numbers (for example: 001)
- Department - 2 numbers (for example: 03)
The complete FormatCode is in the example listed above is: 11100000-01-001-03.
| Retrieving an account when working with segmentation (Visual Basic) | Copy Code | |
|---|---|---|
| ||