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.
Similar Messages
-
How can i set the alternating colors for a table rows
Dear All,
Please any one help me how can i set the Alternating colors for Table Rows.
i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.Hi,
The design property in Table properties should work for your requirement. Select "alternating" value for design.
Please see the API below:
design
Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
alternating - The table rows are displayed alternately in a different color.
standard - The table background has one color. The individual table rows are displayed with grid net lines.
transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
Regards,
Jaya.
Edited by: VJR on Jun 17, 2009 6:43 PM -
How to set table alternating color
how do i set the properties of table with alternating color
properties :
design : alternating
it is like normal table , although i have change the properties of design to alternating.....
pls adviceHi Yzme,
When you change the Table Design propety to "<b>alternate</b>", change the <b>readOnly </b>property to <b>"true</b>". Then the table will display the alternate colors but the table will be read only.
Refer to the following thread also:
Re: Problem with table design in 2004s
Regards,
Jhansi -
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 -
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 Subreport details
I've created a subreport with detail lines that can be suppressed if the value of my database field is zero. So on some reports I could have 7 lines.. and some I could have three (for example) depending on the data. I have to make this table an alternating color table. So if the first line has a white background, the next line needs to have a silver background.. if the line before a line has a silver background.. that line needs to have a while background.
Example of report with 5 detail lines showing:
White
Silver
White
Silver
White
Example with 8 detail lines showing:
White
Silver
White
Silver
White
Silver
White
Silver
There are only 10 detail lines available and the first one is always white. I've been trying to write a formula in the background color properties in my section expert for each detail line that would do this for me.. I was going for something like:
If previous value is crWhite then
formula = crSilver
else
formula = crWhite
end if
I know this is wrong because I can't find a function that will do it for me. Does anyone know a simple way to do this?
Thanks!Is this in a detail format or group header/footer? Is the format conditionally suppressed? These will change the formula. If it's in a group header/footer, use (basic syntax):
global toggleColor as number
toggleColor = 1 - toggleColor
if toggleColor = 0 then
formula = crSilver
else
formula = crWhite
end if
If records are conditionally suppressed, use the formula above, but add an IF statement around the toggleColor = toggleColor - 1 line with the condition "NOT (whatever your suppression formula is)".
HTH,
Carl -
Creating vertical reports with alternating colored rows
I wanted to create a vertical report with alternating colored rows. Creating a vertical report template was not a problem but I am not able to use different bgcolor for alternating rows.
As I mentioned above, I used the follwoing code to generate the vertical report BUT i could not get the alternating rows in a diffrent color:
Before Rows:
<table class="default2">
Before Each Row:
OMIT
Column Template 1
<tr><td bgcolor="#CCCC99" width="200"><font color="#336699" #ALIGNMENT#><b> #COLUMN_HEADER#</td> <td width="500">#COLUMN_VALUE#</td></tr>
Column Template 1 Condition
Use for Odd rows
Column Template 1
<tr><td bgcolor="#CCCC99" width="200"><font color="#336699" #ALIGNMENT#><b> #COLUMN_HEADER#</td> <td bgcolor="#FFFFFF" width="500">#COLUMN_VALUE#</td></tr>
Column Template 1 Condition
Use for Even rows
After Each Row
OMIT
After Rows
</table> -
Revaluation material using Alternative valuation run
Hi friends!!
My question is the next:
I´m want to use the Aternative valuation Run to do a Revaluation of consumption of several periods.
The issue is that I can´t find the option "Revaluate material" in the Costing cockpit of the Alternative valuation Run.
Do you must run the "Costing Cockpit: Actual Costing·" for each month to do the revalutate of ending inventory with the PIP??.
I would like to revaluate the ending stock with the Periodic internal price using the Alternative valuation run if this colud be possible..
Thanks!!!
Best Regards!!
ManuelHi Manuel,
It depends how you want to use the AVR.
The 'Determine Delta Postings' and 'Post Closing' steps are optional
steps. They are only displayed if the AVR run is defined as a 'posting run' in the settings of the AVR.
SAP recommends to run the post closing with the periodic actual costing and post a delta with the AVR functionality.
This delta is AVR actual price - periodic actual price.
The system post the revaluation amount to the material BSX account and the delta posting calculated by the AVR to
the BSD account.
A different option would be to carry out a total post closing only via AVR according to note 633010. In this case,
the system doesn't revaluate materials with the new actual price but post the total revaluation to a LKW account.
In this case the periodic costing run can never be used. For this new posting logic you should use the parameter
AVR_POSTING_NO_DELTA in the CKMLMVADMIN table.
I hope the explanation helps to clarify the problem.
Kind regards,
MLM
p.s. If you are satisfied with the help please pariticipate in our forum giving points! -
How to join two internal table rows in alternative manner into one internal table?
How to join two internal table rows in alternative manner into one internal table?
two internal tables are suppose itab1 & itab2 & its data
Header 1
Header 2
Header 3
a
b
c
d
e
f
g
h
i
Header 1
Header 2
Header 3
1
2
3
4
5
6
7
8
9
INTO itab3 data
Header 1
Header 2
Header 3
a
b
c
1
2
3
d
e
f
4
5
6
g
h
i
7
8
9Hi Soubhik,
I have added two additional columns for each internal table.
Table_Count - It represents the Internal Table Number(ITAB1 -> 1, ITAB2 -> 2)
Row_Count - It represents the Row Count Number, increase the row count value 1 by one..
ITAB1:
Header 1
Header 2
Header 3
Table_Count
Row_Count
a
b
c
1
1
d
e
f
1
2
g
h
i
1
3
ITAB2:
Header 1
Header 2
Header 3
Table_Count
Row_Count
1
2
3
2
1
4
5
6
2
2
7
8
9
2
3
Create the Final Internal table as same as the ITAB1/ITAB2 structure.
"Data Declarations
DATA: IT_FINAL LIKE TABLE OF ITAB1. "Final Internal Table
FIELD-SYMBOLS: <FS_TAB1> TYPE TY_TAB1, "TAB1
<FS_TAB2> TYPE TY_TAB2. "TAB2
"Assign the values for the additional two column for ITAB1
LOOP AT ITAB1 ASSIGNING <FS_TAB1>.
<FS_TAB1>-TABLE_COUNT = 1. "Table value same for all row
<FS_TAB1>-ROW_COUNT = SY-TABIX. "Index value
ENDLOOP.
"Assign the values for the additional two column for ITAB2
LOOP AT ITAB2 ASSIGNING <FS_TAB2>.
<FS_TAB2>-TABLE_COUNT = 2. "Table value same for all row
<FS_TAB2>-ROW_COUNT = SY-TABIX. "Index value
ENDLOOP.
"Copy the First Internal Table 'ITAB1' to Final Table
IT_FINAL[] = ITAB1[].
"Copy the Second Internal Table 'ITAB2' to Final Table
APPEND IT
LOOP AT ITAB2 INTO WA_TAB2.
APPEND WA_TAB2 TO IT_FINAL.
ENDLOOP.
"Sort the Internal Table based on TABLE_COUNT & ROW_COUNT
SORT IT_FINAL BY ROW_COUNT TABLE_COUNT.
After sorting, check the output for IT_FINAL Table, you can find the required output as shown above.
Regards
Rajkumar Narasimman -
Alternative valuation run methodolgy for material ledger
Hi Experts
Does someone can explain me how to customize alternative valuation run in SAP and how to use it.
Do I have to run it from CKMLCPAVR or from CKMLCP.
Can I run for same plant and same period the AVR in CKMLCP ?
On the screen of CKMLCPAVR I don't have nothing in Creat Cost estimate ??
THanks and regards
DjamelHi Djamel ,
1. Purpose of Material Ledger Run (CKMLCP) is to calculate actual cost of the product .. and you can update material master with actual cost ( optional step).SAP uses weighted average methord when calculating actual cost.
2. Purpose of Alternate Valuation Run (CKMLCPAVR) is to have a actual cost for analysis purpose . You can use weighted average methord or use can use FIFO , LIFO valuation methord also . Ifd you want to use LIFO/FIFO methord .. you have to configure LIFO/FIFO customization and use the standard BADI give in the SPRO menu .
3. CKMLCP and CKMLCPAVR have no depencies and you can run that for same plant .. or you can run anyone of them . Both the purposes are different .
4. On the screen of CKMLCPAVR I don't have nothing in Creat Cost estimate ?? Implement SAP Note 659447 - No process steps in AVR cockpit ... it will solve your issues .
5. For CKMLCP.. OBYC settings are as per transaction key "BSX" ... OSS Note : 908737 - Post Closing in Material Ledger
6. CKMLCPAVR -- OBYC settings are as per transaction key "BSD " .. as if required manual entry has to be done to have actual costs . So , inventory account must have manual updation tick in GL master
7. To sum -up... OBYC settings you have to do for CKMLCPAVR and any valuation approach you use other than default SAP weighted avergae methord ( LIFO or FIFO)
Hope it clarifies ... Do revert bac for any further clarifications..
Regards
Sarada -
How to run the setup tables in CRM for 0CRM_LEAD_I datasource.
Hi all,
How to run the setup tables in CRM for 0CRM_LEAD_I datasource.
what is the tcode and steps to follow.
Thankyou.you dont have to do set up tables for 0CRM_LEAD_I.
run the init infopack in BW and then subsequent delta's -
Dynamically changing row color in an ADF table?
Hi,
I am using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Can anyone please let me know the code for dynamically changing the row color of an ADF table?
Thanks,
Vikwell you can use EL on af:column inlineStyle property to change the color on condition
e.g
inlineStyle='#{(row.SelectedRow)?"background-color: Silver":""};a example can be found here it is changing color based on Checkbox selection http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html -
Any alternative to run Oracle Report without using Oracle Rpt Server?
Hi,
Is there other alternative to run Oracle Reports if I don't have oracle report server?
Reason being I'm thinking of using Oracle10g iAS Standard Edition but this edition does not come with Oracle Report Server.
Is there anyway to run it? I need the report to be run through web browser and display as PDF.
Please advise.
Thank you.is there a library (pll) attached to the report which has not been compiled on the application-server ?
-
Will Color run properly on a 2010 macbook pro 15 i7
Will Color run properly on a 2010 macbook pro 15 i7.
Color minimum display requirements are 1680-by-1050 resolution or higher; dual displays are highly recommended. The Macbook Pro 15 i7 comes with 1440 X 900.
What does this means, I won't be able to run Color?
Any suggestion?
Thanks!!You can always launch the application and see what happens. Otherwise we'd still all be banging rocks together and making grunting sounds.... oh, wait a minute.
Anyway, a 15" 1440x900 won't be very much fun. There is a hack that will allow COLOR to run on a sub-requirement display, but it strains the system resources in a major way, plus the user interface does not scale -- all the radio buttons and dialogues will be almost unreadable. The other deal is that some on-board GPUs are not compatible with COLOR at all. Most laptops are nVidia, and there are other issues around that.
FT/COLOR was designed with an absolute minimum 17" single screen (1920x1200) in mind, more preferably dual screen (DVI, not FireWire), one or both of which should be 23", and -- * to achieve useable productivity* -- dual screen plus an HD-SDI Video I/O card (eg Kona3) to display calibrated material on a grade monitor.
That's who the developers originally had in mind, and priced the stand-alone offering accordingly.
FTHD was $5K+, and the 2K version, which you now get packaged with FCS and is actually now capable of 4K, was around $27K+(support contract).
jPo -
Alternative Valuation Run x IFRS depreciation
Hi All
Is there anyone here who has implemented this kind of solution by running the CKMLCPAVR (alternative valuation run) to find a new actual price by using a different depreciation method (IFRS) ?
This is one of the requirements for south american companies to report for IFRS.
RegardsHi Ramos,
yes, I know of customers who use the AVR for this purpose. Currently there is an enhancement in the deveopment queue to better align AVR with newGL. Aim is to direct AVR postings to the ledger of choice.
I could connect you with a colleague if you need more info on that.
best regards,
Udo
Maybe you are looking for
-
I am getting a connection timeout occurred message on my mid-2009 macbook pro I am running mountain lion 10.8.2 but problem occured before and after update. The message only happens when i attempt to connect to the wifi at my university. It works nor
-
How do i transfer my contacts from macbook to iPad
Fairly new to macbookpro with osx maverics and novice to ipad version 7.0.4. Cannot find a working solution from guides as requested actions are not anywehre to be seen. I have a cable connection between the 2 machines.
-
C6180 printer offline even though it's connected to the network.
My c6180 printer won't connect with my computer. I went through the network settings on the printer itself and the settings on the printer itself show that it's connected to my router. But when I try to send a document to the printer, my computer sh
-
Deleted files not clearing space on my hard drive
I'm running iMovieHD v6.0.3 on an old PowerPC G5. Things have always run smoothly until now. When I started editing my most recent video, I had 191GB left on a 500GB hard drive. Whenever I deleted any clips, my trash file size went immediately to 6.7
-
Mac OS X 10.6.5 Disk verification problems
Hi, I just used the disk repair utility and oh boy i found a problem. Here is what it says: Performing live verification. Checking Journaled HFS Plus volume. Checking extents overflow file. Checking catalog file. *Incorrect block count for file live.