Preciso adicionar alguns campos a mais no seguinte relatório do OM do XML Publisher:
Modelo: "Gabarito RTF da Ordem de Venda" ( ONTORDRTF ) ou "Sales Order RTF Template"
Data Definition: "Arquivo de Definição XSD da Ordem de Venda" ( ONTORDDFN )
O modelo é facil pois é em RTF, mas o Data Definition é um arquivo .XSD ( ONTORDDFN.xsd ).
Estive lendo como adicionar mais campos nesse data definition (CNPJ, Insc. Estadual, etc). Parece que temos que implementar uma classe em java
Então:How to display Project Number And Task Number In The Pdf Document Generated [ID 471026.1]
Applies to:
Oracle Order Management - Version: 11.5.10.2
Information in this document applies to any platform.
Goal
Customer uses Oracle Project Manufacturing and need to show the number of the project and the
task in the layout template generated from Preview and Print Action on Sales Order Form.
Have consulted the source of data : OE_PRN_ORDER_LINES_V and observed that the consultation does not consider the PROJECT_NUMBER and TASK_NUMBER fields.
1. In what part of the file ONTORDDFN.xsd must make the correction, adding the number of project
and task to the lines of the order?
2. With regard to the class that would have to implement (CustomClass, which implements
PrintExtensionObject):
3. How the file ONTORDDFN.xsd refers to this class? . As you pass parameters to this class from
the report?
4. What structure must have the xml returns class?.
5. There is a example of code for the Class, with the code to generate the xml?
Solution
1. You should not be modifying the file ONTORDDFN.xsd to add any new fields ..
TO make such customizations only the following interface has been created.
"PrintExtensionObject" with method
"getPrintExtensionXMLFragment(String busDocId,String busDocType) has been provided for
implementation.
2 & 3.
If you mention the CustomClass name in the profile option
"OM: Printed Document Extension Class Name" at site level It will take care of calling it...
4 & 5.
getPrintExtensionXMLFragment should return a ByteArrayOutputStream which is nothing but a XML
Fragment containing Project Number and Task Number. You can use Oracle XSU to query oe_order_lines
and XSU can create a xml fragment from the db query.
You do not need to modify the xsd. The XML Fragment returned by the Custom Class will be part of
the main XML being returned. Hence you have to modify the RTF template to shows these new values
on the UI.
References
NOTE:341206.1 - How to Modify Seeded Order Managment Xml Template/Data Definition Source.
1. Vou ter que criar uma classe nova, que implemente a PrintExtensionObject.
2. Vou ter que "linkar" essa classe no profile "OM: Printed Document Extension Class Name"
Achei um exemplo aqui pra me ajudar a implementar a classe:
http://forums.oracle.com/forums/thread. ... ID=3604740
Mas aqui ele está fazendo uma conexão com o banco diretamente. Minha dúvida: Eu quero criar uma classe como essa mas sem esse acesso direto... Alguém que programa em java poderia me ajudar nessa ? Alguém já fez isso ?
VALEU