Table of Contents

CBSGET - Access functions for CBS data

Module CBSGET CBSGET - Access functions for CBS data

Description


Properties

Property YES/NO
Single page frame No
Show toolbar No
Show menu No
Show statusbar No
Show hint No
Fit panel size No

Rules

Rule Name Additional
function CbsGetAllExtIds text static
function CbsGetBalSum numeric global
function CbsGetCbbSql text global
function CbsGetUnbalancedExtIds text static
function GetAamExtId text global
function GetRelevantDateForBalances datetype static
function InternalGenSqlSet text
sub CbsGetBalance global
sub CbsGetBalanceReleasedOnly static
sub GetAamCbsPerDate global
sub GridCfgAddCbs static

Rules Description and Comments

function CbsGetAllExtIds( in Obj module, in CbcArg text ) : text static

The purpose of this function is to retrieve a textblock with all
IDs used by a certain object within a certain column

Obj is a passed module holding the relevant object
CbcArg holds the selected column

If entries with a blank ID are stored, the blank ID is always
the first line in the textblock


function CbsGetBalSum( in ArgObj module, in ArgCbc text, in ArgPerDat datetype, in ArgCur text, in ArgXrtDat datetype ) : numeric global

retrieve the sum of all balances (multiple ExtIds) per specified date converted to the specified target currency
based on the middle rate (or limit rate in case of limit amounts)

ArgObj is the passed module holding the object
ArgCbc is the selected CBS-column (optionally this could be a comma separated list of columns to be added)
ArgPerDat is the date the balance is retrieved for
ArgCur defines the target currency the amount is converted to
ArgXrtDat is the date the exchange rate is retrieved for

the function returns the amount as function result

Corresponding functions: CbsGetBalance


function CbsGetCbbSql( in ArgObj text, in ArgObjInr text, in ArgCbbIns text, in ArgCbc text, in ArgExtid text, in ArgDat datetype ) : text global

Function to create the necessary where clause to restrict the access of an CBB instance to the entries valid on a certain date describing the balance of a certain column.

The returned text can be combined with other where clauses to build the complete where clause of an sql-expression.

The whole SQL expression has to include a CBB instance with the passed instancename.

ArgObj holds the objectnam of the object the balance is associated to as a SqlLit-Literal or as a sql-reference to a column of another table of the select. (e.g. “`GID`” or “GCD.PNTTYP”)
ArgObjInr holds the objectinr of the object the balance is associated to as a SqlLit-Literal or as a sql-reference to a column of another table of the select. (e.g. SqlLit($GidInr) or “GID.INR” or “GCD.PNTINR”)
ArgCbbIns holds the name of the CBB instance used to hold the fitting CBB entries. If left blank no instancename is used to qualify the CBB-fields in the sql.
ArgCbc names the column for which the balance should be retrieved (or empty)
ArgExtId names the ExtId for which the balance should be retrieved (or empty)
ArgCbc and ArgExtid may hold “ IN (`<val1>`,`<val2>` … )” if more than one value should match
ArgDat holds the date of the balance to be retrieved. If the balance of unspecified future date is searched for, the function GetRelevantDateForBalances might be used to get the date.


function CbsGetUnbalancedExtIds( in Obj module, in CbcArg text ) : text static

The purpose of this function is to retrieve a textblock with all
IDs used by a certain object within a certain column which are not balanced

If entries with a blank ID are stored, the blank ID is always
the first line in the textblock


function GetAamExtId : text global

returns EXTID under which additional amounts are stored


function GetRelevantDateForBalances : datetype static

Date to use to get the relevant balance of a contract.
Usually the farest possible date in future.


function InternalGenSqlSet( in ArgLst text ) : text

Routine to create a SQL-Expression, which represents the passed argument in SQL format.
If the passed text holds a comma separated list of values, the returned text
holds a set description in the form “IN ( `val1`, `val2` . . .)”.
If the passed text holds a single value or is blank, the returned text holds “= `val`”
To use a blank value in a set at least a single space has to be passed as value before a comma.
ArgLst hold the passed value or a valuelist as comma separated list


sub CbsGetBalance( inout CbbArg CBB, in Obj module, in CbcArg text, in ExtId text, in PerDat datetype ) global

retrieve balance per specified date

CbbArg holds the result of the call
Obj is the passed module holding the object
CbcArg is the selected CBS-column
ExtId is the selected ExtId for multiple columns
PerDat is the date the balance is retrieved from


sub GetAamCbsPerDate( inout ArgGrp module, in ArgDat datetype ) global

Reads additional amounts into passed ArgGrp
Loads CBB MAXAAM and OPNAAM inside ArgGrp
To be called in GetxxDCbsPerDate in xxDLODs of contracts which supports additional amounts if contract is available


sub GridCfgAddCbs( in ArgIns text, in ArgCbc text, in ArgExtid text, in ArgBusIns text, in ArgTyp text ) static

Routine to add a reference to a cbs instance within an streamgrid definition.
This routine is a supporting routine to the set of GridCfg routines within STGMOD.
ArgIns new instance (default = (first) passed Cbc)
ArgCbc column or comma separated list of CBC`s
ArgExtId Extid passed to CbsGetCbbSql which is used to generate the sql condition
ArgBusIns Instance of the referred to contract
ArgTyp holds `link` or `join` depending on the requested connection

Corresponding routines: GridCfgAddCol, GridCfgAddFld, GridCfgAddJoinIns, GridCfgAddLinkIns, GridCfgAddPara, GridCfgAddPts, GridCfgInit, GridCfgLoadTds, GridCfgSetDefaultOrder, GridCfgSetPromptStream, GridCfgStore


Modules

Module class Instance Comment
CBE CBE
CBB CBB
XRTMOD XRTMOD