About Me

My photo
Oracle Apps - Techno Functional consultant

Monday, May 6

Implementing Oracle Forms Customizations



Raising Query Find on Form Startup
If you want a Row-LOV or Find window to raise immediately upon entering the form,
at the end of your WHEN-NEW-FORM- INSTANCE trigger, call:
EXECUTE_TRIGGER('QUERY_FIND');
This will simulate the user invoking the function while in the first block of the form.

Implementing Row-LOV
To implement a Row-LOV, create an LOV that selects the primary key of the row the user wants into a form parameter, and then copy that value into the primary key field in the results block right before executing a query.
This example uses the DEPT block, which is based on the DEPT table, and consists of the three columns DEPTNO, DNAME and LOC. This table contains a row for each department in a company.

Create a Parameter for Your Primary Key
Create a form parameter(s) to hold the primary key(s) for the LOV. If the Row-LOV is for a detail block, you do not need a parameter for the foreign key to the master block (the join column(s)), as you should include that column in the WHERE clause of your record group in a later step. Set the datatype and length appropriately.
For example, for the DEPT block, create a parameter called DEPTNO_QF.

Create an LOV
Create an LOV that includes the columns your user needs to identify the desired row. If the Row-LOV is for a detail block, you should include the foreign key to the master block (the join column(s)) in the WHERE clause of your record group. Return the primary key for the row into the parameter.

For our example, create an LOV, DEPT_QF, that contains the columns DEPTNO and DNAME. Set the return item for DEPTNO into parameter DEPTNO_QF. Although the user sees DNAME , it is not returned into any field.

Create a PRE-QUERY Trigger
Create a block-level PRE-QUERY trigger (Execution Hierarchy: Before) that contains:
IF :parameter.G_query_find = 'TRUE' THEN
<Primary Key> := :parameter.<Your parameter>;
:parameter.G_query_find := 'FALSE';
END IF;

For multi-part keys, you need multiple assignments for the primary key. The parameter G_query_find exists in the TEMPLATE form.
For the Dept example, your PRE-QUERY trigger contains:
IF :parameter.G_query_find = 'TRUE' THEN
:DEPT.DEPTNO := :parameter.DEPTNO_QF
:parameter.G_query_find := 'FALSE';
END IF;

Create a QUERY_FIND Trigger
Finally, create a block-level user-named trigger QUERY_FIND on the results block (Execution Hierarchy: Override) that contains:
APP_FIND.QUERY_FIND('<Your LOV Name>');
For DEPT:
APP_FIND.QUERY_FIND('DEPT_QF');

Implementing Find Windows
To implement a Find window, create an additional window that contains the fields a user is most likely to search by when they initiate the search and copy all the item values from that block into the results block just before executing a query.
In this example, there is a block based on the EMP table. This is referred to as the results block. The primary key for this table is EMPNO. This block also contains the date field HIREDATE. The Find window is designed to locate records by EMPNO or a range of HIREDATES.

Copy the QUERY_FIND Object Group from APPSTAND
Copy the QUERY_FIND object group from the APPSTAND form to your form. It contains a window, a block and a canvas from which to start building your Find window.

After you copy it, delete the object group. This leaves the window, canvas and block, but allows you to copy the object group again if you need another Find window.

Warning: DO NOT REFERENCE THIS OBJECT GROUP; you need to customize it.

Rename the Block, Canvas and Window
Rename the Find Block, Canvas, and Window. Set the queryable property of the block to No.
For this example, rename the block, canvas and window to EMP_QF, EMP_QF_CANVAS, and EMP_QF_WINDOW, respectively.

Edit the NEW Button's Trigger
Edit the WHEN-BUTTON-PRESSED trigger for the NEW button in the Find window block so that it passes the Results block name as the argument. This information allows Oracle Applications to navigate to your block and place you on a new record. This button is included because when you first enter a form, the Find window may
automatically come up; users who want to immediately start entering a new record can press this button.
app_find.new('<Your results blockname here>');
becomes
app_find.new('EMP');
Edit the FIND Button's Trigger
Edit the WHEN-BUTTON-PRESSED trigger for the FIND button so that it passes the Results block name. This information allows Oracle Applications to navigate to your block and execute a query.
app_find.find('<Your results blockname here>');
becomes
app_find.find('EMP')
If you need to do further validation of items in the Find window, place your code before the call to APP_FIND.FIND. Specifically, you should validate that any low/high range fields are correct. You may also give a warning if no criteria has been entered at all, or if the criteria entered may take a very long time to process.

