cancel
Showing results for 
Search instead for 
Did you mean: 

Directly access tableview cell I.E. tvx1_2_1

Former Member
0 Kudos

Hello,

I know I have seen on this forum how to access a specfic tableview cell but I can't find the reference. It said something like 'do forget you can also access the table tvx1_2_1' but for the life of me I can't find it. I read it the other day and I thought to myself 'oh I know how to do that'. But now that I have to do it I realize I forgot. I have done searches on tableview, tvx1, 1, directly etc... and I still can't find it. I did it a couple of month ago and I saw it in the debugger (which is how I knew what tvx12_1 was refering to). Does anyone know the thread or can post an example for me? I would be eternally grateful and if we were still rewarding point I would do that too.

TIA

Rich

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Here you go.

[TABLEID]_[ROW]_[CELL]

You can use that format in the OnInputProcessing or OnRequest to process with ABAP or


document.getElementById('[above here]').value or .innerHTML 

I believe both the value and innerHTML will work provided you are in IE that is. .value works if the cell value is in a inputfield the other I think works but I've not had a reason to try it.

Former Member
0 Kudos

Hello Craig,

Your reference to your post threadID=19689 and response was exactly what I was looking for. As a matter of fact my very next task is the handling of edited input cells with an iterator.

Thanks everyone for your response. Have a great weekend!

Cheers,

Rich

Former Member
0 Kudos

Great!!! Be sure to mark the message as solved so others can find solutions faster in the future!

Answers (1)

Answers (1)

maximilian_schaufler
Active Contributor
0 Kudos

Do you want to access that cell on the client via javascript?

Or on the server - either in OnInputProcessing for FlowLogic-Pages or in a controller/model method for MVC?

Former Member
0 Kudos

Hello Maximilian,

Thanks for you response. I am trying to access a specfic tableview cell in a method in my MVC. More specifically in my render_cell_start of my iterator. It might be something like me->tvx1_2_3 for example. Where tvx1 represents the tableview ID and 2_3 is the row and column. Its funny because I pursued this route awhile ago and abandoned it thinking it wasn't necessary. Now I have come full circle and I may need to use this technique. Never a dull moment.

Cheers,

Rich

Former Member
0 Kudos

Not sure about the MVC as I do little with this side of BSP's although I need to change that but if you can are needing to do this in your iterator then it's even simpler.

you can access everything about the table in the iterator have a look at these weblogs:

/people/thomas.jung3/blog/2004/09/15/bsp-150-a-developer146s-journal-part-xi--table-view-iterators

/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator

For example p_cell_id will give you the current ID of your cell while inside of the iterator.

maximilian_schaufler
Active Contributor
0 Kudos

Well, another question: do you want to access this special cell from the browser request (including the form fields) or from the table of your (model) table data? This might be a stupid question, but the answer is quite important ...

Your guess to try sth like me->tvx_1_2_3 will not work, because using it in iteraror would make "me" the iterator object, and if you don't set some attributes than the iterator class does not have any (just some standard method parameters).

So, where the data is coming from, that you want to access (either form submit or an itab somewhere), that's the thing to know right now.