Using drop down by Index in webdynpro ABAP


working with Drop Down by index UI element in web dynpro for ABAP

A+ A-

Create and design component as per below diagram.

Drop Down index in web dynpro ABAP

Step1: Go to SE80, create a web dynpro component ZSAN_DD_INDEX, save it in a local object.

Step2: Double click on main view, click on change, go to context, create a node DD_INDEX with (0 - n) cardinality and create two attributes as below.

MTART -> TYPE -> MARA_MTART.

SELECTED -> TYPE -> CHAR30.

Step3: Go to layout, right click on ROOTUIELEMENTCONTAINER, insert element id : DDI, type : DropDownByIndex, enter, create binding for the property ‘texts’ to MTART of node DD_INDEX. Similarly insert another UI element id: TEXT, type: TextView, enter, create data binding for the property ‘text’ to SELECTED of node DD_INDEX.

Step4: Go methods, double click on WDDOINIT, and add below logic.

Step5: Save and activate whole component, create application and test.



Was this lesson helpful to you? Yes No 15 People out of 23 think this lesson helpful

Lesson Navigation

←Previous Chapter
Next Lesson → Hook Methods in webdynpro ABAP