Skip to Content
author's profile photo Former Member
Former Member

TableView with a Cell as TableView ? Possible ?

Hello out there,

i want to dipslay complex data on a bsp-page. The date is stored in a table. One collumn contains agian a small table. Is it possible to use a tableview to render the output ?

I used an iterator on my "outer"-tableview and in the method RENDER_CELL_START i tried the following coding, but there is nothing rendered on the bsp. Can anybody help ?

<i>CASE p_column_key.

WHEN 'RELATED_PARTNER'.

CALL METHOD ME->GET_CELL_VALUE

EXPORTING

IV_COLUMN_NAME = 'RELATED_PARTNER'

IV_ROW_REF = p_row_data_ref

IMPORTING

EV_CELL_VALUE = lt_table_data.

  • TEST BEGIN IF lt_table_data is INITIAL

IF lt_table_data IS INITIAL.

lwa_table_data-partner = '0060000505'.

APPEND lwa_table_data TO lt_table_data.

lwa_table_data-partner = '0060000509'.

APPEND lwa_table_data TO lt_table_data.

ENDIF.

  • TEST END

GET REFERENCE OF lt_table_data INTO lcr_table.

CREATE OBJECT lcr_table_view.

lcr_table_view->table = lcr_table.

lcr_table_view->fillupemptyrows = 'TRUE'.

lcr_table_view->headervisible = 'FALSE'.

lcr_table_view->footervisible = 'FALSE'.

lcr_table_view->visiblerowcount = 2.

p_replacement_bee = lcr_table_view.</i>

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Oct 17, 2005 at 08:08 AM

    Hi André,

    I don't know if you can place a tableView into a tableView cell. If not, you could just use a HTML table within a htmlb:textView (with code like this):

    METHOD if_htmlb_tableview_iterator~render_cell_start .
    
      DATA lr_text TYPE REF TO cl_htmlb_textview.
      FIELD-SYMBOLS <fs> LIKE LINE OF lt_table_data.
    
      CASE p_column_key.
        WHEN 'RELATED PARTNER'.
    
          CREATE OBJECT lr_text.
          lr_text->id     = p_cell_id.
          lr_text->text   = '<TABLE>'.
          "read table lt_table_data.		
    
          LOOP AT lt_table_data ASSIGNING <fs>.
            CONCATENATE lr_text->text 
    		    '<TR>'
    		    '<TD>'
    		    <fs>-first_field
    		    '</TD>'
    		    '</TR>'
    	            '<TR>'
    		    <fs>-second_field
    		    '</TD>'
    		    '</TR>'
    		INTO lr_text->text.
          ENDLOOP.
    
          CONCATENATE lr_text->text
    		  </TABLE>
    		INTO lr_text->text.
    
          p_replacement_bee = lr_text.
    
      ENDCASE.
    
    ENDMETHOD.
    

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 17, 2005 at 08:06 AM

    Hi Andre,

    nice problem, something I have not thought of yet, placing a whole tableview into a single cell.

    I don't know of any limitations that should prevent you from doing this (compared to other replacement_bees).

    I would suggest that you debug into your iterator code, and watch the tableview object you create, if it gets created in the right way, and how the iterator continues to work with the p_replacement_bee containing the tableview afterwards.

    What WebAS version/SP are you working on btw?

    Max

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Maximilian,

      we are running WebAS6.20 on ABA and Basis SP44.

      I debugged the iterator and think that the tableview-object is well created, but what means that ? I don't know about the real minimum requeired fields in the object to have a well rendered output.

      The steps which are executed after my method are hard to understand, but i think there is nothing be done with p_replacement_bee.

      Kindly regards,

      André

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.