How to color more than one cell in an ALV line ???

Hi SDN community,
I have the following problem:
I display an internal table with the 'REUSE_ALV_GRID_DISPLAY' function and want to color two cells, not only one cell.
Coloring one cell is no problem with...
cell_color1 TYPE lvc_t_scol, " cell color
DATA  gs_cellcolor    TYPE          lvc_s_scol. " to color a cell
gs_cellcolor-fname = 'TNAME'.
gs_cellcolor-color-col = '6'.
gs_cellcolor-color-int = '1'.
gs_cellcolor-color-inv = '0'.
LOOP AT it_result.
  IF it_result-trend EQ 'fast-growing'.
    APPEND gs_cellcolor TO it_result-cell_color1.
    IF sy-subrc EQ 0.
      MODIFY it_result.
    ENDIF.
  ENDIF.
ENDLOOP.
and
ls_layout-coltab_fieldname = 'CELL_COLOR1'.
, the last one is in the layout building form.
My problem is that in
ls_layout-coltab_fieldname = 'CELL_COLOR1'.
, I can only type in ONE fieldname, but I would like to color more than one field/cell, you got my problem?
Thank you very much,
Marius

I'm pretty sure that the color would be controlled by what records are appended to the CELL_COLOR1 table inside IT_RESULT. . So move the code inside the IF statement, and add addition logic.
LOOP AT it_result.
  IF it_result-trend EQ 'fast-growing'.
   gs_cellcolor-fname = 'TNAME'.
   gs_cellcolor-color-col = '6'.
   gs_cellcolor-color-int = '1'.
   gs_cellcolor-color-inv = '0'.
    APPEND gs_cellcolor TO it_result-cell_color1.
    IF sy-subrc EQ 0.
      MODIFY it_result.
    ENDIF.
else.
   gs_cellcolor-fname = 'OTHER_FIELD'.
   gs_cellcolor-color-col = '5'.
   gs_cellcolor-color-int = '1'.
   gs_cellcolor-color-inv = '0'.
    APPEND gs_cellcolor TO it_result-cell_color1.
    IF sy-subrc EQ 0.
      MODIFY it_result.
    ENDIF.
  ENDIF.
ENDLOOP.
Regards,
Rich Heilman

