Documente Academic
Documente Profesional
Documente Cultură
SQL
ORACLE APPS
REPORTS
PLSQL
XML PUBLISHER
BI PUBLISHER
REPORTS
DISCOVER
REPORTS
INTERFACES
CONVERSIONS
WORK FLOW
FORM
PERSONALIZATION
REF: #202, 2
nd
INDEX
S.N
PAGE NO.
O
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
3-6
7-14
14-19
19-21
22-35
35-36
36-36
37-47
48-49
49-53
53-56
56-58
58-74
75-85
86-97
97-116
116-125
125-129
nd
Therefore you only need to register those tables (and all of their columns) that will be used with
flexfields or Oracle Alert.
You can also use the AD_DD API to delete the registrations of tables and columns from Oracle
Application Object Library tables should you later modify your tables. If you alter the table later,
then you may need to include revised or new calls to the table registration routines. To alter a
registration you should first delete the registration, and then re-register the table or column.
Remember, you should delete the column registration first, then the table registration. You should
include calls to the table registration routines in a PL/SQL script. Though you create your tables
in your own application schema, you should run the AD_DD procedures against the APPS
schema. You must commit your changes for them to take effect.
The AD_DD API does not check for the existence of the registered table or column in the
database schema, but only updates the required AOL tables. You must ensure that the tables and
columns registered actually exist and have the same format as that defined using the AD_DD
API. You need not register views.
Syntax for Table Registration :
procedure register_table ( p_appl_short_name in varchar2,
p_tab_name in varchar2,
p_tab_type in varchar2,
p_next_extent in number default 512,
p_pct_free in number default 10,
p_pct_used in number default 70);
1
Syntax for Column Registration :
procedure register_column (p_appl_short_name in varchar2,
p_tab_name in varchar2,
p_col_name in varchar2,
p_col_seq in number,
p_col_type in varchar2,
p_col_width in number,
p_nullable in varchar2,
p_translate in varchar2,
p_precision in number default null,
p_scale in number default null);
Syntax of Delete table :
REF: #202, 2
nd
The application short name of the application that owns the table (usually your custom
application).
p_tab_name
p_tab_type
Use T if it is a transaction table (almost all application tables), or S for a seed data
table (used only by Oracle Applications products).
p_pct_free
The percentage of space in each of the tables blocks reserved for future updates to the
table (199). The sum of p_pct_free and p_pct_used must be less than 100.
p_pct_used
Minimum percentage of used space in each data block of the table (199). The sum of
p_pct_free and p_pct_used must be less than 100.
p_col_name
p_col_seq
The sequence number of the column in the table (the order in which the column appears
in the table definition).
p_col_type
p_col_width
The column size (a number). Use 9 for DATE columns, 38 for NUMBER columns
(unless it has a specific width).
REF: #202, 2
nd
p_nullable
p_translate
Use Y if the column values will be translated for an Oracle Applications product
release (used only by Oracle Applications products) or N if the
values are not translated (most application columns).
p_next_extent
p_precision
p_scale
Example :
CREATE TABLE TEST_DESC ( RESOURCE_NAME VARCHAR2 (150),
RESOURCE_TYPE VARCHAR2 (100),
ATTRIBUTE_CATEGORY VARCHAR2 (40),
ATTRIBUTE1 VARCHAR2 (150),
ATTRIBUTE2 VARCHAR2 (150),
ATTRIBUTE3 VARCHAR2 (150),
ATTRIBUTE4 VARCHAR2 (150),
ATTRIBUTE5 VARCHAR2 (150),
ATTRIBUTE6 VARCHAR2 (150)
);
Table Example:
BEGIN
AD_DD.REGISTER_TABLE ('FND','TEST_DESC','T');
END;
Column Example:
BEGIN
REF: #202, 2
nd
AD_DD.REGISTER_COLUMN
'VARCHAR2', 150, 'Y', 'N');
AD_DD.REGISTER_COLUMN
100, 'Y', 'N');
AD_DD.REGISTER_COLUMN
'VARCHAR2', 40, 'Y', 'N');
AD_DD.REGISTER_COLUMN
'Y', 'N');
AD_DD.REGISTER_COLUMN
'Y', 'N');
AD_DD.REGISTER_COLUMN
'Y', 'N');
AD_DD.REGISTER_COLUMN
'Y', 'N');
AD_DD.REGISTER_COLUMN
'Y', 'N');
AD_DD.REGISTER_COLUMN
'Y', 'N');
END;
('FND',
'TEST_DESC','RESOURCE_NAME',
1,
'TEST_DESC','ATTRIBUTE_CATEGORY',
3,
nd
Multi org :
Use a single installation of any Oracle Applications product to support any number of
organizations, even if those organizations use different sets of books.
Flow :
Business Group
Set of Books
Legal Entity
Operating Unit
Inventory Organization
Sub Inventory
Stock Locations
Items
Major Features :
Multiple Organizations in a Single Installation
Secure Access :You can assign users to particular organizations. This ensures accurate
transactions in the correct operating unit.
Multiple Organizations Reporting : You can set up your Oracle Applications
implementation to allow reporting across operating units by setting up the top reporting
level. You can run your reports at the set of books level, legal entity level, or operating
unit level
Business Group:
REF: #202, 2
nd
The business group represents the highest level in the organization structure, such as the
consolidated enterprise, a major division, or an operation company. The business group secures
human resources information.
For example, when you request a list of employees, you see all employees assigned to the
business group of which your organization is a part.
Set Of Books:
A financial reporting entity that uses a particular chart of accounts, functional currency, and
accounting calendar. Oracle General Ledger secures transaction information (such as journal
entries and balances) by set of books. When you use Oracle General Ledger, you choose a
responsibility that specifies a set of books. You then see information for that set of books only.
Table : GL_SETS_OF_BOOKS or GL_LEDGERS
Legal Entity:
A legal company for which you prepare fiscal or tax reports. You assign tax identifiers and other
legal entity information to this type of organization.
Table : HR_LEGAL_ENTITIES
Operating unit:
An organization that uses Oracle Cash Management, Order Management and Shipping
Execution, Oracle Payables, Oracle Purchasing, and Oracle Receivables. It may be a sales office,
a division, or a department. An operating unit is associated with a legal entity. Information is
secured by operating unit for these applications. Each user sees information only for their
operating unit.
Table :HR_OPERATING_UNITS
Inventory Organization:
An organization for which you track inventory transactions and balances, and/or an organization
that manufactures or distributes products. Examples include (but are not limited to)
manufacturing plants, warehouses, distribution centers, and sales offices. The following
applications secure information by
Oracle Inventory, Bills of Material, Engineering, Work in Process,Master Scheduling/MRP,
Capacity, and Purchasing receiving functions.
Table : ORG_ORGANIZATIONS
MTL_SYSTEM_ITEMS_B
REF: #202, 2
nd
Subinventory:
Which is another organization inside of the Inventory organization will be used to define the
locations under these location items will be placed.
Multiorg Table:
It is a table contains the data which is related to multiple operating units all the multiorg table
names will be end with '_ALL'.
like PO_HEADER_ALL
PO_LINES_ALL
AP_CHECKS_ALL and so on
Note: In all these tables we will find one common column called "ORG_ID" This column will
be populated internally by the system as per the User Operating Unit ID
Client_Info:
It is one the RDBMS vaiabel which contains the User Operating Unit value (ORG_ID)
Multiorg View:
It is a view which is created based on the Multiorg table which contains the WHERE clause
WHERE Org_ID = :Client_Info.
Note: While development of RICE Components we are suppose to Use Multiorg Views not Multi
Org Tables.
Because if we use Multiorg tables we will get all the operating units data if we use multiorg view
we will get the operating units data which is related for that particular user .
org_id is at operating unit level where as organization_id is at inventory level in multiorg
implementation
OrgId:
Org
Id
is
an
unique
ID
for
the
Operating
Unit.
Organisation Id: The Organisation Id is an ID for the Inventory Organisation which is
under
an
Operating
Unit.
MOAC:
REF: #202, 2
nd
Multi Operating Unit Access Control is a major Feature that Oracle has introduced in R12.In
11i, when users had to enter or process data for multiple operating units, they had to login to
different responsibilities because each responsibility could only access one operating unit. So if
there were a centralized payment processing center where users processed payments for multiple
organizations, they would have to keep logging in and out of different responsibilities to process
payments for a different organization or operating unit.
Now in Release 12, Multi-Org Access Control enables companies that have implemented Shared
Services operating model to efficiently process business transactions by allowing users to access,
process, and report on data for an unlimited number of operating units within
a single applications responsibility.
To accomplish this
Multi-org views have been removed, and replaced with synonyms. For example,
MY_TABLE would no longer be a view defined on MY_TABLE_ALL, but rather a
synonym which points to MY_TABLE_ALL
The data restriction is accomplished by assigning a virtual private database (VPD) policy
to the synonym. This policy allows the system to dynamically generate restricting
conditions when queries are run against the synonym.
nd
10
If the org has more than an operating unit (least level)then the org structure can be called as
multi-org.
MOAC provided the role based access, shared services, to perform multiple tasks across different
operation units from within single application responsibility, It is controlled by MO: Security
profile
Database Multi-Org Access Control
In 11I versions of the E-business Suite you may have used standard applications procedures
such as
DBMS_APPLICATION_INFO.SET_CLIENT_INFO
or
FND_CLIENT_INFO.SET_ORG_CONTEXT
These are superseded in Oracle Release 12 by the procedure MO_GLOBAL.INIT.
The MO_GLOBAL.INIT procedure accepts one parameter, Application Short Name. (SQLGL)
In order for the procedure to work, the FND_GLOBAL.APPS_INITIALIZE procedure must also
be run so that the MO_GLOBAL package can see the Application Profile Options Values defined
in the in the E-business Suite.
BEGIN
FND_GLOBAL.APPS_INITIALIZE(USER_ID,RESP_ID,RESP_APPL_ID);
MO_GLOBAL.INIT(SQLGL);
END;
Responsibilities are assigned a Security Profile which is a group of Operating Units
Assignment is through the profile option MO: Security Profile set at the Responsibility
Level.
So from one responsibility you can perform transactions and report on transactions from
multiple operating units
R12 implements MOAC through DB Synonyms that replace the old Multi-Org Views
Pre-R12 Multi-Org Architecture
REF: #202, 2
nd
11
Base data tables exist in the product schema with a naming convention of %_ALL. The
data in this table is striped by ORG_ID (Operating Unit).
A view in the APPS schema provides the Multi-Org filtering based on the statement
below
in
the
where
clause.
SUBSTRB(USERENV ('CLIENT_INFO'), 1, 10)
R12 Multi-Org Architecture
Base data tables exist in the product schema with a naming convention of %_ALL. The
data in this table is striped by ORG_ID (Operating Unit).
A synonym in the APPS schema provides the Multi-Org filtering based the Virtual Private
Database feature of the Oracle 10G DB Server
Pre-R12 you could set your SQL session context for multi-org with the following:
BEGIN
dbms_application_info.set_client_info(2);
END;
Or
FND_GLOBAL.APPS_INITIALIZE to set your context
In R12 you can set your SQL session context for a single OU with the following:
BEGIN
execute mo_global.set_policy_context('S',2);
END;
The S means Single Org Context
2 is the ORG_ID I want set
In R12 you can set your SQL session context for multiple OUs with the following:
BEGIN
execute mo_global.set_org_access(NULL,64,ONT');
END;
64 is the Security Profile you want to use
REF: #202, 2
nd
12
ONT is the application short name associated with the responsibility you will
be using
How to find the Security Profiles :
select psp.SECURITY_PROFILE_NAME,
psp.SECURITY_PROFILE_ID,
hou.NAME,
hou.ORGANIZATION_ID
from PER_SECURITY_PROFILES psp,
PER_SECURITY_ORGANIZATIONS pso,
HR_OPERATING_UNITS hou
where pso.SECURITY_PROFILE_ID = psp.SECURITY_PROFILE_ID
and pso.ORGANIZATION_ID = hou.ORGANIZATION_ID
Tables Information each level :
Level
Table
Profile
Business
Group
HRFV_BUSIN
ESS_GROUPS
Column
HR:Business
ID
GL:Set
Name
Group
Module
BUSINESS_G HRMS
ROUP_ID
of
Books SET_OF_BOO GL
KS_ID
or
LEDGER_ID
GL:Ledger_name
Legal Entity
HR_LEGAL_E
NTITIES
Operating
Unit
HR_OPERATI
NG_UNITS
MO:Operating Unit
ORG_ID
PO,AP,OM,AR,PA,CM
Inventory
Organization
ORG_ORGAN
IZATION_
DEFINITIONS
MFG_ORGANIZATI
ON_ID
ORGANIZATI
ON_ID
INV,WIP,PROD,BOM,
ENG,MRP PO Receipts
REF: #202, 2
nd
13
SubInventor
y
MTL_SECON
DARY_
Stock
Locations
INVENTORIE
S
Items
MTL_ITEM_L
OCATIONS
Requstions
rcv_shipment_hreaders
RFQ,Quotations,PO
rcv_shipment_lines
PO Receipts
rcv_transactions
MTL_SYSTE
M_ITEMS
Questions :
What is Multiorg?
What is the Diff between ORG_ID and ORGANIZATION_ID?
Why the PO Receipt functionality will come at Inventory organization level?
how the System Will Identify user is working for so and so operating Unit?
What is Client_info?
how to Implement Multiorg in Reports and at SQL prompt?
What is Business group, Legal Entity,Operating Unit,Inventory Organizations?
What are the Modules will come at operating Unit level?
What is the flow of Multiorg?
How to Identify the Multiorg Table?
Wat is the Diff between Multiorg Table and Multiorg View?
While Developing RICE Components we will use Multiorg Table or Multiorg View?
Why there is no _ALL for PO_VENDORS
How will you findout Multiorg Succesfully Implemented?
Profile :
REF: #202, 2
nd
14
Profile is one of the changeable option it will change the way of application execution.When
User Log into the application and select the the resp or Appl system will automatically captures
all the profile value as per the profile values application will run.
When we want assign any profile value we have four levels,we have to select any one of the
level.
Site : this is lowest level to assign the Profile values site values are applicable for all the
users.when we install Application by default site level values will be assigned.
Application: These values are applicable for the users who are having the access for the
application. If user is eligible for both application and site level values then application level
value will override the site level value.
Responsibility: We will select the responsibility name assign the value which is applicalbe only
for the users who are having the access for specified responsibility.Responsibility level value will
override both application and site level values.
User: This is highest level in the profile option.we will select the user name and assign the
profile value which is applicable only for this user.User level value will override all other profile
level values.
Diff between Application and Responsibility:
Example :
REF: #202, 2
nd
15
We have to create One Responsibility For the Clerk. Which is accesable by all the Clerks.It
Contains the Forms and Reports which are required for the Clerk.We have to Create new
Responsibility for the Manager,Which is accesable by all the Managers.It COntains the
Forms and Reports which are required for the manager.Where as Application includes all the
Forms,Reports and Programs.If we assign the application to the user he will access all the
forms and Reports. Instead of that we will create the responsibility and we will assign to the
User.
Some of the Imp Profile Names:
GL:Set Of Books
MO:Operating Unit
Hr:Business Groups
MFG_ORGANIZATION_ID
USER_ID
RESP_ID
USERNAME
RESP_NAME
We can find all the Profile details in Application Developer Responsibility.
We can assign the Profile values in System Administrator Responsibility.
Application Developer=>Profile =>Press CTRL+F11 we can find all the profiles.
System administrator=>profile=>System=> Select Profile name, Level =>Find button
then assign the Profile value.
Note: Most of the profile values will be assigned at Responsibility Level.
Retrieve the Profile Value from Backend:(SQL,PL/SQL,Forms,Reports)
======================================
Fnd_Profile.Get('ProfileName',local Variable);
local Variable:= Fnd_Profile.Value('Profile Name');
REF: #202, 2
nd
16
nd
17
begin
l_name:=Fnd_Profile.value('USERNAME');
If l_name = 'OPERATIONS' then
UPDATE PO_VENDORS
SET VENDOR_NAME = v_name
WHERE VENDOR_ID =v_id;
commit;
Fnd_File.Put_line(Fnd_File.Output,'vendorname has updated succesfully');
Else
Fnd_File.Put_line(Fnd_File.Output,'Access Denied for updateion');
End If;
End;
Note: We can pass the profile value as default value by using Profile default type.
Select Default type = profile,Default Value= Profile Name
When we are passing Profile value as default we are suppose to hide the Parameter
because profile is confidential Information we are not suppose to give permission for
modifications.
Profile Tables:
FND_PROFILE_OPTIONS
FND_PROFILE_OPTION_VALUES
FND_PROFILE_OPTIONS_TL
Examples of Profiles:
User profile example(11i or R12) :
BEGIN
fnd_global.apps_initialize(fnd_global.user_id
,fnd_global.resp_id
,fnd_global.resp_appl_id
);
END;
ORG_ID Example(11i):
BEGIN
fnd_client_info.SET_ORG_CONTEXT(fnd_profile.VALUE('ORG_ID'));
END;
REF: #202, 2
nd
18
nd
19
Flexfields
Oracle flexfields is one of the most important parts of Oracle Applications. It is because of the
flexfields that the Oracle Applications is so generic in nature and can be used to suit any industry
or organization. A flexfield, as the name suggests, is a flexible data field that your organization
can customize to your business needs without programming. A flexfield is a field made up of
subfields, or segments. While flexfields do not require programming, they do allow you to
perform significant customizations to the Oracle Applications, so they do require enough
explanation for you to get the most out of the features they provide
Basic Business Requirement :
REF: #202, 2
nd
20
Descriptive Flexfields
Key Flexfields :
key flexfield is a field made up of segments, where each segment has both a value and a
meaning. You can think of a key flexfield as an intelligent field that your business can use to
store information represented as codes.
KFF name
Accounting Flexfield
Assets KFF
Category Flexfield
Location Flexfield
Sales Tax Location Flexfield
Territory Flexfield
Item Catalogs
Item Categories
Stock Locators
System Items
REF: #202, 2
nd
Applicati Table
Staructure Column
on Name
GL
GL_CODE_COMBINATION CHART_OF_ACCOUNTS_
FA
S
ID
FA
FA_ASSET_KEYWORDS
No
FA
FA_CATEGORIES_B
No
AR
FA_LOCATIONS
No
AR
AR_LOCATION_COMBINA LOCATION_STRUCTURE
INV
TIONS
_ID
INV
RA_TERRITORIES
No
INV
MTL_ITEM_CATALOG_GR No
INV
OUPS
STRUCTURE_ID
MTL_CATEGORIES_B
ORGANIZATION_ID
MTL_ITEM_LOCATIONS
ORGANIZATION_ID
MTL_SYSTEM_ITEMS_B
21
Descriptive Flexfields :
Descriptive flexfields like the key flexfields provides further scope of customization in Oracle
Applications. Descriptive flexfields provide customizable expansion space on your forms.
Though the fields on an Oracle Applications form are more than enough to capture all the
possible information from the user perspective, but still the users can feel the need of capturing
additional information. A descriptive flexfield gives you room to expand your forms for
capturing such additional information.
A descriptive flexfield appears on a form as a singlecharacter, unnamed field enclosed in
brackets ([ ]) as shown in figure
Questions :
REF: #202, 2
nd
22
Value sets :
Value-set is a group of values. It can also be thought of as a container of values. The values
could be of any data type (Char, Number etc.) A value set is used in Oracle Applications to
restrict the values entered by a user. For example, when submitting a concurrent program, we
would like user to enter only valid values in the parameter. This is achieved by associating a
value set to a concurrent program parameter.
A Value Set is characterized by value set name and validation. There are two kinds of
validations, format validation and Value validation. In the format validation, we decide the
data type, length and range of the values. In the value validation, we define the valid values.
The valid values could be defined explicitly, or could come implicitly from different source
(like table, another value-set etc.)
Uses
Value-set is an important component of Oracle Applications used in defining Concurrent
program parameters, Key Flex field and descriptive flex field set of values.
Some of the scenarios where value-set is used are given below:
In a concurrent program, we may want users to enter only number between 1 and 100 for
a particular parameter.
In a concurrent program, we may want users to enter only Yes or No for a particular
parameter.
Suppose a concurrent program has two parameters. First parameter is department and
second parameter is employee name. On selecting a particular department, we want to
show only those employee names which belongs to the selected department.
REF: #202, 2
nd
23
REF: #202, 2
nd
24
List type:
The list type defines how the values will appear when this value set is used. Choosing List
of values displays the values as LOV (showing all the values at once). Choosing Long List
of Values displays the values as Long List where Search facility will be available. This is
used when numbers of values are expected to be large. Choosing pop-list displays the values
as pop-list.
Security type: Three choices are available for this field:
No Security
Hierarchical Security
Non-Hierarchical Security
REF: #202, 2
nd
25
Format Validation
Format Type
Possible values for this field are:
Char
Date
Date Time
Number
Standard Date
Standard Date Time
Time
Maximum Size:
Maximum size of the value
Precision:
Applicable when format type is number
Numbers Only:
When this is checked, only numbers are allowed
Upper Case Only:
This is applicable when Format type is Char
Right Justify and Zero-Fill Numbers: Applicable only for Numbers
Min Value:
Min Value allowed
Max Value:
Max Value Allowed
Value set types :
None
Dependant
Independent:
Table
Special
Pair
Translatable In-dependant
Translatable dependant Value Sets
None: when this is chosen, no value-validation is done, only format validation is done. For
example, we want a user to enter a value between 1 and 100. In this case, we can set the
format validation (by setting format type as Number and Min and Max value of 1 and 100
respectively).
REF: #202, 2
nd
26
Independent: When this is chosen, the individual values are defined using the navigation
system administrator => Application => Validation => Values. For example, suppose we
want user to select values of Yes or No for a parameter. We can define Yes and No values for
this case.
Table: When table validation is chosen, the values for the value-set comes from an oracle
application table. After choosing this value, click on Edit Information button to enter table
name, column name and WHERE condition as show in the below screen:
It use your own application tables as value sets for flex field segments and
report parameters instead of the special values tables which Oracle
Applications provides.
You can also use validation tables with other special arguments to make your
segments depend on profile options or field values.
You can use any existing application table, view, or synonym as a validation
table.
If we are using non registered table for our value set, then we have to Create
the necessary grants and synonyms to APPS Schema.
The value column and the defined ID column in the table must return a unique
row for a given value or ID.
If the Hidden Id column is provided the value passed to the report will be
Hidden and not the Value column.
REF: #202, 2
nd
27
Dependant: This type of validation is chosen when value of this value-set is dependant on
some other independent value set. After choosing this validation type, click on Edit
Information button to enter the independent value-set as given in the below figure.
Same like Independent Value Set, except the List of Values shown to you will
depends on which the Independent value you have selected in the Prior
Segment.
Must define your independent value set before you define the dependent value
set that depends on it.
Must create at least one dependent value for each independent value, or else it
wont allow you to enter into that segment or field.
Special: Special validation value sets allow you to call key flex field user exits to validate a flex
field segment or report parameter using a flex field within flex field mechanism. You can call
flex field routines and use a complete flex field as the value passed by this value set.
Pair: Pair validation value set allows user to pass a range of concatenated Flex field
segments as parameters to a report.
Translatable In-dependant and Translatable dependant Value Sets: These value sets are
similar to in-dependant and dependant value sets respectively. Only difference is that this
type allows values to be translated and shown to the user in the users language.
These value sets are similar to Independent and Dependent value sets except
that translated values can be displayed to the user. Translatable Independent
REF: #202, 2
nd
28
and Translatable Dependent value sets allow you to use hidden values and
displayed (translated) values in your value sets. In this way your users can see
a value in their preferred languages, yet the values will be validated against a
hidden value that is not translated.
FND_FLEX_VALUE_HIERARCHIES
FND_FLEX_VALUE_SETS
FND_ID_FLEX_SEGMENTS
FND_FLEX_VALUE_NORM_HIERARCHY
FND_FLEX_HIERARCHIES
FND_FLEX_VALUE
FND_FLEX_VALIDATION_EVENTS
FND_FLEX_VALUE_RULE_LINES
FND_FLEX_VALUE_RULE
FND_FLEX_VALUE_RULE_USAGE
FND_RESPONSIBLITY
FND_TABLES
REF: #202, 2
nd
29
REF: #202, 2
nd
FN
D_F
LE
X_V
ALI
DA
TIO
N_T
AB
LES
30
$PROFILES$ :
This is used to reference the current value of a profile option in a WHERE clause by prefixing
the name of the profile option with $PROFILES$.
Usage:
:$PROFILES$.profile_option_name
A typical example with the use this keyword in a WHERE clause to reference a profile option
value.
....WHERE SET_OF_BOOKS_ID = :$PROFILES$.GL_SET_OF_BOOKS_ID
so what happen when ever the SET_OF_BOOKS_ID need to pass the $PROFILES$ options
simply reference the value which is retrived at form level.
A list of available Profile options can be found in one of the last post.
Block.field
This is used to references the value of an earlier appearing field on the same form
Using :block.field is different from using a descriptive flex field reference field in that the flex
field structure does not change based on the
different :block.field values.
By Using this value set only with flex fields on windows that have the same block.field
available.
$FLEX$ :
This is used to references the value from a value set used earlier on the same form
You can refer to the current value of a previously used value set on the same form by using
$FLEX$.value_set_name.
......WHERE JOURNAL_TYPE = :$FLEX$.GL_SRS_JOURNAL_TYPE
REF: #202, 2
nd
31
$FLEX$
and
$PROFILES$
$FLEX$ and $PROFILES$ are Special Variables in oracle Apps environment and are used to
hold values at runtime.Every Oracle Apps technical consultant will be familiar with the term
$FLEX$ and $PROFILES$. Whenever we are working with value sets, we will be using both of
these for modifying the data fetched, for basing the values of a parameter on the other parameter
and also fetching the Profile Option values. To segregate this based on the functionality.
$FLEX$: Used for basing the value of a parameter on another parameter.
$PROFILES$: used for fetching the data stored in the specified profile option value which is
currently active.
Where
is
it
used?
Both these variables are used in the Parameter form of a Concurrent Program and are used at
the
Where
Clause
window
in
the
value
set
of
Table
type.
Syntax:
:$FLEX$.previous_value_set_name
Important:
The previous value set name must have already been assigned and saved on a different
parameter.
:$PROFILES$.Profile_option_name
Important:
REF: #202, 2
nd
32
Profile option name is the Profile Name and not to be confused with the User profile
Name.
Some
use
of
the
Special
Variables
are
as
below:
Pre-Requisites:
Created an Executable and a concurrent program which is registered in the Application Object
Library.
The
Query
for
the
report
is
as
below:
SELECT
e.ename,
e.empno,
e.sal,
e.hiredate,
e.deptno,
d.dname,
d.loc
FROM
emp
e,
dept
d
WHERE
d.deptno
=
:x_deptno;
The name of the concurrent program is taken as XX_Checking_flex_and_profile_use
Scenario
1:
Changing
the
value
of
Parameter
B
based
on
the
Parameter
A:
In this, we created two value sets and they are: XX_SCENARIO_1 and XX_Sub1
Steps:
Create the value set XX_SCENARIO_1 using the validation type as Table.
Create the second value set XX_Sub1 using the validation type as Table and in the where
clause
field
specify
the
following
code:
where
deptno
<=
:$FLEX$.XX_SCENARIO_1
Working:
To
check
the
REF: #202, 2
working
nd
of
this
concurrent
program,
lets
submit
this
33
In the picture here, the First parameter contains no value, so the second parameter is
disabled as the WHERE clause in value set is equated to NULL, making the field disabled.
When a value is selected in the first parameter, the second parameter gets enabled and
when the LOV is clicked, it shows the departments which are in department number 20
and
below
it,
as
we
have
specified
<=
in
the
where
clause.
Scenario 2:
Use of :$FLEX$ in the default type option of a Parameter form
REF: #202, 2
nd
34
Steps:
The query used in the Default Value test field is as below: Select dname from dept where deptno
=:$FLEX$.XX_SCENARIO_1
Ensure that the default value for the field Department Number is given as SQL Statement.
Select
deptno
from
dept
where
deptno=20
Working:
Lets
submit
the
concurrent
program
and
check.
Since the default value was given as a SQL statement, the result of that is shown in the first
parameter and the second parameter has the value based on the first parameter as
specified
in
the
SQL
statement.
Scenario
3:
Use of $PROFILES$ in where clause and Default Value. It is done in the same way as is used in
$FLEX$.
REF: #202, 2
nd
35
Modifying the where clause using $PROFILES$ returns Successful upon validation.
Scenario
4:
Use of Parameter name instead of a value set name in the $FLEX$ Special Variable.
Where Clause of the value set of table type using the parameter name.
Reason:
When we provide the name of the value set in $FLEX$ then we will be able to change the value
of the parameter which is dependent on it. If the value set is used by more than one parameter
then it becomes difficult to get the exact value in the dependent parameter as it will fetch the
values based on the last used value of the value set. It could have been last used by the first
parameter or any other parameter in the form. To avoid this kind of confusion, the alternative is
to provide the name of the Parameter itself in the $FLEX$ variable. No matter how many times
the value set is used, if we provide the parameter name, we will get the dependent parameter
value based on its parent parameter only. Let me explain this using the pictures below:
Where Clause of the value set of table type using the parameter name.
REF: #202, 2
nd
36
The first and third parameter are based on value set names and the second and fourth parameter
are based on parameter name. Since the second parameter is not initialized, the third parameter
(value
set
based
)is
also
not
initialized.
Since the latest value is from Second parameter, hence the value in third is based on the second
parameter. The third value is based on the value of the second parameter and is irrespective of
the
value
set.
Shown
in
the
next
picture.
REF: #202, 2
nd
37
Here the third parameter takes the latest value of the value set, hence shows the department name
corresponding to that and the fourth parameter values are dependent on the value of the second
parameter.
These were some of the basic uses of $FLEX$ and $PROFILES$. Feel free to post your queries
and comments on this topic.
Questions :
What is value set ?when it will come into picture?
How many tapes of value set? Which one u used mostly?
What is difference between table and dependent value set?
What is $FLEX$ and $PROFILES$? Did u use any time?
Default Types :
When we are hiding the parameter in SRS windows user cant enter the values that time
we can pass values internally by using defaults types.
Constant:
If we want to pass constant values as default then we will select default type constant and
we will specify the values in default value field.
Current Date:
System Date.
REF: #202, 2
nd
38
Current Time:
System Time
Profile:
By using the profile option we can pass user profile values as default.
SQL Statement:
When we want to pass select statement to rest as default values that time we will select
default types as SQL statement and write the select statement in the default values filed.
Select statement should not return more then one value.
Segment:
When we wanted to pass previous parameter values as default to the next
parameter then we will use segment, select default type as segment give the parameter
name in the default values field.
AIM Methodology:
Oracle A.I.M. Methodology encompasses a project management methodology with
documentation templates that support the life cycle of an implementation. The life cycle
methodology and documentation templates allow A.I.M. to be a very useful tool for managing
implementation projects successfully.
Mostly used documents :(will provide example documents)
CV40
CV60
MD50
MD70
MD120
Oracle Reports :
In this tutorial you will learn about Introduction to Oracle Reports Builder, Report file storage
formats, Oracle Reports Builder Tools, Report Wizard, Triggers in Reports, Types of Triggers
and Case Study - Creating a Tabular report.
Introduction to Oracle Reports Builder :
REF: #202, 2
nd
39
Oracle Reports Builder is a powerful enterprise reporting tool used to build reports that
dynamically retrieve data from the database, format, display and print quality reports. Reports
can be stored in File or Database (Report Builder Tables).
Report file storage formats
rdf Report
Binary File Full report definition (includes source code and comments)
Modifiable through Builder. Binary, executable Portable if transferred as binary.
PL/SQL recompiles on Open/Run
rep Report
Binary Run-Only File
No source code or comments. Not modifiable binary, executable.
Report Executables
Oracle Reports Builder Tools
Oracle Reports Builder comes with the following components
Object Navigator
Property Palette
Data Model Editor
Layout Model Editor
Parameter Form Editor
Object Navigator :
The Object Navigator shows a hierarchical view of objects in the report. Each item listed is
called a node and represents an object or type of object the report can contain or reference.
Property Palette :
A Property Palette is a window that displays the settings for defining an Oracle reports object.
nd
40
Queries are SQL Select statements that fetch data from the oracle database. These statements are
fired each time the report is run.
Groups :
Groups determine the hierarchy of data appearing in the report and are primarily used to group
columns selected in the query. Oracle report automatically creates a group for each query.
Data Columns:
Data columns contain the data values for a report. Default data columns, corresponding to the
table columns included in each querys SELECT list are automatically created by oracle reports.
Each column is placed in the group associated with the query that selected the column.
Formula Columns :
Formulas can be entered in formula columns to create computed columns. Formulas can be
written using PL/SQL syntax. Formula columns are generally preceded by CF_ to distinguish
from other columns.
Summary Columns :
Summary columns are used for calculating summary information like sum, average etc. This
column uses a set of predefined oracle aggregate functions. Summary columns are generally
preceded by CS_ to distinguish them from other columns.
Placeholder Columns :
used to hold the values at runtime act as a global variables in reports
Data Links :
Data links are used to establish parent-child relationships between queries and groups via column
matching.
Layout Model Editor :
A report layout editor contains the following layout objects
Frames :
Frames surround other layout objects, enabling control of multiple objects simultaneously
Repeating Frames :
Repeating frames acts as placeholders for groups (I.e repeating values) and present rows of data
retrieved from the database. Repeating frames repeat as often as the number of rows retrieved.
REF: #202, 2
nd
41
Fields :
Fields acts as placeholders for columns values. They define the formatting attributes for all
columns displayed in the report.
Boilerplate :
Boilerplate consists of text (label of the column) and graphics that appear in a report each time it
is run.
Parameter Form Editor :
Parameter form is a runtime form used to accept inputs from the user.
Parameters :
Parameters are variables for a report that accept input from the user at runtime. These parameter
values can then be used in the SQL select statements to retrieve data conditionally. Oracle reports
creates a set of system parameters at runtime namely report destination type, number of copies
etc.
Report Wizard :
When we create a default Tabular Report using report wizard, the wizard will take
you through the below mentioned pages
Report Style Tabular, Form-Like, Mailing Label, Form Letter, Group Left, Group
Above, Matrix, Matrix with Group
Query Type Choose whether to build a SQL query or an Express query.
Data Enter a SELECT statement to retrieve the report data
Displayed Fields Select the fields that you want to display in the output.
Fields to Total Select the fields that you want to summarize.
Labels for Fields Alter the labels that appear for each field and the width of each
field.
Template Select the template that you want to use for this report. A template
contains standard information such as company logo, date, and so on.
Note: The above steps are different for each report style.
Group Left & Have an additional page: Groups
Group Above styles
REF: #202, 2
nd
42
Matrix Reports styles Have 3 additional pages: Matrix Rows Columns Cells
Mailing Label & Have 4 pages: Report Style Data
Form Letter styles Text Template
The difference between Mailing Labels and Form Letters is, Mailing Label shows multiple
records on one page while Form Letter shows one record on each page.
Triggers in Reports
Types of Triggers
Formula Triggers: Formula triggers are PL/SQL functions that populate columns of type
Formula.
Format Triggers: Format triggers are PL/SQL functions executed before the object is formatted.
These triggers are used to dynamically change the formatting attributes and used to conditionally
print and not to print a report column value. These triggers return Boolean values TRUE or
FALSE. If the return value of the format trigger is FALSE, the value is not displayed.
Action Triggers: Action triggers are used to perform user-defined action. These triggers do not
return any value.
Validation Triggers: Validation triggers are PL/SQL functions that are executed when a
parameter value is entered and the cursor moves to the next parameter. These triggers return
Boolean value TRUE / FALSE.
Report Triggers: Report triggers enable execution of PL/SQL functions at specific time during
execution and formatting of report.
Before Parameter Form:
Fires before the Runtime Parameter Form are displayed. Can access the PL/SQL global
variables, report level columns and manipulate accordingly.
After Parameter Form :
Fires after the Runtime Parameter form are displayed. Used to validate the parameter values.
Before Report :
Fires before the report is executed but after the queries is parsed and date is fetched.
REF: #202, 2
nd
43
Between Pages :
Fires before each page of the report are formatted, except the very first page. This page is used to
customize page formatting.
After Report :
Fires after the report previewer are exited, or after report output is sent to a specified destination.
Oracle Reports Registration in APPS :(new development)
Registration Steps :
1. we can receive the MD50,we can analysis and will prepare MD70 Document and will send for
approval(report manager).
2. Once we got approval, we can start development of Report.
3. Develop the Report according client requirement.
4. Once development completed we need to move execution file to Corresponding server path.
nd
44
Executable: Set the executable name as we like here we entered the name as per the program.
Short Name: Set the short name of the executable as related to the executable because we have
to remember them.
Application: Select the Appropriate Application from the list of applications here we selected
the Oracle Receivables because we saved our report (valueset.RDF)
in the AR (Receivables) folder only.
Description: This field is not a mandatory field if we want to describe the concurrent program
executable we use this field.
Execution Method: There are eleven execution methods we can choose what ever we want as
per the requirements.
Execution file name: Enter execution file name without extension.
REF: #202, 2
nd
45
4.Once Executable created then we need to Concurrent program. and save executable short
name.
Navigation : ConcurrentProgramDefine
nd
46
Parameters (Button): If there are any parameters for our report then we go with the parameters
button. We get the window called parameters when we go with the button. Program and
Application will come automatically.
REF: #202, 2
nd
47
nd
48
default type : if we are using any default types then we can choose required one.
Token : this one predefined functionality, this can provide mapping between oracle report
parameters to concurrent program parameters. we need to enter here bind variable name.
Once completed we want to save the form and we need to attach this concurrent program to
request group.
Attaching Concurrent program to Request Group :
Navigation :Security Responsibility Request
nd
49
Request :
Type : Enter specified type Request group.
Name : Select our concurrent program here.
Applications: it will come Automatically whenever we have entered our concurrent program.
once all operations completed and save the form then switch to Corresponding Responsibility.
Submit Concurrent Program :
Switch to particular responsibility (Payables or Receivables)
Navigation : Menu View Requests
REF: #202, 2
nd
50
Here choose ur Concurrent Program and enter Required parameters. and click submit button.
once ur program submitted and completed then u will get ur out put of ur report.
REF: #202, 2
nd
51
2. open in Report Builder and do modifications and compile and move same path of server.
3.Submit the Concurrent Program from particular responsibility.
User Exits :
User Exits are 3GL programs used to transfer the control from the report builder to Oracle
Applications or any and it will perform some actions and return to the report builder. There are
five types of user exits those are.
FND SRWINIT
REF: #202, 2
nd
52
FND SRWEXIT
FND FORMAT_CURRENCY
FND FLEXSQL
FND FLEXIDVAL
FND SRWINIT: Used to write in before report trigger. It is used to fetch the concurrent request
information and also used to set the profile options.
Example :
BEGIN
SRW.USER_EXIT('FND SRWINIT');
END;
FND SRWEXIT: We will write this in after report trigger. Used to free the memory which has
been allocated by the other user exits
Example:
BEGIN
SRW.USER_EXIT('FND SRWEXIT');
END;
FND FORMAT_CURRENCY: This is used to convert amounts or currency from one currency
to other currency values and also used to display currency amounts in formats.
Example:
SRW.USER_EXIT(FND FORMAT_CURRENCY,
Code = currency_code,
Display_width=15,
Amount = :cf_feb,
Display = :cd_feb);
Return (:cd_feb);
FND FLEXSQL: This is used to get the data from flex fields. We will use in formula columns.
FND FLEXIDVAL: This is used to get the data from flex fields. We will use them in formula
columns.
REF: #202, 2
nd
53
Select
sites.vendor_site_id,
vend.segment1
Vendor#,
vendor_name,
sites.vendor_site_code,
vend.end_date_active
VEND_INACTIVE,
sites.inactive_date
SITE_INACTIVE
from
po_vendor_sites_all
sites,
po_vendors
vend,
ap_invoices_all
inv,
po_headers_all
PO
where
vend.vendor_id
=
sites.vendor_id
and
sites.vendor_site_id
=
inv.vendor_site_id(+)
and
inv.vendor_site_id
is
null
and
sites.vendor_site_id
=
po.vendor_site_id(+)
and
po.vendor_site_id
is
null
and
sites.inactive_date
<
sysdate
order by vendor_name, vendor_site_code;
Duplicate Vendor List :
select
pv2.vendor_name
pv1.segment1
pv2.segment1
pvsa1.vendor_site_code
pvsa2.vendor_site_code
pvsa1.address_line1,
REF: #202, 2
nd
pv1.vendor_name,
DUP_VENDOR_NAME,
VENDOR_ID,
DUP_VENDOR_ID,
SITE_CODE,
SITE_CODE,
54
pvsa2.address_line1
DUP_ADDRESS_LINE1,
pvsa1.zip
from
po_vendors
pv1,
po_vendors
pv2,
po_vendor_sites_all
pvsa1,
po_vendor_sites_all
pvsa2
where
pvsa1.vendor_site_id
pvsa2.vendor_site_id
and
substr(replace(pvsa1.address_line1,
),1,20)
=
substr(replace(pvsa2.address_line1,
),1,20)
and
pvsa1.zip
=
pvsa2.zip
and
pv1.vendor_id
=
pvsa1.vendor_id
and
pv2.vendor_id
=
pvsa2.vendor_id
and
pv1.vendor_id
pv2.vendor_id
and
pvsa1.address_line1
YOUR
ADDEDSS
order by 1;
Vendors with no Invoices :
select
segment1
vendor_name
vendor_site_code
end_date_active
inactive_date
from
po_vendors
po_vendor_sites_all
ap_invoices_all
where
vend.vendor_id
and
sites.vendor_site_id
and inv.vendor_site_id is null;
REF: #202, 2
nd
VENDOR
=
=
NBR,
NAME,
SITE_CODE,
VEND_INACTIVE,
SITE_INACTIVE
vend,
sites,
inv
sites.vendor_id
inv.vendor_site_id(+)
55
SELECT
l.subledger_doc_sequence_value
l.effective_date
GL
l.accounted_dr
l.accounted_cr
l.description
l.reference_4
AR
l.reference_9
AR
FROM
gl_je_lines
l,
WHERE
je_source
AND
h.je_header_id
AND
h.set_of_books_id
AND h.period_name =
Doc
gl_je_headers
=
=
Number,
Date,
Debit,
Credit,
Description,
Number,
Type
h
Receivables
l.je_header_id
SELECT
c.customer_number,
c.customer_id,
t.customer_trx_id,
t.trx_number,
ct.NAME
l.line_number,
t.org_id,
cc.segment1,
cc.segment2,
cc.segment3,
cc.segment4,
cc.segment5,
cc.segment6,
d.gl_date,
d.cust_trx_line_gl_dist_id,
REF: #202, 2
nd
distinct
c.customer_name,
invoice_type,
56
d.code_combination_id,
d.account_class
FROM
ra_cust_trx_types_all
ct,
ra_customers
c,
ra_customer_trx_all
t,
ra_customer_trx_lines_all
l,
gl_code_combinations
cc,
ra_cust_trx_line_gl_dist_all
d
WHERE
1
=
1
AND
t.cust_trx_type_id
=
ct.cust_trx_type_id
AND
t.bill_to_customer_id
=
c.customer_id
AND
d.customer_trx_id
=
t.customer_trx_id
AND
d.customer_trx_line_id
=
l.customer_trx_line_id(+)
AND
d.code_combination_id
=
cc.code_combination_id
AND
TRUNC
(d.gl_date)
>=
TO_DATE
(01-01-2009,
DD-MM-YYYY)
AND
d.posting_control_id
=
-3
AND
d.account_set_flag
=
N
AND d.account_class = REV
Query: AR Query to get open invoices for single/All customers :
To get open invoice for single customer /for all customer from the
ar_payment_schedules_all , you can modify the query how you want to get the details
select
FROM
ra_customer_trx_lines_all
ar_payment_schedules_all
ra_cust_trx_types_all
hz_cust_accounts
hz_parties
hz_cust_acct_sites_all
hz_cust_site_uses_all
REF: #202, 2
nd
ra_customer_trx_all
table
aps.*
ra,
rl,
aps,
rt,
hc,
hp,
hcasa_bill,
hcsua_bill,
57
hz_party_sites
hps_bill,
ra_cust_trx_line_gl_dist_all
rct
WHERE
1
=
1
AND
ra.customer_trx_id
=
rl.customer_trx_id
AND
ra.customer_trx_id
=
aps.customer_trx_id
AND
ra.org_id
=
aps.org_id
AND
rct.customer_trx_id
=
aps.customer_trx_id
AND
rct.customer_trx_id
=
ra.customer_trx_id
AND
rct.customer_trx_id
=
rl.customer_trx_id
AND
rct.customer_trx_line_id
=
rl.customer_trx_line_id
AND
ra.complete_flag
=
Y
AND
rl.line_type
IN
(FREIGHT,
LINE)
AND
ra.cust_trx_type_id
=
rt.cust_trx_type_id
AND
ra.bill_to_customer_id
=
hc.cust_account_id
AND
hc.status
=
A
AND
hp.party_id
=
hc.party_id
AND
hcasa_bill.cust_account_id
=
ra.bill_to_customer_id
AND
hcasa_bill.cust_acct_site_id
=
hcsua_bill.cust_acct_site_id
AND
hcsua_bill.site_use_code
=
BILL_TO
AND
hcsua_bill.site_use_id
=
ra.bill_to_site_use_id
AND
hps_bill.party_site_id
=
hcasa_bill.party_site_id
AND
hcasa_bill.status
=
A
AND
hcsua_bill.status
=
A
AND
aps.amount_due_remaining<>
0
AND aps.status = OP
Interfaces
Interfaces are used in Oracle Applications to integrate external systems and Data
Conversion.
REF: #202, 2
nd
58
The interfaces are mainly used to either transfer data from Oracle Applications to a flat
file or data from legacy system to Oracle Applications.
Used extensively at the time of Data Conversion from legacy/ old systems to a fresh
implementation of Oracle Applications.
Used also at regular intervals when data transfer is from other live systems if the systems
are not defined in Oracle Applications implementation.
Oracle provides flexible and flexible tools in the form of Interface programs to import the
master and transactional data like Customers, Invoices, and Sales Orders etc from
external systems into Oracle Applications.
Types of Interfaces
There are two major types of Interfaces:
Inbound Interface: These interfaces are used to transfer data from external systems to
Oracle Applications.
Outbound Interface: These interfaces are used to transfer data from Oracle
Applications to external systems.
Inbound Interface:
Two other distinctions of Inbound Interface:
Open Interface: If the interface logic is provided by Oracle Applications, it is called an
Open Interface.
Custom Interface: If the interface logic needs to be developed by the implementation
team, it is called a Custom Interface.
Process 1 of Inbound:
Datafile (Legacy data)
Prepare delimited data file
Temporary tables
Validate data
Load into Interface Tables
REF: #202, 2
nd
59
Run Concurrent Program to load the data into Apps Base tables
Process 2 of Inbound:
Data file (Legacy data)
Prepare delimited data file
Temporary tables
Validate data
Run required API (application program interface) to load the data into Apps Base
table
Script To find Oracle API's for any module:
Following script and get all the packages related to API in Oracle applications, from which you
can select APIs that pertain to AP. You can change the name like to PA or AR and can check for
different modules
select substr(a.OWNER,1,20)
, substr(a.NAME,1,30)
, substr(a.TYPE,1,20)
, substr(u.status,1,10) Stat
, u.last_ddl_time
, substr(text,1,80) Description
from dba_source a, dba_objects u
WHERE 2=2
and u.object_name = a.name
and a.text like '%Header%'
and a.type = u.object_type
and a.name like 'PA_%API%'
REF: #202, 2
nd
60
order by
a.owner, a.name;
OPEN INTERFACE
But through User Interface, we have to
write codes for validation and insertion
of datas in Interface tables and then in
Oracle base tables
ASL Conversion:
Stage Table :
REF: #202, 2
nd
61
Private API's:
Though Oracle does not have any public api's to load this but you can get advantage of using
these two API's for managing approval supplier list.
PO_ASL_THS.insert_row
Po_Asl_Attributes_Ths.Insert_row
Po_Asl_Documents_Ths.Insert_Row
Base Tables :
PO_APPROVED_SUPPLIER_LIST
REF: #202, 2
nd
62
PO_ASL_ATTRIBUTES
REF: #202, 2
nd
63
REF: #202, 2
nd
64
5.Then move this data file and control files into particular server path(custom top BIN)
REF: #202, 2
nd
65
6.Register this control file in Oracle apps with execution method as SQL * Loader
REF: #202, 2
nd
66
7. Create Concurrent Program for that Executable and this program to Request Group.
REF: #202, 2
nd
67
REF: #202, 2
nd
68
REF: #202, 2
nd
69
REF: #202, 2
nd
70
REF: #202, 2
nd
71
REF: #202, 2
nd
72
8.Then Develop the PLSQL Package to validate and move the data from stage table to
interfaceTable
in
apps
schema.
9.Then Register this Package in to Oracle Applications with executable name as PLSQL Stored
Procedure.
REF: #202, 2
nd
73
REF: #202, 2
nd
74
10.Then Create Concurrent Program and add to Request Group and Submit to validate and move
data from stage table to Interface Table.
REF: #202, 2
nd
75
REF: #202, 2
nd
76
REF: #202, 2
nd
77
REF: #202, 2
nd
78
11.Submit the Standard Concurrent Program to move the data from Interface Table to Base
Table.
REF: #202, 2
nd
79
SQL*Loader:
SQL*Loader is a high-speed data loading utility that loads data from external files into tables in
an Oracle database. SQL*Loader accepts input data in a variety of formats, can perform filtering,
and can load data into multiple Oracle database tables during the same load session.
SQL*Loader is an integral feature of Oracle databases and is available in all configurations.
am4
TYPES of FILES :
CONTROL :
The control file is a text file written in a language that SQL*Loader understands.
The control file describes the task that the SQL*Loader is to carry out. 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.
It also contains the names and locations of the bad file and the discard file.
REF: #202, 2
nd
80
Some of above information (such as name and location of the input file) can also be
passed to SQL*Loader as command-line parameters.
Its also possible for the control file to contain the actual data to be loaded. This is
sometimes done when small amounts of data need to be distributed to many sites,
because it reduces (to just one file) the number of files that need to be passed around.
control_ file_name Specifies the name, which may include the path, of the control file.
The default extension is .ctl.
LOG FILE:
The log file is a record of SQL*Loaders activities during a load session. And path_ file_name
Specifies the name of the log file to generate for a load session. You may include a path as well.
By default, the log file takes on the name of the control file, but with a .log extension, and is
written to the same directory as the control file.
BAD :
This file contains data which errored out due to data issuesand path_ file_name Specifies the
name of the bad file. You may include a path as part of the name. By default, the bad file takes
the name of the control file, but with a .bad extension, and is written to the same directory as the
control file.
DATA :
REF: #202, 2
nd
81
DATA file contains legacy data in delimted format or .CSV or .txt or .dat and path_ file_name
Specifies the name of the file containing the data to load. You may include a path as part of the
name. By default, the name of the control file is used, but with the .dat extension.
DISCARD :
While SQL*Loader is being executed it creates a discard file for records that do not meet any of
the loading criteria. The records contained in this file are called discarded records. Discarded
records do not satisfy any of the WHEN clauses specified in the control file. These records differ
from rejected records. Discarded records do not necessarily have any bad data. A discarded
record is never inserted into the Oracle table.and path_ file_name Specifies the name of the
discard file. You may include a path as part of the name. By default, the discard file takes the
name of the control file, but it has a .dis extension.
Structure of a Control file:
OPTIONS (SKIP = 1,) The first row in the data file is skipped without loading
LOAD DATA
INFILE $FILE
APPEND
REF: #202, 2
nd
(
Colomn mapping
)
OPTION statement precedes the LOAD DATA statement. The OPTIONS parameter allows you
to specify runtime arguments in the control file, rather than on the command line. The following
arguments can be specified using the OPTIONS parameter.
SKIP = n Number of logical records to skip (Default 0)
LOAD = n Number of logical records to load (Default all)
ERRORS = n Number of errors to allow (Default 50)
ROWS = n Number of rows in conventional path bind array or between direct path data
saves (Default: Conventional Path 64, Direct path all)
BINDSIZE = n Size of conventional path bind array in bytes (System-dependent default)
SILENT = {FEEDBACK | ERRORS | DISCARDS | ALL} Suppress messages during run
(header, feedback, errors, discards, partitions, all)
DIRECT = {TRUE | FALSE} Use direct path (Default FALSE)
PARALLEL = {TRUE | FALSE} Perform parallel load (Default FALSE)
REF: #202, 2
nd
83
LOAD DATA
REF: #202, 2
nd
84
INFILE *
INTO TABLE kap_emp
FIELDS TERMINATED BY ,
( emp_num, emp_name, department_num, department_name )
BEGINDATA
7369,SMITH,7902,Accounting
7499,ALLEN,7698,Sales
7521,WARD,7698,Accounting
7566,JONES,7839,Sales
7654,MARTIN,7698,Accounting
Example where file name and path is sent as a parameter when registered as a concurrent
program
LOAD DATA
INFILE $FILE
INTO TABLE kap_emp
FIELDS TERMINATED BY ,
( emp_num, emp_name, department_num, department_name )
REF: #202, 2
nd
85
TYPE OF LOADING:
INSERT If the table you are loading is empty, INSERT can be used.
APPEND If data already exists in the table, SQL*Loader appends the new rows to it. If data
doesnt already exist, the new rows are simply loaded.
REPLACE All rows in the table are deleted and the new data is loaded
TRUNCATE SQL*Loader uses the SQL TRUNCATE command.
INTOTABLEis required to identify the table to be loaded into. In the above example INTO
TABLE APPS.BUDGET, APPS refers to the Schema and BUDGET is the Table name.
FIELDS TERMINATED BY specifies how the data fields are terminated in the datafile.(If the
file is Comma delimited or Pipe delimited etc)
OPTIONALLY ENCLOSED BY specifies that data fields may also be enclosed by
quotation marks.
TRAILINGNULLCOLS clause tells SQL*Loader to treat any relatively positioned columns
that are not present in the record as null columns.
empno
REF: #202, 2
nd
86
ename
job
mgr
sal
POSITION(06:15) CHAR,
POSITION(17:25) CHAR,
POSITION(27:30) INTEGER EXTERNAL,
POSITION(32:39) DECIMAL EXTERNAL,
comm
deptno
Skip columns:
You can skip columns using the FILLER option.
Load
REF: #202, 2
Data
nd
87
TRAILING
(
name
Empno
sal
)
NULLCOLS
Filler,
,
Process Steps :
CREATE TABLE testdept
(deptno NUMBER(2) NOT NULL,
dname VARCHAR2(14),
loc VARCHAR2(13));
Create the SQL*Loader Control and Data file and place them in
$CUSTOM_TOP/bin). Create or check the interface table structures in the backend.
Server(ex:
REF: #202, 2
nd
88
REF: #202, 2
nd
89
Go to Application Developer > Concurrent > Program. Define the Concurrent Program.
Attach the executable defined above.
Go to parameters of the concurrent program. Create a parameter to take the server path of the
data file. You can also place the default value.
Attach the Concurrent program to a Responsibility through a Request Group.
REF: #202, 2
nd
90
Go to that Responsibility and Run the Concurrent Program. If successful check the output file
that have all data uploading information.
OUTPUT FILE :
nd
91
The Bad and Discard files will be created in /conc/out file of the server.
SQL*Loader is flexible and offers many options that should be considered to maximize the
speed of data loads. These include:
Use Direct Path Loads - The conventional path loader essentially loads the data by using
standard insert statements. The direct path loader (direct=true) loads directly into the Oracle
data files and creates blocks in Oracle database block format. The fact that SQL is not being
issued makes the entire process much less taxing on the database. There are certain cases,
however, in which direct path loads cannot be used (clustered tables). To prepare the database
for direct path loads, the script $ORACLE_HOME/rdbms/admin/catldr.sql.sql must be executed.
REF: #202, 2
nd
92
Disable Indexes and Constraints. For conventional data loads only, the disabling of indexes
and constraints can greatly enhance the performance of SQL*Loader.
Use a Larger Bind Array. For conventional data loads only, larger bind arrays limit the number
of calls to the database and increase performance. The size of the bind array is specified using
the bindsize parameter. The bind array's size is equivalent to the number of rows it contains
(rows=) times the maximum length of each row.
Use ROWS=n to Commit Less Frequently. For conventional data loads only, the rows
parameter specifies the number of rows per commit. Issuing fewer commits will enhance
performance.
Use Parallel Loads. Available with direct path data loads only, this option allows multiple
SQL*Loader jobs to execute concurrently.
$ sqlldr control=first.ctl parallel=true direct=true
$ sqlldr control=second.ctl parallel=true direct=true
Use Fixed Width Data. Fixed width data format saves Oracle some processing when parsing
the data. The savings can be tremendous, depending on the type of data and number of rows.
REF: #202, 2
nd
93
Disable Archiving During Load. While this may not be feasible in certain environments,
disabling database archiving can increase performance considerably.
Use unrecoverable. The unrecoverable option (unrecoverable load data) disables the writing of
the data to the redo logs. This option is available for direct path loads only.
SQL*Loaders Capabilities:
SQL*Loader can read from multiple input files in a single load session.
SQL*Loader can handle files with fixed-length records, variable-length records, and
stream-oriented data.
SQL*Loader supports a number of different data types, including text, numeric, zoned
decimal, packed decimal, and various machine-specific binary types.
Not only can SQL*Loader read from multiple input files, but it can load that data into
several different database tables, all in the same load session.
SQL*Loader allows you to use Oracles built-in SQL functions to manipulate the data
being read from the input file.
SQL*Loader includes functionality for dealing with whitespace, delimiters, and null data.
In addition to standard relational tables, SQL*Loader can load data into object tables,
varying arrays (VARRAYs), and nested tables.
SQL*Loader can load data into large object (LOB) columns.
SQL*Loader can handle character set translation between the input data file and the
database.
REF: #202, 2
nd
94
Outbound Interface:
Process:
Gather the data from Oracle apps using SQL
Use UTL_FILE to insert the data into files and store in appropriate server path.
REF: #202, 2
nd
95
Once developed and compiled then create Concurrent Program for procedure.
---------------------------------------------------------------------------------------- COC PROG NAME:xx_outbound
--- FILE NAME :INV_ITEM
--- APPLICATION :INV
--- REQST GROUP :GL
--- FILE LOCATED IN SERVER :/ed22/ora510/eld1appl/inv/11.5.0/sql
REF: #202, 2
nd
96
OUT VARCHAR2,
MC ,
MTL_CATEGORY_sETS MCS
WHERE MSI.ORGANIZATION_ID=OOD.ORGANIZATION_ID
--AND OOD.ORGANIZATION_ID=204
AND MSI.INVENTORY_ITEM_ID=MIC.INVENTORY_ITEM_ID
AND MSI.ORGANIZATION_ID=MIC.ORGANIZATION_ID
AND MIC.CATEGORY_ID=MC.CATEGORY_ID
AND MIC.CATEGORY_SET_ID=MCS.CATEGORY_SET_ID
REF: #202, 2
nd
97
l_id utl_file.file_type;
l_count number default 0;
begin
-- SELECT * FROM V$PARAMETER WHERE NAME LIKE'utl_file%'
l_id:=utl_file.fopen('/ed22/ora510/eld1db/9.2.0/appsutil/outbound/ELD1_eld1','inv.txt','w');
FOR C2 IN C1 LOOP
l_count:=l_count+1 ;
utl_file.put_line(l_id ,C2.ITEM
||'_'||
C2.ORG_NAME ||'_'||
C2.CAT ||'_'||
C2.CAT_SET
);
END LOOP;
utl_file.fclose(l_id);
REF: #202, 2
nd
98
,'SUBMITED
BY
'||
'||
EXCEPTION
WHEN UTL_FILE.invalid_path THEN
FND_FILE.PUT_LINE(FND_FILE.LOG,'INVALID PATH');
WHEN OTHERS THEN
FND_FILE.PUT_LINE(FND_FILE.LOG,'ERR ACCOURED IN PROGRAM');
END INV_ITEM;
Then Register this Package in to Oracle Applications with executable name as PLSQL Stored
Procedure.
REF: #202, 2
nd
99
REF: #202, 2
nd
100
Then Create Concurrent Program and add to Request Group and Submit to validate and move
data from stage table to Interface Table.
REF: #202, 2
nd
101
REF: #202, 2
nd
102
REF: #202, 2
nd
103
REF: #202, 2
nd
104
Submit the Standard Concurrent Program then check corresponding server path for data file.
LIMITATIONS of UTL_FILE :
To create a file it is required to initially create a directory..
CREATE DIRECTORY temp AS "/user/test/"
this would create the directory inthe unix box with name temp under the path /user/test.
now using the UTL_FILE.FOPEN we can read or write to a file.
REF: #202, 2
nd
105
UTL_FILE.FOPEN(/user/test/temp,testfile01,W,50)
the above command will create a file by name testfile01 under the specified path in Write mode
containing each line a max of 50 character.
A max of 50 files can be open simultaneaously and max line size is 50 char these are some of
limitations of UTL_FILE
Questions:
Form :
It is a developmental tool that is used for designing data entry and query screens. It is a front-end
tool that runs in a Graphical User Interface (GUI).
GUI Concepts:
These concepts holds good for any user-interface.
REF: #202, 2
nd
106
nd
107
1. Stacked Canvas
2. Content Canvas
3. Horizontal Toolbar
4. Vertical Toolbar
5. Tab Canvas
Lets discuss briefly about the triggers in this section, for more information you can look through
the Forms Builder Help Topics.
Note: The hierarchy of Objects in a form is
Form
Block
Record
Item
Triggers: These are program units which enhance the functionality of a form/application.
The following triggers can be used to enhance the functionality of the form:
Block Processing Triggers: It fires in response to events related to record management in block.
e.g., When_Create_Record,When_Clear_Block,
Interface Event Triggers: It fires in response to events that occur in form interface.
e.g., When_Button_Pressed,When_Checkbox_Changed,
Master-Detail Triggers: It fires automatically when defined master-detail relationship between
blocks. (Master-Detail relationship discussed further in the document)
e.g.,On_Checkdelete_Master,On_Clear_Details,
Message Handling Triggers: It fires to issue appropriate error and information messages in
response to runtime events.
Registering New Forms in Oracle Apps 11i :
In this tutorial you will learn how to Register New Forms in Oracle Apps 11i , registering form
functions, creating menu of functions and creating responsibilities.
Document Summary
This document describes the process of registering new forms in oracle applications.
Registering a Form
Navigation Application Developer -> Application->Form
REF: #202, 2
nd
108
REF: #202, 2
nd
109
Fields
Form : Enter the file name of your form (the name of the .fmx file) without extension. Your
form filename must be all uppercase, and its .fmx file must be located in your application
directory structure.
Application : Enter the name of the application which will own this form.
User Form Name : This is the form name you see when selecting a form using the Functions
window.
Description : Enter a suitable description for your form.
Register Form Functions
Navigation Application Developer -> Application->Function
REF: #202, 2
nd
110
REF: #202, 2
nd
111
Click on the form tab and you will see following screen
REF: #202, 2
nd
112
Fields
Function : Enter a unique function name for your function. This function name can be used
while calling this program programmatically. This name is not visible to the user through other
forms.
Form : Select the form name which you have registered.
Application : Select the application name for your form.
Parameters : Enter the parameters that you want to pass to your form function. E.g. Query_only.
Creating Menu of Functions
Navigation Application Developer -> Application->Menu
REF: #202, 2
nd
113
REF: #202, 2
nd
114
Fields
Menu : Enter the descriptive name for the menu. This name is not visible to the user.
User Menu Name : The user menu name is used when a responsibility calls a menu.
Menu Type : The options in menu type include:
Standard - for menus that would be used in the Navigator form
Tab - for menus used in self-service applications tabs
Security - for menus that are used to aggregate functions for data security or specific
function security purposes, but would not be used in the Navigator form
Seq : Enter a sequence number.
Prompt : Enter the prompt that the users will see for the menu.
Submenu : If you want another menu to be called from this menu, then enter this menu name in
this field.
Function : Enter the form function name in this field.
Description : Enter a suitable description for the menu.
REF: #202, 2
nd
115
Grant :The Grant check box should usually be checked. Checking this box indicates that this
function is automatically enabled for the user. If this is not checked then the function must be
enabled using additional data security rules.
View Tree :Click on View Tree Button and you will see following screen with the full hierarchy
of the menu.
Creating Responsibilities
Navigation System Administrator -> Security->Responsibility->Define
REF: #202, 2
nd
116
Click on Define button and you will see following screen in front of you.
REF: #202, 2
nd
117
Fields
Responsibility Name : Enter the responsibility name for the new responsibility.
Application : Enter the application name you want to associate the new responsibility to.
Responsibility Key : The responsibility key is a unique identification for the responsibility. This
is used in the loader programs for internal purposes.
Description : Enter a suitable description for the new responsibility.
Effective Dates : Enter the date range in which the responsibility will be active in the From and
To fields.
Available From : In the available from field box, select whether you want this responsibility to
be available from Oracle applications or from Oracle Self Service Web Applications or from
Oracle mobile Applications.
Data Group : The data group defines the database user name that oracle applications use to
connect to the database when you connect to applications using this responsibility.
Menu Name : Enter the menu name that you want to associate with this responsibility.
REF: #202, 2
nd
118
Web Host Name : If your Web Server resides on a different machine from your database, you
must designate the host name (URL) here. Otherwise, the Web Host Name defaults to the current
database host server.
Web Agent Name : Enter the PL/SQL Agent Name for the database used by this responsibility.
If you do not specify an Agent Name, the responsibility defaults to the agent name current at logon.
Request Group : The request group would define which requests the users with this
responsibility can run. If no request group is assigned to this responsibility then the users with
this responsibility will not be able to run requests for which he is not the owner.
Enter the Request group name and Application name for the request group that you want to
assign to this responsibility.
Questions :
1. What is the significance of attaching a request group to a responsibility?
2. What is the significance of attaching a data group to a responsibility?
3. How we relate a function to a form?
4. What is a difference between submenu and function?
5. What is the significance of responsibility in oracle applications?
Form Personalization :
Using the Form Personalization you have option to alter Oracle code at runtime bypassing
important validation logic.
Form Personalizations allows you to fundamentally alter the behavior of the seeded product
forms that Oracle provides you to access data..
Form Personalizations looks very simple and easy things,but sometime this may jeopardize the
integrity of your data. Therefore developer and solution provider context , you must have a
clarity in architectural understanding.
REF: #202, 2
nd
119
Personalization form automatically queries the function, form and pre-defined personalization
rules, if any exists for the specific form. For example, the form name is INVTOMAI i.e. Move
Order form on which the personalization form is opened.
Personalization Form
The Personalization form mainly contains four sections.
Rules
Conditions
Context
Actions
For each function (a form running in a particular context based on parameters passed to it), we
can specify one or more Rules. Each Rule consists of an Event, an optional Condition, the Scope
for which it applies, and one or more Actions to perform.
REF: #202, 2
nd
120
Rules
Rules administer the personalization needs to be implemented on the form. Each rule contains a
sequence number, description and level (Rules may now be specified as acting either at the
Function level (the default) or at the Form level). The rule can be activated or de-activated using
the Enabled checkbox. The rule can be deleted when no longer needed.
Defining rules doesnt identify, when the rule should get evaluated or applied. For each rule,
there should be conditions attached, which power the execution of the rule.
Conditions
Conditions decide the event the rule to be executed. Each condition mainly contains three
sections i.e. Trigger Event, Trigger Object and Condition.
REF: #202, 2
nd
121
WHEN-VALIDATE-RECORD: each time the current record has any change that needed
to be validated.
SPECIAL1 through SPECIAL45: each time the user selects a menu entry from
:
Trigger Object is the object on the form to determine at what level the rule should be executed.
The value can be or
Condition is an optional SQL code fragment that is evaluated when the Event occurs; if it
evaluates to TRUE then the Actions are processed.
Processing Mode is a pop-list which controls when the Rule should be processed i.e., Rules can
be applied while not in Enter-Query mode (the default), only in Enter-Query mode, or in both
modes.
Context
Context manages to whom the personalization should apply. This is similar to the concept of
using profile options in Oracle Applications. The various levels are Site, Responsibility, Industry
and User. During runtime, the values provided in the context are evaluated and personalization
rules will be applied. Usage of context is very vital in implementing the personalization to
prevent the inappropriate users accessing these customizations of the form.
Context levels
While saving a Rule, if no Context rows have been entered the form will automatically create a
row at the Site level.
Actions
Actions decide the exact operation to be performed when the event occurs and the condition
evaluates to true during the runtime.
Each Action consists of one of the following:
setting a Property
displaying a Message
executing a Builtin
enabling a Menu/Special entry
REF: #202, 2
nd
122
Action Types
Each action contains a sequence number, description and language. Actions can be enabled,
disabled or deleted. Based on the action type selected, the fields on the right sector of the actions
tab will be refreshed, where the action parameters are entered.
Insert 'Get' Expression button can be used to automatically construct the expression.
Insert Item Value button can be used to consider the item name along with colon (:)
Example :TOMAI_MAIN_HEADER_BLK.REQUEST_NUMBER
Validate used to test if the syntax of your string is valid. If the evaluation fails, the processing
engine will return an ORA error as if the string had been part of a SQL expression. Otherwise, it
will display the text exactly as it would appear at runtime in the current context.
Apply Now used to apply the changes immediately to the target form to test its effect.
Tables :
FND_FORM_CUSTOM_RULES
FND_FORM_CUSTOM_ACTIONS
FND_FORM_CUSTOM_SCOPES
FND_FORM_CUSTOM_PROP_LIST
FND_FORM_CUSTOM_PROP_V
REF: #202, 2
nd
123
Examples :
How to make Reason field from Corrections form mandatory using Personalization?
That
can
0.
Navigate
1.
the
Click
be
to
Enter
Help
/
Form
2.
Function
Form
Debug
Enter:
Seq
Description
Level
Enabled
Condition:
Trigger
Trigger
Condition
Processing
Corrections
form
Diagnostics
as
Receiving
follows:
Receiving
/
Custom
Code
Personalizations
Name
Name
Mode
=
=
=
make
Reason
=
Field
flag
REALLY
is
Personalize
opens
1
Mandatory
Function
checked.
Event
=
WHEN-VALIDATE-RECORD
Object
=
RCV_TRANSACTION
:RCV_TRANSACTION.REASON_CODE
is
null
Mode
=
Both
=
=
nd
Corrections
RCV_RCVTXECO
RCVTXECO
Off
Actions:
Seq
Type
REF: #202, 2
achieved
1
Message
124
Message
Message
Type
=
Text
Seq
Type
Language
Enabled
Builtin
Save
=
enter
Please
=
=
Type
reason
2
Builtin
All
checked
FORM_TRIGGER_FAILURE
it.
=
flag
=
Show
code
is
RAISE
personalization
should
stay
once
BEHAVIOR
applied.
STEPS
The
issue
can
be
reproduced
at
will
with
the
following
steps:
1.
Log
into
China
HRMS
responsibility
2.
Navigate
to
PEOPLE
form
3. Select Help > diagnostics > Custom Code > Personalize from the pull down menu
Enter
Seq
and
Description
- Go to ACTIONS tab, enter Description and click on 'Select By Text...'
Select
PERSON.LOC_ITEM08
Put
the
desired
text
in
'Value'
Save
- Close the form and re-enter
The
form
personalization
should
be
done
in
the
following
way:
1. Open the PEOPLE form and select Help > Diagnostics > Custom Code > Personalize from the
REF: #202, 2
nd
125
pull
2.
down
Do
menu.
the
This
following
will
to
open
the
change
the
Seq
Description
-------------------------------------------------------------------10
Change
Prompt
Under
CONDITION
Trigger
Trigger
Condition:
Processing
tab,
of
Enabled
Function
IS
in
Yes
the
following:
WHEN-NEW-ITEM-INSTANCE
PERSON.LOC_ITEM06
IS
NULL
OR
NOT
NULL
Enter-Query
Mode
if
Level
-------------------------User
form
'Expatriate'
Level
CONTEXT
Note:
prompt
enter
Event:
Object:
:PERSON.LOC_ITEM06
:PERSON.LOC_ITEM06
Mode:
Not
Enter
Personalizations
required:
Value
XXXXX
XXXXX
is
the
name
of
the
user
Save
Go
to
ACTIONS
tab
and
enter
Seq
Type
Description
------------------------------------------------------------------------REF: #202, 2
nd
the
Language
following:
Enabled
126
10
Property
Change
Object
Target
Property
Value:
-
prompt
All
Yes
Type:
Item
PERSON.LOC_ITEM08
PROMPT_TEXT
Foreigner
Object:
Name:
Save
and
click
Close
on
'Apply
the
Now'
button
form
- Reopen the PEOPLE form. As expected, the prompt 'Expatriate' in 'Miscellaneous' tab has now
changed to 'Foreigner'.
How to force the form fields to use upper case/lower case using forms personalization
feature ?
1. Navigate to the form where you want to enforce upper case/lower case in the form
field.
2.
Select
Help
->Diagnostics
>
Custom
Code
->
Personalize.
nd
the
Actions
tab,
enter
:
Type
Object
:
Name
UPPERCASE
the
following
values:
Property
:
Item
Block_Name.Field_Name
:CASE_RESTRICTION
or
LOWERCASE
127
6. Save the changes and exit Forms personalization form for the changes to take
effect.
How to change the color of a field using form personalizations ?
The following example changes the color of the USER.DESCRIPTION field on the Users form.
1. Create the following action on the WHEN-NEW-FORM-INSTANCE condition of your form
with the appropriate field name:
2.
Seq:
Type:
Lang:
ACTIONS
10
Property
All
Object
Target
Property
Value:
Type:
Object
ITEM
USER.DESCRIPTION
BACKGROUND_COLOR
r255g238b168
:
Name:
you
can
do
the
same
The Value can be any RGB value
thing
for
the
FOREGROUND_COLOR
How to insert or update a database column based on some calculation using Forms
Personalization. ?
Solution
1.Navigate to the Form which is having the LOV Item
2.Open the Personalization form from the pull down menu Help => Diagnostics => Custom
Code
=>
Personalize.
REF: #202, 2
nd
128
:
Type
10
Builtin
FORMS_DDL
:
Begin
Insert Into <table_name>(<column_name>) values('|| (:<block_name><item_name_1> +
:<block_name><item_name_2>)
||');
Commit;
End;
4.Save the personalization rule.
How to disable or alter the display property of a tab page in Oracle Application Forms?
In Oracle Application Release 11.5.10, the functionality can be easily achieved by using
Forms Personalization
1)Navigate to the Form in which you would like to modify the Tab Page.
2)Navigate
to
Help->Diagnostics->Custom
Code->Personalize
3)Enter
the
correct
Sequence
and
appropriate
Description
a)Let
the
Triggering
event
be
WHEN-NEW-FORM-INSTANCE
b)Go To Actions Tab and specify the Sequence and 'Property' value in Type Field.
REF: #202, 2
nd
129
c)Object
Object=>Select Tab
e)Property
f)Value=>False
d)Target
Page
Type=>Tab
Name which
page
is to be modified
Name=>Enabled/Displayed
Prior to Oracle Application Release 11.5.10, this functionality can be achieved by writing
following code in the CUSTOM.pll
if event_name='WHEN-NEW-FORM-INSTANCE' and form_name='<Form Name' then
SET_TAB_PAGE_PROPERTY(<tab_page_name>,<ENABLED/VISIBLE>,<PROPERTY_TR
UE/PROPERTY_FALSE>);
end
if;
In the above code the internal name of the Tab
This can be found by opening the forms in the Form Builder.
Page
should
be
specified.
How can the Add button be excluded from the Purchase Order form, so that users can only
update the purchase orders, but not create new ones?
It is not possible to exclude the Add button in the Purchase Order form using the standard
function exclusions, but the same thing can be achieved via the Form Personalization, as follows:
1.
2.
Open
Help
the
->
Seq
Description
Level
Enabled
Event
Custom
=
Object
nd
->
Order
entry
Code
=
<description>,
=
=
Condition:
Trigger
Trigger
REF: #202, 2
Diagnostics
Purchase
->
e.g.
form:
Personalize
1
Test
Function
checked
WHEN-NEW-RECORD-INSTANCE
PO_HEADERS
130
Processing
Mode
Not
in
Enter-Query
Mode
Context
Level
=
User
Value = <user name> (the users names that should not have access to create a new PO can be
added here).
If all users for a custom responsibility need not have the access, then one can use Level =
Responsibility,
Value
=
<custom
responsibility
name>)
Action:
Seq
Type
Object
Target
Property
Value
=
=
Type
Object
Name
=
=
=
=
1
Property
Block
PO_HEADERS
INSERT_ALLOWED
FALSE
3. Save.
Limitations of Forms Personalization:
This feature has several significant limitations due to the architecture of Oracle Forms and/or the
e-Business Suite.
User can only change what Oracle Forms allows at runtime. For example, the following
cannot be changed:
User cannot display an item, which is not on a canvas (thus, individual flexfield
segments cannot be displayed)
User cannot set certain properties such as the Data type of an Item.
REF: #202, 2
nd
131
Form Personalization can only respond to events that are centrally processed and
dispatched by APPCORE. These are limited to:
WHEN-NEW-FORM-INSTANCE,
WHEN-NEW-BLOCK-INSTANCE,
WHEN-VALIDATE-RECORD (in many but not all forms). This event occurs
whenever changes have been made to the current record in the current block.
SPECIAL1 through SPECIAL45. These occur when the user selects entries from
the Tools, Reports and Actions drop down menus.
Form Personalization can only respond to events that are centrally processed and
dispatched by APPCORE. These are limited to:
WHENNEW-RECORD-INSTANCE
should read
WHEN-NEW-RECORD-INSTANCE
User can see only the events that are being passed by enabling the 'Show Events' option
in the Custom Code menu.
To specify the Initial Value of an Item, user must perform that action in the
WHEN-NEW-RECORD-INSTANCE event of the block that contains the item.
REF: #202, 2
nd
132
Both the Personalization form and the runtime-processing engine will report errors for
these cases and skip processing of them.
Most significantly, this may interfere with, or be overridden by, base product code; any
change user make might interfere with the normal operation of the form. This can
manifest itself in several ways, such as:
User may make a personalization but it does not take effect, because there is code
in the form that overrides it. In some cases user may be able to perform user
personalization by moving the Trigger Event to a 'lower' level, such as block or
item-level.
User personalization may simply produce the wrong result, because user change
interacted with the base code in unexpected and untested ways. At best this error
will occur immediately upon the personalization being applied; at worst it could
REF: #202, 2
nd
133
affect some later processing which does not appear to be directly related to the
object or event.
In extreme cases, user changes may prevent the form from running at all, making
it difficult to open the Personalization screen to remove the offending
personalization unless user turn off Custom Code. Because of this, it is critical
that any change be thoroughly tested in a Test environment. See the
'Troubleshooting, Support, and Upgrade considerations' section later in this
chapter for more information.
Use of the Apply Now button does not always work if dependent on the results of another
action.
The argument (sql) length for creating a record group must be within 2000 Characters.
Populating LOV dynamically from a Record Group must be against the WHEN-NEWITEM-INSTANCE of that LOV item.
The use of the action RAISE FORM_TRIGGER_FAILURE may not work properly in
some triggers.
Use of Builtin Action "Raise Form_Trigger_Failure" and pressing the button "Apply
Now" will show the message "One or more required fields are missing values".
It is not possible to use server-side functions that have OUT parameters as the condition
to execute the actions.
REF: #202, 2
nd
134
A patch does not touch user code, but user still must re-test after applying
a patch.
TCA :TCA is a data model that supports the entry and management of entities that you interact
with. So lets revisit the concept.Trading Community Architecture is a Very flexible, very robust
model which defines the components involve in trading within in E-business Suite.The
implementation of technology and applications to allow users to create and maintain
relationships among entities,The universal data schema for customers, prospects, suppliers,
distributors, resellers, consortiums, bank across all Oracle EBS applications
TCA not only allows for the tracking of relationships between the implementing organization and
its trading partners, but also tracks relationships between the trading partners themselves.
REF: #202, 2
nd
135
REF: #202, 2
nd
136
PARTIES
The related tables are as follows:
HZ_REFERENCES : Stores information about reference given by one party about another.
REF: #202, 2
nd
137
CUSTOMER ACCOUNTS
REF: #202, 2
nd
138
CONTACT POINTS
SITES/LOCATIONS
REF: #202, 2
nd
139
HZ_PARTIES_SITE_USES : Stores information about the party site uses and business
purposes. A party site can have multiple site uses such as bill to or ship to and each site
is stores as a record in this table.
REF: #202, 2
nd
140