Skip to Content

Repeat columns horizontally in tableview

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Dec 11, 2003 at 01:43 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.