-
Book Overview & Buying
-
Table Of Contents
Oracle E-Business Suite R12 Core Development and Extension Cookbook
By :
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:
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.
To add a procedure to write to the output file perform the following steps:
XXHREEBS package. write_output, shown as follows:
We have now added a procedure to write messages to the concurrent program output file.
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.
To write a cursor to retrieve some data perform the following steps:
First_Concurrent_Program and add the cursor as shown in the following image:
Remember that the cursor is available in the download bundle in the XXHREEBS_1_6.pkb package.
We have added a cursor that will return data at runtime. We want to format the data and display it in 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.
To add code to fetch data and write to the output file do the following:
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:
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.
Now we want to run the concurrent program testing that the code we have just added writes messages to the log file.
To run the concurrent program to view the output file, perform the following:
Run Date parameter set to the default date (which is the current date). Organization parameter and then click OK. Person parameter and then click OK.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.
Now we want to view the output file to see the messages we have written to it.
To open the output file to test our changes do the following:
First_Concurrent_Program package have been written to the output file as shown in the following image:
As you can see we have generated formatted data that we have written to the output file.
Change the font size
Change margin width
Change background colour