Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

Contact Us

Authors
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new Click here to raise Support Ticket. Get reply within 48 hours.

Search Courses

×

Warning

JUser: :_load: Unable to load user with ID: 855

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 
 
 
Business Requirement : When User  require report output from jsp/Oa framework  page    then They have to Run concurrent program  which is very tedious process for users and if user wants output in Excel/PDF/Word and in many  other formats then they have to run concurrent program again and again  for each different type of output file.

So Business requirement is that report output should be retrieved from  Oa framework Page Just by single Button Click For Different Type Of Formats.





Sample Output :-


Solution : Creating Oa framework Report and Showing output of Report in Different Format We have to integrate oa framework and Xml Publisher.

For this solution first you have to create Oa framework page, Data Template and Data definition.

STEPS:-
  1. Open Jdeveloper and create new project “oareport”. 
  1. Create view object using below query.
Field
Value
Package
oareport.oracle.apps.ak.server
Name
EmpVO

Query:
 
select employee_number,full_name,hr_general.decode_lookup('SEX',sex)sex,hr_general.decode_lookup('NATIONALITY',nationality)nationality from per_all_people_f
where trunc(sysdate) between effective_start_date and effective_end_date
and current_employee_flag='Y'
and rownum =1
  1. Create Application Module.
Field
Value
Package
oareport.oracle.apps.ak.server
Name
XMLIntegrationAM
 
  1. Click on Edit Application module on “XMLIntegrationAM” and move “EmpVO”  to right side. 
  1. Right Click on Project and Create new oa component -> Page.
Field
Value
Package
oareport.oracle.apps.ak.webui
Name
XMLIntegrationPG
 
  1. go to Structure of page -> Page Layout region  and set Below Property      
Field
Value
ID
MainRN
AM Definations
oareport.oracle.apps.ak.server.XMLIntegrationAM
Window Title
Welcome Page
 
  1. Right Click on MainRN and click on Set new Controller Class.
Field
Value
Package Name
oareport.oracle.apps.ak.webui
Class
XMLIntegrationCO
 
  1. Go to Controller and Add below code in processRequest of XMLIntegrationCO.java
 
 public void processRequest(OAPageContext pageContext, OAWebBean webBean)
 {
   super.processRequest(pageContext, webBean);
   OAApplicationModule am= pageContext.getApplicationModule(webBean);
   am.invokeMethod("getEmpDataXML");

 }
 
  1. Go to structure of Application module XMLIntegrationAM and open XMLIntegrationAMImpl.java  file and add below method in File.
 
   public void getEmpDataXML()
 {
   try
   {
     ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
     OAViewObject vo = (OAViewObject)findViewObject("EmpVO1");
     ((XMLNode)vo.writeXML(4,
                           XMLInterface.XML_OPT_ALL_ROWS)).print(outputStream);
     System.out.println(outputStream.toString());
   } catch (Exception e)
   {
     throw new OAException(e.getMessage() + "Custom Error");
   }
 }
 
  1. Right Click on XMLIntegrationPG and click on Run.
After completing  loding of page Compiler Will Display Output.

Save above xml content to file.

Xml File Name: EmpData.xml
 
<EmpVO>
  <EmpVORow>
     <EmployeeNumber>4</EmployeeNumber>
     <FullName>Walker, Mr. Kenneth (Ken)</FullName>
     <Sex>Male</Sex>
     <Nationality>American</Nationality>
  </EmpVORow>
</EmpVO>
 
  1. Go to structure of  XMLIntegrationPG and add pageButtonBar region .
Field
Value
ID
ButtonRN
Region Style
pageButtonBar
 
  1. Right Click on ButtonRN and add 3 new items with below property.
1)
Field
Value
ID
PrintWord
Item Style
SubmitButton
Prompt
Print  Word

2)
Field
Value
ID
PrintExcel
Item Style
SubmitButton
Prompt
Print Excel

3)
Field Value
ID PrintPdf
Item Style SubmitButton
Prompt Print PDF
  1. Right Click on MainRN in XMLIntegrationPG and add below new QueryRegion.
