Oracle Application – Top useful SQL Queries


Friends, here some of quite useful regular sql queries in oracle applications.

Query 1: Select responsibility name along with application name

SELECT application_short_name ,

frt.responsibility_id, frt.responsibility_name

FROM apps.fnd_responsibility_tl frt , fnd_application fa

WHERE fa.application_id = frt.application_id;
 

Query 2: Get Menu name for Responsibility ID , You can find out responsibility_id from Query 1

SELECT DISTINCT a.responsibility_name, c.user_menu_name

FROM apps.fnd_responsibility_tl a,

apps.fnd_responsibility b,

apps.fnd_menus_tl c,

apps.fnd_menus d,

apps.fnd_application_tl e,

apps.fnd_application f

WHERE a.responsibility_id(+) = b.responsibility_id

AND a.responsibility_id = &resp_id

AND b.menu_id = c.menu_id

AND b.menu_id = d.menu_id

AND e.application_id = f.application_id

AND f.application_id = b.application_id

AND a.LANGUAGE = 'US';
 

Query 3: Get User name and related assigned responsibilities

SELECT distinct u.user_id, u.user_name user_name,

r.responsibility_name responsiblity,

a.application_name application

FROM fnd_user u,

fnd_user_resp_groups g,

fnd_application_tl a,

fnd_responsibility_tl r

WHERE g.user_id(+) = u.user_id

AND g.responsibility_application_id = a.application_id

AND a.application_id = r.application_id

AND g.responsibility_id = r.responsibility_id

order by 1;

Query 4: Get Request Group associate with Responsibility Name

SELECT responsibility_name responsibility, request_group_name,

frg.description

FROM fnd_request_groups frg, fnd_responsibility_vl frv

WHERE frv.request_group_id = frg.request_group_id

ORDER BY responsibility_name

Query 5: Gets Form personalization listing

Personalization is feature available in 11.5.10.X. For More detail on form Personalization Use Following Tables (Rule_id) is reference key for these tables

applsys.fnd_form_custom_actions, applsys.fnd_form_custom_scopes

SELECT ffft.user_function_name “User Form Name”, ffcr.SEQUENCE,

ffcr.description, ffcr.rule_type, ffcr.enabled, ffcr.trigger_event,

ffcr.trigger_object, ffcr.condition, ffcr.fire_in_enter_query

FROM fnd_form_custom_rules ffcr, fnd_form_functions_vl ffft

WHERE ffcr.ID = ffft.function_id

ORDER BY 1;

Query 6: Query to view the patch level status of all modules

SELECT a.application_name,

DECODE (b.status, ‘I’, ‘Installed’, ‘S’, ‘Shared’, ‘N/A’) status,

patch_level

FROM apps.fnd_application_vl a, apps.fnd_product_installations b

WHERE a.application_id = b.application_id;

Query 7: SQL to view all request who have attached to a responsibility

SELECT responsibility_name , frg.request_group_name,

fcpv.user_concurrent_program_name, fcpv.description

FROM fnd_request_groups frg,

fnd_request_group_units frgu,

fnd_concurrent_programs_vl fcpv,

fnd_responsibility_vl frv

WHERE frgu.request_unit_type = ‘P’

AND frgu.request_group_id = frg.request_group_id

AND frgu.request_unit_id = fcpv.concurrent_program_id

AND frv.request_group_id = frg.request_group_id

ORDER BY responsibility_name;

Query 8: SQL to view all requests who have attached to a responsibility

SELECT responsibility_name , frg.request_group_name,

fcpv.user_concurrent_program_name, fcpv.description

FROM fnd_request_groups frg,

fnd_request_group_units frgu,

fnd_concurrent_programs_vl fcpv,

fnd_responsibility_vl frv

WHERE frgu.request_unit_type = ‘P’

AND frgu.request_group_id = frg.request_group_id

AND frgu.request_unit_id = fcpv.concurrent_program_id

AND frv.request_group_id = frg.request_group_id

ORDER BY responsibility_name;

Query 9: SQL to view all types of request Application wise

SELECT fa.application_short_name,

