cancel
Showing results for 
Search instead for 
Did you mean: 

How to react on a Table Cell Selection?

Former Member
0 Kudos

Hi All,

in my application I have a filled table. The table is bound to a context node which represents the return value of a RFC. Now, the user needs to be able to select a particular cell and change its value. However, my table does not allow to change values, although my readOnly property is set to false.

What can I do to enable this and what Action/ Event is raised when the user clicks on a cell?

Generally, I would be interested in a comprehensive Web Dynpro table usage overview/ manual/ intorduction.

Thanks, Johannes

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi Johannes,

Open layout tab of the view.

Goto Outline view.Expand your table and its columns.

Check type TableCellEditor. If it is TextView then delete it insert input field as TableCellEditor. Then your table able to take input from user.

Check this [link|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90ac0015-d1c5-2a10-d788-aed89990811d]

Regards,

Siva

Edited by: Siva Rama Krushna on Aug 12, 2008 8:06 PM

Answers (5)

Answers (5)

Former Member
0 Kudos

ok, can edit my table now.

I need to show the changes on the next view (same table with changes marked bold).

Furthermore, I need to save the changes in the backend. In doing so, i first need an Object containing the changed table. Is there such a thing? Or do the changes even take effect in the actual table?

Thanks, Johannes

vmadhuvarshi_
Contributor
0 Kudos

Johannes,

You can make the node containing table data available on next iView with Context mapping.

If this node is in your View controller and you are calling BAPI from there, this need to be moved to either Component Controller or a Custom Controller as View controllers cannot share there context. Then you can map your context nodes from current iView and next iview to the node in Component/Custom controller.

Whatever changes you make in table in first view will be available in the next view as both views are mapped to same context node. To write them back to R3 table, you need to call an appropriate BAPI.

Hope this helps.

Vishwas.

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi

The Actions depends upon the table cell editor you are using if its a checkbox or radiobutton UI elements they have some events also inputField have onEnter. That totally depends on the type of table cell editor and what kind of action you are doing.

Regards

Kalyan

sureshmandalapu6
Active Contributor
0 Kudos

Hi Johannes Schnatz ,

when u r applying the template using table. select the table and select the context attributes ( node for table ) than in the next step. select the text edit option in the desired cell.

now deply and run

Thanks

Suresh

Former Member
0 Kudos

The Table has Table Columns each of which has a header an an editor element.

Clicking on the editor element, I see

Properties [TextView]

but i do not see where I can change that value...

by the way: I am using a Table whichs Columns are filled by a binding to a RFC.

Do you guys know? Thanks.

Former Member
0 Kudos

I got it.. Right click on Tbale Element -> Create Binding. You can choose the elements you would like to bind. The selected elements in turn will be shown in al list. In this list you can modifiy the editor type.

sureshmandalapu6
Active Contributor
0 Kudos

Exactly,

you got it.

thanks

Suresh

Former Member
0 Kudos

You can also change the table cell editor using the context menu in the "Outline" view. Right-click on the TableColumn element, delete the old editor and select "Insert TableCellEditor...".

Armin

Former Member
0 Kudos

What kind of table cell editor are you using? The context node itself also has a read-only property. Is this set to false?

Generally, you don't implement something like a selection listener or the like. Just enter some value into the cell editor and trigger a server round-trip. Then the value is stored in the node element representing the table row.

Armin