cancel
Showing results for 
Search instead for 
Did you mean: 

No Margin if I use TableView Iterator

daniel_humberg
Contributor
0 Kudos

I am using a htmlb:TableView with Iterator.

I noticed that the cell-margin disappears if I a htmlb:textView in the iterator.

For example, if I have two columns, and in only the second column I show a textview as a replacement bee, the second column will have no cell-margin while the first one has.


METHOD if_htmlb_tableview_iterator~render_cell_start .
  DATA lr_text  TYPE REF TO cl_htmlb_textview.

  FIELD-SYMBOLS <fs_row>  LIKE LINE OF ##mytable##.

    CASE p_column_key.

      WHEN 'MYCOLUMN2'.
        CREATE OBJECT lr_text.
        lr_text->id       = p_cell_id.
        lr_text->wrapping = cl_bdv_co=>c_true.
        lr_text->text     = <fs_row>-mycolumn2.

        p_replacement_bee = lr_text.
    ENDCASE.
ENDMETHOD.

Is there anything I can do about it?

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

quick and dirty

METHOD if_htmlb_tableview_iterator~render_cell_start . DATA lr_text TYPE REF TO cl_htmlb_textview.

FIELD-SYMBOLS <fs_row> LIKE LINE OF ##mytable##. CASE p_column_key.

WHEN 'MYCOLUMN2'.

<b>concatenate '&nbsp' <fs_row>-mycolumn2 into <fs_row>-mycolumn2 .</b>

CREATE OBJECT lr_text.

lr_text->id = p_cell_id.

lr_text->wrapping = cl_bdv_co=>c_true. lr_text->text = <fs_row>-mycolumn2. p_replacement_bee = lr_text.

ENDCASE.

ENDMETHOD.

Regards

Raja

daniel_humberg
Contributor
0 Kudos

Hi Raja,

adding a blank does not help.

If the text covers multiple lines, the blank will only be in the first line. (I use wrapping = true...)

Best regards,

Daniel

Former Member
0 Kudos

Hi Daniel,

I've not tried so far, but I would suppose the changing parameters P_STYLE and P_CLASS in IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START look like a good point to debug or to change the margin manually?

Regards,

Sebastian

Message was edited by: Sebastian Behne

athavanraja
Active Contributor
0 Kudos

p_class is depreciated as on design 2003. check this thread for more on this.

.

instead what you an do is place a raw html table with cellpadding and one cell containing your text into this cell.

DATA: rad_gp TYPE REF TO cl_bsp_bee_table.

CREATE OBJECT rad_gp.

rad_gp->add_html( html = '<table cellpadding="2" ...' ).

p_replacement_bee = rad_gp.

Regards

Raja

Former Member
0 Kudos

hi,

this one helped me with nearly the same problem:

cell padding

P_ISREADONLY = 'X'.

p_replacement_bee = ....

no cell padding

P_ISREADONLY = ' '.

p_replacement_bee = ....

regards,

Stefan

daniel_humberg
Contributor
0 Kudos

Hi Stefan,

in my system (620,SP58), there is no P_ISREADONLY Parameter. Was this added in later releases?

Best regards,

Daniel

Former Member
0 Kudos

Hi Daniel,

I'm working on a 620,SP55.

and in the method RENDER_CELL_START there I have these parameters:

P_TABLEVIEW_ID

P_CELL_ID

P_CELL_BINDING

P_ROW_INDEX

P_ROW_KEY

P_COLUMN_INDEX

P_COLUMN_KEY

P_ROW_DATA_REF

P_EDIT_MODE

P_REPLACEMENT_BEE

P_STYLE

P_CLASS

P_ISREADONLY

P_ISHIERCELL

I remeber P_ISREADONLY was added as we installed a support package, but I don't know when it was exactly.

daniel_humberg
Contributor
0 Kudos

Sorry, Stefan,

you were right, I also have these parameters (I just looked into the wrong method).

I set the parameter and it worked.

Problem solved!

Thx

Answers (1)

Answers (1)

Former Member
0 Kudos

Maybe a Q and D but I gotta try that!

Cheers!