fcpv.user_concurrent_program_name,

description,

DECODE (fcpv.execution_method_code,

‘B’, ‘Request Set Stage Function’,

‘Q’, ‘SQL*Plus’,

‘H’, ‘Host’,

‘L’, ‘SQL*Loader’,

‘A’, ‘Spawned’,

‘I’, ‘PL/SQL Stored Procedure’,

‘P’, ‘Oracle Reports’,

‘S’, ‘Immediate’,

fcpv.execution_method_code

) exe_method,

output_file_type, program_type, printer_name,

minimum_width,

minimum_length, concurrent_program_name,

concurrent_program_id

FROM fnd_concurrent_programs_vl fcpv, fnd_application fa

WHERE fcpv.application_id = fa.application_id

ORDER BY description

Query 10: SQL to view concurrent request processing time, quite useful

SELECT f.request_id , pt.user_concurrent_program_name user_concurrent_program_name

, f.actual_start_date actual_start_date

, f.actual_completion_date actual_completion_date,

floor(((f.actual_completion_date-f.actual_start_date)*24*60*60)/3600)

|| ‘ HOURS ‘ ||

floor((((f.actual_completion_date-f.actual_start_date)*24*60*60) –

floor(((f.actual_completion_date-f.actual_start_date)*24*60*60)/3600)*3600)/60)

|| ‘ MINUTES ‘ ||

round((((f.actual_completion_date-f.actual_start_date)*24*60*60) –

floor(((f.actual_completion_date-f.actual_start_date)*24*60*60)/3600)*3600 –

(floor((((f.actual_completion_date-f.actual_start_date)*24*60*60) –

floor(((f.actual_completion_date-f.actual_start_date)*24*60*60)/3600)*3600)/60)*60) ))

|| ‘ SECS ‘ time_difference

,

DECODE(p.concurrent_program_name,’ALECDC’,p.concurrent_program_name||'[‘||f.description||’]’,p.concurrent_program_name) concurrent_program_name

, decode(f.phase_code,’R’,’Running’,’C’,’Complete’,f.phase_code) Phase

, f.status_code

FROM apps.fnd_concurrent_programs p

, apps.fnd_concurrent_programs_tl pt

, apps.fnd_concurrent_requests f

WHERE f.concurrent_program_id = p.concurrent_program_id

and f.program_application_id = p.application_id

and f.concurrent_program_id = pt.concurrent_program_id

and f.program_application_id = pt.application_id

AND pt.language = USERENV(‘Lang’)

and f.actual_start_date is not null

ORDER by f.actual_completion_date-f.actual_start_date desc;

Advertisements

Oracle Application – General Interview (Technical – Functional Questions)


Oracle Applications / Financials – General Questions for interview or to increase overall awareness on some of the concepts you already aware and worked upon. this is terms as refreshing some of those.

Oracle Application – General Interview (Technical – Functional Questions)

What are different period types?
You use accounting period types to define your accounting calendar. Different Accounting Periods are-
  • General Ledger Periods (attached to Set of Books),
  • Purchasing Periods (Operating Unit Specific),
  • Cost Periods (Inventory Organization Specific),
  • AP Periods, and
  • AR Periods

If it is accounting period types, you can define your own period types to use in addition to the General Ledger standard period types Month, Quarter and Year. You use these period types when you define the accounting calendar for your organization. However the year type should be either Calendar or Fiscal. We have different Period types-

1) 13 Month (13 Month Calendar with An Adjusting Period).

2) Annual.

3) Monthly.

4) Quarterly.

5) Semi Monthly.

6) Weekly.

What types of invoices are there in AP and AR?

Types of Invoices are:

Standard
Credit Memo
Debit Memo
Expenses Report
Prepayment
Mixed

AWT (Automatic Withholding Tax Invoice)

Interest Invoice

PO Default

Quick Match

Mixed

Recurring Invoice

Arrears Invoice

Advance Invoice

Guarantee

Charge Back

Deposit

What is the difference between cross-validation rules and security-rules?

