Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Download PDF
Where is it used?
Syntax:
:$FLEX$.previous_value_set_name
Important:
:$PROFILES$.Profile_option_name
Important:
Pre-Requisites:
Created an Executable and a concurrent program which is registered in the
Application Object Library. The Query for the report is as below:
Scenario 1:
Steps:
Create the value set XX_SCENARIO_1 using the validation type as ‘Table’.
Create the second value set XX_Sub1 using the validation type as ‘Table’ and
in the where clause field specify the following code:
where deptno <= :$FLEX$.XX_SCENARIO_1
Working:
In the picture here, the First parameter contains no value, so the second
parameter is disabled as the WHERE clause in value set is equated to
NULL, making the field disabled.
When a value is selected in the first parameter, the second parameter
gets enabled and when the LOV is clicked, it shows the departments
which are in department number 20 and below it, as we have specified
<= in the where clause.
Scenario 2:
Steps:
Working:
Scenario 3:
Use of $PROFILES$ in where clause and Default Value. It is done in the same
way as is used in $FLEX$.
Scenario 4:
Use of Parameter name instead of a value set name in the $FLEX$ Special
Variable.
Where Clause of the value set of table type using the parameter name.
Reason:
When we provide the name of the value set in $FLEX$ then we will be able to
change the value of the parameter which is dependent on it. If the value set is
used by more than one parameter then it becomes difficult to get the exact
value in the dependent parameter as it will fetch the values based on the last
used value of the value set. It could have been last used by the first parameter
or any other parameter in the form. To avoid this kind of confusion, the
alternative is to provide the name of the Parameter itself in the $FLEX$
variable. No matter how many times the value set is used, if we provide the
parameter name, we will get the dependent parameter value based on its
parent parameter only. Let me explain this using the pictures below:
Where Clause of
the value set of table type using the parameter
name.
The first and third parameter are based on value set names and the
second and fourth parameter are based on parameter name. Since
the second parameter is not initialized, the third parameter (value
set based )is also not initialized.
Since the latest value is from Second parameter, hence the value in
third is based on the second parameter. The third value is based on
the value of the second parameter and is irrespective of the value
set. Shown in the next picture.
Here the third parameter takes the latest value of the value set,
hence shows the department name corresponding to that and the
fourth parameter values are dependent on the value of the second
parameter.
These were some of the basic uses of $FLEX$ and $PROFILES$. Feel free to
post your queries and comments on this topic.