cancel
Showing results for 
Search instead for 
Did you mean: 

hI..Can any one explain about Cardinality

Former Member
0 Kudos

Hi,

I am new to Webdynpro.ABAP...I want know how the cardinality affect the drop down UI element.

To be more specific..I am populating the drop down dynamically using code and I had set the cardinality for that drop down node 0 to n but its giving runtime error .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you have a dropdown, and you want to populate this one from within a 0..N cardinality node,

make sure to use a dropdown by index.

some more explanations about these topics can be found here:

[Context nodes|http://help.sap.com/saphelp_nw2004s/helpdata/en/7a/787e40417c6d1de10000000a1550b0/frameset.htm]

[Dropdown by index|http://help.sap.com/saphelp_nw2004s/helpdata/en/dd/b0884118aa1709e10000000a155106/frameset.htm]

grtz,

Koen

Former Member
0 Kudos

Hi.

I am using DropDownByKey....So, whats the reason for the error if Cardinality is 0 to n. the error resolved when I make Caardinality 1 to n but I want to know what is the rerason behind this??

Can you please explain it to me..

Former Member
0 Kudos

Hi,

that is because you have now limited the context node to a single line, that line is represented in simple elements like

input fields, dropdown by key, textview,...

if you have a cardinality 0..N or 1..N you should represent it in a table or ALV.

grtz,

Koen

Former Member
0 Kudos

Hi

In case of drop down by key, the 'selectedKey' property of the UI element takes/holds only a single value - that is the actual value which is selected. Therefore, it behaves just like an input field.

Regards,

Wenonah

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

For Drop down by key, the cardinality should be 0..1. The reason is that drop down by key can comprise of only one value.

For tables & drop down by index, the cardinality should be 0..n, since a table can comprise of multiple rows.

For a more technical description, please go through the documentation. For now, change the cardinality of the context node to 0..1.

Hope this helps.

Regards

Wenonah