Field
Value
ID
QueryRN
Region Style
query
Construction
resultBasedSearch
Include Simple panel
true
 
  1. Right Click on QueryRN and click Region using wizard and add new table region and add EmpVO in table.
  1. Go to XMLIntegrationAM and change code of below method.
 public XMLNode getEmpDataXML()
 {
   try
   {

     OAViewObject vo = (OAViewObject)findViewObject("EmpVO1");
     XMLNode xmlNode = (XMLNode)vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS);
     return xmlNode;
   } catch (Exception e)
   {
     throw new OAException(e.getMessage() + "Custom Error");
   }
 }
 
  1. Change controller class XMLIntegrationCO.java according to below Attached file.
  1. Retrive $JAVA_TOP/oracle/apps/xdo Directory from server and place it in Jdeveloper because it is needed for some import.
  1. Build Project and run XMLIntegrationPG but it will show blank output in output file  on Clint machine but when you Deploy it to server and take output then it will show correct output.
  1. create "oareport" directory on desktop from merging code of  “myproject” and “my classes”.
    Source Code : oareport.rar
  1. Move  "oareport"  to $JAVA_TOP Directory.
  1. Run below script to import oa framework page
     
java oracle.jrad.tools.xml.importer.XMLImporter $JAVA_TOP/oareport/oracle/apps/ak/webui/XMLIntegrationPG.xml -username APPS -password apps -dbconnection " (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp) (HOST=192.168.1.200)(PORT=1521)) (CONNECT_DATA= (SID=vis) ) )" -rootdir $JAVA_TOP
  1. Restart Server.

adoacorectl.sh stop
adoacorectl.sh start

adapcctl.sh stop
adapcctl.sh start
  1. Create Data Definition.
Field
Value
Name
EmpDataDD
Application
Human Resources
Code
EmpDataDD
Start Date
Current Date


  1. create Data Template
Name
EmpDataDT
Application
Human Resources
Type
RTF
Default File
EmpData.rtf
Default File Language
English
Code
EmpDataDT
Data Definition
EmpDataDD
Start Date
Current date
End Date
 
Sub template
No
Default File Territory
 
Default Output Type
PDF
Preview Format
PDF
File Name
EmpData.rtf
Language
English
RTF File
XML File
 
  1. create below form function.
Field
Value
Function
XX_EMPLOYEE_DETAILS_PAGE
User Function Name
XX_EMPLOYEE_DETAILS_PAGE
Type
SSWA jsp function
HTML Call
OA.jsp?page=/oareport/oracle/apps/ak/webui/XMLIntegrationPG


  1. Attach  function To below menu.
Field
Value
Function Name
XX_EMPLOYEE_DETAILS_PAGE
User Menu Name
Employee Detail Menu
Menu Name
XX_EMPLOYEE_DETAILS_MENU



  1. Create below Responsibility and attach Below Menu.
Field
Value
Responsibility Name
Employee detail Responsibility
Responsibility Key
XX_EMPLOYEE_DETAIL_RESP
Menu name
Employee Detail Menu



  1. Attach Responsibility  to your user.

  1. Login  to Your User  and open page.
  1. Click on Print Pdf .
  1. Click on open It Will show Output in Pdf format.
  1. Click on Print Word .
  1. Click on open output will be shown in word format.
  1. Search any employee number and click on print Excel.
  1. Click on open output will show record for one Employee.

Comments   

+2 #1 Shruti Khanna 2011-10-30 15:12
Thanks for the detailed steps, very useful, Shruti
Quote
0 #2 RKNewOAGuy 2011-10-30 22:22
Very detailed. Thanks much for that info.
Quote
0 #3 AppAttack 2011-10-31 06:47
Thanks for this tutrial...very helpful!
Quote
0 #4 AppsTechSpider 2011-10-31 06:47
Thanks, I can see this being used in almost every project. Carlo
Quote
0 #5 smith 2011-11-01 15:11
Absolutely awesome Info very very usefull.
Thanks a lot for ur efforts.
Quote
0 #6 Khalid Mehmood 2011-11-25 02:09
Thanks Dakshesh, Its really a good effort. Thanks a lot.
Quote
0 #7 Rahul S 2011-11-29 00:28
Superb article! Thanks for the detailed steps.
Quote
0 #8 smith 2011-11-30 16:20
Hi Dakshesh,
Thank s a lot for sharing this article,absolut ely awesome.
But am getting an error while opening the report from application (after the page is completely developed from jDeveloper and have moved
everything to midtear).
the error is when i press one of the options like say PrintWord, am getting error " missing file .. \cabo\styles\ca che\swanEXTN-cu stom-2 3 6 2-en-ie-windows .css"
Don't have any clue about this.
Any suggestions in this regard is highly appreciated.
Th anks
Quote
0 #9 SyedLaiq 2011-12-17 03:22
Dear,

I cannot run the page due to following error "Error(26,8): class XML Node", please provide me the import for this class.

Regards ,