Set Navigation Data Block Properties
Set the Previous Navigation Data Block property of the Find block to be the results block. This allows the user to leave the Find window without executing a query. From the results block, next and previous data block only move up and down the hierarchy of objects; they never take you to the Find window.

Edit the KEY-NXTBLK Trigger
Edit the KEY-NXTBLK trigger on the Find block so that it has the exact same functionality as the FIND button. If the user selects "Go->Next Block," the behavior should mimic pressing the FIND button.

Change the Find Window Title
Change the title of the Find window.
The EMP example uses "Find Employees".
Create Necessary Items
Create the items that the user can query on in the Find window block. You may find it convenient to copy items from the Results block to the Find window block.
Follow these guidelines for items in the Find window:
• Set the Required property to No
• Set the default value to NULL
• If you copied the items from the Results block, ensure that your new items all have Database Item set to No, and remove all triggers associated with them (especially validation triggers). If for some reason you decide you need to keep a particular trigger, remember to change the fields it references to point to the Find block.
Typically, an item in the Find window block has an LOV associated with it, because users should usually be able to select exactly one valid value for the item. The LOV should show all values that have ever been valid, not just those values that are currently valid. Date fields may use the Calendar and the related KEY-LISTVAL
trigger.
• If you have an item that has a displayed value and an associated ID field, the Find window block should have both as well. The ID field should be used to drive the query to improve performance.
• Items that are check boxes or option groups in the Results block should be poplists in the Find window block. When they are NULL, no restriction is imposed on the query.

Fit the Find Window to Your Form
Adjust your Find window for your specific case: resize the window, position, fields, and so on.

Create a PRE-QUERY Trigger
Create a block-level Pre-Query trigger in the Results block (Execution Hierarchy:
Before) that copies query criteria from the Find window block to the Results block (where the query actually occurs). You can use the Oracle Forms COPY built-in to copy character data. For other data types, you can assign the values directly using :=, but this method does not allow the user to use wildcards. However, most of your Find window items use LOVs to provide a unique value, so wildcards would not be necessary.
IF :parameter.G_query_find = 'TRUE' THEN
COPY (<find Window field>,'<results field>');
:parameter.G_query_find := 'FALSE';
END IF;
A commonly used 'special criteria' example is to query on ranges of numbers, dates, or characters. The APP_FIND.QUERY_RANGE procedure is defined to take care of the query logic for you. Pass in the low and high values as the first two arguments, and the name of the database field actually being queried on as the third argument.
In our EMP example,
IF :parameter.G_query_find = 'TRUE' THEN
COPY(:EMP_QF.EMPNO, 'EMP.EMPNO');
APP_FIND.QUERY_RANGE(:EMP_QF.Hiredate_from,
:EMP_QF.Hiredate_to,
'EMP.Hiredate');
:parameter.G_query_find := 'FALSE';
END IF;
• Your base table field query length (in the Results block) must be long enough to contain the query criteria. If it is not, you get an error that the value is too long for your field. All fields should have a minimum query length of 255.
• If you have radio groups, list items, or check boxes based on database fields in your Results block, you should only copy those values from the Find window if they are not NULL.
• If you ever need to adjust the default WHERE clause, remember to set it back when you do a non-query-find query.

Create a QUERY_FIND Trigger
Create a block-level user-named trigger "QUERY_FIND" (Execution Hierarchy:
Override) on the Results block that contains:
APP_FIND.QUERY_FIND('<results block window>',
'<Find window>',
'<Find window block>');
In our EMP example:
APP_FIND.QUERY_FIND('EMP_WINDOW', 'EMP_QF_WINDOW',
'EMP_QF');

Saturday, May 4

XML/BI Publisher Interview Questions

What is BI Publisher?
A. It is a reporting tool for generating the reports. More than tool it is an engine that can be integrated with systems supporting the business.

Is BI Publisher integrated with Oracle Apps?
Yes, it is tightly integrated with Oracle Apps for reporting needs. In 11.5.10 instances xml publisher was used, in R12 we can it BI Publisher

