cancel
Showing results for 
Search instead for 
Did you mean: 

Adding UI controls in table

Former Member
0 Kudos

I have typical invoice scenario, where I have a section to add line items in the invoice. my line item will contain serial number, dropdown of product list, quantity, unitprice (read only mode) fields.

I have added the UI controls for the fields except the dropdown for product, I couldn't get the point how I am gonna add a dropdown in table, is this possible if so how?

I will appreciate if any body have better/alternate solutions to share, for handling line items.

Thank you,

Jawed Ali

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You want to add dropdown as one of the columns in the table, then you can choose tableCellEditor as dropdown. Right click on your table column and select insert table cell editor.

I hope this is what you are looking for.

thanks & regards,

Manoj

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

you can implement a combo box.

See [SAP Online Help - Implementing a ComboBox|http://help.sap.com/saphelp_nwce10/helpdata/en/44/e19921d5c12951e10000000a11466f/frameset.htm]

Regards,

Sudhir

Edited by: Bertram Ganz on Jun 17, 2008 4:08 PM, Replaced copied extract from SAP Online Help with link to it.

Former Member
0 Kudos

Hi,

For a drop down you can use the following UI elements

Drop Down by key

Drop Down by Index

While creating the table using template you can select this or later on you can add using add a table column ->right click-> select Insert table cell editor

From the doc

The DropDownByIndex UI element represents a drop-down list with index-based context binding.

Use this element for realizing a one-from-many selection. The drop-down list consists of a text field, a button and a popup. The currently selected value is displayed in the text field, the list of all selectable values is displayed in the popup which is opened by pressing the button.

Data binding:

The property texts must be bound to an attribute Text having a simple type like String contained in a node Items having cardinality 0..n.

The selected item is given by the (lead) selected element of node Items, the item texts are the Text attribute values in node Items.

Events:

On selection of an item, the event onSelect is triggered. Event parameter index contains the index of the newly selected item.

The DropDownByKey UI element represents a drop-down list with key-based context binding.

Use this element for realizing a one-from-many selection. The drop-down list consists of a text field, a button and a popup. The currently selected value is displayed in the text field, the list of all selectable values is displayed in the popup which is opened by pressing the button.

Data binding:

The property selectedKey must be bound to a context attribute Key having a simple type like String with a value set.

The selectable items of the drop-down list are the keys of the value set, the displayed texts are the corresponding values. The currently selected item is given by the current value of property selectedKey.

Events:

On selection of an item, the event onSelect is triggered. The event parameter key contains the key of the newly selected item.

See Also:

com.sap.dictionary.runtime.ISimpleType

com.sap.typeservices.ISimpleValueSet

Regards

Ayyapparaj