cancel
Showing results for 
Search instead for 
Did you mean: 

Table With Button on Each Row

Former Member
0 Kudos

Dear All,

I have one table which is displayed with few Rows . Each row has one Button apart from the other columns. The table has PR NO, PR ITEM NO ,..... etc these columns. When user clicks on Button it opens one poup, where user can make some entries.

If I want to read the PR Number and Item Number of selected button how do I get that.

Thanks in Advance

Regards,

Raghvendra

Accepted Solutions (0)

Answers (4)

Answers (4)

pranav_nagpal2
Contributor
0 Kudos

Hi Raghavendra,

sorry repeat post.....

regards

Pranav

Edited by: Pranav Nagpal on Jan 20, 2009 3:40 PM

arjun_thakur
Active Contributor
0 Kudos

Hi Raghavendra,

I have faced same situation, the only difference in my case was that I had a LinkToAction in each row instead of a button and I had to read the contect of the row where user have clicked.

Please refer to this [link|; and look for uday's reply. I was able to solve this issue. I am sure it'll will help you as well.

Regards

Arjun

Edited by: Arjun on Jan 20, 2009 7:57 PM

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The suggested forum thread recomends the same thing I mentioned - you have access to the context_element parameter of the event itself which gets filled by the framework with the correct row in which the button that was pressed was sitting.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Look at the event parameters of the onAction that gets triggered by the button:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/20/fa8b41bce2a609e10000000a155106/frameset.htm

There is a context_element importing parameter. When the button is contained within a x:n interative UI element - like a table, then this context_element will automatically be filled with the corresponding row from which the button event was triggered.

vaibhav_tiwari
Contributor
0 Kudos

Hi Raghavendra,

When you read the context node which is bound to the table, by default it will give the value of the currently selected row. So you can read the value of the required fields by just reading the context node bound to the table.

Regards,

Vaibhav Tiwari.