|
|

楼主 |
发表于 2006/12/21 14:13:06
|
显示全部楼层
在metalink上找到了一个资料| 主题: | How to Modify the data source for the XML version of the Print Quote report | | 文档 ID: | 注释:392728.1 | 类型: | HOWTO | | 上次修订日期: | 01-NOV-2006 | 状态: | PUBLISHED | In this Document
Applies to: Oracle Quoting - Version: 11.5.10
Information in this document applies to any platform.
ASOPRINT.xsl
GoalHow to Modify the data source for the XML version of the Print Quote report for customization purposes?
SolutionNote: We do not provide XML sample data as it is not needed to customize the report.
The following are general details for customizing the xml print quote report to add a column.
The example is for adding the column named "EqxMRRDiscPr".
You can use the above framework as example to do your customizations.
The XML Print Quote uses the framework methodology. You will need understanding of the 11i framework customization using JDeveloper to be able to perform these customizations.
Please also note that current Print Quote functionality ONLY uses XSL stylesheets for the layout design. So you need experience with modifying XSL stylesheets. In Release 12, ASO will be providing RTF based stylesheets for simply creating and modifying the layout.
=====================================================
Note: To add a column to the print quote report, following files need to be updated:
LinesVO.xml --- xml files containing the sql query and attribute definition
LinesVORowImpl.class - public class extending the framework class OAViewRowImpl.
This class contains the set and get for the attributes defined in xml file.
ASOPRINT.xsl - this is the xsl stylesheet file used to describe the report layout.
This file needs to be modified to include the new column being added to the report.
STEPS
======
1. Modify VOLines.xml file
a). Modify the query in LinesVO.xml to include the additional columns you want to display in the report. For example,
SELECT
qte.ui_line_number line_number
,qte.padded_concatenated_segments item_number
,qte.item_description item_description
,qte.uom_code Order_Quantity_Uom
,DECODE(qte.line_category_code, 'RETURN', qte.quantity*(-1), qte.quantity) Ordered_Quantity
,qte.line_category_code
,qte.service_ref_line_id
,UPPER(qte.service_ref_type_code) srv_ref_type_code
,DECODE(qte.line_category_code, 'RETURN', qte.line_list_price*(-1), qte.line_list_price)
unit_list_price
,DECODE(qte.line_category_code, 'RETURN', qte.line_adjusted_amount*(-1), qte.line_adjusted_amount)
line_adj_price
,DECODE(qte.line_category_code, 'RETURN', qte.line_quote_price*(-1), qte.line_quote_price)
unit_selling_price
,DECODE(qte.line_category_code, 'RETURN', qte.extended_list_price*(-1), qte.extended_list_price)
line_total_list_price
,DECODE(qte.line_category_code, 'RETURN', qte.extended_adjusted_amount*(-1),
qte.extended_adjusted_amount)
line_total_adj_amt
,DECODE(qte.line_category_code, 'RETURN', qte.extended_selling_price*(-1),
qte.extended_selling_price) line_total
,line_number old_line_number
,to_char(qte.start_date_active,nvl(FND_PROFILE.VALUE('ICX_DATE_FORMAT_MASK'), 'DD-MON-RRRR'))
start_date_active
,to_char(qte.end_date_active,nvl(FND_PROFILE.VALUE('ICX_DATE_FORMAT_MASK'), 'DD-MON-RRRR'))
end_date_active
,qte.service_duration
,qte.service_period
,qte.item_type_code
,decode(qte.item_type_code, 'MDL', NVL(qte.complete_configuration_flag, 'N'), 'Z') Model_Status
,qte.quote_line_id qlid
,qte.quote_header_id
,DECODE(qte.line_category_code,
'RETURN',
(select qte.quantity *
(nvl(sum(decode(apav.applied_flag,'Y',decode(apav.charge_type_code,NULL,0,apav.adjusted_amount),0)
), 0))
FROM aso_price_adjustments_v apav
where qte.quote_line_id = apav.quote_line_id )*(-1),
(select qte.quantity *
(nvl(sum(decode(apav.applied_flag,'Y',decode(apav.charge_type_code,NULL,0,apav.adjusted_amount),0)
), 0))
FROM aso_price_adjustments_v apav
where qte.quote_line_id = apav.quote_line_id )) line_charges
,DECODE(qte.line_category_code,
'RETURN',
(decode(qte.item_type_code,
'MDL',
decode (qte.config_header_id,
NULL,
qte.extended_selling_price,
(select sum(QUOTE_LINES.LINE_QUOTE_PRICE * QUOTE_LINES.QUANTITY)
from ASO_QUOTE_LINES_ALL QUOTE_LINES,
ASO_QUOTE_LINE_DETAILS QUOTE_LINE_DETAILS
where quote_line_details.config_header_id=qte.config_header_id
and quote_line_details.quote_line_id =quote_lines.quote_line_id)),
qte.extended_selling_price))*(-1),
(decode(qte.item_type_code,
'MDL',
decode (qte.config_header_id,
NULL,
qte.extended_selling_price,
(select sum(QUOTE_LINES.LINE_QUOTE_PRICE * QUOTE_LINES.QUANTITY)
from ASO_QUOTE_LINES_ALL QUOTE_LINES,
ASO_QUOTE_LINE_DETAILS QUOTE_LINE_DETAILS
where quote_line_details.config_header_id=qte.config_header_id
and quote_line_details.quote_line_id =quote_lines.quote_line_id)),
qte.extended_selling_price))) model_total
,DECODE(qte.line_category_code, 'RETURN', qte.line_list_price*(-1), qte.line_list_price)
eqx_mrr_disc_pr ***** THIS IS THE COLUMN YOU ARE ADDING TO THE QUERY ************
FROM
aso_pvt_quote_lines_bali_v qte
b). Add the View Attributes for the additional columns you want to add. For example:
<ViewAttribute
Name="EqxMrrDiscPr"
IsPersistent="false"
Precision="255"
Type="java.lang.String"
AliasName="EqxMrrDiscPr"
ColumnType="VARCHAR2"
Expression="EqxMrrDiscPr"
SQLType="VARCHAR" >
</ViewAttribute>
2. Modify LinesVORowImpl.java file to add setters and getters for the newly added view attribute. For example,
a. protected static final int EQXMRRDISCPR = 25;
b. case EQXMRRDISCPR:
return getEqxMrrDiscPr();
case EQXMRRDISCPR:
setEqxMrrDiscPr((String)value);
return;
c. /**
*
* Gets the attribute value for the calculated attribute EqxMrrDiscPr
*/
public String getEqxMrrDiscPr()
{
return (String)getAttributeInternal(EQXMRRDISCPR);
}
/**
*
* Sets <code>value</code> as the attribute value for the calculated attribute EqxMrrDiscPr
*/
public void setEqxMrrDiscPr(String value)
{
setAttributeInternal(EQXMRRDISCPR, value);
}
3. Modify the ASOPRINT.XSL (stylesheet) file. PLEASE DO NOT MODIFY THE ORIGINAL FILE.
Make copy of the file as ASOPRINTEQ.XSL and modify.
a. <xsl:variable name="EqxMRRDiscPr">
<xsl:text>EqxMRRDiscPr</xsl:text>
</xsl:variable>
b. <fo:table-cell xsl:use-attribute-sets="number.header">
<fo:block text-align="left"><xsl:value-of select="$EqxMRRDiscPr"/></fo:block>
</fo:table-cell>
c. <fo:table-cell xsl:use-attribute-sets="table.cell">
<fo:block><xsl:value-of select="./EqxMrrDiscPr"/></fo:block>
</fo:table-cell>
4. Compile LinesVORowImpl.java file and move the class to server side under
$JAVA_TOP/oracle/apps/aso/print/server
5. Also move LinesVO.xml file to
$JAVA_TOP/oracle/apps/aso/print/server
6. Create a new template using the steps below:
Log into application usisng XML Publisher Administrator
Click on Templates
Click Create Template and enter the following values:
Name: Quote Print EQ
Code: ASOPRINTEQ
Application: Order Capture
Data Definition: Quote Printing
Type: XSL-FO
Language: English
Territory: United States of America
File: Upload the modified XSL file ASOPRINTEQ.XSL
Save to create this new template
7. If you want this template used all the time,
set the profile ASO: Default Layout Template to this newly created template.
In any case, user will have option to choose this template at run time from the template LOV.
8. Bounce Apache and test the print quote. You should see an additional column. |
-
-
资料1.rar
30.25 KB, 下载次数: 2, 下载积分: 努力值 -5 点
|