Getting alternative colors in output list
Hi Frnds,
I have to provide alternative colors for each row for my report which i m unable to do.
Actually i am getting colors in my header but i need alternative colors for each row in my output.
below i am providing my code.
<code>
REPORT ZVVK_DOWNLOAD.
TYPE-POOLS RSDS.
DATA : IT_TABLEKEY LIKE COND_FLDS OCCURS 0 WITH HEADER LINE,
IT_TABLEDAT LIKE COND_FLDS OCCURS 0 WITH HEADER LINE,
IT_PRICING LIKE COND_RECS OCCURS 0 WITH HEADER LINE,
IT_RANGE TYPE RSDS_FRANGE_T,
IT_KNUMH LIKE COND_KNUMH OCCURS 0 WITH HEADER LINE .
DATA : IT_KONH LIKE KONHDB OCCURS 0 WITH HEADER LINE,
IT_KONP LIKE KONPDB OCCURS 0 WITH HEADER LINE,
IT_KONM LIKE COND_KONM OCCURS 0 WITH HEADER LINE,
IT_KONW LIKE COND_KONW OCCURS 0 WITH HEADER LINE,
IT_BAPI_COND_RECS LIKE BAPICONDCT OCCURS 0 WITH HEADER LINE,
IT_BAPI_KEY_FIELDS LIKE BAPICONDDD OCCURS 0 WITH HEADER LINE,
IT_BAPI_DATA_FIELDS LIKE BAPICONDDD OCCURS 0 WITH HEADER LINE,
IT_COND_HEADER LIKE BAPICONDHD OCCURS 0 WITH HEADER LINE,
IT_COND_ITEM LIKE BAPICONDIT OCCURS 0 WITH HEADER LINE,
IT_COND_QUANTITY_SCALE LIKE BAPICONDQS OCCURS 0 WITH HEADER LINE,
IT_COND_VALUE_SCALE LIKE BAPICONDVS OCCURS 0 WITH HEADER LINE,
IT_T682I LIKE T682I OCCURS 0 WITH HEADER LINE.
DATA : WA_RANGES LIKE LINE OF IT_RANGE,
WA_SELOPT LIKE LINE OF WA_RANGES-SELOPT_T.
*Data declarations for displaying downloaded file into application server in output list
TYPES: BEGIN OF T_VARINFO,
FLAG TYPE C,
OLENGTH TYPE X,
LINE LIKE RALDB-INFOLINE,
END OF T_VARINFO.
DATA:TABLES TYPE TRDIR-NAME OCCURS 0 WITH HEADER LINE ,
INFOTAB TYPE T_VARINFO OCCURS 0 WITH HEADER LINE.
SELECT-OPTIONS SO_DATE FOR SY-DATUM.
PARAMETERS : P_CONTAB TYPE T681-KOTABNR OBLIGATORY,
FILENAME(128) DEFAULT '/usr/sap/tmp/' LOWER CASE.
*start-of-selection
START-OF-SELECTION.
IF NOT SO_DATE[] IS INITIAL.
WA_RANGES-FIELDNAME = 'DATBI'.
LOOP AT SO_DATE.
MOVE-CORRESPONDING SO_DATE TO WA_SELOPT.
APPEND WA_SELOPT TO WA_RANGES-SELOPT_T.
ENDLOOP.
APPEND WA_RANGES TO IT_RANGE.
ENDIF.
*--For Datarevin for condition table
CALL FUNCTION 'SELECT_RECORDS_FROM_COND_TABLE'
EXPORTING
I_KVEWE = 'A'
I_KOTABNR = P_CONTAB
I_BLOCKSIZE = 0
I_RANGES = IT_RANGE
TABLES
T_COND_TABLES_KEY_FIELDS = IT_TABLEKEY
T_COND_TABLES_DATA_FIELDS = IT_TABLEDAT
T_COND_RECORD_PRICING = IT_PRICING
EXCEPTIONS
INVALID_USAGE = 1
INVALID_TABLE = 2
DIFFERENT_PARAMETERS_IN_BLOCK = 3
LASTBLOCK_ALREADY_SENT = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SELECT * INTO TABLE IT_T682I
FROM T682I
WHERE KOTABNR = P_CONTAB.
LOOP AT IT_PRICING.
IT_KNUMH-KNUMH = IT_PRICING-KNUMH.
APPEND IT_KNUMH.
ENDLOOP.
CALL FUNCTION 'SELECT_PRICES_DETAILS'
TABLES
T_KNUMH = IT_KNUMH
T_KONH = IT_KONH
T_KONP = IT_KONP
T_KONM = IT_KONM
T_KONW = IT_KONW.
CALL FUNCTION 'CRS_MAP_COND_INTO_BAPISTUCTURE'
EXPORTING
I_OPERATION = '005'
TABLES
TI_COND_RECS = IT_PRICING
TI_KEY_FIELDS = IT_TABLEKEY
TI_DATA_FIELDS = IT_TABLEDAT
TI_KONHDB = IT_KONH
TI_KONPDB = IT_KONP
TI_VKONM = IT_KONM
TI_VKONW = IT_KONW
TO_BAPI_COND_RECS = IT_BAPI_COND_RECS
TO_BAPI_KEY_FIELDS = IT_BAPI_KEY_FIELDS
TO_BAPI_DATA_FIELDS = IT_BAPI_DATA_FIELDS
TO_COND_HEADER = IT_COND_HEADER
TO_COND_ITEM = IT_COND_ITEM
TO_COND_QUANTITY_SCALE = IT_COND_QUANTITY_SCALE
TO_COND_VALUE_SCALE = IT_COND_VALUE_SCALE.
IF SY-SUBRC <> 0.
ENDIF.
For displaying filename and number of records downloaded in application server
DATA:VAR_INFO TYPE TABLE OF RSVARADMIN WITH HEADER LINE ,
VAR_NAME TYPE TABLE OF RSVARRANGE WITH HEADER LINE .
CALL FUNCTION 'RS_VARIANT_ADMIN_DATA'
EXPORTING
CURR_REPORT = SY-REPID
TABLES
VARIANT_INFO = VAR_INFO
VARIANT_NAMES = VAR_NAME.
CALL FUNCTION 'PRINT_SELECTIONS'
EXPORTING
MODE = TABLES
RNAME = SY-REPID "program name
RVARIANTE = VAR_INFO-VARIANT "varient name
TABLES
INFOTAB = INFOTAB.
LOOP AT INFOTAB.
WRITE / INFOTAB-LINE.
ENDLOOP.
WRITE:/1(80) SY-ULINE .
WRITE:/1 SY-VLINE ,
3 'The output filename:' COLOR 7,
49 sy-vline,
50 'no of records downloaded:' COLOR 6 ,
80 SY-VLINE.
WRITE:/1(80) SY-ULINE .
Where used
PERFORM DATA_DWNLD TABLES IT_T682I USING P_CONTAB 'WHERE_USED' 'DAT' 'xls'.
*IT_BAPI_COND_RECS
PERFORM DATA_DWNLD TABLES IT_BAPI_COND_RECS USING P_CONTAB 'COND_RECS' 'BIN' 'txt'.
IT_BAPI_KEY_FIELDS
PERFORM DATA_DWNLD TABLES IT_BAPI_KEY_FIELDS USING P_CONTAB 'KEY_FIELDS' 'ASC' 'txt'.
KEY_FIELDS
PERFORM DATA_DWNLD TABLES IT_BAPI_KEY_FIELDS USING P_CONTAB 'KEY_FIELDS' 'DAT' 'xls'.
*DATA_FIELDS
PERFORM DATA_DWNLD TABLES IT_BAPI_DATA_FIELDS USING P_CONTAB 'DATA_FIELDS' 'BIN' 'txt'.
*COND_HEADER
PERFORM DATA_DWNLD TABLES IT_COND_HEADER USING P_CONTAB 'COND_HEADER' 'BIN' 'txt'.
*COND_ITEM
PERFORM DATA_DWNLD TABLES IT_COND_ITEM USING P_CONTAB 'COND_ITEM' 'BIN' 'txt'.
*COND_QUANTITY_SCALE
PERFORM DATA_DWNLD TABLES IT_COND_QUANTITY_SCALE USING P_CONTAB 'QUANTITY_SCALE' 'BIN' 'txt'.
*COND_VALUE_SCALE
PERFORM DATA_DWNLD TABLES IT_COND_VALUE_SCALE USING P_CONTAB 'VALUE_SCALE' 'BIN' 'txt'.
*& Form DATA_DWNLD
text
FORM DATA_DWNLD TABLES P_TAB
USING P_CONTAB TYPE ANY
P_TABNAME TYPE ANY
P_FILETYPE TYPE CHAR10
P_EXT TYPE ANY.
DATA: L_FILE TYPE STRING,
V_LINES TYPE I .
DESCRIBE TABLE P_TAB LINES V_LINES.
CONCATENATE 'ORG' P_CONTAB P_TABNAME
INTO L_FILE SEPARATED BY '_'.
CONCATENATE FILENAME L_FILE '.' P_EXT INTO L_FILE.
CONDENSE L_FILE.
FIELD-SYMBOLS : <FS_DATA> TYPE ANY.
OPEN DATASET L_FILE FOR OUTPUT IN BINARY MODE .
IF SY-SUBRC NE 0.
EXIT.
ELSE.
LOOP AT P_TAB ASSIGNING <FS_DATA>.
TRANSFER <FS_DATA> TO L_FILE .
ENDLOOP.
ENDIF.
CLOSE DATASET L_FILE.
For displaying filename and number of records downloaded in application server
WRITE:/1 SY-VLINE ,
3 L_FILE ,
49 sy-vline,
50 v_lines,
80 SY-VLINE.
WRITE:/1(80) SY-ULINE .
ENDFORM. " DOWNLOAD_FILE
</code>
Hi Satya,
Try this .
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into table it_ekko.
*Populate field with color attributes
loop at it_ekko into wa_ekko.
Populate color variable with colour properties
Char 1 = C (This is a color property)
Char 2 = 3 (Color codes: 1 - 7)
Char 3 = Intensified on/off ( 1 or 0 )
Char 4 = Inverse display on/off ( 1 or 0 )
i.e. wa_ekko-line_color = 'C410'
ld_color = ld_color + 1.
Only 7 colours so need to reset color value
if ld_color = 8.
ld_color = 1.
endif.
concatenate 'C' ld_color '10' into wa_ekko-line_color.
wa_ekko-line_color = 'C410'.
modify it_ekko from wa_ekko.
endloop.
endform. " DATA_RETRIEVAL
For more info ,
http://www.sapdev.co.uk/reporting/alv/alvgrid_color.htm
Regards,
Chitra
Similar Messages
-
In ALV, how do u get alternate colors in output
In ALV, how do u get alternate colors in output
For a non OO ALV...
TYPE-POOLS: slis.
DATA: xfield TYPE slis_t_fieldcat_alv,
gs_layout TYPE slis_layout_alv.
In your data structure you have tu put a field for the color, example:
DATA: BEGIN OF xdata OCCURS 1.
DATA: ebeln LIKE ekko-ebeln,
name1 LIKE lfa1-name1,
txz01 LIKE ekpo-txz01,
color_line(4) TYPE c, " <==== this is the color line
END OF xdata.
You have create a form for the layout like this:
FORM init_layout.
gs_layout-info_fieldname = 'COLOR_LINE'. "<==the name of de field of the structure
ENDFORM.
Perform the init_layout in the initialization.
Your call alv function, have to be like this:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = 'X'
i_callback_program = 'YOUR_PROGRAM'
i_callback_user_command = 'USER_COMMAND'
is_layout = gs_layout
it_fieldcat = xfield[]
TABLES
t_outtab = xdata
EXCEPTIONS
program_error = 1
OTHERS = 2. -
How to get that colorful 'ls' output dmz keeps on showing us
A lot of people keeps on sending me emails and asking how I get ls to look like this:
So I figured I'd write this down so I can direct them here instead. :-)
First of - I've made my LS_COLORS (dircolors, really) configuration public. It contains about 300 different filetypes as of this writing. It's grouped by ... uh, group. Music files, video, pictures, text documents etc. Follow the link for more information and installation instructions.
Second, I use ls++ - colorized ls on steroids. It can colorize files matching PATTERN, thus allowing you to also differentiate files missing an extension. It also calculates the relative mtimes - see the above screenshot.
See ls++(3) and ls++.conf(3) after installation for more information.
Last edited by dmz (2011-07-16 14:55:01)Stalafin wrote:As I see it, ls++ by default acts more like $ ls -lh. Are you planning to extend ls++ to the full functionality of ls?
It's more like ls -hAlv --group-directories-first --time=ctime --time-style=+%s . :-)
I wont make any attempt to include every possible combination of ls options - if there's something special you're missing I can look at it though.
Stalafin wrote:Also, the default color you use for your terms is #121212 (for instance the background of the terms you took the screenshots of)? I am using #1e1e1e and especially the timestamp of files that haven't been changed for a long time are hardly visible :-( .
If you fire up man ls++.conf you'll see what numbers corresponds to what element; for example, color index 4 is used for 'day'. So change the value of $c[4] in the config to any color you'd like.
Stalafin wrote:And on another note: I checked your Xresources: what is the definition the definition of all colors from 0 to 255 good for? Isn't one usually defining only 16?
Normally, yes. But I'm not too happy with the default colors, so I've changed some of them.
See colorcoke and my urxvt fork for more information. -
Submit report to get output list
Hi friends,
I have one requirement to take output list of a transaction in one internal table.
As the transaction is very much interactive , that perticular internal table gets populated somewhere in the middle of the standard program...later on that table undergoes further processing to cope up with he interaction...
using SUBMIT report , we can export it to memory
and using FM 'LIST_FROM_MEMORY' we can get it back as following.
list_tab contains data in two fields RFCSIZE and RFCRECORD in numbers only...
Submit report_name with SELECTION-TABLE SELTAB
exporting list to Memory and return.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
BUT , Can we get the same output list (i.e before interaction) in one internal table...
thanksHi,
You can check whether the list is exported in between before the submit.
Supposed it is exported before the interaction den you can import it ..Just check the value is fetched and stored in a temporary table.
Is it a csutom program or standard SAP one..?
Hope this helps.
Regards,
Navin. -
How Get Alternating Row Colors To Work?
I've searched this forum, searched online, and followed the directions in the Numbers 3.0 Help, but I just can't get the Alternating Row Colors function to work. I'm using an iMac and a new Mac Mini, both running Mavericks, on a spreadsheet converted from Numbers '08. I've seen several screenshots of tables in discussions on this forum that seem to have Alternate Row shading; presumably they were done with Numbers 3.0. So apparently, it can be done. Need Help!
Vistan wrote:
Now I see it! I did not have any of the Table Style boxes in the upper right cortner of the creen selected...when I choose one, the alternate row colors sudenly pop up. I'm now experimenting with the Grid Lines and Header &Footer selection buttons.
Vistan
Vistan,
I'm about as sure as I can be that Table Style boxes having being clicked has nothing to do with the Checkbox for Alternating color rows. I've been wrong before, but I can't grasp the logic on this one, and it doesn't happen here the way you describe.
Jerry -
How to get right color output whit export.
Hello,
Does anyone know how to get the same color/gamma output with export as in the original footage ?
I noticed that when exporting a clip in h.264 or mp4 or quicktime h.264 or mp4, the colors get messed up, or the gamma I don't know really. You can try it yourself.
Here's a link to a testscreen image in png format:
http://joeljohnson.com/wp-content/uploads/2009/08/bbc-hd-test-card.png
I use the standard "digital color measurement tool" app, provided with mac OS X to check what happens with the colors.
The white, grey and black boxes in the left of the picture should be, Black 0%, Grey 20%, grey 40%, Grey 60%, Grey 80% and whie(100%). The red colorblocks inthe picture contain about 2,7% blue and 85% red.
Whenever I import this file in Imovie, the grey scale colors are already a bit changed. About 2% or 4%.
But what bothers me most is that the red blocks contain about 7% blue, 3 times as much as it supposed to contain.
On export the color difference maintain when viewed in quicktime. When viewed in VLC, the grey boxes are displayed as meant to be, 0%, 20%, 40%, 60%, 80% and 100%. So this is probably the well known and discussed gamma shift. BUT the red boxes contain about 7% blue, even when viewed in VLC, why!!!! I can't live with that, I have a red car, but when viewed on video on my computer...it has a blue cast, it's not red, it gets slightly purple. Does anyone know how to solve this problem, and by the way, the other colors in the testscreen image are also shifted on import and export. It keeps me awake at night...Help me please.Hi,
It is same for template.Double Click on the template.
Then Go to Template TAB.
Click to select the line type. If it showing a pencil type icon then click the pencil icon above .
Other thing is given above.
regards
Sandipan
Edited by: Sandipan Ghosh on Apr 2, 2008 4:16 PM -
How to get alternative strings in list of strings.
Hi experts,
how to get alternative strings in list of strings.
eg
'country1, italy, country2, india, country3, paris, country4, scottland, country5, rome'
from the above list i need to fetch all the countries and their names separately.
like country1, country2, country3, country4, country5
italy, india, paris, scottland, rome
i am trying the above one in the below fashion
SELECT SUBSTR
('country1, italy, country2, india, country3, paris, country4, scottland, country5, rome',
1,
INSTR
('country1, italy, country2, india, country3, paris, country4, scottland, country5, rome',
1,
1
- 1
FROM DUAL
can you please any one help meIf you want the data to be more stuctured, and useful:
col col_name for a20
col col_value for a20
var inlist VARCHAR2(2000)
exec :inlist := 'country1, italy, country2, india, country3, paris, country4, scottland, country5, rome';
exec :inlist := replace(:inlist,' ')
select max(decode(mod(lvl,2),1,value)) col_name
,max(decode(mod(lvl,2),0,value)) col_value
from (select substr(:InList,start_pos+1, end_pos-start_pos-1) value
,lvl
from (select :InList
,case when level = 1 then
0
else
instr(:InList,',',1,level-1)
end start_pos
,case when instr(:InList,',',1,level) = 0
then length(:InList)+1
else
instr(:InList,',',1,level)
end end_pos
,level lvl
from dual
connect by level <=length(:InList)-length(replace(:InList,','))+1
group by ceil(lvl/2)
order by 1;
COL_NAME COL_VALUE
country1 italy
country2 india
country3 paris
country4 scottland
country5 rome
Untested on 10g
Then you could stragg the rows together ... -
How can we get Empty screen as a output list
Hi Experts,
when executing the program I want to display an empty screen (as a output list) instead of error message . How we can do? let me know.
Thanks in advance.
Silviya THi Thomas,
Is u have such a requirement either u can use a sucess message i.e. type s with no text.
REPORT ZSAC_TEST1 message-id 00.
message s000.
Or try using this
write:/ 120 '.' .
the o/p screen looks like blank.
Hope this helps U.
Regards
Sachin Dhingra -
Why do I get a colored shadow behind shadow and feather transparency areas when printing?
Hello,
I've been pulling my hair out over this and finally went to my printer to ask if they had insight as to why this is happening. I'll include his reply here but would like to hear your expert opinions too!
When laying out a file in InDesign, I do a lot of overlapping, feather and some drop shadow and always get a colored shadow behind the transparency area when printing out from a pdf. These files are being designed for print, which is what I thought InDesign was created for - as an updated alternative to Quark and Pagemaker? Here is what the printer says:
"Ive taken a look at the file in question and the issues this lady is experiencing can not be resolved in InDesign. What she needs to do is build the background image with color overlays all in Photoshop as a Layered PSD. Then flatten it and pull it in to InDesign as a Tiff. Then she can place her text over the top of it. She needs to use image masks on the color overlays - for the areas she does not what the color to violate.
What it comes down to is these fancy design effects out of InDesign and Illustrator should never be used for printing. They can be used for web design. Reason is, they cause RIP problems. Things fall off the file and transparent areas go away just to name a few. This happens all the time."
I would appreciate any other viewpoints here. Can I really NOT use the shadow and feather functions in InDesign for print? Are there any other ways to approach this problem other than what is being advised here. It is SO much easier to produce the entire file in InDesign.
Here is a link to the pdf. If someone would like to see the original indd file, I can post it somewhere.
http://displaysunlimitedinc.com/test/panel_3_text.pdf
There is a 1 inch blur drop shadow on the black and white temple image; a 1 inch feather on the black and white screened back image behind the main text box; and no drop shadow or feather on the map at top right, yet I get a colored shadow behind all 3 of these areas when I export the indd file to pdf and print that out. The fact that I get a shadow behind the map puzzles me.
Thank you very much in advance.Horgycat,
The CMYK/RGB question is actually pretty complex, and depends to a great extent on how the final output is going to be produced.
If the files are destined for a printing press, all RGB elements must be converted to CMYK prior to printing. You have the option of doing that before placing in ID, or during export to PDF, and there are pros and cons to both methods, but if you don't know until the last minute what the print conditions will be, the convert on export path is more flexible.
Spot colors are a different matter. As far as I'm concerned, you should NEVER specify a spot color unless you are actually using spot ink on a press. A lot of inkjet and laser devices claim to be Pantone certified, but the reality is that even with expanded gamuts available using more than four inks, I'd estimate that better than half the Pantone solids are not reproducible as simulations that would satisfy me or my clients. The convert spot to process route should only be used, in my opinion, when you've designed a job properly to be printed using spot colors, and suddenly you have an output change or an added image that forces you to move to a process output. The last time I tried it, by the way, I had issues at the printer (the regular prepress guy was out of town, so I'm not sure what went wrong) and I ended up re-building the file with real process colors to get the transparency to work.
But you mentioned that you are doing exhibition panels, which implies to me that they are probably NOT going on a press -- you need to do hundreds, or sometimes even thousands, of copies to make a press cost-effective compared to digital printing. I used to work in a large-format output bureau doing just this kind of work, and we used large inkjet plotters. In this case, mixed RGB and CMYK files are less of an issue since most plotters will handle either, and depending on if they have an internal or external RIP or none at all, you may actually get better color fidelity using RGB as CMYK colors may get converted in the RIP to the RGB values that the plotter understands, and then get converted back a second time to CMYK (CMYKOG or whatever ink combination is used) internally before the ink is sprayed. Only the print provider would be in a position to tell you the correct color space for the equipment.
Which of course puts you at a bit of a disadvantage working with a client out of state who isn't supplying you with such necessary information as the correct output profiles for the job. It will be a miracle if the color is close.
A final word about looking funky on screen. Just as many spot colors can't be well simulated in CMYK, many also cannot be displayed adequately on a monitor. The ONLY way to choose spot colors is with a swatch book, and that's what the press operator will be using to verify his work. Clients need to be educated about the differences in technology and the limitations of soft proofs. -
How to Replicate Standard Alternating Colors using XSL-FO??
Hi All
I am using Apex_3.1, Apache fop and Standard Report Printing to produce PDF reports. We would like to replicate the theme 12 (Blue) standard alternating colors in our PDF output.
I do realise that this involves modifying the xsl-fo and have tried putting color attributes in the xsl-fo (Generic Columns). I know I can just put the color in the apex print settings but that doesn't give me the alternating colors.
Edited by: Keith Jamieson on Oct 22, 2009 4:04 PMI believe this is the section of the xsl template that needs modified.
<fo:table-body>
<xsl:for-each select=".//ROW">
<fo:table-row >
#PRN_TEMPLATE_BODY_ROW#
</fo:table-row>
</xsl:for-each>
</fo:table-body>and I have found this example which appears to do what I require.
<xsl:template name="table.row.properties">
<xsl:variable name="tabstyle">
<xsl:call-template name="tabstyle"/>
</xsl:variable>
<xsl:variable name="bgcolor">
<xsl:call-template name="dbfo-attribute">
<xsl:with-param name="pis" select="processing-instruction('dbfo')"/>
<xsl:with-param name="attribute" select="'bgcolor'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="rownum">
<xsl:number from="tgroup" count="row"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$bgcolor != ''">
<xsl:attribute name="background-color">
<xsl:value-of select="$bgcolor"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="$tabstyle = 'striped'">
<xsl:if test="$rownum mod 2 = 0"
<xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:template>Every time I try and add that section to the code, I end up breaking it and not getting any pdf output :(
eg my latest attempt
<?xml version = '1.0' encoding = 'utf-8'?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink">
<xsl:variable name="_XDOFOPOS" select="''"/>
<xsl:variable name="_XDOFOPOS2" select="number(1)"/>
<xsl:variable name="_XDOFOTOTAL" select="number(1)"/>
<xsl:variable name="_XDOFOOSTOTAL" select="number(0)"/>
<xs1:variable name="rownum" />
<xsl:choose>
<xsl:when test="$bgcolor != ''">
<xsl:attribute name="background-color">
<xsl:value-of select="$bgcolor"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="$tabstyle = 'striped'">
<xsl:if test="$rownum mod 2 = 0">
<xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
</xsl:if>
</xsl:when>
</xsl:choose>
<xsl:attribute-set name="padding">
<xsl:attribute name="padding-bottom">0.25pt</xsl:attribute>
<xsl:attribute name="padding-top">0.25pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="text">
<xsl:attribute name="text-align">start</xsl:attribute>
<xsl:attribute name="orphans">2</xsl:attribute>
<xsl:attribute name="start-indent">0.0pt</xsl:attribute>
<xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
<xsl:attribute name="padding-top">0.0pt</xsl:attribute>
<xsl:attribute name="end-indent">0.0pt</xsl:attribute>
<xsl:attribute name="padding-bottom">0.0pt</xsl:attribute>
<xsl:attribute name="height">0.0pt</xsl:attribute>
<xsl:attribute name="widows">2</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="align-left">
<xsl:attribute name="text-align">left</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="align-center">
<xsl:attribute name="text-align">center</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="align-right">
<xsl:attribute name="text-align">right</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="footer">
<xsl:attribute name="text-align">right</xsl:attribute>
<xsl:attribute name="start-indent">5.4pt</xsl:attribute>
<xsl:attribute name="end-indent">5.4pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="text_2">
<xsl:attribute name="start-indent">5.4pt</xsl:attribute>
<xsl:attribute name="end-indent">23.4pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="text_20">
<xsl:attribute name="height">13.872pt</xsl:attribute>
<xsl:attribute name="end-indent">5.4pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="text_0">
<xsl:attribute name="end-indent">5.4pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="page-header">
<xsl:attribute name="color">#PAGE_HEADER_FONT_COLOR#</xsl:attribute>
<xsl:attribute name="font-family">#PAGE_HEADER_FONT_FAMILY#</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="font-size">#PAGE_HEADER_FONT_SIZE#pt</xsl:attribute>
<xsl:attribute name="font-weight">#PAGE_HEADER_FONT_WEIGHT#</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="page-footer">
<xsl:attribute name="color">#PAGE_FOOTER_FONT_COLOR#</xsl:attribute>
<xsl:attribute name="font-family">#PAGE_FOOTER_FONT_FAMILY#</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="font-size">#PAGE_FOOTER_FONT_SIZE#pt</xsl:attribute>
<xsl:attribute name="font-weight">#PAGE_FOOTER_FONT_WEIGHT#</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="body-font">
<xsl:attribute name="height">12.0pt</xsl:attribute>
<xsl:attribute name="font-family">#BODY_FONT_FAMILY#</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="font-size">#BODY_FONT_SIZE#pt</xsl:attribute>
<xsl:attribute name="font-weight">#BODY_FONT_WEIGHT#</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="page-number">
<xsl:attribute name="height">13.872pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="header-font">
<xsl:attribute name="height">#HEADER_FONT_SIZE#pt</xsl:attribute>
<xsl:attribute name="font-family">#HEADER_FONT_FAMILY#</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="font-size">#HEADER_FONT_SIZE#pt</xsl:attribute>
<xsl:attribute name="font-weight">#HEADER_FONT_WEIGHT#</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="border">
<xsl:attribute name="border-top">#BORDER_WIDTH#pt solid #BORDER_COLOR#</xsl:attribute>
<xsl:attribute name="border-bottom">#BORDER_WIDTH#pt solid #BORDER_COLOR#</xsl:attribute>
<xsl:attribute name="border-start-width">#BORDER_WIDTH#pt</xsl:attribute>
<xsl:attribute name="border-start-color">#BORDER_COLOR#</xsl:attribute>
<xsl:attribute name="border-start-style">solid</xsl:attribute>
<xsl:attribute name="border-end-width">#BORDER_WIDTH#pt</xsl:attribute>
<xsl:attribute name="border-end-color">#BORDER_COLOR#</xsl:attribute>
<xsl:attribute name="border-end-style">solid</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="cell">
<xsl:attribute name="background-color">#BODY_BG_COLOR#</xsl:attribute>
<xsl:attribute name="color">#BODY_FONT_COLOR#</xsl:attribute>
<xsl:attribute name="padding-start">5.15pt</xsl:attribute>
<xsl:attribute name="vertical-align">top</xsl:attribute>
<xsl:attribute name="padding-top">0.0pt</xsl:attribute>
<xsl:attribute name="padding-end">5.15pt</xsl:attribute>
<xsl:attribute name="number-columns-spanned">1</xsl:attribute>
<xsl:attribute name="height">0.0pt</xsl:attribute>
<xsl:attribute name="padding-bottom">0.0pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="header-color">
<xsl:attribute name="background-color">#HEADER_BG_COLOR#</xsl:attribute>
<xsl:attribute name="color">#HEADER_FONT_COLOR#</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="master0" margin-left="66.6pt" margin-right="66.6pt" page-height="#PAGE_HEIGHT#pt" page-width="#PAGE_WIDTH#pt" margin-top="36.0pt" margin-bottom="36.0pt">
<fo:region-before region-name="region-header" extent="54.0pt"/>
<fo:region-body region-name="region-body" margin-top="54.0pt" margin-bottom="54.0pt"/>
<fo:region-after region-name="region-footer" extent="54.0pt" display-align="after"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="master0">
<xsl:variable name="_PW" select="number(#PAGE_HEIGHT#)"/>
<xsl:variable name="_PH" select="number(#PAGE_WIDTH#)"/>
<xsl:variable name="_ML" select="number(72.0)"/>
<xsl:variable name="_MR" select="number(72.0)"/>
<xsl:variable name="_MT" select="number(90.0)"/>
<xsl:variable name="_MB" select="number(90.0)"/>
<xsl:variable name="_HY" select="number(36.0)"/>
<xsl:variable name="_FY" select="number(36.0)"/>
<xsl:variable name="_SECTION_NAME" select="string('master0')"/>
<fo:static-content flow-name="region-header">
<fo:block xsl:use-attribute-sets="text text_2 text_0 #PAGE_HEADER_ALIGNMENT#">
<fo:inline xsl:use-attribute-sets="page-header">#PAGE_HEADER#</fo:inline>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="region-footer">
<fo:block xsl:use-attribute-sets="text footer">
<fo:inline xsl:use-attribute-sets="body-font page-number">
<fo:page-number/>
</fo:inline>
</fo:block>
<fo:block xsl:use-attribute-sets="text text_2 #PAGE_FOOTER_ALIGNMENT#">
<fo:inline xsl:use-attribute-sets="page-footer">#PAGE_FOOTER#</fo:inline>
</fo:block>
</fo:static-content>
<fo:flow flow-name="region-body">
<fo:block xsl:use-attribute-sets="padding">
<fo:table start-indent="0.0pt">
<xsl:variable name="_XDOFOPOS2" select="number(1)"/>
<xsl:variable name="_XDOFOTOTAL" select="number(1)"/>
#PRN_TABLE_CELLS#
<fo:table-header>
<fo:table-row>
#PRN_TEMPLATE_HEADER_ROW#
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:for-each select=".//ROW">
<xs1:choose>
<xs1:when> test = ".//ROW mod 2 = 0"
<fo:table-row bgcolor=#EEEEEE>
#PRN_TEMPLATE_BODY_ROW#
</fo:table-row>
</xs1:when>
<xs1:when> test = ".//ROW mod 1 = 0"
<fo:table-row bgcolor=#DDDDDD>
#PRN_TEMPLATE_BODY_ROW#
</fo:table-row>
</xs1>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:block>
<fo:block xsl:use-attribute-sets="text text_2 text_20">
<fo:inline id="{concat('page-total-', $_SECTION_NAME, $_XDOFOPOS)}"/>
<fo:inline id="{concat('page-total', $_XDOFOPOS)}"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet> -
Alternating color runs in a table
I have a bean that returns a few ArrayLists. I am displaying the results in a jsp in a table. What is the best way in jsp for me to get the colors of the <tr> to alternate?
This works - I think adding the values into the pageContext is key:
<%@ page language="java" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%
List payPeriods = new ArrayList();
for (int index = 0; index < 10; ++index)
payPeriods.add(new Integer(index*index));
pageContext.setAttribute("payPeriods", payPeriods);
%>
<center>
<h3>Alternating Color Test</h3>
<table border="1">
<tr bgcolor="#ffad00">
<th>Row Number</th>
<th>Value</th>
</tr>
<c:forEach items="${payPeriods}" var="payPeriod" varStatus="status">
<c:choose>
<c:when test="${(status.count % 2) == 0}">
<tr bgcolor="#77ccff">
</c:when>
<c:otherwise>
<tr bgcolor="#ffffff">
</c:otherwise>
</c:choose>
<td>
<c:out value="${status.count}"/>
</td>
<td>
<c:out value="${payPeriod}"/>
</td>
</tr>
</c:forEach>
</table>
</center>It's not exactly your case, but it does show the alternating colors. I'll leave the changes to you. -
How to get default color of a selected row in a JLIst
I have a JList that I am changing the font color for based on a certian situation so I created my own MyCellRenderer to do this. However, when I select an item in the list the row is no longer highlighted. I used the isSelected method to determine if a row was selected and then change the background color of that row. However, I would like the color to be the default color that you get when you select a row in a default JList. I can't seem to figure out how to get that color. How do I obtain what that color is? I found an example where you can get the default color for the background of a button and use that color so I would guess it is something similar to that. My code is below so I hope someone can tell me how to get that color that I want.
Thanks...Chris
class MyCellRenderer extends JLabel implements ListCellRenderer {
public MyCellRenderer() {
setOpaque(true);
public Component getListCellRendererComponent(
JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
int index1 = value.toString().indexOf("-");
String errors = value.toString().substring(index1 + 1, index1 + 6).trim();
int numErrors = Integer.parseInt(errors);
if (numErrors > 0)
setForeground(Color.red);
setBackground(Color.white);
else
setBackground(Color.white);
setForeground(Color.black);
if(isSelected)
//ColorUIResource col = (ColorUIResource)UIManager.getDefaults().get("JButton.background");
ColorUIResource col = (ColorUIResource)UIManager.getDefaults().get("Button.background");
setBackground(col);
setText(value.toString());
return this;
}Swing related questions should be posted in the Swing forum.
I would like the color to be the default color that you get when you select a row in a default JList. I can't seem to figure out how to get that colorlist.getSelectionBackground(); -
How to add new fields on output list of ME5A(Purchase Requisitions)
Hi Friends,
I have to do a task to add a new field ABC Indicator (MARC-MAABC) on the output list of ME5A. IS there any standard way to to this or do I have to copy ME5A to ZME5A and do? Please advice.
Apprecaite your suggestions ont his thread.
Thanks,
HarryHi,
Already there are some ENHANCEMENT spots are available in the program RM06BA00.. check if you can use them to add your logic to get the new field... -
Recently i have been getting the color wheel a lot and it is screwing with my happiness. Any thoughts on how to clean the computer up so this stops?
Back up all data immediately as your boot drive may be failing.
If you have more than one user account, these instructions must be carried out as an administrator.
Triple-click anywhere in the line below on this page to select it:
syslog -k Sender kernel -k Message CReq 'Channel t|GPU D|I/O|Previous Sh' | tail | open -ef
Copy the selected text to the Clipboard (command-C).
Launch the Terminal application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
Paste into the Terminal window (command-V).
The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.
A TextEdit window will open with the output of the command. If the command produced no output, the window will be empty. Post the contents of the TextEdit window (not the Terminal window), if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that. -
Adding fields to ALV output list in Tcode S_ALR_87012357
Hi,
I need your help to insert new fields in output at standard t-code S_ALR_87012357 for GST Report.
Report name is RFUMSV00.
The add/insert columns are
1)Vendor Description,
2)SGD Gross Amt(100% tax Reporting curr)
3)SGD Tax Base Amt(100% Tax Reporting curr),
4)SGD Input Tax(7% Tax Reporting curr) and
5) Value(100%Vendor Curr)
Could anyone help me how to do this.
Thanks,
ShabareeshChanging the field catalog should not add the new fields required in internal table (e.g. structure RFUMS_TAX_ITEM for items)
You could try to append a structure to those, and fill its value with FI_TAX_BADI_011 ?
Regards,
Raymond
PS: List of BAdI for this report
FI_TAX_BADI_010
RFUMSV00: Events for List Output Using ALV
FI_TAX_BADI_011
RFUMSV00: Event 'APPEND' for Line Item Lists
FI_TAX_BADI_012
RFUMSV00: Event 'GET bkpf LATE' during Selection
FI_TAX_BADI_013
RFUMSV00: Set Parameters for DME Tool (Tree Type UMS1)
FI_TAX_BADI_014
RFUMSV00: Field Catalog of Output Lists for ALV
FI_TAX_BADI_015
RFUMSV00: Event "END-OF-SELECTION" before Data File Creation
FI_TAX_BADI_016
RFUMSV00: Transfer of All Tax Data
Maybe you are looking for
-
Adobe Creative cloud Photoshop CC 2014 , smudge tool freezing
Issue: Adobe CC 2014 , Photoshop smudge tool freezing , application stops responding when using more that 4000px Facing issue with Adobe photo shop , smudge tool freezes when using >4000px . issue persists on all workstations with NVidia card on wind
-
Toggle Option in Process Chain not working
Hello SDNers, I am experiencing the below scenario with one of my process chain. Process Chain FLow Start | | Local Chain (To delete the already existing file from Application Server(ZFTP)) | Local chain to rename the file | | Local chain (Load data
-
Hi, I have a ODS which is being loaded from 2lis_o2_hdr,2lis_02_itm,2lis_02_scl. When I run report in this ods,I am getting PO# Item# SC# Createdby Compcode 123 10 1 NA NA 123 10 NA NA 06 123 NA
-
Incorrect Color Output when Printing
I've place a CMYK image from photoshop into indesign. It has a dark blue background and prints correctly out of photoshop. Indesign, however, prints the blue as a rich purple color. The color output is set to composite CMYK. When I change the output
-
Management Studio Login not possible
Hello, I use BB 10.2.1 and after the latest Update the Management Studio is not accessable. I cannot give in Login Name and Password because thies fields are missing. I only the the drop down menu "Log in using" an this is empty. Do you have any idea