Nov 30, 2010

Oracle apps’s technical FAQs 6

(ERP) Oracle Applications 11i,Oracle apps’s technical FAQs 5:


56) What are triggers?
---- triggers are similar to procedures, in that they are the named pl/sql blocks with declarative, executable and exception-handling sections, how ever a procedure is executed explicitly from another block via a procedure call, which can also pass arguments.
---- A trigger is executed implicitly when ever a particular event task places. And is nothing but a event.
---- The triggering event is a DML (insert, update, delete) operations on a data base table
----- fires whenever a data event(such as DML) or system event(such as login or shutdown) occurs on a schema or database
Trigger timing : 1) before
2) after
3) instead of ( this is used for views)
Triggering events : 1) insert
2)update
3) delete
Trigger type : 1) statement level
2) row level.
Firing sequence of database triggers
1) before statement trigger
2) before row trigger
3) after row trigger
4) after statement trigger
Ex:
1) Create or replace trigger secure_emp
Before
Insert on emp
Begin
If (to_char(sysdate,’dy’) in(‘sat’,’sun’)) or
To_char(sysdate,’hh24:mi’)
Not between ’08:00’ and ’18:00’)
Then raise_application_error(-20500,’u can insert in the office timings’)
End if;
End;
Ex :- 2) write a program to all transitions with name smith?
Create or replace
Trigger trigger_name
Before insert or update or delete
On emp
For each row
When (old.ename =’smith’ or
New.ename =’smith’)
Begin
Raise_application_error(-20003,’smith’);
End;
57) Difference between triggers and procedures?
Defined with create trigger
Defined with create procedure
The data dictionary contains source code in the user_triggers.
Data dictionary contains source code in user_source
Implicitly invoked
Explicitly invoked
Commit, save point and rollback are not allowed(TCL)
Those are allowed

58) What are LOCKS?
-- Is to reduce concurrency
1) share lock
---it allows the other users for only reading not to insert or update or delete.
2) exclusive lock
--- only one user can have the privileges of insert or update and delete of particular object
--- others can only read.
3) update lock
----multiple user can read, update delete
Lock levels :
1) table level 2) table space 3) data base level.

58) What is template.fmb?
a) The TEMPLATE form is the required starting point for all development of new
Forms.
b) The TEMPLATE form includes platform–independent attachments of several
Libraries.
APPSCORE :- It contains package and procedures that are required of all forms to support the MENUS ,TOOLBARS.
APPSDAYPK :- It contains packages that control the oracle applications CALENDER FEATURES.
FNDSQF :- it contains packages and procedures for MESSAGE DICTONARY, FLEX FIELDS, PROFILES AND CONCURRENT PROCESSING.
CUSTOM :- it allows extension of oracle applications forms with out modification of oracle application code, you can use the custom library for customization such as zoom ( such as moving to another form and querying up specific records)

59) What are ad-hoc reports?
Ans.: Ad-hoc Report is made to meet one-time reporting needs. Concerned with or formed for a
particular purpose. For example, ad hoc tax codes or an ad hoc database query

60) What is responsibility in Oracle Applications?
Is collection of menus, request security groups and data groups
Menus: collection of forms is nothing but menus
Request security groups: collection of programs.
Data groups: is a group of modules to be made accessible by the user through
Responsibility
Navigations are : 
System admin --> security --> define
Security--> user --> define

61) What are different execution methods of executables in Oracle Applications Concurrent program?
FlexRpt The execution file is wrnitten using the FlexReport API.
FlexSql The execution file is written using the FlexSql API.
Host The execution file is a host script.
Oracle Reports The execution file is an Oracle Reports file.
PL/SQL Stored Procedure The execution file is a stored procedure.
SQL*Loader The execution file is a SQL script.
SQL*Plus The execution file is a SQL*Plus script.
SQL*Report The execution file is a SQL*Report script.
Spawned The execution file is a C or Pro*C program.
Immediate The execution file is a program written to run as a subroutine of the concurrent manager. We recommend against defining new immediate concurrent programs, and suggest you use either a PL/SQL Stored Procedure or a Spawned C Program instead.
Composite Datatypes :
– PL/SQL TABLES
– PL/SQL RECORDS
- Nested TABLE
- VARRAY
What is the sequence of functions – group by,having,orderby in a select statements ?
Select…..
Group by…
Having…
Orderby..
Difference between User and Super User?
User : login user or front end user
Super user : it has full access of particular module

Oracle apps’s technical FAQs 5

(ERP) Oracle Applications 11i,Release 12 - Technical (eBussiness Suite):


52) what is REF Cursor?

