cancel
Showing results for 
Search instead for 
Did you mean: 

Repeat columns horizontally in tableview

Former Member
0 Kudos
210

Hi,

I've implemented a tableview (in order to use the iterator), but would like to know if there's any possibility of repeating my 3 table fields horizontally? Instead of a very "long" table on my page, I'd like to make it look like the following:

A B C   A B C A B C

A B C   A B C A B C

A B C   A B C A B C

etc... where A, B and C are my 3 table fields.

Easy enough with the good old ABAP/html method, but... can a tableview handle this?

Trond

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member181879
Active Contributor
0 Kudos

Hallo Trond,

> can a tableview handle this?

I wanted to write Jein, but I see that you are not from Germany. Set let me write Yes/No. I can be done with work. On your side!

What I would recommend you do, is define a dummy table, for example of type STRING_TABLE. Just flood fill it with empty lines, and feed it to the <htmlb:tableView> to render with an iterator.

As first step, in the GET_COLUMN_DEFINITIONS callback, make the column definitions for the 9 columns you want (3 * ABC).

With this, the RENDER_CELL_START will be called 9 times (once per column definition) for each line rendered from the dummy table. Of course, when you get the p_data_ref, you ignore it. You look at the p_column_name/nr, and then calculate where you are in your real table. Read the correct line, and build the correct p_replacement_bee.

It is not very ellegant, and a little programming. But it will work.

bye, brian

Former Member
0 Kudos

Thanks. I guess I got the meaning of "Jein" anyway.

There's actually a variation on this solution: I could bundle my initial table (3 fields) into a second one (9 fields) and use that one for the tableview. Might actually save some lines of code (and keep the local class implementing the iterator simpler...)

The scramble/unscramble logic still has to be created, though. I guess it all just depends where I'd like to put it...

Trond