What is the difference between xml publisher and BI Publisher?
Name is the difference, initially it was released on the name of xml publisher( the initial patchset), later on they have added more features and called it Business Intelligence Publisher. In BI by default we have integration with Datadefinitions in R12 instance. Both these names can be used interchangeably

What are the various components required for developing a BI publisher report?
Data Template, Layout template and the integration with Concurrent Manager.

How does the concurrent program submitted by the user knows about the datatemplate or layout template it should be using for generating the output?
The concurrent program ‘shortname’ will be mapped to the ‘code’ of the Datatemplate. Layout template is attached to the datatemplate, this forms the mapping between all the three.

What is a datatemplate?
Datatemplate is an xml structure which contains the queries to be run against the database so that desired output in xml format is generated, this generated xml output is then applied on to the layout template for the final output

What is a layout template?
Layout template defines how the user views the output, basically it can be developed using Microsoft word document in rft (rich text format) or Adobe pdf format. The data output in xml format (from Data template) will be loaded in layout template at run time and the required final output file is generated.

What are the output formats supported by layout template?
xls, html, pdf, eText etc are supported based on the business need.

Do you need to write multiple layout templates for each output type like html/pdf?
No, only layout template will be created, BI Publisher generates desired output format when the request is run

What is the default output format of the report?
The default output format defined during the layout template creation will be used to generate the output, the same can be modified during the request submission and it will overwrite the one defined at layout template

Can you have multiple layout templates for a singe data template?
Yes, multiple layouts can be defined, user has a choice here to use one among them at run time during conc request submission

Where do you register data and layout templates?
Layout template will be registered under xml publisher administrator responsibility>Templates tab.
Data template will be registered under xml publisher admininstrator responsibility> Data Definitions

I want to create a report output in 10 languages, do I have to create 10 layout templates?
No, BI Publisher provides the required translation for your templates, based on the number of languages installed in your oracle apps environment requires outputs are provided

What is the required installation for using BI Pub report?
BI Publisher deskop tool has be installed. Using this tool you can preview or test the report before deploying the same on to the instance.

How do you move your layout or data template across instances?
xdoloader is the utility that will be used.

What is the tool to map required data output and layout templates so that they can be tested in local machine?
Template viewer will be used for the same.

Which component is responsible for generating the output in xml format before applying it to layout template?
DataEngine will take DataTemplate as the input and the output will be generated in xml format which will then be applied on layout template

Can BI publisher reports be used in OAF pages?
XDO template utility helper java classes are provided for the same.

Name some business use cases for BI  reports?
Bank EFT, customer documents, shipping documents, internal analysis documents or any transactional documents

How do you pass parameters to your report?
Concurrent program parameters should be passed, ensure that the parameter name/token are same as in the conc prog defn and the data template

What are the various sections in the data template?
        Parameter section
        Trigger Section
        Sql stmt section
        Data Structure section
        Lexical Section

What does lexical section contain?
The required lexical clause of Key Flex field or Descriptive FF are created under this section

What triggers are supported in Data template?
Before report and After report are supported

Where is the trigger code written?
The code is written in the plsql package which is given under ‘defaultpackage’ tag of data template.

what is the file supporting the translation for a layout template?
A. xliff is the file that supports the translation, you can modify the same as required.

How do you display the company logo on the report output?
A. Copy and paste the logo (.gif. or any format) on the header section of .rtf file . Ensure you resize per the company standards.

Thursday, May 2

Oracle iExpenses Set Ups



Here is a summary of steps to set up Oracle Internet Expenses. iExpenses is basically an extension Oracle Payables. Employee and Contingent Worker expense reports become supplier invoices and get paid from Payables. You will need following responsibilties to set up Internet Expenses: Payables Manager, Internet Expenses Setup and Administration, System Administration, Application Developer, and AX Developer. If you are also planning on charging expense reports to projects, you will also need Project Billing Super User and General Ledger Super User responsibilities. You will also need access to Oracle Workflow Builder to customize the Expenses workflow and Project Expense Reports Account Generator.
Oracle Internet Expenses Setup Steps:
Step 1: PA: Enable Project Expenditure Types for Expense Report Entry.
Navigation: Project Billing Super User: Setup > Expenditures > Expenditure Types. Enable expenditure types to be used on project-related expense reports. Enable selected expenditure types with an Expenditure Type Class ‘Expense Reports’. You need to associate these expenditure types with Expense Type you define in the Expesen Report Template (next step).