Cross validation rules prevent all the responsibilities/users entering invalid account combinations. Security rules are attached to specific responsibilities to prevent using few of the segment values for a segment. Cross Validation Rule: Rules that define valid combinations of segment values a user can enter in an account. Cross-validation rules restrict users from entering invalid combinations of account segment values. Security Rule: It determines the accounting transaction user can view at different levels of hierarchy, such as at Site Level –>Application Level –> Responsibility Level –> User level. Cross Validation Rule applies across the chart of account where Security Rule is applicable at Responsibility Level or User Level. Cross Validation Rules are meant for defining the set of combinations that are excluded from the global set whereas Security Rules are to restrict Users/Responsibilities. Cross-Validation Rules are to control the certain code combinations. Security Rules are to control the certain segment values.

How many ways can you enter a journal in GL?

1. Manual entry 2. Subledger Entry 3. Spreadsheet Entry 4. Recurring Entry 5. Mass Allocation

What is a recurring invoice?

Recurring Invoice is a type of invoice which occurs at definite intervals of time. The best example for a recurring invoice is Rent paid to the Owner.

What are the general setup steps for AP, AR, and GL?

For GL:

1. Define Chart of Accounts2. Define Calendar
3. Define Currency
4. Create Set of Books
For AP:
1. Define Suppliers (Creditors)

2. Invoice

3. Look up codes

4. Selection of Set of Books

5. Payment Terms

6. Financial & Payable Options

7. Define Banks

For AR:

1. Flexifield

2. System Options

3. Payment Terms

4. Open period

5. Auto Accounting

6. Transaction Type

7. Transaction Source

How do we integrate AP or AR to GL ?

There is a program in payables to transfer AP to GL is “payables transfer to general ledger” GL is like AR->GL<-AP, AR and AP both transfer the data in GL. AR Contains all Invoices/Receipts /CM/DM and same way AP also have AP Vouchers. Yes, there is a clear Integration of AP/AR with GL.

The integration is like this: all the accounting created in subledgers (AP/AR) are transferred to Gl. The journal created from AP/AR are clearly identified in GL according to their batch names and journal names.
What is the difference between GL date and GL posted date in GL ?
GL date is the date used to determine the correct accounting period for your transactions where as the GL posting date is the date when the journal entry is posted the GL. GL date is the date used to determine the correct accounting period for your transactions where as the GL posting date is the date when the journal entry is posted the GL, also Called Transaction Date & Posted Date.

In GL there is no org id. So how can we differentiate the data different operating units when no other modules are given ?

HR data is at business group level. GL Data is differentiated based on set of books id. AP and AR data is mostly at operating unit level. Inventory, BOM, WIP data is at inventory organization level. In the gl_sets_of_books we have the set_of_books_id column. This column is enough to differentiate between one operating unit with the other. If you see the multiorg structure of Oracle Apps modules, we’ll see that GL is setup at set of books level. Now you generally won’t get data at OU level. OU data sums up at a higher SOB level. Please follow the below structure if you want more clarification top->bottom HR org->SOB->OU->inventory org

At what stage, the subledger data is posted to GL?

When Transactions are completed in subledgers data may be posted to GL Basically after entering the transactions, report will be taken to verify the transactions. In case, if approval is needed, it is approved after verifying the transactions. Once you are sure that the transactions are correct, the same can be posted to GL. Once it is posted, most of the information for the posted transaction can not be modified in the subledger. In case of any wrong entry, you need to follow the reversal procedure. Practically, the verification of transactions are done only during the initial stages after implementation. Once the system becomes stable, it is not followed strictly. Note: Make sure that GL period is open for the transaction GL date. Close all the periods in subledger after you reconciled all your transactions. Once you close the period, sweep program will run and all the un-posted and future entries will be transferred to next open period. Once this is done run the GL Transfer program and Journal import programs to complete the transaction transfer process. Once this is done you will find un-posted journal entries in GL you can post the same or reverse the same if you find something is missing. GL periods should also been opened and the GL period should be closed at the last.

Why cant interest rates are set uniquely supplier wise in payables module, whereas interest rate is applied to all suppliers the same rate?

