Skip to Content

Problem with row of Result view after Color

Hi Experts,

I do changes in color of Result view of Oppt.

But after color the row doesn't seems like normal row and gaps also increase .

Plz suggest me some solution to make it normal row.

Here is the Code .

CASE P_ROW_INDEX.

WHEN P_ROW_INDEX.

READTABLE me->iv_data INTO ls_data INDEX p_row_index.
IF sy-subrc NE0.
EXIT.
ENDIF.


ASSIGNCOMPONENT p_column_key OFSTRUCTURE ls_data TO <col>.
IF sy-subrc = 0.
wf_text = <col>.
ENDIF.

IF ls_data-STATUS eq'E0002'.

iv_flag = ABAP_TRUE.

Endif.
if iv_flag = ABAP_TRUE.
* CONCATENATE '<span style="background-color:YELLOW">' wf_text '</span>'
* INTO html_str.
CONCATENATE'<font color="RED">' wf_text '</font>'into html_str.

ELSE. EXIT.
* CONCATENATE '<font color="GREEN">' wf_text '</font>' into html_str.

ENDIF.

CREATE OBJECT html_bee.

html_bee->add( html = html_str ).

p_replacement_bee = html_bee.

Regards

Alok

rowcol1.jpg (87.2 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Jan 06, 2014 at 08:53 PM

    Hi Alok,

    I suppose you are in the iterator of a cellerator tag. It is kind of hard to get what you are doing from the post you made.

    If I remember correctly, I did it with a DIV tag and adding styles. You seem to already have build an HTML bee around the original content.

    <div style="background-color: green">

    Of course you need to close the tag again </div>


    You might have to add the DIV for every cell. As the BSP Tags add styles very often they get overwritten a lot.

    cheers Carsten

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 05:01 AM

    Hello Alok,

    Please check below link:--

    http://scn.sap.com/message/14295856#14295856

    Thanks,

    Amit Singh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 12:01 PM

    Hello Alok,

    You can try moving the focus to the initial line.

    To do so, first create an instance attribute ihe class in which you are writing this code :

    LR_BO Instance Attribute Type Ref To IF_BOL_BO_PROPERTY_ACCESS

    Secondly, paste the below code at the last after your code ( i.e. after this line

    p_replacement_bee = html_bee. )

    * set focus to Initial line

    lr_bo = me->gr_context_node->get_bo_by_index( iv_index = 1 ).


    Let me know the result.

    Regards,

    Devashish

    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.