To execute a multi-row query, oracle opens an unnamed work area that stores processing information, to access the information, an explicit, which names the work area or, a cursor variable, which points to the work area.

where as a cursor always refers to the same query work area, a cursor variable can refer to a different work areas, cursor variable area like ‘c’ or ‘pascal’ pointers, which hold the memory location(address) of some object instead of the object itself.

So, declaring a cursor variable creates a pointers, not an object.

32) Can u define exceptions twice in same block?

No

33) Can you have two functions with the same name in a pl/sql block?

Yes

34) Can you have two stored functions with in the same name?

Yes

35) Can function be overload?

Yes

36) What is the maximum number of statements that can be specified in a trigger statement?

One.

32) Stored procedure?

Stored procedure is a sequence of statements that perform specific function.

53) What is procedure?

---- is a named pl/sql block to perform a specific task.

---- A procedure may have DML statements.

---- It may or may not return a value.

---- Procedure can return more than one value.

Example for procedure

1) To accept the year as a parameter and list emp belong to the year?

Create or replace

Procedure empy(y number) is

Cursor emp_cursor is

Select * from emp where to_char(hiredate,’yyyy’)=’y’;

Emp_record emp%rowtype;

Begin

For emp_record in emp_cursor loop

Print (emp_record.empno);

Print (emp_record.ename);

Print (emp_record.sal);

End loop;

End;

Output :

var empx number;

Begin

:empx := ‘1234’;

End;

Exec empy(:empx);

Print empy;

54) What is function?

---- is a named pl/sql block to perform a specific task, is mainly used for calculation purpose.

---- A function is called as part of an exception.

---- Every function should return a value

Example for function

Create or replace

Function get_sal(p_id in emp.emp_no% type)

Return number

Is

v_sal emp.sal%type :=0;

Begin

Select salary into v_salary

From emp

Where emp_no = p_id;

Return v_salary

End get_sal;

End;

Output :

var g_sal number;

Exec :g_sal := get_sal(99);

Print g_salary;

9.Can functions be overloaded ?

Yes.

10.Can 2 functions have same name & input parameters but differ only by return datatype

No.

55) What is the package?

---- Group logically related pl/sql types, items and subprograms.

1) package specification

2) package body

Advantages of a package:

· Modularity

· Easier Application Design

· Information Hiding

· Overloading

You cannot overload:

•Two subprograms if their formal parameters differ only in name or parameter mode. (datatype and their total number is same).

•Two subprograms if their formal parameters differ only in datatype and the different datatypes are in the same family (number and decimal belong to the same family)

•Two subprograms if their formal parameters differ only in subtype and the different subtypes are based on types in the same family (VARCHAR and STRING are subtypes of VARCHAR2)

•Two functions that differ only in return type, even if the types are in different families.

56) What is FORWARD DECLARATION in Packages?

PL/SQL allows for a special subprogram declaration called a forward declaration. It consists of the subprogram specification in the package body terminated by a semicolon. You can use forward declarations to do the following:

• Define subprograms in logical or alphabetical order.

• Define mutually recursive subprograms.(both calling each other).

• Group subprograms in a package

Example of forward Declaration:

CREATE OR REPLACE PACKAGE BODY forward_pack

IS

PROCEDURE calc_rating(. . .); -- forward declaration

PROCEDURE award_bonus(. . .)

IS -- subprograms defined

BEGIN -- in alphabetical order

calc_rating(. . .);

. . .

END;

PROCEDURE calc_rating(. . .)

IS

BEGIN

. . .

END;

END forward_pack;

Oracle apps’s technical FAQs 4

(ERP) Oracle Applications 11i,Release 12 - Technical (eBussiness Suite):


33) FLEX FIELDS?

Used to capture the additional business information.

DFF

KFF

Additional

Unique Info, Mandatory

Captured in attribute prefixed columns

Segment prefixed

Not reported on standard reports

Is reported on standard reports

To provide expansion space on your form With the help of []. [] Represents

descriptive Flex field.

FLEX FILED : DESCRIPTIVE : REGIGSTER

Used for entering and displaying key information

For example Oracle General uses a key Flex field called Accounting Flex field to

uniquely identifies a general account.

FLEX FILED : KEY : REGIGSTER

Oracle Applications KEY FLEX FIELDS

1) GL :- ACCOUNTING

2) AR :- SALES TAX LOCATION, TERRITORY,

3) AP :- BANK DETAILS, COST ALLOCATION, PEOPLE GROUP

Oracle Applications DESCRIPTIVE FLEX FIELDS (Partial)

1) GL :- daily rates

2) AR :- credit history, information

3) PA :- bank branch, payment terms, site address,

34) What are the requests groups?