Terms and conditions differ with each supplier.

What is FSG and its use?

Financial Statement Generator is a powerful report building tool for Oracle GL. FSG is used by the management for the decision making in the financial sector of the firm or an enterprise.

Uses of FSG :1. Generate financial reports such as income statements and balance based upon the data in your GL.
Note: If you have average balance processing enabled in your set of books, you can report on functional, foreign–entered, or translated average balances.
2. Define your reports with reusable report objects, making it easy to create new reports from the components of reports you’ve already defined. 3. Design custom financial reports to meet specific business needs.
4. Print as many reports as you need simultaneously.
5. Print the same report for multiple companies, cost centers, departments in the same report request.

6. Schedule reports to run automatically.

7. Produce ad-hoc reports whenever you need them.

8. Print reports to tab-delimited files for easy import into client-based spreadsheet programs. In addition, you can use the Report Wizard feature of Applications Desktop Integrator to design and submit your financial reports, as well as view the results, directly from a spreadsheet. 9. Define segment value security rules to restrict financial information contained in FSG report output generated by specific users and responsibilities. Note: To apply segment value security rules, the profile option FSG: Enforce Segment Value Security must be enabled

Explain ADI and its features?

ADI means application desktop integrator. It is a excel file which allows you to transfer the data pertaining to General Ledger, Fixed Assets and Budget to oracle apps and allows to run a request. ADI functionality provides an alternative to users who prefer to load information directly from Microsoft Excel rather than using the Oracle user interface. It should read Oracle Interface Programs (batch jobs) rather than Oracle User Interfaces. Broadly following are the feature / elements of ADI

1. Journal Wizard

2. Budget Wizard

3. Report Wizard.

4. Account Hierarchy Editor.

5. Analysis Wizard.

6. Request Center

ADI allows users take advantage of many of the data-entry shortcuts of a spreadsheet, such as copying and pasting cells, dragging and dropping ranges of cells and using formulas to calculate journal line amounts. ADI validates the data entered against the accounts, security rules and reference information that are defined in the General Ledger (GL).

What is EDI and its functions?

EDI – Electronic Data Interchange, to send the data to another server/destination via EDI server.E-Commerce Gate Way is the one of the Module in Oracle Apps. EDI (Electronic Data Interchange) is way of exchanging the Business documents like Sales Order, Invoice, PO etc., between two business entities in agreed standard format like ASCII X12 format. In oracle application, business documents may be referred as 850POI (purchase order Inbound), 810INO (Invoice Outbound) etc.. There are several third party sources are available which may be use in mapping of several documents from Oracle Format to X12 and vice versa. Some of them like Sterling Commerce, Klein Schmidt…. EDI is a toll where in whenever the customer is sending the PO it gets saved in this toll, again when the supplier after supplying the material will send an invoice through EDI, wherein the EDI of the customer will match the PO with the invoice and the invoice will get processed automatically, in case if it is not matching it will be in the error sheet

Shivmohan Purohit

Oracle Applications FND Useful Tables


Hello Friends , here is some of quite commonly used AOL FND ( Foundation) tables and their usage. There are many other tables also in FND but here i am putting only few commonly used tables. for other table if needed we can dig furthur. Let go through below article and let me know if it useful.

1- FND_ID_FLEXS

2- FND_ID_FLEX_SEGMENTS

3- FND_ID_FLEX_STRUCTURES

4- FND_FLEX_VALUES

5- FND_FLEX_VALUE_HIERARCHIES

FND_ID_FLEXS stores registration information about key flexfields. Each row includes the four–character code that identifies the key flexfield, the title of the flexfield (by which a user identifies theflexfield), the name of the combinations table that contains the key flexfield columns, and the name of the structure defining (MultiFlex) column for the flexfield (SET_DEFINING_COLUMN_NAME). Each row also contains values that identify the application that owns the combination table and the application that owns the key flexfield, a table–type flag that specifies whether the combinations table is specificor generic (S or G), whether dynamic inserts are feasible for the flexfield(Y or N), whether the key flexfield can use ID type value sets, and the name of the unique ID column in the combinations table. You need one row for each key flexfield in each application. Oracle Application ObjectLibrary uses this information to generate a compiled key flexfield definition

