Current Variables in T24
CURRENT VARIABLE
Introduction
In addition to the system common variables that can be used in ENQUIRY and VERSION there is a feature where the user can populate a variable of their own and use it later. There are now a series of
new system variables and a much wider option for users to create and use their own which are:
CURRENT.CUSTOMER
CURRENT.ARRANGEMENT
CURRENT.EXTERNAL.USER
These may be set on login by an external user and cleared when they logout. This means that ENQUIRY
& VERSION can be tailored to accept the content of the variable instead of forcing a user to enter their
own customer number or arrangement etc.
Similarly in VERSION you can now default a field content by using the !CURRENT.CUSTOMER
to populate a customer field with the current content of the variable. So the variable could be set in
one Enquiry and used in either another Enquiry linked to it; or via VERSION to populate fields in an
application triggered from the Enquiry.
Note:
Wherever you set your CURRENT.xxx variable it will remain until you logout/login again so is available
during your active session until you change it.
USE OF CURRENT VARIABLE IN ENQUIRY:
Steps to be followed:
Step1:
Define the field in the enquiry for which the field value has to be used in composite screen or version. For
example define the field ARB.SWAP.FX in the enquiry IBIS.FOREX.ARBSWAP.IHLD.DEALS.
Step2:
In the field Enquiry Name in Enquiry define the COS screen name and in the selection criteria use the
current variable
The value of the field can be used to set a user-defined variable (e.g. CURRENT.CUSTOMER,
CURRENT.ACCOUNT, etc.). For example, "CURRENT.DATE>DATE" where DATE is a field on the
enquiry, or using a literal as the value as in "CURRENT.DATE>20070101".
In order to set the value of a user-defined variable a ">" character must be used between the variable
name and the variable value. For example, "CURRENT.DATE>DATE", or "CURRENT.DATE>20070101".
Step3:
Now use the CURRENT.ARBSWAPFX variable in the version used in composite screen.
In order to use the value of a variable an "!" character must be used preceding the variable name. For
example, a field can be defaulted to today's date by using "! TODAY" or the value of a user-defined
variable containing a customer number by using "!CURRENT.CUSTOMER".
This current variable can be achieved through routine also.
Insert Files: I_System
While assigning to a current variable, Notable thing is that it should starts with ‘CURRENT.’
To assign a value to the variable Syntax is
CALL System.setVariable('CURRENT.<VariableName>’,<Value assigned to the variable>)
Eg:
CALL System.setVariable('CURRENT.USER', USER.ID)
Where USER.ID = OPERATOR
EXAMPLE:
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_ENQUIRY.COMMON
$INSERT I_F.USER
$INSERT I System
USER.ID = OPERATOR
CALL GET.LOC.REF('USER','L.DBGT3.DEP.COD', YPOS)
*L.DBGT3.DEP.COD is a local reference field in USER attached.
Y.AOA = R.USER<EB.USE.LOCAL.REF, YPOS>
CALL System.setVariable ('CURRENT.USER', USER.ID)
RETURN
END
Comments
Post a Comment