Professional Documents
Culture Documents
P2P Interv Qs PDF
P2P Interv Qs PDF
Contents:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
RFQ
&
Quotations:
Matching Types:
Calendar Periods:
Invoice Processing:
Payment Actions:
Create Accounting:
Accrual Reconciliation:
Setups
Navigation
Expense
AP
Accrual
PO
Setup
Organizations
Purchasing
Options
o Accrue
Expense
Items
:
Period
End
o Accrue
Inventory
Items:
At
Receipt
Table:
PO_SYSTEM_PARAMETERS_ALL
Inventory
AP
Accrual
INV
Setup
Organizations
Parameters
o Other
Accounts
Tab
Receiving
Option
Inventory
AP
Accrual
Table:
MTL_PARAMETERS
Declare
Accrual
Accounts
PO
Accounting
Accrual
Write
Off
Select
Accrual
Accounts
1. Order
Management
2. Cash
Management
3. Payables
4. Receivables
5. Purchasing
6. Inventory
7. Projects
8. Assets
9. General
Ledger
Procure-2-Pay order:
1) Payables
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
2) Purchasing
3) Inventory
4) General
Ledger
Payables:
1
Complete
all
transactions
Invoice
&
Credits,
Prepayments,
Expense
Report,
invoice
Imports
&
Payments.
2
Approve
Invoice
&
Complete
Payments
To
approve
all
un-Approved
invoice
run
program
Payables
Approval.
3
Invoice
Hold
Report
Lists
holds
applied
to
invoices
for
which
journal
entries
and
posting
cannot
be
created.
4
Journal
Entries
Report
It
produces
details
or
summary
listing
of
accounting
information
that
have
been
accounted
with
error
and
entries
that
cannot
be
transfer
to
GL.
5
Unaccounted
Transaction
Report
Lists
of
all
payment
transactions
with
reasons,
for
which
payables
cannot
account
for
transaction.
6
Payment
Instruction
Register
Actual
payments
are
compared
against
this
register
to
verify
oracle
payables
have
recorded
payment
correctly.
7
Reconcile
Payments
to
bank
Statement
Bank
Statement
Import
Activity
Auto
Reconciliation
Program
(or)
Bank
Statement
Import
&
AutoReconciliation
8
Create
Accounting
Creating
accounting
entries
9
Optional
Reports
Posted
Invoice
Register
Posted
Payment
Register
10
Unposted
Invoice
and
Payment
Sweep
It
transfers
unaccounted
transactions
from
one
accounting
period
Program
to
another.
This
program
will
not
forward
accounted
transactions
with
errors.
Purchasing:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
P2P
Accounting
Entries:
Purchasing Module:
Create
Requisition
--
--
Create
PO
--
--
Receipts
Inventory
Items
Receiving
Inspection
A/C
Inventory
AP
Accrual
A/C
Expense
Items
Receiving
Inspection
A/C
Expense
AP
Accrual
A/C
Return
to
Vendor
Inventory
Items
Inventory
AP
Accrual
A/C
Receiving
Inspection
A/C
Expense
Items
Expense
AP
Accrual
A/C
Receiving
Inspection
A/C
Period
End
@
Period
End
Close
PO
Charge
A/C
Expense
AP
Accrual
A/C
@Next
Period
Open
Expense
AP
Accrual
A/C
PO
Charge
A/C
Payables Module:
Inventory Module:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Requisition
Requisition Headers:
Requisition Lines:
PO_Requisition_Lines_All PO_Req_Distributions_All
MTL_Categories_B
PO_Vendors PO_Vendor_Sites_All
RCV_Shipment_Lines RCV_Transactions
Requisition Distributions:
PO_Req_Distributions_All GL_Code_Combinations
PA_Projects_All PA_Tasks
PA_Expenditure_Types
Purchase Order
PO Headers:
PO_Releases_All
PO_Vendors PO_Vendor_Sites_All
HR_Locations_All
PO_Agents
RCV_Transactions RCV_Shipment_Lines
PO_Action_History
PO_Headers_Archive_All
AP_Invoices_All
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
PO
Lines:
PO_Line_Types_B
MTL_Categories_B
PO_Lines_Archive_All
RCV_Transactions RCV_Shipment_Lines
PO Shipments:
PO_Line_Locations_All PO_Distributions_All
PO_Releases_All
RCV_Routing_Headers
HR_Locations_All
PO_Line_Locations_Archive_All
AP_Holds_All
AP_Invoice_Lines_All
PO Distributions:
PO_Distributions_All HR_Locations_All
PO_Distributions_Archive_All
PO_Req_Distributions_All
GL_Code_Combinations
PA_Projects_All PA_Tasks
AP_Invoice_Distributions_All
Cst_Ap_Po_Reconciliation
Cst_Misc_Reconsiliation
RCV_Transactions RCV_Shipment_Lines
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Receiving
RCV_Routing_Headers
PO_Requisition_Lines_All PO_Req_Distributions_All
PO_Vendors PO_Vendor_Sites_All
AP_Invoice_Distributions_All
Payable Invoice
Invoice Distribution:
AP_Invoice_Distributions_All PO_Distributions_All
RCV_Transactions
GL_Code_Combinations
PA_Projects_All PA_Tasks
PA_Expenditure_Types
----------------------------
AP_Invoices_All
AP_Accounting_Events_All
AP_Invoices_All AP_Invoice_Lines_All
AP_Invoice_Payments_All
AP_Trial_Balance
Invoice Details:
AP_Invoices_All PO_Headers_All
PO_Vendors PO_Vendor_Sites_All
GL_Code_Combinations
PA_Projects_All PA_Tasks
PA_Expenditure_Types
AP_Payment_Schedules_All
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
AP_Invoice_Payments_All
AP_Payment_Schedules_All AP_Invoice_Payments_All
AP_Bank_Accounts_All
AP_Invoice_Payments_All AP_Invoice_Distributions_All
AP_Invoices_All
AP_Supplier_Sites_All
AP_Checks_All
AP_Accounting_Events_All
AP_Payment_Schedules_All
AP_Checks_All AP_Check_Formats
AP_Invoice_Payments_All
AP_Payment_History_All
AP_Bank_Accounts_All
PO_Vendors PO_Vendor_Sites_All
Accounting Events:
Bank Information:
AP_Bank_Accounts_All GL_Code_Combinations
AP_Bank_Branches
AP_Bank_Account_Uses_All
AP_Checks_All
AP_Bank_Branches AP_Bank_Accounts_All
AP_Bank_Charges
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
AP_Bank_Transmissions
AP_Bank_Account_Uses_All AP_Bank_Accounts_All
PO_Vendors PO_Vendor_Sites_All
AP_SUPPLIERS:
AP_SUPPLIER_SITES_ALL:
AP_INVOICES_ALL:
AP_INVOICE_LINES_ALL:
It
contains
records
for
invoice
lines
entered
manually,
generated
automatically
or
imported
from
the
Open
Interface.
An
invoice
can
have
one
or
more
invoice
lines.
An
invoice
line
represents
goods
(direct
or
indirect
materials),
service(s),
and/or
associated
tax/freight/miscellaneous
charges
invoiced
from
a
supplier.
An
invoice
line
should
contain
all
the
attributes
that
are
present
on
the
physical
or
electronic
invoice
presented
by
the
supplier.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
AP_INVOICE_DISTRIBUTIONS_ALL:
AP_INVOICE_PAYMENTS_ALL:
AP_PAYMENT_SCHEDULES_ALL:
AP_PAYMENT_HISTORY_ALL:
AP_BATCHES_ALL:
It
contains
summary
information
about
invoices
you
enter
in
batches
if
you
enable
the
Batch
Control
Payables
option.
There
is
one
row
for
each
batch
of
invoices
you
enter.
If
you
enable
Batch
Control,
each
invoice
must
correspond
to
a
record
in
this
table.
Your
Oracle
Payables
application
uses
this
information
to
group
together
invoices
that
one
person
entered
in
a
batch.
AP_CHECKS_ALL:
It
stores
information
about
payments
issued
to
suppliers
or
refunds
received
from
suppliers.
There
is
one
row
for
each
payment
you
issue
to
a
supplier
or
refund
received
from
a
supplier.
Oracle
Payables
application
uses
this
information
to
record
payments
you
make
to
suppliers
or
refunds
you
receive
from
suppliers.
Oracle
Payables
application
stores
the
supplier
name
and
bank
account
name
for
auditing
purposes,
in
case
either
one
is
changed
after
you
create
the
payment.
Oracle
Payables
application
also
stores
address
information
for
all
payments.
AP_HOLDS_ALL:
It
contains
information
about
holds
that
you
or
your
Oracle
Payables
application
place
on
an
invoice.
For
non-matching
holds,
there
is
one
row
for
each
hold
placed
on
an
invoice.
For
matching
holds,
there
is
one
row
for
each
hold
placed
on
an
invoice-shipment
match.
An
invoice
may
have
one
or
more
corresponding
rows
in
this
table.
Your
Oracle
Payables
application
does
not
pay
invoices
that
have
one
or
more
unreleased
holds
recorded
in
this
table.
AP_BANK_ACCOUNTS_ALL:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
It
contains
information
about
your
bank
accounts.
There
is
one
row
for
each
bank
account
you
define
and
each
bank
account
must
be
affiliated
with
one
bank
branch.
AP_BANK_ACCOUNT_USES_ALL:
It
stores
information
for
the
internal
and
external
bank
accounts
you
define
in
Oracle
Payables
and
Oracle
Receivables
applications.
AP_CARDS_ALL:
It stores information about the corporate credit cards issued to your employees by your corporate credit card providers.
AP_TRIAL_BALANCE:
It contains demoralized information about invoices and payments posted to the accrual set of books.
Subledger Accounting:
XLA_Events XLA_Event_Classes_B
XLA_Event_Mappings_B
XLS_Event_Sources
XLA_Event_Types_B
XLA_Ae_Headers XLA_Ae_Lines
XLA_Trial_Balances
GL Journal Entries:
GL_Je_Headers GL_Je_Lines
AP_Invoice_Transmissions
AP_Check_Transmissions
GL_Je_Lines GL_Ledgers
GL_Code_Combinations
Inventory:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Table
Description
MTL_PARAMETERS
It
maintains
a
set
of
default
options
like
general
ledger
accounts;
locator,
lot,
and
serial
controls,
inter-organization
options,
costing
method,
etc.
for
each
organization
defined
in
Oracle
Inventory.
Each
organizations
item
master
organization
(MASTER_ORGANIZATION_ID)
and
costing
organization
(COST_ORGANIZATION_ID)
are
maintained
here.
MTL_SYSTEM_ITEMS_B
This
is
the
definition
table
for
items.
This
table
holds
the
definitions
for
inventory
items,
engineering
items,
and
purchasing
items.
The
primary
key
for
an
item
is
the
INVENTORY_ITEM_ID
and
ORGANIZATION_ID.
Therefore,
the
same
item
can
be
defined
in
more
than
one
organization.
Items
now
support
multilingual
description.
MLS
is
implemented
with
a
pair
of
tables:
MTL_SYSTEM_ITEMS_B
and
MTL_SYSTEM_ITEMS_TL.
Translations
table
(MTL_SYSTEM_ITEMS_TL)
holds
item
Description
and
Long
Description
in
multiple
languages.
MTL_ITEM_STATUS
This
is
the
definition
table
for
material
status
codes.
Status
code
is
a
required
item
attribute.
It
indicates
the
status
of
an
item,
i.e.,
Active,
Pending,
Obsolete.
MTL_UNITS_OF_MEASURE_TL
This
is
the
definition
table
for
both
the
25-character
and
the
3-character
units
of
measure.
The
base_uom_flag
indicates
if
the
unit
of
measure
is
the
primary
unit
of
measure
for
the
uom_class.
Oracle
Inventory
uses
this
table
to
keep
track
of
the
units
of
measure
used
to
transact
an
item.
MTL_ITEM_LOCATIONS
This
is
the
definition
table
for
stock
locators.
The
associated
attributes
describe
which
subinventory
this
locator
belongs
to,
what
the
locator
physical
capacity
is,
etc.
MTL_ITEM_CATEGORIES
This
table
stores
inventory
item
assignments
to
categories
within
a
category
set.
For
each
category
assignment,
this
table
stores
the
item,
the
category
set,
and
the
category.
Items
always
may
be
assigned
to
multiple
category
sets.
However,
depending
on
the
Multiple
Assignments
Allowed
attribute
value
in
a
given
category
set
definition,
an
item
can
be
assigned
to
either
many
or
only
one
category
in
that
category
set.
MTL_CATEGORIES_B
This
is
the
code
combinations
table
for
item
categories.
Items
are
grouped
into
categories
within
the
context
of
a
category
set
to
provide
flexible
grouping
schemes.
Item
categories
now
support
multilingual
category
description.
MLS
is
implemented
with
a
pair
of
tables:
MTL_CATEGORIES_B
and
MTL_CATEGORIES_TL.
MTL_CATEGORIES_TL
table
holds
translated
Description
for
Categories.
MTL_CATEGORY_SETS_B
It
contains
the
entity
definition
for
category
sets.
A
category
set
is
a
categorization
scheme
for
a
group
of
items.
Items
may
be
assigned
to
different
categories
in
different
category
sets
to
represent
the
different
groupings
of
items
used
for
different
purposes.
An
item
may
be
assigned
to
only
one
category
within
a
category
set,
however.
STRUCTURE_ID
identifies
the
flexfield
structure
associated
with
the
category
set.
Category
Sets
now
support
multilingual
category
set
name
and
description.
MLS
is
implemented
with
a
pair
of
tables:
MTL_CATEGORY_SETS_B
and
MTL_CATEGORY_SETS_TL.
MTL_CATEGORY_SETS_TL
table
holds
translated
Name
and
Description
for
Category
Sets.
MTL_DEMAND
This
table
stores
demand
and
reservation
information
used
in
Available
To
Promise,
Planning
and
other
Manufacturing
functions.
There
are
three
major
row
types
stored
in
the
table:
Summary
Demand
rows,
Open
Demand
Rows,
and
Reservation
Rows.
MTL_SECONDARY_INVENTORIES
This
is
the
definition
table
for
the
subinventory.
A
subinventory
is
a
section
of
inventory,
i.e.,
raw
material,
finished
goods,
etc.
Subinventories
are
assigned
to
items
(in
a
many
to
one
relationship),
indicating
a
list
of
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
valid
places
where
this
item
will
physically
exist
in
inventory.
MTL_ONHAND_QUANTITIES
It
stores
quantity
on
hand
information
by
control
level
and
location.
It
is
maintained
as
a
stack
of
receipt
records,
which
are
consumed
by
issue
transactions
in
FIFO
order.
The
quantity
on
hand
of
an
item
at
any
particular
control
level
and
location
can
be
found
by
summing
TRANSACTION_QUANTITY
for
all
records
that
match
the
criteria.
MTL_TRANSACTION_TYPES
It
contains
seeded
transaction
types
and
the
user
defined
ones.
USER_DEFINED_FLAG
will
distinguish
the
two.
The
table
also
stores
the
TRANSACTION_ACTION_ID
and
TRANSACTION_SOURCE_TYPE_ID
that
is
associated
with
each
transaction
type.
MTL_MATERIAL_TRANSACTIONS
This
table
stores
a
record
of
every
material
transaction
or
cost
update
performed
in
Inventory.
Records
are
inserted
into
this
table
either
through
the
transaction
processor
or
by
the
standard
cost
update
program.
The
columns
TRANSACTION_TYPE_ID,
TRANSACTION_ACTION_ID,
TRANSACTION_SOURCE_TYPE_ID,
TRANSACTION_SOURCE_ID
and
TRANSACTION_SOURCE_NAME
describe
what
the
transaction
is
and
against
what
entity
it
was
performed.
MTL_ITEM_ATTRIBUTES
This
table
stores
information
on
item
attributes.
Each
row
in
the
table
corresponds
to
an
attribute.
The
table
stores
the
attribute
name,
the
corresponding
user-friendly
name
seen
by
the
users,
and
the
kind
of
validation
enforced
on
the
attribute.
MTL_ITEM_CATALOG_GROUPS_B
This
is
the
code
combinations
table
for
item
catalog
groups.
An
item
catalog
group
consists
of
items
that
can
be
described
by
the
same
set
of
descriptive
elements
or
item
properties.
When
an
item
is
associated
with
an
item
catalog
group,
the
item
inherits
the
descriptive
elements
for
that
group
which
then
behave
like
additional
item
attributes.
MTL_ITEM_REVISIONS_B
It
stores
revision
levels
for
an
inventory
item.
When
an
item
is
defined
a
starting
revision
record
is
written
out
to
this
table,
so
every
item
will
at
least
have
one
starting
revision.
MTL_ITEM_TEMPLATES_B
This
is
the
definition
table
for
item
templates.
It
contains
the
user-defined
name
(TEMPLATE_NAME)
and
description
(DESCRIPTION)
ONLY
for
backward
compatibility.
You
can
use
a
template
to
set
certain
item
attributes.
MTL_DESCRIPTIVE_ELEMENTS
It
stores
the
descriptive
element
definitions
for
an
item
catalog
group.
Descriptive
elements
are
defining
properties
used
to
describe
in
the
catalog
group.
MTL_DESCR_ELEMENT_VALUES
It
stores
the
descriptive
element
values
for
a
specific
item.
When
an
item
is
associated
with
a
particular
item
catalog
group,
one
row
per
descriptive
element
(for
that
catalog
group)
is
inserted
into
this
table.
ORG_ACCT_PERIODS
It
holds
the
open
and
closed
financial
periods
for
organizations.
MTL_CUSTOMER_ITEMS
It
stores
customer
item
information
for
a
specific
customer.
Each
record
can
be
defined
at
one
of
the
following
levels:
Customer,
Address
Category,
and
Address.
The
customer
item
definition
is
organization
independent.
MTL_SYSTEM_ITEMS_INTERFACE
It
temporarily
stores
the
definitions
for
inventory
items,
engineering
items
and
purchasing
items
before
loading
this
information
into
Oracle
Inventory.
MTL_TRANSACTIONS_INTERFACE
It
allows
calling
applications
to
post
material
transactions
(movements,
issues,
receipts
etc.
to
Oracle
Inventory
transaction
module.
MTL_ITEM_REVISIONS_INTERFACE
It
temporarily
stores
revision
levels
for
an
inventory
item
before
loading
this
information
into
Oracle
Inventory.
MTL_ITEM_CATEGORIES_INTERFACE
This
table
temporarily
stores
data
about
inventory
item
assignments
to
category
sets
and
categories
before
loading
this
information
into
Oracle
Inventory.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
MTL_DESC_ELEM_VAL_INTERFACE
This
table
temporarily
stores
descriptive
element
values
for
an
item
that
is
associated
with
an
item
catalog
group
before
loading
this
information
into
Oracle
Inventory.
MTL_DEMAND_INTERFACE
It
is
the
interface
point
between
non-Inventory
applications
and
the
Inventory
demand
module.
Records
inserted
into
this
table
are
processed
by
the
Demand
Manager
concurrent
program.
MTL_INTERFACE_ERRORS
It
stores
errors
that
occur
during
the
item
interface
process
reporting
where
the
errors
occurred
along
with
the
error
messages.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
How many ways are there to load data into interface tables?
1. SQL
*
Loader
Conventional
Path
Load
Direct
Path
Load
2. External
Tables
SQL Loader:
Files Generated:
Bad
File:
o
SQL
Loader
Rejected
records
and
Oracle
DB
rejected
records
will
be
stored.
o Default
file
name
will
be
same
as
source
feed
file
name.
Discard
File:
o Records
not
inserted
into
DB.
o User
needs
to
give
the
discard
file
name
else
file
will
not
be
created.
Log
File
:
o The
log
file
contains
a
detailed
summary
of
the
load,
including
a
description
of
any
errors
that
occurred
during
the
load.
Parfile:
o It
specifies
the
name
of
a
file
that
contains
commonly
used
command-line
parameters.
Control
File:
o The
control
file
is
a
text
file
written
in
a
language
that
SQL*Loader
understands.
o The
control
file
tells
SQL*Loader
where
to
find
the
data,
how
to
parse
and
interpret
the
data,
where
to
insert
the
data,
and
more.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Loading
Objects:
1. Column
Objects:
o When
a
column
of
a
table
is
of
some
object
type,
the
objects
in
that
column
are
referred
to
as
column
objects.
2. Row
Objects:
o These
objects
are
stored
in
tables,
known
as
object
tables
that
have
columns
corresponding
to
the
attributes
of
the
object.
The
object
tables
have
an
additional
system-generated
column,
called
SYS_NC_OID$,
that
stores
system-
generated
unique
identifiers
(OIDs)
for
each
of
the
objects
in
the
table.
1. Nested
Table
2. Varray
Append
The append keyword denotes that these records can be inserted even if the table has
other data.
Insert
which allows records to enter the table only if the table is empty
Replace
Delete all rows from the table before loading the new records.
Truncate
Delete all rows from the table before loading the new records.
Load Data
Inflie
Badfile= abc.bad
Discardfile = abc.discard
APPEND
WHEN
TRAILING NULLCOLS
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
LOAD
DATA
statement
tells
SQL*Loader
that
this
is
the
beginning
of
a
new
data
load.
INFILE clause specifies the name of a datafile containing data that you want to load.
BADFILE clause specifies the name of a file into which rejected records are placed.
DISCARDFILE clause specifies the name of a file into which discarded records are placed.
APPEND clause is one of the options you can use when loading data into a table that is not empty.
INTO TABLE clause enables you to identify tables, fields, and datatypes.
TRAILING
NULLCOLS
clause
tells
SQL*Loader
to
treat
any
relatively
positioned
columns
that
are
not
present
in
the
record
as
null
columns.
For
example
some
of
the
last
columns
data
will
not
be
available
in
feed
file
rather
we
can
load
them
during
runtime
like
DATE
columns
which
we
can
load
automatically
by
using
keyword
SYSDATE.
Option Clause:
BINDSIZE
=
n
COLUMNARRAYROWS
=
n
DIRECT
=
{TRUE
|
FALSE}
ERRORS
=
n
LOAD
=
n
MULTITHREADING
=
{TRUE
|
FALSE}
PARALLEL
=
{TRUE
|
FALSE}
READSIZE
=
n
RESUMABLE
=
{TRUE
|
FALSE}
RESUMABLE_NAME
=
'text
string'
RESUMABLE_TIMEOUT
=
n
ROWS
=
n
SILENT
=
{HEADER
|
FEEDBACK
|
ERRORS
|
DISCARDS
|
PARTITIONS
|
ALL}
SKIP
=
n
SKIP_INDEX_MAINTENANCE
=
{TRUE
|
FALSE}
SKIP_UNUSABLE_INDEXES
=
{TRUE
|
FALSE}
STREAMSIZE
=
n
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Executing
SQL
*
Loader
from
Command
Line:
Load
Data
Infile
a1.txt
Infile
a2.txt
Infile
a3.txt
APPEND
Into
Table
emp
(
eid
number,
Ename
char
)
Single
File
Multiple
Table:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Load
Data
Infile
a1.txt
REPLACE
Into
Table
emp1
WHEN
edept
=
10
(
eid
int,
Ename
char,
Edept
char
)
Into
Table
emp2
WHEN
edept
=
20
(
eid
int,
Ename
char,
Edept
char
)
Into
Table
emp3
WHEN
edept
=
30
(
eid
int,
Ename
char,
Edept
char
)
SQL
Loader
Performance
Tips:
Make
logical
record
processing
efficient.
o Make
it
easy
for
the
software
to
figure
out
physical
record
boundaries.
That
is,
use
the
file
processing
option
string
"FIX
nnn"
or
"VAR".
o If
you
use
the
default
(stream
mode),
on
most
platforms
(e.g.,
UNIX)
SQL*Loader
has
to
scan
each
physical
record
for
the
terminating
newline
character.
Make
field
setting
efficient.
o Field
setting
is
the
process
of
mapping
the
"fields"
in
the
datafile
to
their
corresponding
columns
in
the
database.
o Avoid
delimited
fields;
use
positional
fields.
If
you
use
delimited
fields,
SQL*Loader
has
to
scan
the
input
data
looking
for
the
delimiter(s)/enclosure(s).
If
you
use
positional
fields,
SQL*Loader
just
increments
a
pointer
to
get
to
the
next
field
(very
fast).
Make
conversions
efficient.
o There
are
several
conversions
that
SQL*Loader
does
for
you;
character
set
conversions
and
datatype
conversions..
o Avoid
character
set
conversions
if
you
can.
Direct
Path
&
Conventional
Path
Load
o If
you
can,
use
the
"unrecoverable"
option
on
direct
path
loads.
o Even
for
conventional
path
loads,
always
run
SQL*Loader
directly
on
the
server
rather
than
across
a
network.
o Disable
Indexes
and
Constraints.
For
conventional
data
loads
only,
disabling
of
indexes
and
constraints
can
increase
the
performance.
o Use
Fixed
Width
Data.
Fixed
width
data
format
saves
Oracle
some
processing
when
parsing
the
data.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Common
Error:
When using SQL/Loader to load input a data file it only loads 5000 rows, then generates the following error
This is a bug in SQL*Loader when direct path with column transformation (SQL string) is used.
Solution:
The
external
tables
feature
is
a
complement
to
existing
SQL*Loader
functionality.
It
enables
you
to
access
data
in
external
sources
as
if
it
were
in
a
table
in
the
database.
How
External
Tables
Created?
CREATE
TABLE
..
ORGANIZATIONAL
EXTERNAL
..
;
Steps
to
Create
External
Tables:
1. Create
Directory
Path
2. Create
External
Table
FND Load
FNDLOAD
is
an
Oracle
utility
for
the
transfer
of
a
wide
range
of
Oracle
Foundation
(FND)
data
from
one
instance
to
another
instance.
How
it
Works:
Conversion
between
database
format
and
text
file
format
is
specified
by
a
configuration
file.
Oracle
does
provide
a
confirmation
file
and
it
is
important
to
just
pass
the
configuration
file
name
and
then
just
call
the
loader
and
leave
everything.
Configuration
Files:
Configuration
File
Object
Name
afattach.lct
Load
attachments
setup
data
afcpprog.lct
Concurrent
Program
Definitions
afcppstl.lct
Concurrent
Program
Printer
Styles
afcpreqg.lct
Concurrent
Request
Groups
afcprset.lct
Concurrent
Request
Sets
Flex
fields
(KFF,
DFF,
value
sets,
value
sets
afffload.lct
data)
aflvmlu.lct
Lookup
types
and
codes
afscprof.lct
Profiles
and
Profile
Values
afscursp.lct
Security
data
(users,
responsibilities,
etc)
afsload.lct
Menu
/
Function
Security
Data
Lookup
Types
FND_LOAD
Modes:
1. DOWNLOAD
:
Generate
&
Download
.LDT
file
2. UPLOAD
:
Upload
the
.LDT
file.
Steps:
Step
1:
Log
into
UNIX
Server
&
go
to
$FND_TOP
Select
*
from
apps.fnd_env_context
where
variable_name
like
'%FND_TOP%';
Step
2:
Generate
.LDT
file
$FNDLOAD
apps/apps
0
Y
DOWNLOAD
$FND_TOP/patch/115/import/afscursp.LCT
/home/applmgr/sysadmin_resp.LDT
FND_RESPONSIBILITY
RESP_KEY=SYSTEM_ADMINISTRATOR
Step
3:
Now
FTP/SFTP
the
file
to
Destination
Server
Instance.
Step
4:
Log
into
Destination
Server
instance
UNIX
Box.
$FNDLOAD
apps/apps
0
Y
UPLOAD_PARTIAL
$FND_TOP/patch/115/import/afscursp.LCT
/home/applmgr/sysadmin_resp.LDT
FND_RESPONSIBILITY
RESP_KEY=SYSTEM_ADMINISTRATOR
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
DBLink
Database
Link
(dblink)
to
execute
SQL
against
external
database
as
if
it
was
the
database
you
are
logged
in
to.
You
create
an
Oracle
dblink
with
the
following
command:
CREATE
DATABASE
LINK
<link_name>
CONNECT
TO
<user_name>
IDENTIFIED
BY
<password>
USING
'<remote_sid>';
Now
you
can
execute
SQL
statements
using
the
remote
database.
To
specify
a
table
from
the
remote
database,
you
specify
the
table
name
and
the
database
link
name:
<table_name>@<dblink_name>.
To
remove
an
existing
Oracle
database
link,
you
use
the
DROP
DATABASE
LINK
command:
DROP
DATABASE
LINK
<link_name>;
INSERT
INTO
sales
SELECT
*
FROM
emp@Server_Name
WHERE
creation_date
>=
TRUNC
(sysdate,
'DD');
COMMIT;
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
UNIX Commands
Commands
Usage
&
Examples
CUT
Cut
a
specific
Character
from
each
line
in
a
file
Cut
-c1-3
file1.txt
//
first
3
character
from
each
line
will
be
displayed
Cut
a
specific
Field
from
each
line
in
a
delimited
(|)
file
Cut
-d|
-f5
file1.txt
//
fifth
word
from
each
line
will
be
displayed
SED
Usage:
It
is
mostly
used
to
replace
the
text
in
a
file.
Replace
word
abc
with
xyz
in
a
file.
Sed
s
/
abc/
xyz/
file1.txt
S
Substitution
Operation
/
Delimiters
(user
can
use
any
delimiter
of
their
choice)
Replace
nth
occurrence
of
the
pattern,
below
command
replaces
2nd
occurance
Sed
s
/
abc/
xyz/2
file1.txt
Replace
all
occurrence
of
the
pattern
Sed
s
/
abc/
xyz/g
file1.txt
g
Global
Replacement
Replace
Http://
to
Https://
Note
in
the
above
case
both
delimiter
and
replacement
string
is
/.
To
use
make
system
to
understand
which
Sed
Command
delimiter
is
and
string
delimiter
we
have
to
use
\
backslash.
Sed
s
/
http:\
/\
/
/
https:
\
/
\
/
/g
file1.txt
(or)
to
avoid
confusion
change
the
delimiter
of
user
choice
for
example,
Sed
s
_http://
_https:/
/_g
file1.txt
GREP
Usage:
The
grep
command
allows
you
to
search
one
file
or
multiple
files
for
lines
that
contain
a
pattern.
Exit
status
is
0
if
matches
were
found,
1
if
no
matches
were
found,
and
2
if
errors
occurred
Syntax:
Grep
[Options]
Pattern
[Files]
Options:
-c
Display
then
no.
of
matched
lines.
-I
Ignore
case
sensitive
-s
Silent
mode
-v
display
all
lines
that
dont
match
-w
Match
whole
word
Search
for
a
string
in
a
file.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Grep
abc
file1.txt
Search
for
string
in
multiple
files.
Grep
abc
file1.txt
file2.txt
Checking
for
whole
word
in
a
file
Grep
-
w
abc
file1.txt
Search
for
a
string
in
all
file
recursively
Grep
-r
abc
*
Display
count
of
no.
of
matched
Grep
-c
abc
file1.txt
Display
the
line
numbers
Grep
-n
abc
file1.txt
AWK
AWK
-
the
(very
old)
original
from
AT&T
NAWK
-
A
newer,
improved
version
from
AT&T
GAWK
-
The
Free
Software
foundation's
version
NAWK
Syntax:
AWK
BEGIN
{
Begin_action}
GAWK
{
Body_action}
END
{
End_action}
filename
For
example,
awk
BEGIN
{sum=0}
{sum=sum+$5}
END
{print
sum}
Using
if
Condition,
This
awk
command
checks
for
the
string
"t4"
in
the
9th
column
and
if
it
finds
a
match
then
it
will
print
the
entire
line.
awk
'{
if
(
$9
==
"t4"
)
print
$0;
}'
input_file
Using
for
Loop,
This
awk
command
checks
for
the
string
"t4"
in
the
9th
column
and
if
it
finds
a
match
then
it
will
print
the
entire
line.
awk
'BEGIN
{
for(i=1;i<=5;i++)
print
"square
of",
i,
"is",i*i;
}'
Features
available
in
AWK:
only
some
features
are
listed
below
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
FS
Input
field
separator
OFS
Output
field
separator
RS
Record
separator
ORS
Output
record
separator
NR
Number
of
the
record
NF
Number
of
fields
in
a
record
FILENAME
Contains
current
input-file
Examples
to
print
a
word
from
delimiter
string
awk
'BEGIN
{FS=":"}
{print
$2}'
input_file
To
print
output
in
delimited
format,
awk
'BEGIN
{OFS=":"}
{print
$4,$5}'
input_file
MAILX
Usage:
The
mail
command
allows
you
to
read
or
send
mail.
If
users
option
is
left
blank,
it
allows
you
to
read
mail.
If
users
have
a
value,
then
it
allows
you
send
mail
to
those
users.
Syntax:
mailx
[options]
[users]
Options:
for
sending
emails
-m
type
Display
a
"Message-type:"
line
at
the
heading
of
the
message,
followed
by
type.
-t
Display
a
"To:"
line
at
the
heading
of
the
message
with
the
names
of
the
recipients.
-w
Send
mail
to
users
without
waiting
for
a
remote
transfer
program
to
finish.
-F
Save
message
in
a
file
called
the
name
of
the
first
recipient.
-h
n
If
message
has
not
been
sent
after
n
network
connections,
do
not
send
message.
-i
Ignore
interrupts
-r
address
address
is
the
return
address
for
mail
messages.
-s
subject
Displays
subject
in
the
subject
header.
-U
Convert
uucp-type
addresses
to
Internet
format.
-v
Verbose.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
If
Statement
in
UNIX:
Primary
Options
are
available
for
file
validation.
Option
Meaning
[
-a
FILE
]
True
if
FILE
exists.
[
-c
FILE
]
True
if
FILE
exists
and
is
a
character-special
file.
[
-d
FILE
]
True
if
FILE
exists
and
is
a
directory.
[
-e
FILE
]
True
if
FILE
exists.
[
-f
FILE
]
True
if
FILE
exists
and
is
a
regular
file.
[
-r
FILE
]
True
if
FILE
exists
and
is
readable.
[
-s
FILE
]
True
if
FILE
exists
and
has
a
size
greater
than
zero.
[
-w
FILE
]
True
if
FILE
exists
and
is
writable.
[
-x
FILE
]
True
if
FILE
exists
and
is
executable.
[
-O
FILE
]
True
if
FILE
exists
and
is
owned
by
the
effective
user
ID.
[
-L
FILE
]
True
if
FILE
exists
and
is
a
symbolic
link.
Read
Concurrent
Parameters
in
UNIX
Shell
Script
Often
when
concurrent
program
is
created
on
a
shell
script
there
is
a
need
to
extract
parameters
passed
from
concurrent
program
in
the
shell
script.
In
Shell
Script,
$1
is
the
variable
that
stores
following
information
-
Concurrent
Program
Short
Name
-
Request
ID
-
Login
Information
(APPS
username
and
password)
-
User
Id
-
User
Name
-
Printer
Name
-
Save
output
Flag
-
Print
number
of
Copies
-
List
of
concurrent
program
parameters
Following
code
can
be
used
to
extract
different
values
requestid=`(echo
$1
|
cut
-f2
-d'
'
|
cut
-f2
-d=
|
tr
-d
'"'
)`
#request_id
login_usr_pwd=`(echo
$1
|
cut
-f3
-d'
'
|
cut
-f2
-d=
|
tr
-d
'"'
)`
#database
username/password
conc_user_id=`(echo
$1
|
cut
-f4
-d'
'
|
cut
-f2
-d=
|
tr
-d
'"'
|
cut
-c1-8)`
#userid
conc_user_name=`(echo
$1
|
cut
-f5
-d'
'
|
cut
-f2
-d=
|
tr
-d
'"'
|
cut
-c1-8)`
#username
prog_param1=`(echo
$1
|
cut
-f9
-d'
'
|
tr
-d
'"'
)`
#parameter
1
prog_param2=`(echo
$1
|
cut
-f10
-d'
'
|
tr
-d
'"'
)`
#parameter
2
prog_param3=`(echo
$1
|
cut
-f11
-d'
'
|
tr
-d
'"'
)`
#parameter
3
prog_param4=`(echo
$1
|
cut
-f12
-d'
'
|
tr
-d
'"'
)`
#parameter
4
prog_param5=`(echo
$1
|
cut
-f13
-d'
'
|
tr
-d
'"'
)`
#parameter
5
prog_param6=`(echo
$1
|
cut
-f14
-d'
'
|
tr
-d
'"'
)`
#parameter
6
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
How
to
connect
SQL*PLUS
from
UNIX
Shell:
Example
1:
#!/usr/bin/ksh
emp_id=`sqlplus
s
$USER/$PASSW@$INST
<<
EOF
set
pagesize
0
set
feedback
off
set
verify
off
set
heading
off
select
EMP_ID
from
EMPLOYEE
where
EMP_NAME='Blogger';
exit;
EOF`
echo
$emp_id
Example 2:
This
example
explains
the
same
as
above,
except
this
uses
a
variable
name
as
a
parameter.
#!/usr/bin/ksh
EMP="Blogger"
emp_id=`sqlplus
s
$USER/$PASSW@$INST
<<
EOF
set
pagesize
0
set
feedback
off
set
verify
off
set
heading
off
select
EMP_ID
from
EMPLOYEE
where
EMP_NAME='$EMP';
exit;
EOF`
echo
$emp_id
Example 3:
This
example
shows
another
way
to
connect
to
sqlplus
from
shell.
#!/usr/bin/ksh
EMP="Blogger"
emp_id=`echo
"
set
pagesize
0
set
feedback
off
set
verify
off
set
heading
off
select
EMP_ID
from
EMPLOYEE
where
EMP_NAME='$EMP';
exit;"
|
sqlplus
s
$USER/$PASSW@$INST
`
echo
$emp_id
Pagesize
Sets
the
number
of
rows
on
each
page
of
output
in
iSQL*Plus,
and
the
number
of
lines
on
each
page
of
output
in
command-line
and
Windows
GUI.
Feedback
Displays
the
number
of
records
returned
by
a
script
when
a
script
selects
at
least
n
records.
ON
or
OFF
turns
this
display
on
or
off.
Turning
feedback
ON
sets
n
to
1.
Setting
feedback
to
zero
is
equivalent
to
turning
it
OFF.
SET
FEEDBACK
OFF
also
turns
off
the
statement
confirmation
messages
such
as
'Table
created'
and
'PL/SQL
procedure
successfully
completed'
that
are
displayed
after
successful
SQL
or
PL/SQL
statements.
Verify
Controls
whether
to
list
the
text
of
a
SQL
statement
or
PL/SQL
command
before
and
after
replacing
substitution
variables
with
values.
ON
lists
the
text;
OFF
suppresses
the
listing.
Heading
Controls
printing
of
column
headings
in
reports.
ON
prints
column
headings
in
reports;
OFF
suppresses
column
headings.
The
SET
HEADING
OFF
command
does
not
affect
the
column
width
displayed,
it
only
suppresses
the
printing
of
the
column
header
itself.
Autotrace
Displays
a
report
on
the
execution
of
successful
SQL
DML
statements
(SELECT,
INSERT,
UPDATE
or
DELETE).
The
report
can
include
execution
statistics
and
the
query
execution
path.
OFF
does
not
display
a
trace
report.
ON
displays
a
trace
report.
TRACEONLY
displays
a
trace
report,
but
does
not
print
query
data,
if
any.
Echo
Controls
whether
or
not
to
echo
commands
in
a
script
that
is
executed
with
@,
@@
or
START.
ON
displays
the
commands
on
screen.
OFF
suppresses
the
display.
ECHO
does
not
affect
the
display
of
commands
you
enter
interactively
or
redirect
to
SQL*Plus
from
the
operating
system.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Report 6i
Different
types
of
layout
in
report?
1) Tabular
2) Group
Above
3) Group
Left
4) Matrix
5) Matrix
with
Group
6) Form
like
7) Form
Letter
8) Mailing
Label
Different
type
of
columns
in
data
model:
Summary
Column:
A
Summary
Column
is
a
field
that
sums
items
in
another
column
and
generates
a
total
(or
other
function).
Formula
Column:
A
Formula
column
performs
a
user-defined
computation
on
the
data
of
one
or
more
columns.
Placeholder
Column:
Used
to
store
runtime
values.
What
are
various
Report
triggers?
1) Before
Parameter
2) After
Parameter
3) Before
report
4) Between
pages
5) After
Report
There
are
two
types
of
anchors:
1) Implicit
(not
visible,
Reports
created)
By
Default,
Reports
implicitly
anchors
each
object
to
its
immediate
enclosing
object.
2) Explicit
(visible,
Designer
created)
Various
types
of
parameters
available
in
reports:
1) System
Parameters
2) User
Defined
Parameters:
A
USER
parameter
is
an
object
that
you
create
to
hold
a
value
that
users
can
change
at
runtime.
o Restrict
values
in
the
WHERE
clause
of
the
SELECT
statement
o Substitute
any
part
of
the
SELECT
statement
o Substitute
a
single
column
or
expression
in
the
SELECT
statement.
o Restrict
printing
in
the
Layout.
Referring
parameters
in
Report:
There
are
two
ways
you
can
reference
parameters
in
a
query:
use
a
bind
reference
or
a
lexical
reference.
Bind
Reference
-
replaces
a
single
value
or
expression.
o To
create
a
bind
references
in
a
query,
reference
the
parameter
with
a
colon
(:).
Lexical
Reference
-
replaces
any
part
of
a
SELECT
statement,
such
as
column
names,
the
FROM
clause,
the
WHERE
clause,
or
the
ORDER
BY
clause.
o To
create
a
lexical
reference
in
a
query,
prefix
the
parameter
name
with
an
ampersand
(&).
Comparing
Bind
&
Lexical:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Type
Prefix
Use
to
Replace
Parameter
Created
by
Default
Bind
:
WHERE,
GROUP
BY
Yes
If
it
does
not
already
ORDER
BY
HAVING
CONNECT
BY,
START
WITH
Lexical
&
Any
part
of
SELECT
No
You
must
always
create
the
parameter
in
the
navigator
Statement
yourself.
Data
type
must
be
CHAR.
Modes
in
Layout
Model:
Confine
Mode:
o On:
child
objects
cannot
be
moved
outside
their
enclosing
parent
objects.
o Off:
child
objects
can
be
moved
outside
their
enclosing
parent
objects.
Flex
Mode:
o On:
parent
borders
stretch
when
child
objects
are
moved
against
them.
o Off:
parent
borders
remain
fixed
when
child
objects
are
moved
against
them.
Report
Builder
PL/SQL
Packages:
SRW.BREAK
This
procedure
temporarily
stops
report
execution
at
the
place
at
which
SRW.BREAK
was
encountered,
and
displays
(read-only)
the
current
values
of
all
columns
and
parameters.
Report
execution
resumes
when
the
read-only
screen
is
accepted.
SRW.BREAK;
Restriction:
o This
procedure
is
not
meaningful
in
a
Before
Form
or
After
Form
trigger,
because
data
for
the
report
is
not
fetched
until
the
Before
Report
trigger.
SRW.CONTEXT_FAILURE
This
exception
stops
the
report
execution
and
raises
the
following
error
message:
REP-1426:
Running
<construct_name>
from
incorrect
context.
SRW.CONTEXT_FAILURE;
Usage
Note:
o Report
Builder
raises
this
exception
when
a
Report
Builder
packaged
function
or
procedure
is
called
in
the
wrong
context.
EXCEPTION
when
SRW.CONTEXT_FAILURE
then
srw.message(4000,
Contact
the
Application
Development
group
regarding
SRW.CONTEXT_FAILURE.);
raise
srw.program_abort;
SRW.DO_SQL
DDL
(statements
that
define
data),
or
DML
(statements
that
manipulate
data).
DML
statements
are
usually
faster
when
they
are
in
PL/SQL,
instead
of
in
SRW.DO_SQL.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
SRW.DO_SQL
(:sql_statement
CHAR);
SRW.DO_SQL_FAILURE
This
exception
stops
the
report
execution
and
raises
the
following
error
message:
REP-1425:
Error
running
DO_SQL
package
-
REP-msg
ORA-msg
SRW.DO_SQL_FAILURE;
Usage
Notes:
Report
Builder
raises
this
exception
when
the
SRW.DO_SQL
packaged
procedure
fails.
EXCEPTION
when
SRW.DO_SQL_FAILURE
then
srw.message(1000,
Error
occurred
while
creating
table
CHECKS.);
SRW.GET_PAGE_NUM
This
function
returns
the
current
page
number.
This
is
useful
when
you
want
to
use
the
page
number
in
the
fields
Format
Trigger
property.
SRW.GET_PAGE_NUM
(page_num);
Restriction:
it
is
only
meaningful
in
a
format
trigger.
SRW.MESSAGE
This
procedure
displays
a
message
with
the
message
number
and
text
that
you
specify.
SRW.MESSAGE
(msg_number
NUMBER,
msg_text
CHAR);
EXCEPTION
when
srw.unknown_user_exit
then
srw.message(1000,
User
exit
MYEXIT
failed.Call
Karen
Smith
x3455.);
raise
srw.program_abort;
SRW.PROGRAM_ABORT
This
exception
stops
the
report
execution
and
raises
the
following
error
message:
REP-1419:
PL/SQL
program
aborted.
SRW.PROGRAM_ABORT;
SRW.RUN_REPORT
This
procedure
invokes
RWRUN60
with
the
string
that
you
specify.
This
procedure
is
useful
for:
o running
drill-down
reports
(i.e.,
calling
a
report
from
a
buttons
action
trigger)
o sending
parts
of
a
report
to
different
recipients
(e.g.,
to
send
a
report
via
e-mail
to
each
manager
with
just
his
or
her
groups
data)
o sending
parts
of
a
report
to
different
printers
(e.g.,
to
send
each
managers
report
to
his
or
her
printer)
o running
multiple
reports
from
a
single
"driver"
report
srw.run_report(report=MAIL_IT
desname=||:ename
||
desformat=dflt
batch=yes
mgr_no=||
TO_CHAR(:empno)
);
SRW.RUN_REPORT_FAILURE
If
the
SRW.RUN_REPORT
packaged
procedure
fails,
this
exception
stops
the
report
execution
and
raises
the
following
error
message:
REP-1428:
Error
while
running
SRW.RUN_REPORT.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
EXCEPTION
WHEN
srw.run_report_failure
then
srw.message(30,
Error
mailing
reports.);
raise
srw.program_abort;
SRW.USER_EXIT
This
procedure
calls
the
user
exit
named
in
user_exit_string.
It
is
useful
when
you
want
to
pass
control
to
a
3GL
program
during
a
reports
execution.
SRW.USER_EXIT20
This
procedure
is
the
same
as
SRW.USER_EXIT,
except
that
it
calls
the
user
exit
with
five
arguments
instead
of
just
two.
This
enables
you
to
share
user
exits
with
other
Oracle
products,
such
as
Oracle
Forms,
which
pass
five
arguments
instead
of
two.
SRW.USER_EXIT_FAILURE
This
exception
is
raised
when
the
user
exit
you
called
has
failed.
When
called,
it
stops
the
report
execution
and
raises
the
following
error
message:
REP-1416:
User
exit
<exit_name>
failed.
EXCEPTION
when
SRW.USER_EXIT_FAILURE
then
SRW.MESSAGE(200,
PASS
user
exit
failed.
Check
its
code.);
What
are
User
Exits
in
oracle
Reports?
Its
an
API
which
provides
easy
way
to
pass
control
from
report
builder
to
3GL
program
that
performs
some
function
and
then
returns
control
back
to
report
builder.
Using
these
we
can
integrate
oracle
reports
with
oracle
apps
AOL
and
run
them
as
concurrent
programs.
Below
are
some
AOL
integrations.
FND
SRWINIT
This
is
a
User
Exit
which
sets
your
profile
option
values
and
allows
Oracle
AOL
user
exits
to
detect
that
they
have
been
called
by
oracle
repots.
FND
SRWINIT
also
allows
your
report
to
use
the
correct
organization
automatically.
Can
be
used
in
BEFORE-REPORT
Trigger.
FND_SRWEXIT
This
user
exit
ensures
that
all
the
memory
allocated
for
AOL
user
exits
has
been
freed
up
properly.
Can
be
used
in
AFTER-
REPORT
Trigger.
FND
To
format
the
currency
amount
dynamically
depending
upon
the
precision
of
the
FORMAT_CURRENCY
actual
currency
value,
standard
precision,
users
profile
values
and
location
(country)
of
the
site.
You
obtain
the
currency
value
from
the
database
into
an
Oracle
Reports
column.
Define
another
Oracle
Reports
column,
a
formula
column
of
type
CHAR,
which
executes
the
FORMAT_CURRENCY
user
exit
to
format
the
currency
value.
A
displayed
field
has
this
formula
column
as
its
source
so
that
the
formatted
value
is
automatically
copied
into
the
field
for
display.
Syntax:
FND
FORMAT_CURRENCY
CODE=:column
containing
currency
code
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
DISPLAY_WIDTH=field
width
for
display
AMOUNT=:source
column
name
DISPLAY=:display
column
name
[MINIMUM_PRECISION=:P_MIN_PRECISION]
[PRECISION={STANDARD|EXTENDED}]
[DISPLAY_SCALING_FACTOR=:P_SCALING_FACTOR]
FND
FLEXSQL
Call
this
user
exit
to
create
a
SQL
fragment
usable
by
your
report
to
tailor
your
SELECT
statement
that
retrieves
flexfield
values.
This
fragment
allows
you
to
SELECT
flexfield
values
or
to
create
a
WHERE,
ORDER
BY,
GROUP
BY,
or
HAVING
clause
to
limit
or
sort
the
flexfield
values
returned
by
your
SELECT
statement.
You
call
this
user
exit
once
for
each
fragment
you
need
for
your
select
statement.
You
define
all
flexfield
columns
in
your
report
as
type
CHARACTER
even
though
your
table
may
use
NUMBER
or
DATE
or
some
other
datatype.
Syntax:
FND
FLEXSQL
CODE="flexfield
code"
APPL_SHORT_NAME="application
short
name"
OUTPUT=":output
lexical
parameter
name"
MODE="{
SELECT
|
WHERE
|
HAVING
|
ORDER
BY}"
[DISPLAY="{ALL
|
flexfield
qualifier
|
segment
number}"]
[SHOWDEPSEG="{Y
|
N}"]
[NUM=":structure
defining
lexical"
|
MULTINUM="{Y
|
N}"]
[TABLEALIAS="code
combination
table
alias"]
[OPERATOR="{
=
|
<
|
>
|
<=
|
>=
|
!=
|
"||"
|
BETWEEN
|
QBE}"]
[OPERAND1=":input
parameter
or
value"]
[OPERAND2=":input
parameter
or
value"]
FND
FLEXIDVAL
Call
this
user
exit
to
populate
fields
for
display.
You
pass
the
key
flexfields
data
retrieved
by
the
query
into
this
exit
from
the
formula
column.
With
this
exit
you
display
values,
descriptions
and
prompts
by
passing
appropriate
token
(any
one
of
VALUE,
DESCRIPTION,
APROMPT
or
LPROMPT).
Syntax:
FND
FLEXIDVAL
CODE="flexfield
code"
APPL_SHORT_NAME="application
short
name"
DATA=":source
column
name"
[NUM=":structure
defining
source
column/lexical"]
[DISPLAY="{ALL|flexfield
qualifier|segment
number}"]
[IDISPLAY="{ALL|flexfield
qualifier|segment
number}"]
[SHOWDEPSEG="{Y
|
N}"]
[VALUE=":output
column
name"]
[DESCRIPTION=":output
column
name"]
[APROMPT=":output
column
name"]
[LPROMPT=":output
column
name"]
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
[PADDED_VALUE=":output
column
name"]
[SECURITY=":column
name"]
This
is
an
AOL
user
exit
available
to
populate
key
flexfields
for
display
CODE
means
Key
flexfield
code
(GL#
is
for
Accounting
Flex
field,
for
all
other
check
the
table
FND_ID_FLEXS)
NUM
is
the
structure
of
the
key
flex
field(Chart
of
Accounts
Number)
DATA
is
where
you
store
the
retrieved
data
(your
sql
output).
SRW.USER_EXIT('FND
FLEXSQL
CODE="GL#"
NUM=":P_STRUCT_NUM"
APPL_SHORT_NAME="SQLGL"
OUTPUT=":P_SEC_SEG"
MODE="SELECT"
DISPLAY=":P_SEC_SEG_VAL"
')
The
userexit
call
FND
FLEXIDVAL
:
SRW.REFERENCE(:SEC_SEG);
SRW.USER_EXIT('FND
FLEXIDVAL
CODE="GL#"
DATA=":SEC_SEG"
APPL_SHORT_NAME="SQLGL"
VALUE=":SEC_SEG_DISP"
DISPLAY="ALL"
NUM=":P_STRUCT_NUM"
');
return(:sec_seg_disp);
Properties
Usage:
Only
Important
properties
discussed.
Property
Name
Usage
Anchor
Properties
Child
Edge
Type
Description
The
Child
Edge
Type
property
is
the
edge
of
the
child
object
on
which
the
anchor
is
located.
Values:
Top,
Bottom,
Left,
and
Right
Applies
to
anchors
Parent
Edge
Type
Description
The
Parent
Edge
Type
property
is
the
edge
of
the
parent
object
on
which
the
anchor
is
located.
Values:
Top,
Bottom,
Left,
and
Right
Applies
to
anchors
Common
Layout
Object
Properties
Base
Printing
On
The
Base
Printing
On
property
is
the
object
on
which
to
base
the
Print
Object
On
property
of
the
current
object.
For
example,
if
you
specify
a
Print
Object
On
of
All
Pages
and
a
Base
Printing
On
of
Anchoring
Object,
the
current
object
will
be
triggered
to
print
on
every
logical
page
on
which
its
anchoring
object
(parent
object)
appears.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Values:
o Anchoring
Object
Is
the
parent
object
to
which
the
current
object
is
implicitly
or
explicitly
anchored.
o Enclosing
Object
Is
the
object
that
encloses
the
current
object.
Applies
to:
layout
objects
Required/Optional:
required
Default:
Anchoring
Object
Keep
with
anchoring
The
Keep
with
Anchoring
Object
property
indicates
whether
to
keep
an
object
and
the
object
objects
to
which
it
is
anchored
on
the
same
logical
page.
Yes
o Means
that
if
the
object,
its
anchoring
object,
or
both
cannot
fit
on
the
logical
page,
they
will
be
moved
to
the
next
logical
page.
o For
a
repeating
frame,
it
means
the
first
instance
of
the
repeating
frame
must
be
able
to
fit
on
the
same
page
as
its
anchoring
object.
o Any
layout
object
other
than
a
repeating
frame,
it
means
the
object
must
be
able
to
format
entirely
on
the
same
page
as
its
anchoring
object.
Minimum
window
Lines
Page
Break
After
o The
Page
Break
After
property
indicates
that
you
want
all
children
of
the
object
to
be
moved
to
the
next
page.
o In
other
words,
any
object
that
is
a
child
object
of
an
anchor
(implicit
or
explicit)
to
this
object
will
be
treated
as
if
it
has
Page
Break
Before
set
to
Yes.
Note
that
this
does
not
necessarily
mean
that
all
the
objects
below
the
object
with
Page
Break
After
will
move
to
the
next
page.
Applies
to:
layout
objects
Required/Optional:
optional
Default:
No
Page
Break
Before
The
Page
Break
Before
property
indicates
that
you
want
the
object
to
be
formatted
on
the
page
after
the
page
on
which
it
is
initially
triggered
to
print.
Note
that
this
does
not
necessarily
mean
that
all
the
objects
below
the
object
with
Page
Break
Before
will
move
to
the
next
page.
Applies
to:
layout
objects
Required/Optional:
optional
Default:
No
Page
Protect
o The
Page
Protect
property
indicates
whether
to
try
to
keep
the
entire
object
and
its
contents
on
the
same
logical
page.
Setting
Page
Protect
to
Yes
means
that
if
the
contents
of
the
object
cannot
fit
on
the
current
logical
page,
the
object
and
all
of
its
contents
will
be
moved
to
the
next
logical
page.
o Note:
Using
Page
Protect
may
cause
objects
below
the
page
protected
object(s)
to
appear
above
the
page
protected
object(s).
Applies
to:
layout
objects
Required/Optional:
optional
Default:
No
Print
Object
On
The
Print
Object
On
property
is
the
frequency
with
which
you
want
the
object
to
appear
in
the
report.
The
Print
Object
On
options
indicates
the
logical
page(s)
on
which
the
object
should
be
triggered
to
print
with
regard
to
the
Base
Printing
On
object.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Values:
All
Pages,
All
but
First
Page,
Default,
First
Page,
Last
Page
Horizontal
Elasticity
/
The
Horizontal/Vertical
Elasticity
property
is
how
the
horizontal
size
of
the
object
will
change
Vertical
Elasticity
at
runtime
to
accommodate
the
objects
or
data
within
it.
Contract
Means
the
horizontal
size
of
the
object
decreases,
if
the
formatted
objects
or
data
within
it
are
wide
enough,
but
it
cannot
increase
to
a
width
greater
than
that
shown
in
the
Report
Editor.
Expand
Means
the
horizontal
size
of
the
object
increases,
if
the
formatted
objects
or
data
within
it
are
wide
enough,
but
it
cannot
decrease
to
a
width
less
than
that
shown
in
the
Report
Editor.
Fixed
Means
the
width
of
the
object
is
the
same
on
each
logical
page,
regardless
of
the
size
of
the
objects
or
data
within
it.
Truncation
of
data
may
occur;
look
at
the
examples.
The
width
of
the
object
is
defined
to
be
its
width
in
the
Report
Editor.
Variable
Means
the
object
may
expand
or
contract
horizontally
to
accommodate
the
objects
or
data
within
it
(with
no
extra
space),
which
means
the
width
shown
in
the
Report
Editor
has
no
effect
on
the
objects
width
at
runtime.
Common
Column
Properties
Break
Order
The
Break
Order
property
is
the
order
in
which
to
display
the
columns
values.
This
property
applies
only
to
columns
that
identify
distinct
values
of
user-created
groups
(i.e.,
break
groups).
The
order
of
column
values
in
a
default
group
is
determined
by
the
ORDER
BY
clause
of
the
query.
For
column
values
in
user-created
groups,
however,
you
must
use
Break
Order
to
specify
how
to
order
the
break
columns
values.
Values:
o Ascending
o Descending
Applies
to:
columns
Required/Optional:
Required,
if
Set
Break
Order
is
set
to
Yes.
Default:
Ascending
Set
break
Order
The
Set
Break
Order
property
is
whether
to
set
the
order
in
which
to
display
the
columns
values,
using
the
Break
Order
property.
Applies
to:
columns
Required/Optional:
optional
Default:
Yes
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Form Personalization
Profile
Options:
Profile
Name
Level
(Value:
Yes
/
No)
Usage
Hide
Diagnostics
Menu
Site/Application/Resp/User
If
this
profile
is
set
to
Yes,
the
Diagnostics
menu
is
hidden
Entry
from
the
user.
Utilities:
Diagnostics
Site/Application/Resp/User
It
determines
whether
a
user
can
automatically
use
the
following
Diagnostics
submenu
items:
Examine,
Trace,
Debug,
Properties,
and
Custom
Code.
How
to
disable
Form
Personalizations?
Navigation:
Help
Diagnostics
Custom
Code
OFF
Form
Personalization
Sequence:
1. Form
Personalization
2. Custom.pll
Components
involved
in
form
personalization:
Rules:
Once
Rules
are
defined,
when
the
target
function
is
run
the
rules
are
automatically
applied
as
even
occur
within
the
form.
Conditions:
It
decides
when
the
rule
should
be
executed
on
below
factors.
o Triggering
Event
(Mandatory)
WHEN-NEW-FORM-INSTANCE
WHEN-NEW-BLOCK-INSTANCE
WHEN-NEW-RECORD-INSTANCE
WHEN-NEW-ITEM-INSTANCE
WHEN-VALIDATE-RECORD
MENU1
to
MENU
15
SPECIAL1
to
SPECIAL45
o Trigger
Object
o Condition
o Processing
Mode
(Mandatory)
Contexts:
Personalization
can
be
applied
in
sequence
Site
Responsibility
User
Actions:
This
is
used
to
perform
below
actions.
a) Property
b) Message
c) Builtin
d) Menu
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Special
Triggers:
Two
types
of
special
triggers
available,
Menu1
Menu
15
Special1
Special45
Special
Triggers
are
sub
classified
as,
1) Tool
Menu
i. Menu1
-
Menu
15
ii. Special1
Special
15
2) Report
Menu
i. Special16
Special30
3) Action
Menu
i. Special31
Special45
Action
Types:
Message
Types
o Show
o Hint
o Error
o Debug
o Warn
Builtin
Types
o Launch
SRS
Form
o Launch
a
Function
o Launch
a
URL
o DO_KEY
o Execute
a
Procedure
o GO_ITEM
o GO_BLOCK
o FORMS_DDL
o RAISE
FORM_TRIGGER_FAILURE
o EXECUTE
TRIGGER
o SYNCHRONIZE
o Call
Custom
Library
o Create
Record
Group
from
query
Menu
Type
o Menu1
Menu15
o Special1
Special45
Property
Types
All
form
object
properties.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Form
Personalization
Tables:
FND_FORM_CUSTOM_RULES
FND_FORM_CUSTOM_SCOPES
FND_FORM_CUSTOM_ACTIONS
FND_FORM_CUSTOM_PARAMS
FND_FORM_CUSTOM_PROP_VALUES
FND_FORM_CUSTOM_PROP_LIST
Steps
involved
in
modifying
Custom.pll
Step 1: Open the form builder and download below libraries files and attach it.
APPCORE.pll
APPCORE2.pll
FNDSQL.pll
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Different
Libraries
Available:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
How
to
migrate
form
personalization
from
one
instance
to
another?
Use
FNDLOAD
(purely
a
DBA
task)
Step1:
Download
for
a
specific
form
(or)
Step
1:
Download
all
personalization
Step
2:
Usin
FTP/SFTP
transfer
the
downloaded
file
Step
3:
Upload
to
the
target
instance
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
How
to
migrate
Oracle
Forms
and
Oracle
Report
definitions
from
version
6i
and/or
9i
to
11G?
For
Oracle
Reports
1. Open
and
then
save
all
6i
and
9i
reports
as
type
RDF.
2. These
should
run
just
fine
in
most
cases
in
11G
without
conversion
(and
you
do
not
have
to
install
the
larger
11g
Application
Server
release
with
Weblogic
Server
on
your
design
platform),
but
if
there
are
issues
running
the
older
RDFs,
then
a
conversion
using
the
rwconverter
utility
will
be
required
on
the
11g
platform
(see
the
Report
Builder
Help
for
the
topic
of
conversion
and
rwconverter).
3. Create
a
reports
directory
on
the
AS
11g
instance
so
that
you
can
utilize
the
sourceDir
option
in
the
report
server's
configuration.
This
causes
Reports
to
only
look
in
that
directory
for
its
definitions.
4. Copy
your
converted
and
migrated
Reports
10.1.2
RDF
definitions
to
your
AS
11g
deployment
box
(make
sure
not
to
corrupt
them
if
using
FTP).
Place
them
in
the
REPORTS_PATH
or
sourceDir
directory
if
used).
5. One
caveat
is
that
6i
Reports
could
use
6i
Graphics
and
there
is
no
migration
path
for
that.
Due
to
the
new
Java
implementation,
6i
Graphics
need
to
be
redesigned
with
the
new
Graphic
Wizard
integrated
into
the
new
Builder.
FND APIs
Why
to
Set
Org
Context?
FND_CLIENT_INFO
Package:
FND_CLIENT_INFO.Set_Org_Context:
Note**
this
package
is
obsolete
in
oracle
R12.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
FND_GLOBAL
Package:
FND_GLOBAL.APPS_INITIALIZE
This
procedure
sets
up
global
variables
and
profile
values
in
a
database
session.
Call
this
procedure
to
initialize
the
global
security
context
for
a
database
session.
You
can
use
it
for
routines
such
as
PL/SQL
or
other
programs
that
are
not
integrated
with
either
the
Oracle
Applications
concurrent
processing
facility
or
Oracle
Forms
(both
of
which
already
do
a
similar
initialization
for
a
database
session).
The
typical
use
for
this
routine
would
be
as
part
of
the
logic
for
launching
a
separate
non
Forms
session
from
an
established
Oracle
Applications
form
session.
You
can
also
use
this
procedure
to
set
up
a
database
session
for
manually
testing
application
code
using
SQL*Plus.
This
routine
should
only
be
used
when
the
session
must
be
established
outside
of
a
normal
form
or
concurrent
program
connection.
FND_GLOBAL.USER_ID
FND_GLOBAL.ORG_ID
FND_GLOBAL.ORG_NAME
FND_GLOBAL.RESP_ID
FND_GLOBAL.RESP_APPLICATION_ID
FND_GLOBAL.RESP_NAME
FND_GLOBAL.SECURITY_GROUP_ID
FND_GLOBAL.USER_NAME
FND_GLOBAL.APPLICATION_NAME
FND_GLOBAL.APPLICATION_SHORT_NAME
FND_GLOBAL.CONC_LOGIN_ID
FND_GLOBAL.CONC_PROGRAM_ID
FND_GLOBAL.CONC_REQUEST_ID
FND_GLOBAL.PER_BUSINESS_GROUP_ID
FND_GLOBAL.PER_SECURITY_PROFILE_ID
FND_GLOBAL.CURRENT_LANGUAGE
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
FND_PROFILE
Package:
It
is
used
to
perform
various
actions
related
to
profile
values
through
PL/SQL.
Some
of
the
important
ones
are
listed
below.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
FND_REQUEST
Package:
FND_REQUEST.SET_OPTIONS
Optionally
call
before
submitting
a
concurrent
request
to
set
request
options.
Returns
TRUE
on
successful
completion,
and
FALSE
otherwise.
FND_REQUEST.SET_REPEAT_OPTIONS
Optionally
call
before
submitting
a
concurrent
request
to
set
repeat
options.
Returns
TRUE
on
successful
completion,
and
FALSE
otherwise.
FND_REQUEST.SET_PRINT_OPTIONS
Some
print
options
that
are
set
at
the
program
level
(i.e.,
using
the
Concurrent
Programs
form)
cannot
be
overridden
using
this
procedure.
See
the
following
argument
descriptions
to
determine
which
print
options
can
be
overridden.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
FND_REQUEST.SUBMIT_REQUEST
Submits
a
concurrent
request
for
processing
by
a
concurrent
manager.
If
the
request
completes
successfully,
this
function
returns
the
concurrent
request
ID;
otherwise,
it
returns
0.
The
FND_REQUEST.SUBMIT_REQUEST
function
returns
the
concurrent
request
ID
upon
successful
completion.
It
is
then
up
to
the
caller
to
issue
a
commit
to
complete
the
request
submission.
Your
code
should
retrieve
and
handle
the
error
message
generated
if
there
is
a
submission
problem
(the
concurrent
request
ID
returned
is
0).
Use
FND_MESSAGE.RETRIEVE
and
FND_MESSAGE.ERROR
to
retrieve
and
display
the
error
(if
the
request
is
submitted
from
the
client
side).
You
must
call
FND_REQUEST.SET_MODE
before
calling
FND_REQUEST.SUBMIT_REQUEST
from
a
database
trigger.
If
FND_REQUEST.SUBMIT_REQUEST
fails
from
anywhere
but
a
database
trigger,
database
changes
are
rolled
back
up
to
the
point
of
the
function
call.
After
a
call
to
the
FND_REQUEST.SUBMIT_REQUEST
function,
all
setup
parameters
are
reset
to
their
default
values.
Note**
FND_REQUEST
must
know
information
about
the
user
and
responsibility
from
which
the
request
is
submitted.
Therefore,
this
function
only
works
from
concurrent
programs
or
forms
within
Oracle
E-Business
Suite.
FND_REQUEST.SET_MODE
Call
this
function
before
calling
FND_REQUEST.SUBMIT_REQUEST
from
a
database
trigger.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
FND_CONCURRENT
Package:
FND-CONCURRENT.GET_REQUEST_STATUS
Returns
the
status
of
a
concurrent
request.
If
the
request
has
already
completed,
also
returns
a
completion
message.
FND-CONCURRENT.GET_REQUEST_STATUS
Waits
for
request
completion,
then
returns
the
request
phase/status
and
completion
message
to
the
caller.
Goes
to
sleep
between
checks
for
request
completion.
FND-CONCURRENT.SET_COMPLETION_STATUS
Call
SET_COMPLETION_STATUS
from
a
concurrent
program
to
set
its
completion
status.
The
function
returns
TRUE
on
success,
otherwise
FALSE.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
MO_GLOBAL
Package:
MO_GLOBAL.INIT
Purpose
of
mo_global.init
:-
It
will
check
if
new
Multi
Org
Security
Profile
is
set,
to
decide
if
new
Security
Profile
method
will
be
used.
If
the
new
MO
security
profile
is
set,
then
mo_global.init
inserts
one
record,
for
each
Organization
in
Org
Hierarchy,
in
table
mo_glob_org_access_tmp
When
&
from
where
is
mo_global.init
called
?
This
package
procedure
will
be
called
as
soon
as
you
login
or
as
soon
as
you
switch
responsibility.
Just
like
FND_GLOBAL.INITIALIZE
is
called.
It
is
safe
to
assume
that
Oracle
will
invoke
MO_GLOBAL.INIT
after
FND_GLOBAL.INITIALIZE.
From
SQL*Plus,
you
can
simulate
login
to
a
specific
responsibility
by
calling
a.Call
FND_GLOBAL.INITIALIZE
This
will
set
your
responsibility
id,
user_id
etc
b.
call
MO_GLOBAL.INIT
This
will
read
the
MO
profile
option
values
for
your
responsibility/user,
and
will
initialize
the
Multi
Org
Access.
MO_GLOBAL.SET_POLICY_CONTEXT
MO_GLOBAL.ORG_SECUTIRY
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
MOAC
for
table
access
In
11i
_ALL
Tables
where
non
Org
specific
and
Org
specific
views
were
created
on
these
tables.
But
in
R12
its
different
concept
For
the
table
AP_INVOICES_ALL
a
synonym
AP_INVOICES_ALL
is
created
in
APPS.
Also
another
synonym
AP_INVOICES
is
created
which
refers
to
AP_INOICES_ALL.
A
Row
Level
security
is
applied
to
AP_INVOICES,
using
package
function
MO_GLOBAL.ORG_SECURITY.
This
can
be
double-checked
by
running
SQL
select
*
from
all_policies
where
object_name=AP_INVOICES
The
effect
of
this
policy
is
that,whenever
you
access
AP_INVOICES,
Oracle
RLS
will
dynamically
append
WHERE
CLAUSE
similar
to
below
SELECT
*
FROM
AP_INVOICES
WHERE
EXISTS
(SELECT
1
FROM
mo_glob_org_access_tmp
oa
WHERE
oa.organization_id
=
org_id)
Some
of
the
other
Functions:
MO_GLOBAL.GET_OU_NAME:
This
function
returns
the
legal
entity
name
for
the
org_id
parameter
passed,
if
it
exists
in
the
PL/SQL
array
populated
by
set_org_access
Multi-Org
API.
FUNCTION
get_ou_name(p_org_id
NUMBER)
MO_GLOBAL.GET_LE_NAME:
This
function
returns
the
legal
entity
id
for
the
org_id
parameter
passed,if
it
exists
in
the
PL/SQL
array
populated
by
set_org_access
Multi-Org
API.
FUNCTION
get_le_name(p_org_id
NUMBER)
MO_GLOBAL.GET_LE_NAME
FUNCTION
get_le_id(p_org_id
NUMBER)
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
MO_GLOBAL.GET_CURRENT_ORG_ID
This
function
returns
the
access
mode
stored
in
the
application
context.
FUNCTION
get_current_org_id
RETURN
NUMBER;
MO_GLOBAL.IS_MULTI_ORG_ENABLED
Called
by
oracle
server
during
parsing
sql
statment.
Used
by
Multi-Org
synonyms.
FUNCTION
is_multi_org_enabled
RETURN
VARCHAR2;
MO_GLOBAL.IS_CLIENT_INFO_POLICY
Return
Y
if
shared
seed
data
(-3114)
exists.
Return
N
if
shared
seed
data
is
eliminated.
FUNCTION
set_client_info_policy(
obj_schema
VARCHAR2
,
obj_name
VARCHAR2
)
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
WF_ROUTING_RULES The routing rules defined by user like forward, re-assign, reject etc.
Types
of
Workflow
Process:
Synchronous
A
synchronous
process
is
a
process
that
can
be
executed
without
interruption
from
start
to
finish.
The
Workflow
Engine
executes
a
process
synchronously
when
the
process
includes
activities
that
can
be
completed
immediately,
such
as
function
activities
that
are
not
deferred
to
the
background
engine.
The
Workflow
Engine
does
not
return
control
to
the
calling
application
that
initiated
the
workflow
until
it
completes
the
process.
With
a
synchronous
process,
you
can
immediately
check
for
process
results
that
were
written
to
item
attributes
or
directly
to
the
database.
However,
the
user
must
wait
for
the
process
to
complete.
Asynchronous
An
asynchronous
process
is
a
process
that
the
Workflow
Engine
cannot
complete
immediately
because
it
contains
activities
that
interrupt
the
flow.
Examples
of
activities
that
force
an
asynchronous
process
include
deferred
activities,
notifications
with
responses,
blocking
activities,
and
wait
activities.
Rather
than
waiting
indefinitely
when
it
encounters
one
of
these
activities,
the
Workflow
Engine
sets
the
audit
tables
appropriately
and
returns
control
to
the
calling
application.
The
workflow
process
is
left
in
an
unfinished
state
until
it
is
started
again.
The
process
can
be
restarted
by
the
Notification
System,
such
as
when
a
user
responds
to
a
notification;
by
the
background
engine,
such
as
when
a
deferred
activity
is
executed;
or
by
the
Business
Event
System,
such
as
when
an
event
message
is
de-queued
from
an
inbound
queue
and
sent
to
the
workflow
process.
With
an
asynchronous
process,
the
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
user
does
not
have
to
wait
for
the
process
to
complete
to
continue
using
the
application.
However,
the
results
of
the
process
are
not
available
until
the
process
is
completed
at
a
later
time.
Forced
Synchronous
A
forced
synchronous
process
completes
in
a
single
SQL
session
from
start
to
finish
and
never
inserts
into
or
updates
any
database
tables.
As
a
result,
the
execution
speed
of
a
forced
synchronous
process
is
significantly
faster
than
a
typical
synchronous
process.
The
process
results
are
available
immediately
upon
completion.
However,
no
audit
trail
is
recorded.
Activity
Cost:
Each
function
activity
and
event
activity
has
a
cost
associated
with
it.
The
cost
is
a
value
representing
the
number
of
seconds
it
takes
for
the
Workflow
Engine
to
execute
the
activity.
If
you
do
not
know
how
long
it
takes
for
the
Workflow
Engine
to
perform
the
activity,
you
can
enter
an
estimated
cost
and
update
it
later
as
you
accumulate
more
information
about
its
performance.
Generally,
you
should
assign
complex,
long
running
activities
a
high
cost.
The
valid
range
for
cost
is
0
to
1,000,000.
Note**
although
the
cost
is
entered
and
displayed
in
seconds
in
Oracle
Workflow
Builder,
it
is
actually
converted
and
stored
in
the
database
as
hundredths
of
a
second.
In
normal
processing,
the
Workflow
Engine
completes
the
execution
of
a
single
activity
before
continuing
to
a
subsequent
activity.
In
some
cases,
an
activity
might
take
so
long
to
process
that
background
processing
would
be
more
appropriate.
The
default
threshold
for
the
Workflow
Engine
is
50
hundredths
of
a
second.
Activities
with
a
cost
higher
than
this
are
deferred
to
background
engines.
Deferred
Processing:
The
engine
has
a
deferred
processing
feature
that
allows
long-running
tasks
to
be
handled
by
background
engines
instead
of
in
real
time.
Deferring
the
execution
of
activity
functions
to
background
engines
allows
the
Workflow
Engine
to
move
forward
to
process
other
activities
that
are
currently
active.
The
engine
can
be
set
up
to
operate
anywhere
on
a
continuum
between
processing
all
eligible
work
immediately,
to
processing
nothing
and
marking
all
transitions
as
deferred.
Each
activity
has
a
user-defined
processing
cost.
You
can
set
this
cost
to
be
small
if
the
activity
merely
sets
an
item
attribute,
or
you
may
set
it
to
be
very
high
if
the
activity
performs
a
resource-intensive
operation.
If
the
result
of
a
completed
activity
triggers
the
execution
of
a
costly
function,
you
might
want
to
defer
the
execution
of
that
costly
function
to
a
background
engine.
The
Workflow
Engine
integrates
with
Oracle
Advanced
Queues
to
carry
out
deferred
processing.
If
a
function
activity
has
a
cost
that
exceeds
the
main
threshold
cost,
the
Workflow
Engine
marks
that
activity
with
a
status
of
'DEFERRED'
in
the
workflow
status
tables
and
en-queues
the
deferred
activity
to
a
special
queue
for
deferred
activities.
A
special
queue
processor
called
the
background
engine
checks
and
processes
the
activities
in
the
'deferred'
queue.
The
order
in
which
the
deferred
activities
are
processed
are
based
on
the
first
in,
first
out
ordering
of
an
activity's
en-queue
time.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Deferred
Activity:
When
an
activity
is
deferred,
the
main
Workflow
Engine
can
then
continue
to
the
next
available
activity,
which
may
occur
on
some
other
parallel
branch
of
the
process.
If
no
other
activity
is
available
to
be
executed,
the
Workflow
Engine
returns
control
immediately
to
the
calling
application.
The
user
remains
unaware
that
processing
is
still
taking
place,
rendering
a
faster
execution
time.
To
defer
an
activity,
Activity
Cost
>
Threshold
Cost
The
threshold
cost
is
a
PL/SQL
package
variable
with
a
default
value
of
50
hundredths
of
a
second.
Set
a
cost
above
this
threshold
for
all
activities
that
you
don't
want
the
user
to
wait
for.
At
runtime,
the
Workflow
Engine
defers
any
thread
to
the
background
as
soon
as
it
encounters
an
activity
with
a
cost
higher
than
the
threshold.
Then
the
background
engine
later
identifies
the
process
as
deferred
and
continues
its
execution.
Workflow
Access
Protection:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Access
protection
is
a
feature
that
prevents
workflow
seed
data
created
by
a
'seed
data
provider'
from
being
modified
by
a
'seed
data
consumer'.
'seed
data
provider'
-->
any
organization
that
creates
'seed
data'
for
other
organizations
('seed
data
consumers')
to
use
in
defining
and
customizing
a
workflow
process.
Workflow
objects
definitions
that
can
be
customized.
Workflow
object
definitions
protected
against
customization.
Scenario:
There
are
2
teams
in
my
organization
Global
Team
&
Regional
Team.
Global
Team
does
development
across
all
regions
where
as
regional
team
does
development
within
their
own
region
and
not
shared
by
other.
Consider
my
organization
Global
team
using
oracle
std.
item
type
in
my
workflow
in
a
custom
workflow
process.
Now
my
organization
wants
to
enable
below
protections,
Identify
certain
workflow
objects
in
its
custom
workflow
definition
as
corporate
standards
that
the
regional
teams
should
adhere
to
and
not
modify.
Designate
certain
objects
in
its
deployed
process
as
customizable
for
the
regional
offices
to
alter
to
their
offices'
needs.
How
this
can
be
achieved?
By
using
Access
Protection
Feature
in
Oracle
Workflow.
Access
Protection
Features:
1. Access
Level
2. Customization
Level
3. Protection
Level
The
combination
of
protection,
customization,
and
access
levels
make
up
the
access
protection
feature
and
determines
whether
a
user
can
modify
a
given
workflow
object.
The
level,
in
all
three
cases,
is
a
numeric
value
ranging
from
0
to
1000
that
indicates
the
relationship
between
different
organizations
as
providers
and
consumers
of
seed
data.
The
following
ranges
of
levels
are
presumed
by
Oracle
Workflow:
0-9
Oracle
Workflow
10-19
Oracle
Application
Object
Library
20-99
Oracle
Applications
development
100-999
Customer
organization.
You
can
determine
how
you
want
this
range
to
be
interpreted.
For
example,
100
can
represent
headquarters,
while
101
can
represent
a
regional
office,
and
so
on.
1000
Public
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Access
Level:
A
"user
of
Oracle
Workflow"
in
this
case,
represents
someone
who
is
operating
Oracle
Workflow
Builder,
or
the
Workflow
Definitions
Loader
program,
which
loads
workflow
process
definitions
from
a
file
into
a
database.
As
a
seed
data
provider,
you
should
always
operate
Oracle
Workflow
Builder
at
the
same
consistent
access
level
because
the
level
you
work
at
affects
the
protection
level
of
the
seed
data
you
create.
In Oracle Workflow Builder, select About Workflow from the Help menu.
If
you
are
going
to
run
the
Workflow
Definitions
Loader
program
to
download
workflow
process
definitions
from
the
database
to
a
file,
check
the
value
for
the
environment
variable
WF_ACCESS_LEVEL
on
your
workflow
server.
Protection
Level:
Whenever
you
create
a
workflow
object
in
Oracle
Workflow
Builder,
you
have
the
option
of
protecting
the
object
at
a
certain
level.
An
object's
protection
level
helps
control
whether
other
users
can
modify
the
object
based
on
their
access
levels,
by
allowing
only
users
with
an
access
level
equal
to
or
lower
than
the
object's
protection
level
to
modify
the
object.
The
protection
level
that
you
set
for
an
object
is
dependent
on
the
setting
of
the
Lock
at
this
Access
Level
check
box
and
on
your
current
access
level.
If
you
check
the
Lock
at
this
Access
Level
check
box,
the
protection
level
for
the
object
is
set
to
your
current
access
level.
Users
with
an
access
level
higher
than
your
current
access
level
will
not
be
able
to
modify
the
object.
These
users
will
see
a
small
lock
on
the
workflow
object's
icon,
indicating
that
the
object
can
be
used
but
not
modified.
For
users
with
an
access
level
equal
to
or
lower
than
your
current
access
level,
the
customization
level
for
the
object
will
determine
whether
they
can
modify
the
object.
If
you
do
not
check
the
Lock
at
this
Access
Level
check
box,
the
protection
level
for
the
object
is
set
to
1000.
In
this
case
all
users
who
are
not
restricted
by
the
customization
level
can
modify
the
object.
Customization
Level:
Every
workflow
object,
in
addition
to
having
a
protection
level,
also
records
a
customization
level
when
you
modify
the
object
and
save
it
to
a
database
or
file.
An
object's
customization
level
helps
control
whether
other
users
can
modify
the
object
based
on
their
access
levels,
by
allowing
only
users
with
an
access
level
equal
to
or
higher
than
the
object's
customization
level
to
modify
the
object.
Setting
the
customization
level
ensures
that
a
customizable
object
that
has
been
customized
never
gets
overwritten
during
a
seed
data
upgrade,
because
the
upgrade
always
occurs
with
the
Workflow
Definitions
Loader
operating
at
an
access
level
below
the
customized
object's
customization
level.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Workflow
Definition
Loader
(WFLOAD):
We
use
the
Workflow
Definitions
Loader
to
save
or
load
process
definitions
from
a
database
or
flat
file.
We
can
also
define
as
it
is
a
utility
that
moves
workflow
data
between
a
file
and
a
database
and
it
is
also
used
to
upgrade,
upload
and
download
the
workflow
data.
Usage:
Normally
when
we
upgrade
our
database,
we
use
the
Workflow
Definitions
Loader
to
preserve
and
back
up
our
process
definitions
to
a
flat
file.
When
the
database
upgrade
is
completed,
we
use
the
Loader
program
again
to
upload
the
definitions
back
into
your
database.
We
can
also
use
the
Loader
program
to
upgrade
our
database
with
a
newer
version
of
a
process
definition
or
to
transfer
process
definitions
to
other
databases.
Modes:
The
Workflow
Definitions
Loader
automatically
validates
the
process
definition
to
ensure
that
it
conforms
to
specific
process
design
rules.
There
are
four
modes
available
with
WFLOAD.These
are
as
follows:
For
Example,
WFLOAD
apps/apps
0
Y
DOWNLOAD
poxwfrqa.wft
POAPWF
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Workflow
APIs:
Below
are
some
important
APIs
frequently
used
in
workflow
development
/
customizations.
WF_ENGINE
APIs
WF_ENGINE. CreateProcess
CreateProcess
(itemtype
in
varchar2,itemkey
in
varchar2,process
in
varchar2
default
);
Creates
a
new
runtime
process
for
an
application
item.
For
example,
a
Requisition
item
type
may
havea
Requisition
Approval
Process
as
a
top
level
process.
When
a
particular
requisition
is
created,
an
application
calls
CreateProcess
to
set
up
the
information
needed
to
start
the
defined
process.
WF_ENGINE. SetItemUserKey
SetItemUserKey
(itemtype
in
varchar2,itemkey
in
varchar2,
userkey
in
varchar2);
Lets
you
set
a
userfriendly
identifier
for
an
item
in
a
process,
which
is
initially
identified
by
an
item
type
and
item
key.
The
user
key
is
intended
to
be
a
user
friendly
identifier
to
locate
items
in
the
Workflow
Monitor
and
other
user
interface
components
of
Oracle
Workflow.
WF_ENGINE. GetItemUserKey
GetItemUserKey
(itemtype
in
varchar2,itemkey
in
varchar2)
return
varchar2;
Returns
the
userfriendly
key
assigned
to
an
item
in
a
process,
identified
by
an
item
type
and
item
key.
The
user
key
is
a
userfriendly
identifier
to
locate
items
in
the
Workflow
Monitor
and
other
user
interface
components
of
Oracle
Workflow.
WF_ENGINE. SetItemOwner
SetItemOwner
(itemtype
in
varchar2,itemkey
in
varchar2,owner
in
varchar2);
A
procedure
to
set
the
owner
of
existing
items.
The
owner
must
be
a
valid
role.
Typically,
the
role
that
initiates
a
transaction
is
assigned
as
the
process
owner,
so
that
any
participant
in
that
role
can
find
and
view
the
status
of
that
process
instance
in
the
Workflow
Monitor.
WF_ENGINE. StartProcess
StartProcess
(itemtype
in
varchar2,itemkey
in
varchar2);
Begins
execution
of
the
specified
process.
The
engine
locates
the
activity
marked
as
START
and
then
executes
it.
CreateProcess(
)
must
first
be
called
to
define
the
itemtype
and
itemkey
before
calling
StartProcess(
).
WF_ENGINE. LaunchProcess
LaunchProcess
(itemtype
in
varchar2,itemkey
in
varchar2,process
in
varchar2
default'',userkey
in
varchar2
default
'',owner
in
varchar2
default
'');
Launches
a
specified
process
by
creating
the
new
runtime
process
and
beginning
its
execution.
This
is
a
wrapper
that
combines
CreateProcess
and
StartProcess.
WF_ENGINE. SuspendProcess
SuspendProcess
(itemtype
in
varchar2,itemkey
in
varchar2,process
in
varchar2
default
'');
Suspends
process
execution
so
that
no
new
transitions
occur.
Outstanding
notifications
can
complete
by
calling
CompleteActivity(
),
but
the
workflow
does
not
transition
to
the
next
activity.
Restart
suspended
processes
by
calling
ResumeProcess(
).
ResumeProcess(itemtype
in
varchar2,itemkey
in
varchar2,process
in
varchar2
default
'');
Returns
a
suspended
process
to
normal
execution
status.
Any
activities
that
were
transitioned
to
while
the
process
was
suspended
are
now
executed.
WF_ENGINE. AbortProcess
AbortProcess
(itemtype
in
varchar2,itemkey
in
varchar2,process
in
varchar2
default
'',result
in
varchar2
default
eng_force);
Aborts
process
execution
and
cancels
outstanding
notifications.
The
process
status
is
considered
COMPLETE,
with
a
result
specified
by
the
result
argument.
Also,
any
outstanding
notifications
or
subprocesses
are
set
to
a
status
of
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
COMPLETE
with
a
result
of
force,
regardless
of
the
result
argument.
WF_ENGINE. AddItemAttr
AddItemAttr
(itemtype
in
varchar2,itemkey
in
varchar2,aname
in
varchar2);
Adds
an
empty
item
type
attribute
variable
to
the
process.
Although
most
item
type
attributes
are
defined
at
design
time,
developers
can
create
new
attributes
at
runtime
for
a
specific
process.
WF_ENGINE. SetItemAttrText
SetItemAttrText(itemtype
in
varchar2,itemkey
in
varchar2,aname
in
varchar2,avalue
in
varchar2);
WF_ENGINE. SetItemAttrNumber
SetItemAttrNumber(itemtype
in
varchar2,itemkey
in
varchar2,aname
in
varchar2,avalue
in
number);
WF_ENGINE. SetItemAttrDate
SetItemAttrDate
(itemtype
in
varchar2,itemkey
in
varchar2,aname
in
varchar2,avalue
in
date);
WF_ENGINE. GetItemAttrText
GetItemAttrText(itemtype
in
varchar2,itemkey
in
varchar2,aname
in
varchar2)
return
varchar2;
WF_ENGINE. GetItemAttrNumber
GetItemAttrNumber(itemtype
in
varchar2,itemkey
in
varchar2,aname
in
varchar2)
return
number;
WF_ENGINE. GetItemAttrDate
GetItemAttrDate(itemtype
in
varchar2,itemkey
in
varchar2,aname
in
varchar2)
return
date;
WF_ENGINE. BeginActivity
BeginActivity
(itemtype
in
varchar2,itemkey
in
varchar2,activity
in
varchar2);
Determines
if
the
specified
activity
can
currently
be
performed
on
the
process
item
and
raises
an
exception
if
it
cannot.
The
CompleteActivity()
procedure
automatically
performs
this
function
as
part
of
its
validation.
However,
you
can
use
BeginActivity
to
verify
that
the
activity
you
intend
to
perform
is
currently
allowed
before
actually
calling
it.
WF_ENGINE. CompleteActivity
CompleteActivity(itemtype
in
varchar2,itemkey
in
varchar2,activity
in
varchar2,result_code
in
varchar2);
Notifies
the
workflow
engine
that
the
specified
activity
has
been
completed
for
a
particular
item.
WF_ENGINE. ItemStatus
ItemStatus(itemtype
in
varchar2,itemkey
in
varchar2,status
out
varchar2,result
out
varchar2);
Returns
the
status
and
result
for
the
root
process
of
the
specified
item
instance.
Possible
values
returned
for
the
status
are:
ACTIVE,
COMPLETE,
ERROR,
or
SUSPENDED.
If
the
root
process
does
not
exist,
then
the
item
key
does
not
exist
and
will
thus
cause
the
procedure
to
raise
an
exception.
Workflow
core
APIs:
PL/SQL
procedures
called
by
function
activities
can
use
a
set
of
core
Oracle
Workflow
APIs
to
raise
and
catch
errors.
When
a
PL/SQL
procedure
called
by
a
function
activity
either
raises
an
unhandled
exception,
or
returns
a
result
beginning
with
'ERROR:',
the
Workflow
Engine
sets
the
function
activity's
status
to
ERROR
and
sets
the
columns
ERROR_NAME,
ERROR_MESSAGE,
and
ERROR_STACK
in
the
table
WF_ITEM_ACTIVITY_STATUSES
to
reflect
the
error.
WF_CORE.
CLEAR
CLEAR
Clears
the
error
buffers.
WF_CORE.
GET_ERROR
GET_ERROR(err_name
out
varchar2,err_message
out
varchar2
err_stack
out
varchar2);
Returns
the
name
of
a
current
error
message
and
the
token
substituted
error
message.
Also
clears
the
error
stack.
Returns
null
if
there
is
no
current
error.
WF_CORE.
RAISE
RAISE
(name
in
varchar2);
Raises
an
exception
to
the
caller
by
supplying
a
correct
error
number
and
token
substituted
message
for
the
name
of
the
error
message
provided.
Workflow
Directory
Service
APIs:
WF_DIRECTORY.
GetRoleUsers
GetRoleUsers(role
in
varchar2,users
out
UserTable);
Returns
a
table
of
users
for
a
given
role.
WF_DIRECTORY.
GetUserRoles
GetUserRoles(user
in
varchar2,roles
out
RoleTable);
Returns
a
table
of
roles
that
a
given
user
is
assigned
to.
WF_DIRECTORY.
GetRoleInfo
GetRoleInfo(Role
in
varchar2,Display_Name
out
varchar2,Email_Address
out
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
varchar2,Notification_Preference
out
varchar2,Language
out
varchar2,Territory
out
varchar2);
Returns
the
following
information
about
a
role:
Display
name
Email
address
Notification
Preference
('QUERY',
'MAILTEXT',
'MAILHTML','MAILATTH',
'SUMMARY')
Language
Territory
WF_DIRECTORY.
IsPerformer
IsPerformer
(user
in
varchar2,role
in
varchar2);
Returns
true
or
false
to
identify
whether
a
user
is
a
performer
of
a
role.
WF_DIRECTORY.
GetRoleName
GetRoleName
(p_orig_system
in
varchar2,p_orig_system_id
in
varchar2,p_name
out
varchar2,p_display_name
out
varchar2);
Returns
a
Workflow
display
name
and
role
name
for
a
role
given
the
system
information
from
the
original
user
and
roles
repository.
WF_DIRECTORY.
SetAdHocUserStatus
(user_name
in
varchar2,status
in
varchar2
default
SetAdHocUserStatus
'ACTIVE');
Sets
the
status
of
an
ad
hoc
user
as
'ACTIVE'
or
'INACTIVE'.
WF_DIRECTORY.
SetAdHocRoleStatus
(role_name
in
varchar2,status
in
varchar2
default
SetAdHocRoleStatus
'ACTIVE');
Sets
the
status
of
an
ad
hoc
role
as
'ACTIVE'
or
'INACTIVE'.
WF_DIRECTORY.
CreateAdHocUser
CreateAdHocUser
(name
in
out
varchar2,display_name
in
out
varchar2,
language
in
varchar2
default
null,
territory
in
varchar2
default
null,
description
in
varchar2
default
null,
notification_preference
in
varchar2
default
'MAILHTML',
email_address
in
varchar2
default
null,
fax
in
varchar2
default
null,
status
in
varchar2
default
'ACTIVE',
expiration_date
in
date
default
sysdate);
Creates
a
user
at
runtime
by
creating
a
value
in
the
WF_LOCAL_USERS
table.
This
is
referred
to
as
an
ad
hoc
user.
WF_DIRECTORY.
CreateAdHocRole
CreateAdHocRole
(role_name
in
out
varchar2,
role_display_name
in
out
varchar2,
language
in
varchar2
default
null,
territory
in
varchar2
default
null,
role_description
in
varchar2
default
null,
notification_preference
in
varchar2
default'MAILHTML',
role_users
in
varchar2
default
null,
email_address
in
varchar2
default
null,
fax
in
varchar2
default
null,
status
in
varchar2
default
'ACTIVE',expiration_date
in
date
default
sysdate);
Creates
a
role
at
runtime
by
creating
a
value
in
the
WF_LOCAL_ROLES
table.
This
is
referred
to
as
an
ad
hoc
role.
WF_DIRECTORY.
AddUsersToAdHocRole
(role_name
in
varchar2,role_users
in
varchar2);
AddUsersToAdHocRole
Adds
users
to
a
existing
ad
hoc
role.
WF_DIRECTORY.
RemoveUsersFromAdHocRole
(role_name
in
varchar2,role_users
in
varchar2
RemoveUsersFromAdHocRole
default
null);
Removes
users
from
an
existing
ad
hoc
role.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Advance PL/SQL
Ref
Cursor:
A
ref
cursor
is
a
variable,
defined
as
a
cursor
type,
which
points
to,
or
references
a
cursor
result.
Ref
cursor
is
a
Data
type.
A
variable
created
using
this
data
type
is
usually
called
as
a
Cursor
Variable.
A
cursor
variable
can
be
associated
with
different
queries
at
run-time.
Features
of
REF
Cursor:
There
can
be
a
TYPE
of
ref
cursor.
The
variable
of
this
TYPE
can
be
used
to
pass
the
parameters
to
a
program
and
return
value
from
the
cursor.
The
variable
of
REF
CURSOR
type
returns
the
same
data
type
as
the
cursor
variable.
The
cursor
variable
is
passed
as
a
parameter
to
a
procedure.
The
cursor
variable
takes
all
the
rows
from
the
specified
table.
These
rows
are
given
to
the
bind
variable.
So
the
parameter
passed
should
satisfy
two
conditions
--
o The
parameter
should
be
taken
from
the
TYPE
of
Ref
Cursor.
o It
should
be
of
IN
OUT
mode.
Finally
the
data
retrieved
by
the
cursor
variable
can
be
seen
through
the
bind
variable.
For
this
the
data
type
of
the
bind
variable
should
be
REFCURSOR.
While
executing
the
procedure
bind
variable
should
be
directly
given.
And
then
by
print
statement
the
data
is
displayed.
The
cursor
variable's
data
structure
and
the
procedure
block's
data
structure
should
be
same.
Usage
Restrictions:
Comparison
operators
cannot
be
used
to
test
cursor
variables
for
equality,
inequality,
null,
or
not
null.
Null
cannot
be
assigned
to
a
cursor
variable.
The
value
of
a
cursor
variable
cannot
be
stored
in
a
database
column.
Static
cursors
and
cursor
variables
are
not
interchangeable.
For
example,
a
static
cursor
cannot
be
used
in
an
OPEN
FOR
statement.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Std.
Cursor
Vs.
REF
Cursor:
Std.
Cursor
REF
Cursor
It
is
static
in
definition.
It
may
be
dynamically
opened
or
opened
based
on
logic.
It
cant
be
returned
to
a
client.
It
can
be
returned
to
a
client.
A
normal
cursor
can
be
global.
A
ref
cursor
cannot.
(you
cannot
define
them
OUTSIDE
of
a
procedure
/
function)
A
normal
cursor
cant
be
passed
from
subroutine
to
A
ref
cursor
can
be
passed
from
subroutine
to
subroutine.
subroutine.
Better
Performance
than
REF
Cursor
Not
as
good
as
Std.
Cursor
but
need
to
use
in
appropriate
situation.
REF
Cursor
Syntax:
Method1:
Example:
TYPE
rc1
IS
REF
CURSOR;
Obj_rc1
rc1;
Method2:
Obj_rc1
SYS_REFCURSOR;
DECLARE
TYPE
r_cursor
IS
REF
CURSOR;
c_employee
r_cursor;
er
employee%ROWTYPE;
BEGIN
OPEN
c_employee
FOR
select
*
from
employee;
LOOP
FETCH
c_employee
INTO
er;
exit
when
c_employee%NOTFOUND;
dbms_output.put_line(er.ename
||
'
-
'
||
er.position);
END
LOOP;
CLOSE
c_employee;
END;
Ref
Cursor
with
Record
Type:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
DECLARE
TYPE
r_cursor
IS
REF
CURSOR;
c_employee
r_cursor;
TYPE
rec_emp
IS
RECORD
(
name
VARCHAR2(40),
position
VARCHAR2(40)
);
er
rec_emp;
BEGIN
---
---
End;
PLSQL
Collections:
A
collection
is
an
ordered
group
of
elements
of
the
same
type.
Each
element
from
the
group
can
be
accessed
using
a
unique
subscript.
The
element
types
of
a
collection
can
be
either
built-in
datatypes,
user-defined
types
or
references
(REFs)
to
object
types.
VARRAY:
Varrays
are
ordered
groups
of
items
of
type
VARRAY.
Varrays
can
be
used
to
associate
a
single
identifier
with
an
entire
collection.
The
maximum
size
of
a
varray
needs
to
be
specified
in
its
type
definition.
The
range
of
values
for
the
index
of
a
varray
is
from
1
to
the
maximum
specified
in
its
type
definition.
If
no
elements
are
in
the
array,
then
the
array
is
atomically
null.
The
main
use
of
a
varray
is
to
group
small
or
uniform-sized
collections
of
objects.
Elements
of
a
varray
cannot
be
accessed
individually
through
SQL,
although
they
can
be
accessed
in
PL/SQL.
The
type
of
the
element
of
a
VARRAY
can
be
any
PL/SQL
type
except
the
following:
o BOOLEAN
o TABLE
o VARRAY
o object
types
with
TABLE
or
VARRAY
attributes
o REF
CURSOR
o NCHAR
o NCLOB
o NVARCHAR2
When
a
varray
is
declared,
a
constructor
with
the
same
name
as
the
varray
is
implicitly
defined.
The
constructor
creates
a
varray
from
the
elements
passed
to
it.
You
can
use
a
constructor
wherever
you
can
use
a
function
call,
including
the
SELECT,
VALUES,
and
SET
clauses.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
A
varray
can
be
assigned
to
another
varray,
provided
the
datatypes
are
the
exact
same
type.
Syntax:
TYPE
<type_name>
IS
VARRAY
(10)
OF
NUMBER;
Steps
in
defining
VARRAY:
1. Declare
2. Initialize
using
constructor
3. Allocate
place
to
store
4. Assign
Value
Example:
When
VARRAY
Fails?
VARRAY
is
bounded
i.e.
when
defining
VARRAY
we
define
the
SIZE.
Consider
above
example
we
have
defined
size
as
10,
when
the
SQL
query
pulls
records
more
than
10,
VARRAY
fails.
Any
way
to
increase
size
of
array
dynamically?
Yes,
using
NESTED
TABLE.
Nested
Table
is
Unbounded.
Nested
Table:
An
ordered
group
of
items
of
type
TABLE
are
called
nested
tables.
Nested
tables
can
contain
multiple
columns
and
can
be
used
as
variables,
parameters,
results,
attributes,
and
columns.
They
can
be
thought
of
as
one
column
database
tables.
Rows
of
a
nested
table
are
not
stored
in
any
particular
order.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
The
size
of
a
nested
table
can
increase
dynamically,
i.e.,
nested
tables
are
unbounded.
Elements
in
a
nested
table
initially
have
consecutive
subscripts,
but
as
elements
are
deleted,
they
can
have
non-consecutive
subscripts.
Nested
tables
can
be
fully
manipulated
using
SQL,
Pro*C,
OCI,
and
PL/SQL.
The
range
of
values
for
nested
table
subscripts
is
1..2147483647.
To
extend
a
nested
table,
the
built-in
procedure
EXTEND
must
be
used.
To
delete
elements,
the
built-in
procedure
DELETE
must
be
used.
An
uninitialized
nested
table
is
atomically
null,
so
the
IS
NULL
comparison
operator
can
be
used
to
see
if
a
nested
table
is
null.
Oracle
provides
new
operators
such
as
CAST,
THE,
and
MULTISET
for
manipulating
nested
tables.
Syntax:
TYPE
<type_name>
IS
TABLE
OF
NUMBER;
Steps
in
defining
VARRAY:
Same
as
VARRAY.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
VARRAY
NESTED
TABLE
varrays
have
a
maximum
size
i.e.
bounded
Nested
tables
are
unbounded
But
not
from
a
varray.
Whereas
varrays
are
always
dense.
Individual
elements
can
be
deleted
from
a
nested
table.
The
nested
tables
can
be
sparse
Varrays
are
stored
by
Oracle
in-line
(in
the
same
Nested
table
data
is
stored
out-of-line
in
a
store
table
tablespace)
which
is
a
system-generated
database
table
associated
with
the
nested
table.
When
stored
in
the
database,
varrays
retain
their
ordering
When
stored
in
the
database,
nested
tables
do
not
retain
and
subscripts.
their
ordering
and
subscripts,
varrays
do
not
indexes
Nested
tables
support
indexes
Associative
Arrays
(or)
Index
by
Table
(or)
PLSQL
Table:
What
VARRAY
and
NESTED
TABLE
cannot
do?
Associating
a
Key
value
with
array.
Syntax:
TYPE
<type_name>
IS
TABLE
OF
NUMBER
INDEX
BY
PLS_INTEGER;
TYPE
<type_name>
IS
TABLE
OF
NUMBER
INDEX
BY
VARCHAR2
(20);
TYPE
<type_name>
IS
TABLE
OF
VARCHAR2
(20)
INDEX
BY
PLS_INTEGER;
Note**
The
Key
is
always
UNIQUE
&
NOT
NULL.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Manipulating
Collections:
This
is
done
by
built-in
functions
and
procedures
called
Collection
Methods.
COUNT
Counts
no.
of
elements
with
values
Example:
V2.COUNT;
LIMIT
Current
Max.
Size
of
Array
Example:
V2.LIMIT
FIRST
Return
1st
element
value.
Example:
V2.FIRST
LAST
Returns
last
element
value.
Example:
V2.LAST
PRIOR
Returns
prior
value
of
current
element
Example:
V2.PRIOR(3)
EXTEND
Extend
the
size
of
the
array.
Example:
V2.EXTEND(5)
TRIM
Decrease
the
size
of
the
array
Example:
V2.EXTEND(5)
DELETE
Deletes
the
value
of
specific
element.
Does
not
apply
to
VARRAY.
EXISTS
(n)
Checks
any
key
available,
if
YES
returns
TRUE
NO
returns
FALSE
NEXT
Returns
next
key
value
Bulk
Binding:
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
What
is
Bulk
Binding?
The
assignment
of
values
to
PL/SQL
variables
in
SQL
statements
is
called
binding.
The
binding
of
an
entire
collection
at
once
is
referred
to
as
bulk
binding.
What
is
the
Advantage?
Bulk
binds
improve
performance
by
minimizing
the
number
of
context
switches
between
PL/SQL
and
SQL
engines
while
they
pass
an
entire
collection
of
elements
(varray,
nested
tables,
index-by
table,
or
host
array)
as
bind
variables
back
and
forth.
Prior
to
Oracle8i,
the
execution
of
every
SQL
statement
required
a
switch
between
the
PL/SQL
and
SQL
engines,
whereas
bulk
binds
use
only
one
context
switch.
How
to
Bulk
Bind?
Bulk
binding
includes
the
following:
1. Input
collections,
use
the
FORALL
statement
2. Output
collections,
use
BULK
COLLECT
clause
Input
Collections:
Input
collections
are
data
passed
from
the
PL/SQL
engine
to
the
SQL
engine
to
execute
INSERT,
UPDATE,
and
DELETE
statements.
FORALL
index
IN
lower_bound..upper_bound
sql_statement;
Note:
If
a
FORALL
statement
fails,
then
database
changes
are
rolled
back
to
an
implicit
savepoint
marked
before
each
execution
of
the
SQL
statement.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Output
Collections:
Output
collections
are
data
passed
from
the
SQL
engine
to
the
PL/SQL
engine
as
a
result
of
SELECT
or
FETCH
statements.
The
keywords
BULK
COLLECT
can
be
used
with
SELECT
INTO,
FETCH
INTO,
and
RETURNING
INTO
clauses.
The
syntax
is
as
follows:
...
BULK
COLLECT
INTO
collection_name[,
collection_name]
....
Example:
SELECT
INTO
Example:
FETCH
INTO
Restriction:
You
cannot
bulk-fetch
from
a
cursor
into
a
collection
of
records.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Example:
Cursor
Attribute
The
new
composite
cursor
attribute
for
bulk
binds
is
%BULK_ROWCOUNT.
It's
syntax
is
as
follows:
IF
SQL%BULK_ROWCOUNT(i)
=
...
THEN
.....
ENDIF;
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
After
importing
items,
they
can't
be
seen
in
the
Master
Item
form.
Querying
the
items
return
"No
Items
Found".
Do
a
SELECT
from
the
mtl_system_items
table
and
confirmed
the
items
are
loaded.
Also
verify
that
the
item
organization
id
is
the
same
as
the
Master
organization.
Check
the
value
of
the
eng_item_flag.
If
value
is
'N'
then
the
item
is
an
inventory
item.
If
the
value
is
'Y'
then
the
item
is
an
engineering
item
and
is
not
viewable
from
inventory.
While
importing
items
from
a
legacy
system
into
the
mtl_transactions_interface
table,
during
the
validation
process
an
error
occurs:
'oracle
error
1426
in
inltev'
cause:
inltev
failed
due
to
ora
-
01426
numeric
overflow.
The
sql
statement
being
executed
at
the
time
of
the
error
was
update
mtl_transaction_interface
mti
set
last_update_date=
sysdate,
l
and
was
executed...
Check
the
script
being
using
to
load
the
transactions
and
make
sure
there
is
no
item
in
the
legacy
system
that
isn't
in
oracle
mtl_system_items
table.
During
the
validation
process
the
transaction
being
loaded
for
an
item
couldn't
find
the
item
in
oracle.
The
error
occurs
because
it
was
trying
to
insert
transactions
for
a
non
existant
item
into
the
system.
-
The
way
it
works
is
that
it
flags
(errors)
that
item
with
an
invalid
item
id,
and
then
the
other
items
following
the
errored
item
(invalid
item
id)
would
have
a
numeric
overflow
error.
If
items
in
the
interface
exist
in
the
item
master
but
not
in
the
child
org
it
was
inserting
into,
this
error
could
also
occur.
When
trying
to
insert
records
in
the
MTL_SYSTEM_ITEMS_INTERFACE_TABLE,
getting
an
error:
ORA-00001:
unique
constraint
(INV.MTL_SYSTEM_ITEMS_INTERFACE_U2)
violated
INVPAGI2.
assign_item_header_recs:
ORA-00001:
unique
constraint
(INV.MTL_SYSTEM_ITEMS_INTERFACE_U2)
violated
This
is
due
to
index
MTL_SYSTEM_ITEMS_INTERFACE_U2
which
is
created
incorrectly
in
systems
setup.
Find
out
how
many
segments
are
used
in
the
System
Items
Key
Flex
Field.
Drop
the
index
MTL_SYSTEM_ITEMS_INTERFACE_U2.
Create
a
new
MTL_SYSTEM_ITEMS_INTERFACE_U2
index
on
ORGANIZATION_ID
and
all
the
enabled
segments
of
the
System
Items
Flex
Field.
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Item
import
process
appears
to
have
run
successfully.
There
are
no
errors
in
the
mtl_interface_errors
table.
The
log
file
contains
no
warnings
or
error
messages.
The
System_items_interface
table
still
contains
the
items
and
the
process_flag
is
still
at
1.
It
is
as
if
the
process
has
never
been
run.
Running
the
item
import
process
normally
gives
error
messages
to
indicate
problems
with
validating
new
items.
When
no
errors
appear,
it
can
only
be
due
to
two
reasons.
First,
that
item
import
has
completed
successfully,
or
second,
that
there
is
a
machine
resource
issue/problem.
Item
Import
loads
the
records
from
the
interface
table
into
system
memory
before
it
starts
processing
them.
If
there
are
more
rows
of
data
than
available
memory,
the
item
import
process
will
fail
without
giving
any
error
messages
or
indication
of
a
problem.
Thus
before
loading
data
to
be
imported,
you
need
to
consider
the
memory
resources
available
on
your
system
and
load
the
data
accordingly.
It
is
always
recommended
that
the
user
test
with
1
item
initially,
to
verify
that
it
is
imported
successfully.
User
should
verify
that
the
loaded
data
is
valid
and
will
run
through
the
system
without
errors.
Following
this,
batches
of
100
-
1000
can
be
tested
to
determine
the
most
suitable
batch
size
for
your
system.
The
following
errors
occur
in
the
concurrent
request
log
after
an
unsuccessful
attempt
at
item
import:
INVPOPIF:ORA-6502
pl/sql
numeric
or
value
error
This
error
may
occur
more
than
once.
The
solution
to
this
issue
is
to
disable
any
custom
triggers
that
may
be
on
the
MTL-SYSTEM_ITEMS
table.
Custom
triggers
on
any
of
the
tables
involved
with
item
import
could
potentially
cause
problems.
Also,
check
MTL_ITEM_REVISIONS
(if
importing
item
revisions)
and
MTL_ITEM_CATEGORIES.
If
importing
costs
also
check
for
custom
triggers
on
the
CST_ITEM_COST_DETAILS,
and
CST_ITEM_COSTS
tables.
What
are
the
required
key
flexfields
in
Oracle
Inventory?
The
required
flexfields
for
Oracle
Inventory
and
their
corresponding
codes
appear
in
the
error
statement:
(app-xxxxx
fdfrkf:appl=401
code
=
XXXX
num
=
101):
Key
Flexfield
Code
Owner
Accounting
Flexfield
GL#
GL
System
Items
MSTK
INV
Item
Categories
MCAT
INV
Item
Catalogs
MICG
INV
Stock
Locators
MTLL
INV
Account
Aliases
MDSP
INV
Sales
Orders
MKTS
INV
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S
Oracle
Application
Validation
Error
Codes:
Please
refer
the
below
Oracle
documents
for
validation
errors.
http://docs.oracle.com/cd/E19509-01/820-4390/6nfs0i9e0/index.html
Manufacturing
o Inventory
:
http://docs.oracle.com/cd/E19509-01/820-4390/ggtqg/index.html
o Requisition:
http://docs.oracle.com/cd/E19509-01/820-4390/ggtrg/index.html
o Purchase
Order
:
http://docs.oracle.com/cd/E19509-01/820-4390/ggtng/index.html
o Receiving:
http://docs.oracle.com/cd/E19509-01/820-4390/ggtrm/index.html
Financial
Budget-GL
o Account
Payables:
http://docs.oracle.com/cd/E19509-01/820-4390/ggtpw/index.html
o Account
Receivable:
http://docs.oracle.com/cd/E19509-01/820-4390/ggtne/index.html
o Cash
Management:
http://docs.oracle.com/cd/E19509-01/820-4390/ggtqw/index.html
o Fixed
Assets:
http://docs.oracle.com/cd/E19509-01/820-4390/ggtsa/index.html
o General
Ledger:
http://docs.oracle.com/cd/E19509-01/820-4390/ggtsb/index.html
P2P
Interview
Preparation
-
by
Dinesh
Kumar
S