a) Single request: - this allows you to submit an individual request.

b) Request set : - this allows you to submit a pre-defined set of requests.

35) Sys Admin Module?

a) Define Custom Users, b) Define Login Users, c) Register oracle DB users,

d) Define Concurrent Programs, e) Register Concurrent Executables, f) Setting Profile Option Values, g) Define Request Types.

36) AOL?

a) Registering tables. b) Registering views c) Registering db sequences

d) Registering profile options e) Registering lookups and lookup codes

f) Registering forms g) Registering Form and Non-Form functions i) registering

Menus and sub-menus. j) Registering DFF and KFF. k) Libraries

37) What r the type Models in the system parameters of the report?

1) Bit map 2) Character mode

38) .What is SRW Package? (Sql Report Writer)

The Report builder Built in package know as SRW Package This package extends reports ,Control report execution, output message at runtime, Initialize layout fields, Perform DDL statements used to create or Drop temporary table, Call User Exist, to format width of the columns, to page break the column, to set the colors

Ex: SRW.DO_SQL, It’s like DDL command, we can create table, views , etc.,

SRW.SET_FIELD_NUM

SRW. SET_FILED_CHAR

SRW. SET FILED _DATE

37) Difference between Bind and Lexical parameters?

BIND VARIABLE :

-- are used to replace a single value in sql, pl/sql

-- bind variable may be used to replace expressions in select, where, group, order

by, having, connect by, start with cause of queries.

-- bind reference may not be referenced in FROM clause (or) in place of

reserved words or clauses.

LEXICAL REFERENCE:

-- you can use lexical reference to replace the clauses appearing AFTER select,

from, group by, having, connect by, start with.

-- you can’t make lexical reference in a pl/sql statmetns.

38) Matrix Report: Simple, Group above, Nested

Simple Matrix Report : 4 groups

1.Cross Product Group

2. Row and Column Group

3. Cell Group

4. Cell column is the source of a cross product summary that

becomes the cell content.

Frames: 1.Repeating frame for rows(down direction)

2.Repeating frame for columns(Across )

3.Matrix object the intersection of the two repeating frames

39) what is Flex mode and Confine mode?

Confine mode

On: child objects cannot be moved outside their enclosing parent objects.

Off: child objects can be moved outside their enclosing parent objects.

Flex mode:

On: parent borders "stretch" when child objects are moved against them.

Off: parent borders remain fixed when child objects are moved against

them.

40) What is Place holder Columns?

A placeholder is a column is an empty container at design time. The placeholder can hold a value at run time has been calculated and placed in to It by pl/sql code from anther object.

You can set the value of a placeholder column is in a Before Report trigger.

Store a Temporary value for future reference. EX. Store the current max salary as records are retrieved.

23) What is Formula Column?

A formula column performs a user-defined computation on another column(s) data, including placeholder columns.

24) What is Summary columns?

A summary column performs a computation on another column's data. Using the Report Wizard or Data Wizard, you can create the following summaries: sum, average, count, minimum, maximum, % total. You can also create a summary column manually in the Data Model view, and use the Property Palette to create the following additional summaries: first, last, standard deviation, variance.

50) What is cursor?

A Cursor is a pointer, which works on active set, I.e. which points to only one row at a time in the context area’s ACTIVE SET. A cursor is a construct of pl/sql, used to process multiple rows using a pl/sql block.

28) Types of cursors?

1) Implicit: declared for all DML and pl/sql statements.

By default it selects one row only.

2) Explicit: Declared and named by the programmer.

Use explicit cursor to individually process each row returned by a

Multiple statements, is called ACTIVE SET.

Allows the programmer to manually control explicit cursor in the

Pl/sql block

a) declare: create a named sql area

b)Open: identify the active set.

c) Fetch: load the current row in to variables.

d)Close: release the active set.

CURSOR ATTRIBUTES

a) %is open: evaluates to true if the cursor is open.

b) %not found: evaluates to true if the most recent fetch does not return a row

c) %found: evaluates to true if the most recent fetch returns a row.

d) %row count: evaluates to the total number of rows returned to far.

Example for cursor:

1) Declare

Vno emp.empno%type;

Vname emp.ename %type;

Cursor emp_cursor is

Select empno,ename

From emp;

Begin

Open cursor;

For I in 1..10 loop

Fetch emp_cursor into vno,vname;

Dbms_output.putline(to_char(vno) ||’ ‘||vname);

End if;

E nd;

2) Begin

Open emp_cursor;

Loop

Fetch when emp_cursor % rowcount >10 or

Emp_curor % not found;

Bdms_output_put_line(to_char(vno)||’ ‘|| vname);

