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

Change a row design in a tableview iterator

Hi Everybody!

A simple question :

I have a tableView in a BSP. I want to make a special design for some rows, depending on values.

So I use an iterator, and within the method

RENDER_CELL_START

, I try to write something for

P_STYLE

parameter, something like this :

P_STYLE = '<td style=`background-color:#CCAADD;`>'.

but of course it's not working...

Any idea from BSP professionnals ?

Thanks!

François

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 03, 2005 at 07:13 AM

    This parameter does not actually allow you to enter your own style - I got annoyed by it myself when I started working with iterators.

    If you debug a bit into the code of the method R_TXT_CELL of class CL_SAPTABLECELL you come across this part:

    IF p_style IS NOT INITIAL.
      SPLIT p_style AT ';' INTO TABLE styletable.
      LOOP AT styletable ASSIGNING <style>.
        SPLIT <style> AT ':' INTO stylename stylevalue.
        TRANSLATE stylename TO LOWER CASE.
        IF stylename EQ 'celldesign'.
    ...

    From this (and the follow-up lines) we can learn that the only style attribute that can be used has to be called <b>'celldesign'</b>, and its allowed values are the ones in the table m_tableview->m_htmlb_tableview->mc_render_lib_d2_rt_validation->_et_stcd (runtime name of course).

    For a quick reference, here are the values of this table:

    STANDARD

    ALTERNATING

    TRANSPARENT

    NEGATIVE

    POSITIVE

    TOTAL

    SUBTOTAL

    SUBTOTAL_LIGHT

    BADVALUE_DARK

    BADVALUE_MEDIUM

    BADVALUE_LIGHT

    CRITICALVALUE_DARK

    CRITICALVALUE_MEDIUM

    CRITICALVALUE_LIGHT

    GOODVALUE_DARK

    GOODVALUE_MEDIUM

    GOODVALUE_LIGHT

    GROUP_HIGHLIGHTED

    GROUP_HIGHLIGHTED_LIGHT

    KEY_MEDIUM

    GROUP_LEVEL1

    GROUP_LEVEL2

    GROUP_LEVEL3

    MARKED

    FILTER

    FILTERICON

    POPIN

    So, we have to live with this possibility - otherwise you would have to use a HTML element which you place into the cell, and which you can apply your styles to.

    Cheers,

    Max

    Add a comment
    10|10000 characters needed characters exceeded

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.