Coloring alv text

hi
color the text and the cell to same color.
so that the tex should get disappear.
is that possible..example?

hi
color the text and the cell to same color.
so that the tex should get disappear.
is that possible..example?

Similar Messages

  • [ALV] Text in color and bold

    Hello,
    I have an ALV Grid and I would like one cell, with text color in red and in bold.
    I'm in OOP's with CL_GUI_ALV_GRID.
    I've tried like that :
    CONSTANTS :
                c_bold(4)           TYPE x       VALUE '00000020',
                c_red(4)            TYPE x       VALUE '00000017'.
    *-LAYOUT
      fe_layout-cwidth_opt = c_x.
      fe_layout-no_rowmark = c_x.
      fe_layout-info_fname = 'ROW_COLOR'.
      fe_layout-stylefname = 'CELLS_STYLES'.
    *-OUTTAB
      clear we_style.
      we_style-fieldname = 'XXXXX'.
      we_style-style = c_bold.
      we_style-style = c_red.
      insert we_style into table we_outtab-cells_styles.
    It doesne't work. The bold put the text color in black.
    There is a solution ?
    Thank you.

    Hello Bernard
    I checked my sample report and it shows that '00000037' yields the text in bold and red.
    '00000037' = '00000020' + '00000017'   !!!
    Below you find a modified version of the sample report:
      BREAK-POINT.
      CONSTANTS :
          c_bold(4)           TYPE x       VALUE '00000020',
          c_red(4)            TYPE x       VALUE '00000017'.
      CLEAR: ls_outtab2.
      REFRESH: lt_celltab.
      ls_outtab2-maxlen = 0.
      ls_outtab2-style  = c_bold.
      ls_outtab2-style2 = c_red.
      ls_style-style = c_bold + c_red.
      INSERT ls_style INTO TABLE lt_celltab.
      ls_outtab2-celltab = lt_celltab.
      INSERT ls_outtab2 INTO gt_outtab2 INDEX 1.
    ENDFORM.                    " FILL_OUTTAB2
    Entire report:
    *& Report  ZUS_SDN_ALV_STYLE_LIST
    *& Thread: [ALV] Text in color and bold
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1191290"></a>
    *& Thread: color alv list display
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1072435"></a>
    *& Thread: Hiliting the Specific rows in ALV grid
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1062831"></a>
    *& Thread: Reg... coloring of rows
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1041516"></a>
    *& Thread: Painting cell in alv with objects
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1029759"></a>
    *& Thread: styles
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="830498"></a>
    *& Thread: Is it possible to assign color to manually modified record in tabcontrol?
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="878289"></a>
    *& The report generates style values and shows their effect in ALV grid.
    REPORT  zus_sdn_alv_cell_style_2.
    TYPE-POOLS: abap.
    TYPES: BEGIN OF ty_s_outtab.
    INCLUDE TYPE knb1.
    TYPES: celltab TYPE lvc_t_styl. " cell style
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
    WITH DEFAULT KEY.
    TYPES: BEGIN OF ty_s_outtab2.
    INCLUDE TYPE lvc_s_styl.
    TYPES: celltab TYPE lvc_t_styl. " cell style
    TYPES: END OF ty_s_outtab2.
    TYPES: ty_t_outtab2 TYPE STANDARD TABLE OF ty_s_outtab2
    WITH DEFAULT KEY.
    DATA:
    gs_layout TYPE lvc_s_layo,
    gs_variant TYPE disvariant,
    gt_fcat TYPE lvc_t_fcat.
    DATA:
    gt_outtab TYPE ty_t_outtab,
    gt_outtab2  TYPE ty_t_outtab2.
    PARAMETERS:
      p_rows    TYPE i DEFAULT 200.
    START-OF-SELECTION.
      SELECT * FROM knb1 UP TO 100 ROWS
      INTO CORRESPONDING FIELDS OF TABLE gt_outtab
      WHERE bukrs = '1000'.
    **  data: gr_kunnr    type RANGE OF kunnr.
    **  SELECT kunnr as low from knb1 into CORRESPONDING FIELDS OF TABLE gr_kunnr
    **    WHERE bukrs = '1000'.
      PERFORM set_layout_and_variant.
      PERFORM set_cell_style.
    **  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    **    EXPORTING
    **      i_structure_name = 'KNB1'
    **      i_grid_title     = 'Cell Styles'
    **      is_layout_lvc    = gs_layout
    **      i_save           = 'A'
    **      is_variant       = gs_variant
    **    TABLES
    **      t_outtab         = gt_outtab
    **    EXCEPTIONS
    **      program_error    = 1
    **      OTHERS           = 2.
    **  IF sy-subrc = 0.
    **  ENDIF.
      PERFORM fill_outtab2.
    **  PERFORM fill_fieldcatalog_2.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_structure_name = 'LVC_S_STYL'
          i_grid_title     = 'Cell Styles'
          is_layout_lvc    = gs_layout
          i_save           = 'A'
          is_variant       = gs_variant
    *      IT_FIELDCAT_LVC  = gt_fcat
        TABLES
          t_outtab         = gt_outtab2
        EXCEPTIONS
          program_error    = 1
          OTHERS           = 2.
      IF sy-subrc = 0.
      ENDIF.
    END-OF-SELECTION.
    *& Form SET_LAYOUT_AND_VARIANT
    FORM set_layout_and_variant .
      CLEAR: gs_layout,
      gs_variant.
      gs_layout-cwidth_opt = abap_true.
      gs_layout-stylefname = 'CELLTAB'.
      gs_variant-report = syst-repid.
      gs_variant-handle = 'STYL'.
    ENDFORM. " SET_LAYOUT_AND_VARIANT
    *&      Form  set_cell_style
    *       text
    FORM set_cell_style .
    * define local data
      CONSTANTS:
      lc_style_bold TYPE int4 VALUE '00000121',
      lc_style_red TYPE int4 VALUE '00000087',
      lc_style_cursive TYPE int4 VALUE '00008700',
      lc_style_underline_faint TYPE int4 VALUE '00008787',
      lc_style_underline TYPE int4 VALUE '00008707',
      lc_style_underline_red TYPE int4 VALUE '00008007'.
      DATA:
      ls_outtab TYPE ty_s_outtab,
      ls_style TYPE lvc_s_styl,
      lt_celltab TYPE lvc_t_styl.
      CLEAR: ls_style.
      ls_style-fieldname = 'BUKRS'.
      ls_style-style = '00000011'.    " make contents invisible
      INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'BUKRS'.
    **  ls_style-style = lc_style_bold.
    **  INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'KUNNR'.
    **  ls_style-style = lc_style_red.
    **  INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'ERDAT'.
    **  ls_style-style = lc_style_cursive.
    **  INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'ERNAM'.
    **  ls_style-style = lc_style_underline.
    **  INSERT ls_style INTO TABLE lt_celltab.
      ls_outtab-celltab = lt_celltab.
      MODIFY gt_outtab FROM ls_outtab
      TRANSPORTING celltab
      WHERE ( bukrs = '1000' ).
    ENDFORM. " SET_CELL_STYLE
    *&      Form  FILL_OUTTAB2
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_outtab2 .
    * define local data
      DATA: ls_outtab2  TYPE ty_s_outtab2,
            ld_num8(8)  TYPE n,
            ld_idx      TYPE i,
            ld_fname    TYPE fieldname,
            ld_perc     TYPE i,
            ld_text(50) TYPE c.
      DATA:
      ls_style TYPE lvc_s_styl,
      lt_celltab TYPE lvc_t_styl.
      FIELD-SYMBOLS: <ld_style>  TYPE lvc_style.
      ld_num8 = 0.
      DO p_rows TIMES.
        WRITE syst-index TO ld_text NO-ZERO.
        CONDENSE ld_text NO-GAPS.
        ld_perc = ( syst-index * 100 ) / p_rows.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            percentage = ld_perc
            text       = ld_text.
        CLEAR: ls_style,
           ls_outtab2.
        REFRESH: lt_celltab.
        ls_outtab2-maxlen = syst-index.
        MOVE ld_num8 TO ls_outtab2-style.
        ls_style-style = ls_outtab2-style.
        INSERT ls_style INTO TABLE lt_celltab.
        ls_outtab2-celltab = lt_celltab.
        APPEND ls_outtab2 TO gt_outtab2.
        ADD 1 TO ld_num8.
      ENDDO.
      BREAK-POINT.
      CONSTANTS :
          c_bold(4)           TYPE x       VALUE '00000020',
          c_red(4)            TYPE x       VALUE '00000017'.
      CLEAR: ls_outtab2.
      REFRESH: lt_celltab.
      ls_outtab2-maxlen = 0.
      ls_outtab2-style  = c_bold.
      ls_outtab2-style2 = c_red.
      ls_style-style = c_bold + c_red.
      INSERT ls_style INTO TABLE lt_celltab.
      ls_outtab2-celltab = lt_celltab.
      INSERT ls_outtab2 INTO gt_outtab2 INDEX 1.
    ENDFORM.                    " FILL_OUTTAB2
    *&      Form  FILL_FIELDCATALOG_2
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_fieldcatalog_2 .
    * define local data
      DATA: ls_fcat TYPE lvc_s_fcat,
            lt_fcat TYPE lvc_t_fcat.
      DATA: ld_fname  TYPE fieldname.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'LVC_S_STYL'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = lt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DELETE lt_fcat WHERE ( fieldname NE 'STYLE' ).
      READ TABLE lt_fcat INTO ls_fcat INDEX 1.
      DO 16 TIMES.
        ls_fcat-fieldname = 'STYLE'.
        ls_fcat-col_pos = syst-index.
        WRITE syst-index TO ld_fname NO-ZERO.
        CONDENSE ld_fname NO-GAPS.
        CONCATENATE ls_fcat-fieldname ld_fname INTO ls_fcat-fieldname.
        APPEND ls_fcat TO gt_fcat.
      ENDDO.
    ENDFORM.                    " FILL_FIELDCATALOG_2
    Regards
      Uwe

  • Transfer footage iMovie 08 to iMovie 06 HD & change outline color for text

    I have a completed video that is basically all stills. I would like to transfer the stills in their current sequence and if possible with their current crop styles ie Ken Burns without having to start ALL over. Is this possible? Just downloaded 06 HD because I wanted more editing options that iMovie 08 seems to be lacking.
    Also, how do you change the outline color for text in titles? At one point it switched from black to white but I have no idea how it happened... now its back to black.
    Lastly, are we only allowed to place music exactly at the head of a clip or is there a setting I am unable to find that unlocks that "snap to" function?
    Thank you.
    Message was edited by: boogieon
    Message was edited by: boogieon

    Thanks....I was thinking that was probably it. Will be a little time consuming, but I'll feel better in the end knowing a vacation and bunch of summer stuff is back on tape for archiving.

  • I am unable to change the color of text in an email I replay to or compose. I am on 31.6.0 release of Thunderbird.

    When I receive, reply or compose email. I no longer am able to see or change the color of text. I select to change the text from black to Red (or any other color) and the text just stays black, The color seletor box will show the last select color, but never actually changes the text color in an email. Also in received email, when the sender has indicated their replies to me are in another color, All the text only appears as black. I never had this problem in the past, not sure what has happened. I did restart Thunderbird with add-ons disabled and this did not change the problem.

    Hello, maybe the question need to move by a moderator to thunderbird support ?
    https://support.mozilla.org/en-US/questions/thunderbird?owner=all
    thank you
    [moderator note: question thread has been moved from Firefox queue to Thunderbird queue]

  • Is there a way to change the font size and color of text in the calendar app?

    Does anyone know a way of changing the font size and color of text in the calendar app that comes with the iPad 2?  It is very hard to see the small gray numbers on the calendar.  Thanks

    Looks like you didn't get a reply on your post, but it is still a problem.  Font size is supposedly changeable via "Accessibility" in Settings, but it doesn't work.  You can turn on "Zoom".

  • How to color the text  elements in script?

    how to color the text  elements in script?
    byeeeee
    plz send the answers

    Hi,
    Please go through my blog to know how to do color printing in SAP scripts.
    White Paper on 'Color Printing in SAP Scripts'
    Regards,
    Sireesha Ch

  • How to change background color of text in pdf based by font name

    Hi
    How to change the background color of text in PDF based by font name. Is there any option in Javascript. e.g: If PDF containing ARIAL font, the ARIAL text background color needs to be changed in red color for all pages. Same for all fonts with different different color in the PDF.
    Thanks in Advance

    Hi
    1) Is there any possibilities to highlight with different color based on font using javascript
    2) list of font used in PDF using javascript
    3) How to hilight the text using javascript
    Thanks in Advance

  • Download colored ALV output in to EXCEL sheet

    Hi ,
    I want to download colored ALV output to Excel sheet with color.
    one of the field in ALV is with 4 colors depending on condition.
    i am unable to download the color using download option(that field is comming with out color).
    Please help me by providing the solution.
    Thanks in advance.
    Regards
    sarath

    Hi Srini,
    thanks for the reply.
    i am using standard download function only.
    if i use download->local file->HTML Format only the font is appearing in colors.in case of spread sheet no color comming.
    but my requirement is to download into excel and  background also with color(green...) font in black like that.
    (exactly appearing in the ALV)
    Thanks
    sarath

  • I want to change the size and color of text in call out boxes and text boxes. How can I do this? Jack

    I want to change the size and color of text in call out boxes and text boxes. How can I do this? Jack

    Highlite the text inside the text box and then press Ctrl+E.

  • How do I change the color of text in Messages?

    How do I change the color of text in Messages? It was easy to do before, but I can't seem to find it after the upgrade.. is it a hidden menu option?  The gray text is really annoying.

    Two possible ways are available
    Set the text with and html text string like "<html><font color-red>" + text + "</font></html>"
    or get the cellrenderer, cast to the DefaultCellRenderer and call setForeground or background or implement or your own cellrenderer to do the custom coloring (this could maybe depend on indexes)
    ICE

  • How do I change the color of text on a greeting card

    I don't see where to change font, change size, change text color or center text on card.

    Two possible ways are available
    Set the text with and html text string like "<html><font color-red>" + text + "</font></html>"
    or get the cellrenderer, cast to the DefaultCellRenderer and call setForeground or background or implement or your own cellrenderer to do the custom coloring (this could maybe depend on indexes)
    ICE

  • How do i change the color of text boxes and the texts that i enter in them?

    I recently changed my system's color settings and now the text boxes in Firefox are dark grey. This is fine when the text happens to show up as white, but when it shows up as black, I can't read what I'm typing. (I'm not clear on what makes the difference. The box I'm typing this in now happens to be dark grey with white text.) I've tried playing around with settings within Firefox preferences and in my OS' (Kubuntu) system settings, and haven't yet been able to identify what settings exactly might change this specific aspect.

    Two possible ways are available
    Set the text with and html text string like "<html><font color-red>" + text + "</font></html>"
    or get the cellrenderer, cast to the DefaultCellRenderer and call setForeground or background or implement or your own cellrenderer to do the custom coloring (this could maybe depend on indexes)
    ICE

  • How To Color a Text string using Regex (java.util.regex)

    Hello,
    How can I color a text string using regex class in 1.4?

    Yes, did you notice it said something about incredibly vague functionality?
    Let me break it down for you
    > How can I color a text string
    Strings do not have color... You can color a component (a label, a button), but you can't color a string
    > using regex class in 1.4?
    Using a regular expression? How would a regular exression color anything? Do you have embedded color codes? Are you searhing a string for some secret word?
    What are you talking about?

  • How do you change the character color for text msgs?

    How do you change font colors for text messages in iOS7 for an iPhone 4S?

    never mind... i got it
    its was the contentbackgroundcolor property....

  • How do you change the color of text messages?

    Can you change the color of text messages?  If so, how?

    Two colors. Blue and green.
    Green is for text message. Blue is for iMessage. You can't change these, though.

Maybe you are looking for