Similar Messages

  • Tables with more than one cell with a high number of rowspan (ej. 619). This cell can not be print in a page and it must be cut. But I don't know how  indesign can do this action.

    Tables with more than one cell with a high number of rowspan (ej. 619). This cell can not be print in a page and it must be cut. But I don’t know how  indesign can do this action.

    set the wake-on lan on the main computer
    The laptop's too far away from the router to be connected by ethernet. It's all wifi.
    No separate server app on the laptop, it's all samba
    The files are on a windows laptop and a hard drive hooked up to the windows laptop. The windows share server is pants, so I'd need some sort of third party server running. Maybe you weren't suggesting to use Samba to connect to the windows share though?
    I'm glad that you've all understood my ramblings and taken and interest, thanks The way I see it, I can't be the only netbook user these days looking for this kind of convenience, and I certainly won't be once chrome and moblin hit the market.
    Last edited by saft (2010-03-18 20:38:08)

  • How to select more than one slide on Keynote?

    Please, someone knows how to select more than one slide on keynote for IPad?

    // Allow selection to span one contiguous set of rows, visible columns, or block of cells
    table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    // Allow multiple selections of rows, visible columns, or cell blocks
    table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

  • How to select more than one row in a JTable swing adf adf?

    how to select more than one row in a JTable swing adf adf?

    // Allow selection to span one contiguous set of rows, visible columns, or block of cells
    table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    // Allow multiple selections of rows, visible columns, or cell blocks
    table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

  • How to add more than one clip to a drop zone?  New guy

    Hey all, I'm new to DVD studio and I'm trying to fiqure out how to add more than one clip to a Template drop zone. I'm using a 6 button template. I've named each button .. Football, Baseball, Hockey ...etc.
    How can put in MORE THAN ONE CLIP in the Football track/drop zone. So when someone clicks on Football they can see 3 examples.
    Do I need to create something to link to that Football button?
    Any replies appreciated

    You can edit the segments to be used in FCP or Motion so that the asset drop in has three examples
    Another way (if you want) is to make the entire menu outside of DVD SP so that the background layer is an m2v and the items are revealed/masked to some degree
    Take a look towards the bottom of this thread http://discussions.apple.com/thread.jspa?messageID=2951183&#2951183 where I discuss http://www.dvdstepbystep.com/Overmovies.zip
    Note that you can also use a basic overlay to do this. The overlay would be just solid black instead of the arrows/circles things I use in that example.
    For instance make the text one color and the box over the movie another (You can make it blue and the box red lets say) Draw a region over both for the button. Map blue for highlights/transparencies for normall/selected/activated and the same for the Box

  • If-function for more than one cell

    Hello friends,
    I am looking for an if-function that asks for more than one cell. EG:
    =If(A2=True;50;0) were A2 is a marker field. In my table A3, A4 and A5 are markerfields as well. How do I add those cells to my my function. Saying: Is any of A2-A5 true, than say 50 else say 0.
    As a second question:
    Is there a function that says: If A2 is true give me 50, if A3 is true gimme 40 ... all in one function!?
    Thanks a lot for helping me !!
    Jimmy

    The answer to both is yes you can perform these using functions that exist in Numbers:
    1) You can use check boxes for the marker cells then use cells in the next column to translate from check boxes to a numeric value:
    e.g. B2 = if(A2=TRUE, 1, 0)
    then sum the cells in B2 - B5 and compare to 0.  if the sum is greater than zero then one of the check boxes is checked:
    2) The question with this request is what if more than one marker is set (again I am assuming you are using check boxes)
    I am assuming the A2 take precedence (that is if the checkbox for A2 is checked that the result will be 50 EVEN if A3 is checked)
    A1 = IF(A2=TRUE, 50, IF(A3=TRUE, 40, 0))

  • How to show more than one record at a form-like style report?

    Hi All,
    I developed a form-like style report
    I want it to show more than one record at once (At the same page)
    I tried that by setting the value to "Maximum records per page" property for the repeating frame to 10
    but when I close the property palete and open it agian the value is returned to 1 !!!
    how to show more than one record at the same page?????
    Thank u

    Hi,
    there's perhaps another property like "page protect". If than 2 records didn't fit at one page there's a page break. Or is there any object inside the repeating frame with page-break properties? Sorry .. it's like looking into a chrystal ball ...
    Regards
    Rainer

  • Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes? Both my daughters have ipods, my wife has one

    Dear All
    Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes. My daughters have a different generation 'nano' each & my wife a 'shuffle'?
    Many thanks

    Click here for options.
    (69081)

  • How to display more than one documents on windows 8 desktop?

    how to display more than one documents on windows 8 desktop?

    Adobe Reader Touch doesn't show more than one file on screen and doesn't show them on the desktop. Apparently these are very old fashioned things that Microsoft doesn't think we'll want to do any more and calls them "legacy" to make them sound antiquated.
    If you want to do these things use the legacy Adobe Reader, a much more powerful and flexible app (and not obsolete in the slightest). http://get.adobe.com/reader . There are no legacy apps in the Windows App Store.

  • How to make more than one partition on Airport Time Capsule?

    how to make more than one partition on Airport Time Capsule?

    Only for the very brave......
    Open up the Time Capsule (voids the warranty)
    Pull the hard drive
    Place the hard drive in a separate enclosure
    Connect the enclosure directly to your Mac
    Use Disk Utility to partition the hard drive
    Reinstall the hard drive back in the Time Capsule
    For the rest of us.....
    The next best thing might be to set up one or more disk images on the Time Capsule, which will allow you reserve a given amount of space for each disk image.
    Open up Macintosh HD > Applications > Utilities > Disk Utility
    Click on the New Image tab
    Navigate to the Time Capsule
    Set up the disk image by naming it and specifying how much space you want to reserve

  • How to attach more than one picture on an email

    How to attach more than one picture on an email?

    Tap the square with arrow on top right and select pictures you want to send (max 5 pictures)
    http://i1224.photobucket.com/albums/ee374/Diavonex/f0bd7d73.jpg

  • How to sync more than one iphone to a macbook?..

    How to sync more than one iphone to a macbook?..

    Open itunes, connect iphone, select what you want to sync, sync
    Do the same for each iphone.

  • How to add more than one tabular region in a page?...

    How to add more than one tabular region in a page?
    i have a page, that page contain form and tabular region. when i trying to add another tabular region it showing error
    1 error has occurred
    Updatable SQL Query already exists on page 2. You can only add one updatable SQL query per page. Select a different page.
    but i have to add the tabular in that page.
    Is it possible?
    pls help...
    Thanks and regards,
    skud

    hi,
    even i am searching for some thing similar.
    i want to have 3 calendars in one page.
    getting same message calendar already exists on page 2. You can only add one calander per page. Select a different page.
    pls help.

  • I have an HP Photosmart C4180 all in one printer scanner and copier, I can't figure out how to scan more than one page at a time and then send as a PDF file via email

    I have an HP Photosmart C4180 all-in-one, printer, scanner and copier.  I can't figure out how to scan more than one page?  It will only let me do one page at a time and then I have difficulty sending pages 1, 2 and 3 as one docuement.  Any ideas??
    Thank you, Jetteski

    Hello Jetteski,
    Hello Jetteski, Thanks for the post.
    Since you are running a MAC, check the below links for some excellent information on scanning.  Good Luck!
    http://goo.gl/M8Cl2
    http://goo.gl/cufK6
    http://goo.gl/OTQoR
    I work for HP but my posts and replies are my own....Thank you!

  • Just bot a macbook pro to replace one of my pc's. can't figure out how to have more than one website open at a time like explorer. Is it possible to do?

    I can't figure out how to open more than one website at a time like explorer does on a pc. would like to know if it Is possible or not.

    Tabbed browsing is the way. Go to Safari's View menu:
    and click "Show Tab Bar." When you see a link on another site you wish to open without closing the first site, simply right-click and select "Open Link in New Tab."