End loop;

Close emp_cursor;

End;

CURSOR FOR LOOP

A) cursor for loop is a short cut to process explicit cursors

B) it has higher performance

C) cursor for loop requires only the declaration of the cursor, remaining things like opening, fetching and close are automatically take by the cursor for loop

Example:

1) Declare

Cursor emp_cursor is

Select empno,ename

From emp;

Begin

For emp_record in emp_cursor loop

Dbms_output.putline(emp_record.empno);

Dbms_output.putline(emp_record.ename)

End loop

End;

Can we create a cursor without declaring it?

Yes – by using cursor for loop using subqueries.

BEGIN

FOR emp_record IN ( SELECT empno, ename

FROM emp) LOOP

-- implicit open and implicit fetch occur

IF emp_record.empno = 7839 THEN

...

END LOOP; -- implicit close occurs

END;

a) for update clause:

1) use explicit locking to deny access for the duration of a transaction

2) lock the rows before update or delete

Ex : select …….

From…….

For update[ of column ref] [no_wait]

b) where current of clause?

1) use cursor to update or delete the current row

Where current of <>

29) Attribute data types?

1) %type 2) %row type.

30) Exception Handilings?

Is a mechanism provided by pl/sql to detect runtime errors and process them with out halting the program abnormally

1) pre-defined

2) user-defined.

PRE-DEFINED:

1) cursor_already_open--------attempted to open an already open cursor.

2) Dup_val_on_index --------attempted to insert a duplicate values.

3) Invalid_cursor -------- illegal cursor operation occurred.

4) Invalid_number -------- conversion of character string to number fails.

5) Login_denied ---------loging on to oracle with an invalid user name

and password.

6) program_error -------- pl/sql has an internal problem.

7) storage_error -------- pl/sql ran out of memory or memory is

corrupted.

8) to_many_row ---------single row select returned more than one row.

9) value_error -------- arithmetic,conversion,truncation or size

constraint error occurred.

10) zero_devided -------- attempted to divided by zero.

USER-DEFINED:

Declare : name the exception

Raise : explicitly raise the exception by using the raise statements

Reference: exception handing section.

The Raise_Application_Error_Procedure:

n You can use this procedure to issue user-defined error messages from stored sub programs.

n You can report errors to your applications and avoid returning unhandled exceptions.

Raise_Application_Error(error_number,message[,{true/false}]

Error number è between -20000 to -20999

pragma exception_init?

It tells the compiler to associate an exception with an oracle error. To get an error message of a specific oracle error.

Ex: pragma exception_init(exception name, oracle error number)

Example for Exceptions?

1) Check the record is exist or not?

Declare

E emp% rowtype

Begin

e.empno := &empno;

select * into e from emp where empno =e.empno;

Dbms_output.putline(‘empno’ || e.empno);

Exception

When no_data_found then

Dbms_output.putline(e.empno ||’doest exist’);

End;

2) User defined exceptions?

Define p_dept_desc =’gvreddy’

Define p_dept_number =1236

Declare

E_invalid_dept exception;

Begin

Update departments

Set dept_name=’&p_dept_desc’

Where dept_id =’&p_dept_number’;

If sql% not found then

Raise e_invalid_departments;

End if;

Commit;

Exception

When e_invalid_departments then

Dbms_output.putline(‘no such dept’);

End;

Oracle apps’s technical FAQs 3

(ERP) Oracle Applications 11i,Release 12 - Technical (eBussiness Suite):

