Relationship between variable and element

91 阅读1分钟

Created by Jerry Wang on Jul 12, 2014

We know that for a given element, it could be assigned with several variables. 

 

clipboard1

 

 

for example, variable ZCR_RULE_TEST has only maintained two variables. 

 

clipboard2

 

 

 

It is a common misunderstanding that an element could only use the variables which are assigned to it in this customizing during the layout design. This is not correct.

 

 

See example for above element. Although it has only been assigned with two variables. However in the design time, all variables defined for the content are available for use.

clipboard3

 

To understand the relationship between variable and element, we must first know one attribute for variable.

When we create a variable, we have to maintain its visibility:

clipboard4

 

 

The dialog visibility means the variable must be displayed in the dialog processing. Normally the description of variable will be maintained as the style of question, to guide end user to input accordingly, see example below.

 

 

Note: in this example, all variables marked with "Dialog only" or "Dialog and Fill-in Tab" will appear in the tab "Dialog".

clipboard5

 

And in Document Summary, you could see only the two variables assigned to the element are displayed:

clipboard6

 

 

Once you have fnished the value fill and click button "Accept":

 

clipboard7

 

 

And you could see the values are filled in the document:

 

clipboard8

 

 

 

Summary

 

 

1. If a simple variable is marked as "Dialog and fill-in tab", it means this variable is then displayed as a leaf node in the variable tree and could be used in the layout design of any element. This means even if you have not assigned it to a given element, you can still drag this variable to the layout part of that given element. Till now there is no hard relationship between the variable and the given element.

 

 

Meanwhile if you also have assigned the variable to the element in customizing, then the variable will be displayed in the fill-in tab of that element, as shown in the example above.

 

 

2. If a simple variable has visibility "Fill-in tab only", then it will not be displayed in the Dialog tab. For example I have set ZJERRY_TEST as "Fill-in Tab only"

clipboard9

 

and it will not be displayed in the Dialog tab any more:

clipboard10

 

 

But it still could be consumed in the element design:

 

clipboard11

 

 

So essentially speaking, the assignment of variable to element below could only control whether a variable will appear in the fill-in tab of a given element, but could not controll whether a variable could be consumed in the element layout design.

 

clipboard12

 

 

In order to find out which variables have been maintained to a given element, please query table /IPRO/TELM_VAR with element name for field ELMNTX:

 

clipboard13

 

 

 

clipboard14