Maybe you are looking for

  • Problem with bluetooth connection between iPhone 5s iOS 8.1.2 and MacBook Pro (Mid 2012) Yosemite 10.10.1

    After the upgrade to iOS 8.1.2 in iPhone 5s and OS X 10.1.1 Yosemite (MacBook Pro Mid 2012) can not connect my iPhone 5s to the MacBook, the iPhone tells me: "The MacBook is incompatible" or the message "Connection Error, Make sure the Mac is turned

  • How to Display INR format in WEBI 4.X reports

    Hello All, I have a requirement to display the amount in WEBI report as INR format i.e 1,00,00,000.00. I tried to create a custom number format at report level as #,##,##,###.## , but is it not working. I tried custom display format at universe level

  • Printer for GR

    HI, I see that printer is assigned in several places for GR output- OMJ3, MN21 and in the user defaults. Could you please let me know from where is the printer determined. Which one takes priority? Thanks Aparna

  • Import XAVC S videos to an Ipad, can I ?

    I've been wondering If I can import videos taken with my Sony HDR-AS100V to an Ipad air or mini Retina, using the ''lighting to sd card camera reader adapter'' by apple. Does an ipad support xavc s ? In other words, can I play xavcs videos on an ipad

  • Shuffle not persistent in iTunes 7

    So in iTunes 6, I could have my shuffle remain in the list even when ejected. This was really nice, as I could update my list so the next time I plugged in the shuffle all the settings were ready to go. Now, in iTunes 7, when I go to eject the shuffl