cancel
Showing results for 
Search instead for 
Did you mean: 

Drop down values Interactive form and cardinality

Former Member
0 Kudos

Hi,

I have designed an Interactive form of type ZCL. In webdynpro ABAP im using it. I have one filed called:

Purchase Org. "EKORG" from a Vendor BAPI. I have placed a drop down field from Standard palette on to the form. Under object tab, in default binding I have selected my field and a pop is displaying Binding Properties:

If I select update all related properties option then my drop down is changing to Text Filed.

So Im selecting last option like dont make any chages then my drop down will be there and binding also will be there. like following:

$record.IMPORTING.T_BASIC.EKORG.

And I have written code in my doinit method for reading values and binded that internal table to my context node.

If I have onlyone value then it is displaying in the drop down. If I have moe than one value then it is displaying following error:

Number of Elements of the Collection of Node COMPONENTCONTROLLER.1.YFIFM_00005.1.IMPORTING.1.T_BASIC Violates the Cardinality.

where Im going wrong? What cardinality I have to put?

With Regards,

Ravi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi:

I think you can use Library -> Web Dynpro Native -> Enumberated Drop-Down List and drop the Enumberated Drop-Down List to your design form, open Object -> Binding and bind the context to it.

Former Member
0 Kudos

Hi Ravi,

In the main node create another node like A1 with cardinality 0..n and in this node create attributes TEXT and VALUE.

Now goto method and in that method using code wizard read the node A1.

And use the below code snippet sample in your program

*Declare the TYPES

TYPES : BEGIN OF TY_TABLE,

TEXT TYPE SOMETYPE,

VALUE TYPE SOMETYPE,

END OF TY_UOM.

*Define Internal Table and work area.

DATA : IT_TABLE TYPE STANDARD TABLE OF TY_TABLE INITIAL SIZE 0,

WA_TABLE TYPE TY_TABLE.

SELECT TEXT VALUE FROM TABLENAME INTO TABLE IT_TABLE.

lr_node_info->bind_table( IT_TABLE ).

And in the Adobe Form Layout

Go to Menu of the Adobe LiveCycle Designer:

Tools>Options..>DataBinding

In that window u just check the Show Dynamic properties Check Box.

Now for the Drop Down go the binding tab in object palette and click on the list items and there specify the text as the internal table text field and value as internal table value field and select the internal table.

OR

From the WebDynpro Native Library Palette use the Value Help Drop Down and in object palette goto binding tab and provide the form interface binding. Before this in the WebDynpro for the particular field in the properties provide the search help.

Regards

Pradeep Goli

Former Member
0 Kudos

Hi Ravi,

Check the cardinality property of node. I think you have set 1..1 cardinality. It mean the node can contain only one element thats why it is giving error when there is more then element.

So change the cardinality to 0..n or 1..n.

Regards,

Vikram

Former Member
0 Kudos

Hi,

I tried with possible cardinalities. But still facing the same problem. I have context structure like following

MainNode(1 to 1)

-subnode(1 to 1)

--subnodesubnode (1 to n)

--element EKORG (is here for my dropdown)

Can some one tell me what cardinality I should maintain for this scenario

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

If you want a Drop Down list, try using the "ValueHelpDropDownlist" from webdynpro native/activex tab as per the display type used in the interactive form. Then do the binding of the fields. Click Update all related properties...

Thanx and Regards,

Divya