Step 2: AP: Define Expense Report Templates
Navigation: Payables Manager: Setup > Invoice > Expense Report Template. You must define at least one expense report template with the Enable for Internet Expenses Users check box selected. Only expense report templates with this option enabled can be used in Internet Expenses. Use the Oracle Payables Expense Report Templates window to define your expense report templates. Default default natural account for non-project expenses. For project-related expenses, associate your expense types with project expenditure types.

Step 3: AP: Define Financials Options > Accounting
Navigation: Payables Manager: Setup > Options > Financials. You define the Expense Clearing Account in the Oracle Payables Financials Options window. This will be a default liability account for iExpenses expenses reports imported into Oracle Payables. The Expense Clearing Account field is also available in the Card Program window. If you define the Expense Clearing Account field in the Card Program window, the value you define there will take precedence over the value in the Oracle Payables Financial Options window.

Step 4: AP: Define Financials Options > Human Resources
Navigation: Payables Manager: Setup > Options > Financials. Use the Payables Financials Options window to define the Expense Report Reimbursement Address and Employee Numbering Method.

Step 5: AP: Establish Multiple Currencies Setup
Navigation: Payables Manager: Setup > Options > Payables > Currency. The currency in which an expense report is paid is known as the reimbursement currency. Internet Expenses users can specify a reimbursement currency that is different from your company functional currency only if Oracle Payables is set up for multiple currencies.

Step 6: AP: Defining Expense Report Options
Navigation: Payables Manager: Setup > Options > Payables > Expense Reports. Define the fields below:
§  Default Template. The default expense report template that you want to use in the Payables Expense Reports window. You can override this value in the Expense Reports window. A default expense report template appears in the Expense Reports window only if the expense report template is active.
§  Payment Terms. Payment terms you want to assign to any suppliers that you create from employees during Expense Report Import. Define and assign immediate payment terms for your employee suppliers.
§  Pay Group. Pay Group you want to assign to employee expense reports, e.g. EMPLOYEES. You must define this pay group in the Purchasing Lookups window.
§  Payment Priority. Payment priority for employee expense reports. Choose a number between 1 (high) and 99 (low) to be the priority of employee payments.
§  Apply Advances. If you enable this option, Payables applies advances to employee expense reports if the employee has any outstanding, available advances. You can override this default during expense report entry.
§  Automatically Create Employee as Supplier. You must enable this option, if you want to import employee expense reports and automatically create a supplier for any expense report where an employee does not already exist as a supplier.
§  Hold Unmatched Expense Reports. This option defaults to the Hold Unmatched Invoices option for the supplier and supplier site for any suppliers Payables creates during Expense Report Import.

Step 7: AP: Assign Signing Limits
Navigation: Payables Manager: Employees > Signing Limits. Managers can approve an expense reportonly if the total amount of the report does not exceed their signing limit defined in Accounts Payable. When you assign signing limits to a manager, you specify a cost center to which the signing limit applies. You have to give managers signing limits for multiple cost centers, if employees from multiple cost centers submit expense reports to him/her.

Step 8: OIE: Define iExpense Policies
Navigation: Internet Expenses Setup and Administration: Internet Expenses Setup > Policy > Expense Fields. Use the pages in the Policy region to set up online policy compliance and perdiem and mileage rates.
§  Schedules. Create rate and policy schedules for your employees to use when they submit expense reports.
§  Expense Fields. Set up expense fields to capture additional information on expense reports.
§  Exchange Rates. Set up exchange rate definitions to validate the exchange rates that employees enter on their expense reports for foreign currency receipts.

Step 9: OIE: Enable Expense Allocations
Navigation: Internet Expenses Setup and Administration: Internet Expenses Setup > Accounting > Define. There are two tasks to complete for setting up expense allocations:
§  Use the Internet Expenses Setup responsibility to define which segments of the accounting flexfield segments are visible and updatable by the user.
§  Use the OIE: Enable Expense Allocations profile option to enable expense allocations according to your requirements. You can set the display of accounting flexfield segments and online validation as user-definable or automatic.

