DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • 8 Practices Software Engineers Should Adopt and Champion for Cybersecurity
  • An In-Depth Analysis of GraphQL Functioning Using GenAI Within a Monolithic Application Framework
  • Deploying An Image Captioning Server With BentoML
  • Flask vs. Django: Which Python Framework to Choose?

Trending

  • 5 Subtle Indicators Your Development Environment Is Under Siege
  • Testing SingleStore's MCP Server
  • The Cypress Edge: Next-Level Testing Strategies for React Developers
  • Event-Driven Architectures: Designing Scalable and Resilient Cloud Solutions

Customizing Oracle EBS Applications

In this article, we will use RMA Label (developed using XML Publisher report) as an example to display embedded PDF in the browser window on a button click in EBS.

By 
Puneet Kakkar user avatar
Puneet Kakkar
·
Feb. 13, 21 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
5.6K Views

Join the DZone community and get the full member experience.

Join For Free

Oracle EBS is the largest selling suite of applications across North America and it is well integrated with other corporate applications. Often times, there is a business requirement to Preview report outputs (in browser). In this article, we will use RMA Label (developed using XML Publisher report) as an example to display embedded PDF in the browser window on a button click in EBS.

High-level Steps for Implementation

  1. Designing a label in XML Publisher with a client-specific format.
  2. Upload the XML publisher template in Oracle Repository and register as a concurrent program.
  3. Create new pages using OA framework and JDeveloper to trigger XML Publisher label for preview and email.
  4. Add buttons on existing business functions (such as RMA Label Screen) using Personalization to call newly developed pages.

Pre-requisites

I’m using the following for my setup:

  • Oracle EBS 12.2.8 release.
  • Setup Oracle JDeveloper with OAF Extension (10.1.3.4) project and workspace.
  • Putty and FileZilla FTP tool.
  • Design Label using XML Publisher.

I won’t be going through the setup of these pre-requisites — setting up JDeveloper and designing labels is reasonably straightforward. Please get in touch in case you need any help regarding pre-requisites.

Designing Label and Register Concurrent Program

Labels are designed using XML Publisher report template and uploaded in XML Publisher Administrator repository as below:

  • Login to Oracle EBS and navigate to XML Publisher Administrator > Home > Templates. Create a new Template as below and upload the RTF template:

Creating a new template


  • Login to Application Developer and Create a new Concurrent Program as below:

Creating a new concurrent program

Please note that concurrent Program Executable is 'Java Concurrent Program.'

  • Login to System Administrator > Responsibility > Request to assign the concurrent program (created in the previous step) to Application Developer Responsibility.

Request Groups UI


  • Test Concurrent Program by submitting manually and Review the output. Make sure, your output is displayed in PDF format as desired.

Develop Oracle Application Framework Page to Preview the PDF Output

  • Launch JDeveloper and create a new page by going to OA Components > Page:

OA Components > Page  

  • Give a name (something like 'ReturnLabelViewPG') and package name (xx.oracle.apps.csd.returns.webui) and click OK.
  • Under the Page Layout Region, add a single column Layout Region as below. 

singlecolumnRN

  • Right-click 'PageLayoutRN' and set a new Controller as below. 
    • Package Name — xx.oracle.apps.csd.returns.webui
    • Class Name — ReturnLabelViewCO 

Setting a new controller

 

  • Add a new method printReportin your Controller as below, pasting the code as well:
Java
 




x
14


 
1
public void printReport(OAPageContext pageContext, OAWebBean webBean , String orderId) {
2
OAApplicationModule oaAM = pageContext.getApplicationModule(webBean);
3
pageContext.putParameter("p_DataSource",DocumentHelper.DATA_SOURCE_TYPE_BLOB);
4
pageContext.putParameter("p_DataSourceCode","XX_DEPOT_RMA");// Data Definition Short Name
5
pageContext.putParameter("p_DataSourceAppsShortName","XX");// Data Definition Registered Application Short Name
6
pageContext.putParameter("p_TemplateCode","XX_DEPOT_RMA");//XML Report Template Short Code
7
pageContext.putParameter("p_TemplateAppsShortName","XX");//XML Report Template Application Short Name
8
pageContext.putParameter("p_Locale","English:United States");//XML Report Template Language and Territory
9
pageContext.putParameter("p_OutputType","PDF");//Desired XML Report Output
10
pageContext.putParameter("p_XDORegionHeight","200%");//Desired XML output frame size
11
Serializable[] oaParams = {orderId}; //Parameter passed to the report
12
BlobDomain result = (BlobDomain)oaAM.invokeMethod("submitReport",oaParams);
13
pageContext.putSessionValueDirect("XML_DATA_BLOB", result);
14
   }



  • Update the processRequest method in Controller as below to call printReport method coded in the previous step.
Java
 




xxxxxxxxxx
1
11
9


 
1
 public void processRequest(OAPageContext pageContext, OAWebBean webBean)
2
   {
3
     super.processRequest(pageContext, webBean);
4
       String strOrderId = pageContext.getParameter("OrderId");//Get this value from calling Page
5
       printReport(pageContext, webBean, strOrderId);
6
    }



printReport highlighted

 

  • Create a new Application Module by doing a right-click on the project, and click new Application Module.
    1. Package name — xx.oracle.apps.csd.returns.server
    2. Name — ReturnLabelAM
  • Once the Application Module is created, add a new method submitReport as below. I have pasted the contents as well. This method is called from Controller (previous step) to trigger the label report by passing orderID as the input parameter.
Java
 




xxxxxxxxxx
1
28


 
1
public BlobDomain submitReport (String strOrderId)
2
{
3
BlobDomain blobDomain = new BlobDomain();
4
try
5
{
6
DataTemplate datatemplate = new DataTemplate(((OADBTransactionImpl)getOADBTransaction()).getAppsContext(), "XX", "XX_DEPORT_RMA");
7
Hashtable parameters = new Hashtable();
8
parameters.put("P_ORDER_ID",strOrderId);
9
datatemplate.setParameters(parameters);
10
datatemplate.setOutput(blobDomain.getBinaryOutputStream());
11
datatemplate.processData();
12
}
13
catch(SQLException e)
14
{
15
throw new OAException("SQL Error=" + e.getMessage(),OAException.ERROR);
16
}
17
catch (OAException e)
18
{
19
throw new OAException("XDOException" + e.getMessage(),OAException.ERROR);
20
}
21

          
22
catch(Exception e)
23
{
24
throw new OAException("Exception" + e.getMessage(),OAException.ERROR);
25
}
26
return blobDomain;
27
}
28
}



Deployment

  • The next steps will be to deploy your locally developed Java components/ OAF page to the Application server.
  • Login to the Unix box on the server using putty and go to $JAVA_TOP.

  • Create new Directories (same as your package structure in JDeveloper):
  1. mkdir -p xx/oracle/apps/csd/returns/server #directory to hold server components
  2. mkdir -p xx/oracle/apps/csd/returns/webui #directory to hold webui components
  3. chmod 777 xx/oracle/apps/csd/returns/server #set permission to read/write/exec
  4. chmod 777 xx/oracle/apps/csd/returns/webui #set permission to read/write/exec
  • Login to FileZilla and move the files to the locations above.
  • Review the files as below for xx/oracle/apps/csd/returns/webui.

  • Login to putty and go to $JAVA_TOP, run the below command to generate the customall.jar file. Take a backup of the existing customall.jar file present on this location:
    1. adgcnjar
    2. it prompts for you to enter APPS (database user name) and password. Once entered, it will generate a customall.jar file on the server. 
  • Import the OAF page into Oracle Repository using the below command from putty, while connecting to the Middle tier:

    JAVA_TOP/xx/oracle/apps/csd/returns/webui/ReturnLabelViewPG.xml -username apps
     -password <apps_password> -dbconnection
     "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST= <host_name> )
    (PORT=<host_port>))(CONNECT_DATA=(SID=<host_SID>)))" -rootdir $JAVA_TOP
  • Bounce application services on the middle tier of EBS, so Oracle can pick customall.jar file on run time execution.

Personalize Oracle Application Screen to Add Preview Button

  • Add a button to the screen in EBS where you want to see the preview output. For demonstration purposes, the Depot Repair screen has been used. Use the Personalization feature to add the Preview button and set the properties as below. Note the Destination URL, which calls the custom page developed.

Test RMA Preview Changes

Click the RMA Preview button. Clicking this button calls the XML publisher template and embeds the output in the frame as below.

Embedded output

Conclusion

In this article, we learned about extending Oracle Applications to add Preview functionality using Oracle standards. You can use the same approach and extend any Oracle provided screen to add more functionality. I hope you find this article useful for your business requirements. In the next article, we will see how we can leverage the same label and enable it for emails.

Application framework

Opinions expressed by DZone contributors are their own.

Related

  • 8 Practices Software Engineers Should Adopt and Champion for Cybersecurity
  • An In-Depth Analysis of GraphQL Functioning Using GenAI Within a Monolithic Application Framework
  • Deploying An Image Captioning Server With BentoML
  • Flask vs. Django: Which Python Framework to Choose?

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!