Skip to Content
0
Dec 18, 2006 at 03:09 PM

Tableview: align column right and column header left

96 Views

I have a tableview with an interator, and I would like to align a column to the right which the column header should be aligned to the left.

This is my table

<htmlb:tableView id              = "ttp"
                                table           = "//m_sb_item_list/mt_pb_task_combined"
                                headerText      = "bla"
                                headerVisible   = "TRUE"
                                footerVisible   = "FALSE"
                                iterator        = "<%= controller %>"
                                selectionMode   = "NONE"
                                filter          = "NONE"
                                sort            = "NONE"
                                design          = "STANDARD"
                                allRowsEditable = "TRUE" />

This is my GET_COLUMN_DEFINITIONS

      ls_coldef-columnname          = 'MY_COL'.
      ls_coldef-width               = '30'.
      ls_coldef-title               = zcl_co=>sc_txt_mycol.
      ls_coldef-sort                = zcl_zsc_co=>sc_false.
      ls_coldef-wrapping            = zcl_zsc_co=>sc_true.
      ls_coldef-horizontalalignment = 'LEFT'.
      APPEND ls_coldef TO p_column_definitions.
      CLEAR ls_coldef.

This is my RENDER_CELL_START

CASE p_column_key.
      WHEN 'MY_COL'.
        CREATE OBJECT lr_text.
        lr_text->id    = p_cell_id.
        lr_text->align = 'RIGHT'. "not working
        lr_text->text = <fs_row_mem>-t_eff_estimation.
        p_replacement_bee = lr_text.