EsbOtlGenerateCurrencyOutline
Description
EsbOtlGenerateCurrencyOutline() generates a currency outline based on the existing outline.
Syntax
EsbOtlGenerateCurrencyOutline (hOutline, phCurOutline)
ByVal hOutline As Long
phCurOutline As Long
Parameters
hOutline | Outline contexthandle.
|
phCurOutline | Return variable for the currency outline handle.
|
Return
Value
Returns 0 if successful; otherwise one of the following:
OTLAPI_ERR_ALREADYCURRENCY
OTLAPI_CUR_NOACCOUNTS
OTLAPI_CUR_NOTIME
OTLAPI_CUR_NOCOUNTRY
Notes
- There must be a Time, Accounts, and Country dimension
in the source outline.
- The Time dimension and all descendants are copied
directly from the source outline to a Time dimension in the new
outline.
- A dimension named CurCategory (Dense, Category
= Accounts) is created in the new outline. All currency categories
in the source Accounts dimension become children of the CurCategory
dimension in the new outline.
- A dimension named CurName (Dense, Category =
Country) is created in the new outline. All currency names from
the source Country dimension become children of the CurName dimension
in the new outline.
- A dimension named CurType (Sparse, Category =
Type) is created with no children in the new outline.
- The currency outline must be saved by calling
EsbOtlWriteOutline() followed by EsbOtlRestructure()
and closed by calling EsbOtlCloseOutline().
- The new outline has the following attributes:
Auto-configure is set to ESB_TRUE
Case-sensitivity is set to be the same as the original outline.
Example
Declare Function EsbOtlGenerateCurrencyOutline Lib
"ESBOTLW" (ByVal hOutline As Long,
phCurOutline As Long) As Long
Sub ESB_OtlGenerateCurrencyOutline()
Dim sts As Long
Dim Object As ESB_OBJDEF_T
Dim hOutline As Long
Dim hCurOutline As Long
Object.hCtx = hCtx
Object.Type = ESB_OBJTYPE_OUTLINE
Object.AppName = "Sample"
Object.DbName = "Interntl"
Object.FileName = " Interntl "
sts = EsbOtlOpenOutline(hCtx, Object,
ESB_YES, ESB_YES, hOutline)
If sts = 0 Then
sts = EsbOtlGenerateCurrencyOutline
(hOutline, hCurOutline)
End If
End Sub
See
Also
EsbOtlOpenOutline()
EsbOtlWriteOutline()
EsbOtlRestructure()