Step 10: OIE: Define Receipt Notification Rule Set
Navigation: Internet Expenses Setup and Administration: Internet Expenses Setup > Audit > Notification Rules. Create one or more notification rule sets to determine when to send notifications to users for overdue or missing receipts.

Step 11: OIE: Assign Receipt Notification Rule Set
Navigation: Internet Expenses Setup and Administration: Internet Expenses Setup > Audit > Notification Rule Assignments. Use the Notification rule set assignments pages to assign the notification rule sets that you created to the operating units that you want.

Step 12: OIE: Define Mileage Rate Schedule.
Navigation: Internet Expenses Setup and Administration: Internet Expenses Setup > Policy > Schedules > Mileage. A mileage rate schedule can take into account distance traveled, type and category of vehicle, type of fuel, and the number of passengers. Set up one or more mileage rate schedules and schedule periods that you require for employee expense reporting.

Step 13: AP: Complete Mileage Expense Type Definition in Payables
Navigation: Payables Manager > Setup > Invoice > Expense Report Templates. Find the expenses template, find the mileage expense type, and assign the Mileage Schedule.

Step 14: SA: Define New iExpenses Responsibilities
Navigation: System Administration: Security > Responsibility. Create a new iExpenses responsibility.

Step 15: SA: Define OIE Profile Options
Navigation: System Administration: Profile > System. Set Internet Expenses related profile options according to your business requirements. Below is a brief description of each profile.
OIE: Allow Credit Lines. Set the profile option to Yes to enable users to enter negative receipts (credit lines). Users enter negative receipts to report the refund of a previously reimbursed expense, for example, an unused airline ticket. The default value is Yes.
OIE: Enable Credit Card. Set the profile option to Yes to enable the credit card functionality to allow users with corporate credit cards to select and add credit card transactions to their expense reports.
OIE: Allow Non-Base Pay. Set the profile option to Yes to enable users to choose the reimbursement currency for their expense reports. You must set up Payables to use multiple currencies before you can enable this profile option.
OIE: CC Approver Req profile option indicates whether users must enter an alternate approver when they charge their expense reports to a cost center different from their own. Set the profile option to Yes to require employees to enter the Alternate Approver field when employees enter a cost center other than their default cost center. If you set this profile option to Yes, you must also set the OIE: Enable Approver profile option to Yes.
OIE: CC Payment Notify. Use the profile option to specify whether a notification is sent to employees when payment is created in Oracle Payables for corporate credit card transactions. The default value is No.
OIE: Enable DescFlex profile option enables Internet Expenses to display descriptive flexfields. You must set up descriptive flexfields specifically for use in Internet Expenses before you can enable this option.
OIE: Enable Projects profile option enables users to enter project-related information on expense reports. You must set up Internet Expenses to integrate with Oracle Projects before you can enable this option.
OIE: Enable Tax profile option enables the availability of tax-related elements on expense reports.
OIE: Enable Approver profile option enables the Alternate Approver field in Internet Expenses. When this profile option is set to Yes, the Alternate Approver field is available for users to specify a different employee to approve their expense report. When this profile option is set to No, the Alternate Approver field is hidden.
OIE: Approver Required profile option indicates whether users must designate an approver for their expense reports. If you set it to Yes, Internet Expenses requires that users always enter an alternate approver as defined in Oracle HRMS.
OIE: Purpose Required profile option controls whether users must enter a purpose when creating an expense report. A purpose is a brief description of the business activities that justify the expenses in a report
OIE: Report Number Prefix profile option specifies a prefix value for expense report numbers, e.g. EXP-. The expense report number becomes the corresponding invoice number when the expense report is converted into an invoice via the Expense Report Import program.
OIE: Grace Period profile option specifies the number of grace period days beyond an end date that certain OIE setup items remain available for use. The default value is 30.
OIE: Enable Policy profile option controls the behavior of Internet Expenses in relation to reports that contain policy violations.
OIE: Enable Expense Allocations profile option determines whether an end user can update the cost center segment value on an expense line.
PA: Allow Project Time and Expense Entry profile option enables users to enter project-related information on expense reports. If you set this option to Yes, then you must set the OIE: Enable Projects profile option to Yes as well.
PA: AutoApprove Expense Reports profile option permits automatic approval of project-related expense reports.
Journals: Display Inverse Rate profile option determines how the reimbursable amount is calculated when users enter foreign currency receipts. When this profile option is set to No, the receipt amount is multiplied by the exchange rate to determine the reimbursable amount. When it is set to Yes, the receipt amount is divided by the exchange rate. The default value is No.
AME: Installed profile option enables the integration between Internet Expenses and Oracle Approvals Management. Enabling this profile disables Oracle Workflow expense report approvals!
WF: Notification Reassign Mode profile option determines the forwarding functionality that is available to employees. See Do You Want to Delegate or Transfer That Oracle Notification? article.
WF: Mailer Cancellation Email profile option enables the functionality that sends the cancellation notifications when time outs are reached for a notification and a new notification is sent because of resend setup.

