on 01-06-2014 4:13 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Carsten,
My requirement is to change color of text not background as per the status value.
But the problem is with the row is after color change it expands , but as per requirement
it should seems like normal row.
I am writing code in render_cell .
Am i clear with my requirement or u need some more input??
Regards
Alok
The background color was just an example. For chaning the text color the corresponding attribute is:
<div style="color:green">
What I meant in my above post is that you should be working with styles instead of adding new attributes. They are likely to destroy any formatting SAP has done by CSS classes.
Currently I do not have access to a CRM system. Thus I could not try the code above, but I am positive it works.
cheers Carsten
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.