31) Tell me some report names and their table names in GL, AP, AR, and PO?
1) ra_customer_trx_all
customer_trx_id
trx_number (invoice no, debit memo no, credit memo no)
cust_trx_type_id
2) ra_customer_lines_all (details of invoice)
cutomer_trx_id
3) ar_payment_schdules_all
check_id
This table stores all transactions except adjustments and miscellaneous cash receipts. Oracle Receivables updates this table when activity occurs against an invoice, debit memo, chargeback, credit memo, on account credit, or receipt.
4) ra_cust_trx_types_all (invoice types)
cust_trx_type_id
5) ra_batches_all
Batch_id
This table stores information about each receipt batch that you create in
Oracle Receivables. Each row includes information about a specific batch such as batch source, status, batch type, control count, and control amount
6) ra_receivable_application_all
7) ra_adjustments_all
This table stores information about your invoice adjustments. Each row includes general information about the adjustment you are making such as activity name, amount, accounting information, reason, and type of adjustment. You need one row for each adjustment you are making to an invoice.
8) ra_cash_receiots_all
Cash_receipt_id
This table stores one record for each receipt that you enter. Oracle Receivables creates records concurrently in the AR_CASH_RECEIPT_HISTORY_ALL, AR_PAYMENT_SCHEDULES_ALL, and AR_RECEIVABLE_APPLICATIONS tables for invoice–related receipts.
1) ap_invoice_all
invoice_amount, base_amount, payment_status_flag(‘y’ –fully paid
‘n’—unpaid
‘p’ –partially paid)
2) ap_invoice_payments_all
invoice_id,
3) ap_invoice_distibutions_All
amount, base_amount, dist_code_combination_id, line_type_lookup_code
4) ap_payment_schdules
payment_status_flag(“ ‘’’’’”)
5) ap_payment_dustributions_all
6) ap_checks_all
check_id,
AP_CHECKS_ALL stores information about payments issued to suppliers or refunds received from suppliers. You need one row for each payment you issue to a supplier or refund received from a supplier. Your Oracle Payables application uses this information to record payments you make to suppliers or refunds you receive from suppliers.
7) ap_accounting_events_all
8) ap_bank_accounts_all
AP_BANK_ACCOUNTS_ALL contains information about your bank accounts. You need one row for each bank account you define. Each bank account must be affiliated with one bank branch. When you initiate an automatic payment batch, enter a manual check, or create a Quick payment, you can select a bank account that you define in this table.
9) ap_bank_accounts_uses_all
AP_BANK_ACCOUNT_USES_ALL stores information for the internal and external bank accounts you define in Oracle Payables and Oracle
Receivables applications.
1) po_vendors
2) po_vendors_sites_all
3) po_headers_all
po_header_id
4) po_lines_all
po_line_id
5) po_line_locations_All
6) po_distributions_all
po_distribution_id,
1) Gl_code_combinations
GL_CODE_COMBINATIONS stores valid account combinations for each Accounting Flexfield structure within your Oracle General Ledger application. Associated with each account are certain codes and flags, including whether the account is enabled, whether detail posting or detail budgeting is allowed, and others.
2) Gl_je_batches.
GL_JE_BATCHES stores journal entry batches.
3) Gl_je_headers
GL_JE_HEADERS stores journal entries. There is a one–to–many relationship between journal entry batches and journal entries. Each row in this table includes the associated batch ID, the journal entry name and description, and other information about the journal entry. This table corresponds to the Journals window of the Enter Journals form. STATUS is ’U’ for unposted, ’P’ for posted. Other statuses indicate that an error condition was found. A complete list is below.
4) Gl_je_lines.
GL_JE_LINES stores the journal entry lines that you enter in the Enter Journals form. There is a one–to–many relationship between journal entries and journal entry lines. Each row in this table stores the associated journal entry header ID, the line number, the associated code combination ID, and the debits or credits associated with the journal line. STATUS is ’U’ for unposted or ’P’ for posted
5) Gl_set of books
GL_SETS_OF_BOOKS stores information about the sets of books you define in your Oracle General Ledger application. Each row includes the set of books name, description, functional currency, and other information. This table corresponds to the Set of Books form.
6) Gl_periods
GL_PERIODS stores information about the accounting periods you define using the Accounting Calendar form. Each row includes the start date and end date of the period, the period type, the fiscal year, the period number, and other information. There is a one–to–many relationship between a row in the GL_PERIOD_SETS table and rows in this table.
1) OPEN-DEBIT MEMO REPORT?
This report shows all the open-debit memo transactions, based on customer number and dates.
Columns :- type, customer_no, trx_no, amt_due, remaining.
Parameter :- type, customer, from_date, to_date.
2) GENERATING POSITIVE PAY FILE FOR BANK REPORT?
Basically this report generates a flat file of all the payments in order to send in to the bank.
3) UPDATE POSITIVEPAY CHECKS REPORT?
This report which updates the data into the (AP) account payables system from the plot file, the file which is sent by bank
4) UPDATE POSITIVEPAY OUT STANDING CHECKS?
This report which shows the out standing checks
5) CUSTOMER PAYMENT DETAILS REPORT?
Which shows each customer original amount, amount pay and due amount based on transaction type (books, pens)
Transaction types in AR
Credit memo transaction types
Invoice, debit memo, and charge back transaction types
Commitment transaction types
Q) HOW DO YOU RECTIFY THE ERRORS IN INTERFACE TABLES?
Depending on the naming convention used, errors appear in either alphabetical order or by error code number.
31) How do u identity its name of report?
System administrator à concurrent à program à define
System administrator à concurrent à program àexecutable
32) Who information’s?
1) Created by
2) Creation date
3) Last _updated by
4) last_update_date
5) last_update_value

OraApps Search

Custom Search

Search This Blog