FND_ID_FLEX_SEGMENTS: FND_ID_FLEX_SEGMENTS stores setup information about keyflexfield segments, as well as the correspondences between application table columns and the key flexfield segments the columns are used for. Each row includes a flexfield application identifier, the flexfield code,which identifies the key flexfield, the structure number(ID_FLEX_NUM), the value set application identifier, the segment number (the segment’s sequence in the flexfield window), the name of the column the segment corresponds to (usually SEGMENTn, where n is an integer). Each row also includes the segment name, whether security is enabled for the segment, whether the segment is required, whether the segment is one of a high, low segment pair, whether the segment is displayed, whether the segment is enabled (Y or N), type of default value, display information about the segment such as prompts and display size, and the value set the segment uses. Each row also includes a flag for whether the table column is indexed; this value is normally Y. You need one row for each segment of each structure for each flexfield. Oracle Application Object Library uses this information to generate a compiled key flexfield definition to store in the FND_COMPILED_ID_FLEXS table Thanks – Shivmohan Purohit

FND_ID_FLEX_STRUCTURES : FND_ID_FLEX_STRUCTURES stores structure information about keyflexfields. Each row includes the flexfield code and the structurenumber (ID_FLEX_NUM), which together identify the structure, and the name and description of the structure. Each row also includes values that indicate whether the flexfield structure is currently frozen, whether rollup groups are frozen (FREEZE_STRUCTURED_HIER_FLAG), whether users can dynamically insert new combinations of segment values through the flexfield pop–up window, and whether the flexfield should use segment cross–validation rules. Each row also contains information about shorthand flexfield entry for this structure, including whether shorthand entry is enabled, the prompt for the shorthand window, and the length of the shorthand alias field in the shorthandwindow. You need one row for each structure of each key flexfield. Oracle Application Object Library uses this information to generate acompiled key flexfield definition to store in the FND_COMPILED_ID_FLEXS table


FND_FLEX_VALUES stores valid values for key and descriptive flexfield segments. Oracle Application Object Library uses this table when users define values for independent or dependent type value sets. Oracle Application Object Library also uses this table when users define parent values for ranges of child values that exist in a validation table(Oracle Application Object Library stores the parent values in this table). Each row includes the value (FLEX_VALUE) and its hierarchy level if applicable as well as the identifier of the value set the value belongs to. If the value is a dependent value, PARENT_FLEX_VALUE_LOW contains the independent value this value depends upon. Oracle Application Object Library does not use the PARENT_FLEX_VALUE_HIGH column. If ENABLED_FLAG contains N, this value is currently invalid, regardless of the start and end dates.

If ENABLED_FLAG contains Y, the start and end dates indicate if this value is currently valid.SUMMARY_FLAG indicates if this value is a parent value that has child values, and STRUCTURED_HIERARCHY_LEVEL contains the rollup group the parent value belongs to, if any (1 through 9). COMPILED_VALUE_ATTRIBUTES contains the compiled values of anysegment qualifiers assigned to this value. These values are in a special Oracle Application Object Library format, and you should never modify them.

VALUE_CATEGORY and ATTRIBUTE1 through ATTRIBUTE50 are descriptive flexfield columns, where VALUE_CATEGORY is the context (structure defining) column.

These descriptive flexfield columns do not contain values unless you have defined the descriptive flexfield at your site. You need one row for each independent, dependent or parent value belonging to a value set.Oracle Application Object Library uses this information to ensure that users enter valid values in flexfield segments


FND_FLEX_VALUE_HIERARCHIES stores information about child value ranges for key flexfield segment values. Each row includes an identification of the parent value the range belongs to, as well as the low and high values that make up the range of child values. FLEX_VALUE_SET_ID identifies the value set to which the parent value belongs. You need one row for each range of child values (you can have more than one row for each parent value). Oracle Application Object Library provides this information for applications reporting purposes.