Syed Laiq Uddin
Quote
0 #10 Abdulrahman 2011-12-21 23:37
Hi Daksesh,
keep up the good work Daksesh, hope to see more of your great work again soon.
warm regards
Abdulra hman
Quote
0 #11 Hassan Shoaib 2011-12-22 23:46
Hi,

After deployment of the code on R12.0.6 I am getting the following error: Can you please advise about the missing class?

An exception occured.

URL=h ttp://xxxx.xxxx .com:8000/OA_HT ML/OA.jsp?page= /oareport/oracl e/apps/ak/webui /XMLIntegration PG&transactioni d=1010681421&la nguage_code=US& CallFromForm='Y '

javax.servle t.ServletExcept ion: oracle.classloa der.util.Annota tedClassNotFoun dException:

Missing class: __9__9_OA

Depe ndent class: oracle.jsp.runt imev2.JspPageIn fo
Loader: oc4j:10.1.3
Code-Source: /d01/ebsr12/app s/tech_st/10.1. 3/j2ee/home/lib /ojsp.jar
Configuration: in META-INF/boot.x ml in /d01/ebsr12/app s/tech_st/10.1. 3/j2ee/home/oc4 j.jar

This load was initiated at oacore.web.html .jsp990395144:0 .0.0 using the loadClass() method.

The missing class is not available from any code-source or loader in the system.
Quote
0 #12 sridhar_oaf 2012-05-22 12:34
Hi Dakshesh,

I received the below error : while running the page from Jdeveloper.

'c ould not open because it either not a supported file or because the file has been damaged(for example , it was sent as an email attachement and wasnt correctly decoded)'

I opened the page using : notepad and found that it included the total HTML tags, which are used for generating the OA page.

Is it compulsory to register the page in Apps Instance ?

Please clarify.

-Srid har
Quote
-1 #13 Sanjil Jain 2013-02-16 08:02
Hi,

I have a urgent requirement to implement the same in i-Supplier page. Perform all the steps as directed but getting error while I tried to open the PDF file after download. I have even checked after deploying your code into server but its not working. Please help to resolve the issue.

Regards ,
Sanjil Jain
Quote
0 #14 Best Payday Loan 2021-07-21 01:55
payday loan guaranteed
Quote
0 #15 Loan 2021-07-22 00:37
payday loans in dayton ohio
Quote
0 #16 Online Payday Loan 2021-07-22 14:09
payday loans in california
Quote
0 #17 Loan 2021-07-23 06:12
online payday loans florida
Quote
0 #18 Fastest Payday Loan 2021-07-23 07:26
get cash now
Quote
0 #19 Fastest Payday Loan 2021-07-23 11:55
new direct payday lenders
Quote
0 #20 Online Loans 2021-07-24 14:34
loans
Quote
0 #21 Quick Loans 2021-07-24 14:36
list of payday loans
Quote
0 #22 Payday Express 2021-07-24 15:00
short term personal loan
Quote
0 #23 Best Online Loans 2021-07-25 01:39
loans for students
Quote
0 #24 Payday Loans 2021-07-25 07:01
personal loans no credit
Quote
0 #25 Best Payday Loan 2021-07-25 09:14
direct lender payday loans
Quote
0 #26 Direct Lenders 2021-07-26 01:53
non payday loans for bad credit
Quote
0 #27 Loans 2021-07-26 11:35
personal loan no credit check
Quote
0 #28 Speedycash 2021-07-27 01:11
ohio cash advance
Quote
0 #29 Loan Cash 2021-07-27 21:14
personal loans for poor credit
Quote
0 #30 Loans Online 2021-07-28 04:42
best debt consolidation loans
Quote
0 #31 Best Online Loans 2021-07-28 16:45
i need a loan
Quote
0 #32 Payday Loans Online 2021-07-29 11:03
personal loans low interest rates
Quote
0 #33 Get A Loan 2021-07-30 07:56
500 loans
Quote
0 #34 Online Loans 2021-07-30 07:58
loan balance
Quote
0 #35 Online Loans 2021-07-30 18:53
payday loans near me
Quote
0 #36 Fastest Payday Loan 2021-07-30 19:49
online payday loan lenders
Quote
0 #37 Easy Payday Loan 2021-07-31 16:27
small loans bad credit
Quote
0 #38 Cash Loan 2021-07-31 18:52
1000 payday loan
Quote
0 #39 Paydayloan 2021-07-31 23:31
bad credit loans direct lenders
Quote
0 #40 Paydayloan 2021-08-01 09:52
payday loans los angeles
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Aug 2021  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
        1
  2  3  4  5  6  7  8
  9101112131415
16171819202122
23242526272829
3031     

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner