Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle E-Business Suite R12 Core Development and Extension Cookbook

You're reading from   Oracle E-Business Suite R12 Core Development and Extension Cookbook Building extensions in Oracle E-Business Suite is greatly simplified when you follow the step-by-step instructions in this book. Whether novice or pro, this is a great tutorial with over 60 recipes and stacks of screenshots.

Arrow left icon
Product type Paperback
Published in May 2012
Publisher Packt
ISBN-13 9781849684842
Length 480 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Andy Penver Andy Penver
Author Profile Icon Andy Penver
Andy Penver
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Oracle E-Business Suite R12 Core Development and Extension Cookbook
Credits
About the Author
About the Reviewers
1. www.PacktPub.com
2. Preface
1. Creating Concurrent Programs 2. Oracle Forms FREE CHAPTER 3. Advanced Oracle Forms 4. Forms Personalization 5. Workflow 6. Utilities

Reporting to the concurrent program output file


Now that we have written to the log file to view log information, we want to write more user-friendly information to the user. We will make this more formatted so that it provides useful information to the user about the processing that has taken place.

The tasks we are going to perform in this recipe are as follows:

  • Add a procedure to write to the output file

  • Add a cursor to get some data

  • Add code to fetch data and write to the output file

  • Run the concurrent program

  • View the concurrent program output file

Add a procedure to write to the output file

We are now going to add the code to the executable, which is our package called XXHREEBS. If you wish to view or copy the code then it can be found in the file XXHREEBS_1_6.pkb. You can compile the package body provided or use the following instructions to add the code manually.

How to do it...

To add a procedure to write to the output file perform the following steps:

  1. 1. Open SQL Developer and connect to the apps user.

  2. 2. Navigate to Packages and select the XXHREEBS package.

  3. 3. Now edit the package body.

  4. 4. Add a new procedure called write_output, shown as follows:

  5. 5. Compile the package body.

How it works...

We have now added a procedure to write messages to the concurrent program output file.

Add a cursor to get some data

We are now going to add a cursor to our procedure to get some data back so that it can be displayed in the output file.

How to do it...

To write a cursor to retrieve some data perform the following steps:

  1. 1. Edit the procedure First_Concurrent_Program and add the cursor as shown in the following image:

Note

Remember that the cursor is available in the download bundle in the XXHREEBS_1_6.pkb package.

How it works...

We have added a cursor that will return data at runtime. We want to format the data and display it in the output file.

Add code to fetch data and write to the output file

We are now going to add a cursor for loop to our procedure to get some data back, so that it can be written to the output file.

How to do it...

To add code to fetch data and write to the output file do the following:

  1. 1. Edit the First_Concurrent_Program procedure and add a cursor for loop to get the data. Make some calls to the write_output procedure to add the information to the output file as shown in the following image:

  2. 2. Compile the package body.

How it works...

For the employee record that we have entered in the person parameter we will fetch the record from the database and write the details to the output file.

Running the concurrent program

Now we want to run the concurrent program testing that the code we have just added writes messages to the log file.

How to do it...

To run the concurrent program to view the output file, perform the following:

  1. 1. Log in to Oracle with the XXEBS Extending e-Business Suite responsibility.

  2. 2. Navigate to Submit Requests and submit a single request.

  3. 3. Select the XXHR First Concurrent Program concurrent program and leave the Run Date parameter set to the default date (which is the current date).

  4. 4. Select Vision Corporation from the list of values for the Organization parameter and then click OK.

  5. 5. Select an employee record from the list of values for the Person parameter and then click OK.

  6. 6. Click on the Submit button and when prompted to submit a new request select No and the form will close down.

  7. 7. Navigate to View Requests and click on the Find button (to find all requests).

  8. 8. You should see that the concurrent program we just submitted has completed successfully. (If it is still Pending then click the refresh button until the status is Completed.)

How it works...

We have run the concurrent program to test the code that we added to write to the output file. We can now view the output to ensure that the layout is as expected.

View the concurrent program output file

Now we want to view the output file to see the messages we have written to it.

How to do it...

To open the output file to test our changes do the following:

  1. 1. Click on the View Output button and a browser window will open.

  2. 2. You will see that the messages we put into the First_Concurrent_Program package have been written to the output file as shown in the following image:

How it works...

As you can see we have generated formatted data that we have written to the output file.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image