on 06-01-2010 4:24 AM
Hi friends,
i am creating a node and it contains 1 attribute and if i am giving cardinality as 1.1 then it is working fine, but if i change cardinility to 0.1 then it gives error as follows :
{
The following error text was processed in the system EH4 : Adapter error in INPUT_FIELD "ROOTUIELEMENTCONTAINER_F_NAME" of view "ZTTRRYY1.MAIN": Context binding of property VALUE cannot be resolved: Node MAIN.1.ZEMP does not contain any elements
The error occurred on the application server ECCEHP4_EH4_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: RAISE_FOR of program CX_WDR_ADAPTER_EXCEPTION======CP
Method: RAISE_BINDING_EXCEPTION of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
}
thanks in advance
Regards,
Mihir Sharma
Hi Mihir,
Every context node is composed of two values that, taken together, describe the maximum and minimum number of elements the node collection may hold at runtime. Suppose you want to bind the context to a table then naturally you need to go for either 0..n or 1..n because the table may contain either a minimum of 0/1 rows & a maximum of any number of rows.
This is important because, if you set the wrong value it would end up in a runtime error. The 2 possible kind of cardinality errors are:
1) Trying to delete the default element from a node of cardinality 1..
2) Trying to add a second element to a node of cardinality ..1
In your case, you want to bind an attribute under your context node to an input field then you need to set the binding as 1..1 as the field can always hold 1 & only 1 value.
For your reference, the concept for different cardinalities are as below:
1u20261 - Only one element is instantiated.
0u20261 - At runtime, no more than one element is instantiated, but it is also possible that no element is instantiated.
1u2026n - n elements can be instantiated, but at least one element must be instantiated.
0u2026n - The number of instantiated elements of the context node can vary.
The cardinalities 0..n and 1..n correspond to the declaration of an internal table. The cardinality 1..1 corresponds to the
declaration of a structure.
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mihir,
When we take the Cardinality as 1:1, the node contains only one element instance, which is instantiated automatically.
When we take the Cardinality as 0:1, the node contains only one element instance, which must not be instantiated.
So the node attribute (cardinality 0..1) binded with Input field value, does not instantiate element instance and the error comes up.
Hope it will clear your doubt.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.