Step 16: WF: Customize Project Expense Report Account Generator.
This step will be described in detail in a separate IAF article.

Step 17: GL: Assign Your Customized Project Expense Report Account Generator to your chart of accounts
Navigation: General Ledger Super User: Setup > Financials > Flexfields > Key > Accounts. Select your accounting structure to which you want to assign the process. Find the Project Expense Report Account Generator Item Type. Select a Process Name you define in the previous step. Save your changes.

Step 18: SA: Define a new OIEADMIN Role
Navigation: System Administrator: Security > Users. Create a new Oracle OIEADMIN user. Run the Synchronize Local WF tables process every time you make changes to user setup.

Step 19: WF: Define Workflow Notification Performers.
Perform the steps in Oracle Workflow Builder to set up expense report performers. This step will be documented in detail later on.

Step 20: Personalize Expense Report Submission Instructions
§  As System Administrator: Set profile option ‘Personalize Self-Service Defn’ to Yes.
§  Navigate to Expenses Home page in your iExpenses responsibility
§  Create and submit an expense report
§  In the Confirmation page, click the Personalize Submission Instructions Header link in the Submission Instructions region.
§  In the Choose Personalization Context page, enter Your Business Group in the Organization field and click Apply.
§  In the Personalize Region page, click Personalize for the Raw Text item.
§  In the Personalize Raw Text page, select False for the Rendered row at the Site level, then click Apply.
§  In the Personalize Region page, click Create Item for the Header: Submission Instructions item.
§  In the Create Item page, select the “Raw Text” value from the Item Style list.
§  Complete the page according to your business requirements: ID = XYZ_SUBMISSION_INSTRUCTIONS Text: Include the text message. Add Your Company’s Submission Instructions Here. Click Apply.
§  In the Personalize Region page, click Personalize for the message you created.
§  In the Personalize Raw Text page, enter a message in the Text field for the appropriate level, then click Apply.
§  In the Personalize Region page, click Return to Application.
§  As System Administrator: Set profile option ‘Personalize Self-Service Defn’ to No.

Step 21: AD: Compile the Expense Types Descriptive flexfield.
Navigation: Application Developer: Application > Validation > Set
§  Query value set name ‘OIE_EXPENSE_TYPES’.
§  Click Edit Information. In the Table Columns section, for the ID column, change the Size to 30 and Save.
§  Navigate: Flexfield > Descriptive > Segments
§  Query the Title ‘Expense Report Line’
§  Freeze and compile the Expense Report Line Flexfield.

Step 22: Enable the Display of Project and Task
Navigation: AK Developer responsibility. Navigate to the Define Regions window. Use the Region Items window to enable the display of project and task information. You need to perform this step in order to view projects and tasks in View Expense Report History:
§  Query the region ICX_AP_EXP_LINES_D.
§  Choose Region Items to navigate to the Region Items window.
§  Query the region items ICX_PROJECT_NUMBER item (ATTRIBUTE_NAME).
§  Check the Node Display box for these region items.
§  Query the region items ICX_TASK_NUMBER item (ATTRIBUTE_NAME).
§  Check the Node Display box for these region items.
§  Save your work.

Other Configuration Considerations
§  Make sure all expense approving managers are set up as Oracle users.
§  Make sure every employee is assigned to one Oracle user only!
Submit the Synchronize WF LOCAL tables process regurarly to update the Workflow resource information