Вы находитесь на странице: 1из 68

What happens when you login to Apps?

Firstly and surely there is a URL for oracle applications that is structured possibly in below
format, although it can vary from version of apps.
http://machinename:portnumber/OA_HTML/US/ICXINDEX.htm
http://machinename:portnumber /oa_servlets/AppsLogin
When you join an Oracle Apps development team for an employer, you will first be given URL
of the development environment.
In any Oracle Apps implementation project (assuming it has gone live), there are minimum of
three environments, each with different URL's and different database instances.
These are:--------------Development environment
Testing environment
Production environment
You will most probably, as a techie, be given url,username ad password of the development
environment.
What happens when you login(no advanced info here):-------------------------------------A. Your login gets authenticated against a table named fnd_user for your username and
password. The screen below is where username and password defined. This screen is called user
definition screen. Only system administrators have access to this screen.
B. As you can see above, this username xxpassi is attached to two responsibilities (this will be
discussed in details in latter training lesson). It is this assignment to the responsibility that
controls what a logged in person can do and can't do. In laymans words, a responsibility is a
group of menu.

C. When you successfully login you will see below screens.

This screen below will prompt you to change your password, to a value different than that
assigned by System Administrator.

Click on either of the above Responsibility Names, will initiate Oracle Apps( Note: You might
be prompted to install jinitiator..just keep clicking OKOK for all Jinitiator messages).
Effectively, what I mean to say is that you do not need to download jinitiator from anywhere;
Oracle will do this automatically (provided your DBAs got this cofiged) for you during your
first logon attempt from the PC. Once your jInitiator gets installed

Hurray, we have logged into apps.


Some notes on advanced info (beginners may ignore this):
Oracle internally uses a login named GUEST, prior to invoking validation of actual username.
Some people regard this as a security threat, but it isnt. Your DBAs can change the guest
password from its default value after installation.
Oracle uses a DB User account named applsyspub to which it first connects during validation of
LOGIN. This user account has very restricted privileges and has access to below objects
(primarily for authentication purposes):FND_APPLICATION

FND_UNSUCCESSFUL_LOGINS
FND_SESSIONS
FND_PRODUCT_INSTALLATIONS
FND_PRODUCT_GROUPS
FND_MESSAGES
FND_LANGUAGES_TL
FND_APPLICATION_TL
FND_APPLICATION_VL
FND_LANGUAGES_VL
FND_SIGNON
FND_PUB_MESSAGE
FND_WEBFILEPUB
FND_DISCONNECTED
FND_MESSAGE
FND_SECURITY_PKG
FND_LOOKUPS

What are Profile Options in Oracle Apps ?


Profile Options provide flexibility to Oracle Apps. They are a key component of Oracle
Applications, hence these much be understood properly. I will be taking multiple examples here
to explain what profile options mean. I will also try to explain by stepping into Oracle shoes
"How will you design a program that is flexible", by using Profile Options.
Following that, if you still have questions regarding profile options, then leave a comment and I
promise to respond. For the learners of Oracle Apps, understanding profile options is mandatory.
What is profile option?
The profile option acts like a Global Variable in Oracle.
Why does Oracle provide profile options?
These are provided to keep the application flexible. The business rules in various countries and
various companies can be different. Hence the profile options are delivered by Oracle in such a
manner to avoid hard-coding of logic, and to let the implementation team at site decide the
values of those variables.
For screenshots of below listed examples in this article, please click

this link

Enough definitions, give me some scenarios where profile options are used by Oracle....
1. There are profile options which can turn the debugging on, to generate debug messages. Say
one of 1000 users reports a problem, and hence you wish to enable debugging against just that
specific user. In this case you can Turn On the debugging profile option "again that specific
user".
2. There are profile options that control which user can give discount to their customers at the
time of data entry. You can set profile option "Discount Allowed" to a value of either Yes or No
against each Order Entry user.

3. Lets assume an Organization has department D1 and D2. Managers of both the Departments
have "HRMS Employee View" responsibility. But you do not want Manager of D2 to be able to
see the list of Employees in Organization D1. Hence you can set a profile option against the
username of each of these users. The value assigned to such profile option will be "Name of the
Organization" for which they can see the employees. Of course, the SQL in screen that displays
list of employees will filter off the data based on logged in users profile option value.
Lets take an example. Lets assume you are a developer in Oracle Corporation building a
screen in ERP. Let us further assume that you are developing an Order Entry screen.
Assume that business requirements for your development work is:1. Screen should be flexible to ensure that different users of the screen can give different levels
of discounts. For example, a clerk Order Entry User can give no more than 5% discount. But
Sales Manager can enter an Order with 15% discount.
2. There should not be any hard-coding regarding the maximum permissible discount.
3. In the screen there will be a discount field.
4. When the discount value is entered in discount field, an error will be raised if user violates the
maximum permissible discount.
Here is how Oracle will code this screen
1. They will define a profile option named "OEPASSI Maximum Discount Allowed".
2. The short name of this profile option is "OEPASSI_MAX_DISCOUNT"
2. In the when-validate-item of the discount field(assuming Oracle Forms), following code will
be written
IF :oe_line_block.discount_value > fnd_profile.value('OEPASSI_MAX_DISCOUNT')
THEN
message(
'You cant give discount more than '
|| fnd_profile.value('OEPASSI_MAX_DISCOUNT') || '%' ) ;
raise form_trigger_failure ;-- I mean raise error after showing message
END IF ;
Here is how, the client implementing Oracle Order Entry will configure their system.
1. Navigate to System administration and click on system profile menu.
2. For Clerk User(JOHN), set value of profile "OEPASSI Maximum Discount Allowed" to 5
For Sales Manager User(SMITH), set value of profile "OEPASSI Maximum Discount Allowed"
to 15
Question: This sounds good, but what if you have 500 Order Entry Clerks and 100 Order Entry
Sales Managers? Do we have to assign profile option values to each 600 users?
Answer : Well, in this case, each Clerk will be assigned Responsibility named say XX Order
Entry Clerk Responsibility
Each Sales Manager will be assigned Responsibility named say XX Order Entry Sales Manager
Responsibility
In this case, you can assign a profile option value to both these responsibilities.

XX Order Entry Clerk Responsibility will have a value 5% assigned against it. However, XX
Order Entry Sales Manager Responsibility will have a profile option value of 15% assigned.
In the when-validate-item of the discount field, following code will then be written
IF :oe_line_block.discount_value > fnd_profile.value('OEPASSI_MAX_DISCOUNT')
THEN
message(
'You cant give discount more than '
|| fnd_profile.value('OEPASSI_MAX_DISCOUNT') || '%' ) ;
raise form_trigger_failure ;-- I mean raise error after showing message
END IF ;
Please note that our coding style does not change even though the profile option is now being
assigned against responsibility. The reason is that API fnd_profile.value will follow logic similar
to below.
Does Profile option value exist against User?
--Yes: Use the profile option value defined against the user.
--No: Does Profile option value exist against Responsibility
-----Yes: Use the profile option value defined against the current responsibility in which user has
logged into.
-----No: Use the profile option value defined against Site level.

Profile Options Examples Screenshots


You have reached this page from Profile Options Training Article
Firstly, lets define the responsibility for Clerk, as we discussed in Article.

Next, lets define the sales manager responsibility, as we discussed in Article.

Lets define user JOHN, that is Clerk

And also, lets define user SMITH ( Sales manager )

Now, we need to define the profile option for discount, hence go to responsibility "Application
Developer"

When you click on menu "Profile" above, you will then see below screen for defining profile
option. Please note that the "Name" field is the short name of profile option, and it is this name
used in API call to FND_PROFILE.value

Now, after having defined a profile option, its time to assign these to JOHN & SMITH.
Hence go to responsibility "System Administrator"

Click on Menu Profile/System, as below

The profile option assignment screen looks like below. Enter JOHN in USER, OEPASSI% in
Profile, to select profile named "OEPASSI Maximum Discount Allowed"

Assign a value of 5 to the user.

Click on torch, to return to search screen as below

and this time we will assign value of 15 against user SMITH.

OK, what if we have too many clerks, we can also simply assign profile value to Responsibility
of Clerk. Doing so, all the users that use this responsibility, will inherit profile option value
against Responsibility.

Assign 5% max discount for Clerks

Now, lets select Sales Manager responsibility in profile screen

Search on this...as below......

Assign value 15% to Sales Manager responsibility.

ORG_ID and Multi Org In Oracle Apps


In this Oracle Apps training article, we will learn about org_id. I hope that you have read and
understood the significance of profile options that we discussed in the earlier chapter.
Before I tell you what is org_id, lets do some questions & answers:Why do we need org_id
In any global company, there will be different company locations that are autonomous in their
back office operations. For example, lets take the example of a gaming company named
GameGold Inc that has operations in both UK and France.
Please note the following carefully:1. This company(GameGold Inc) has offices in both London and Paris
2. UK has different taxation rules that France, and hence different tax codes are defined for these
countries.

3.GameGold Inc has implemented Oracle Apps in single instance(one common Oracle Apps
database for both UK & France).
4. When "UK order entry" or "UK Payables" user logs into Oracle Apps, they do not wish to see
tax codes for their French sister company. This is important because French tax codes are not
applicable to UK business.
5. Given the single database instance of GameGold Inc, there is just one table that holds list of
taxes. Lets assume that the name of the Oracle table is ap_tax_codes_all
6. Lets assume there are two records in this table.
Record 1 tax code -"FRVAT"
Record 2 tax code - "UKVAT"
7. Lets further assume that there are two responsibilities
Responsibility 1 - "French order entry".
Responsibility 2 - "UK order entry"
8. Now, users in France are assigned responsibility 1 - "French order entry"
9. Users in UK will be using responsibility named "UK order entry"
10. In the Order Entry screen, there is a field named Tax Code(or VAT Code).
11. To the French user, from the vat field in screen, in list of values UKVAT must not be visible.
12. Also, the "French order entry" user should only be able to select "FRVAT" in the tax field.
13. Similarly, UK order entry user, that uses responsibility "UK Order Entry", only "UKVAT"
should be pickable.
How can all this be achieved, without any hard coding in the screen.
Well....the answer is org_id
ORG_ID/Multi-Org/Operating Unit are the terminologies that get used interchangeably.
In brief steps, first the setup required to support this....
The screenshots are at the bottom of the article
1. You will be defining two organizations in apps named "French operations" and "UK
Operations". This can be done by using organization definition screen.
2. In Oracle Apps, an organization can be classified as HRMS Org, or Inventory Warehouse Org,
or Business Group, Operating Unit Org or much more types. Remember, Organization type is
just a mean of tagging a flag to an organization definition.
3. The two organizations we define here will be of type operating unit. I will be using words
org_Id & operating unit interchangeably.
4. Lets say, uk org has an internal organization_I'd =101
And french org has orgid =102.
Qns: How will you establish a relation betwee uk responsibility and uk organization.
Ans: By setting profile option MO : Operating unit to a value of UK Org, against uk order entry
responsibility
Qns: How will the system know that UKVAT belongs to uk org?
Ans: In VAT code entry screen(where Tax Codes will be entered), following insert will be done

Insert into ap_vat_codes_all values(:screenblock.vatfield, fnd_profile.value('org_id').


Alternately, use USERENV('CLIENT_INFO')
Next question, when displaying VAT Codes in LOV, will oracle do: select * from
ap_vat_codes_all where org_id=fnd_profile.value('ORG_ID')?
Answer: almost yes.
Oracle will do the following
1. At the tme of inserting data into multi-org table, it will do insert into (vatcode,org_id) ....
2. Creates a view in apps as below
Create or replace view ap_vat_codes as Select * from ap_vat_codes_all where org_id =
fnd_profile.value('ORG_ID')
3. In the lov, select * from ap_vat_codes ,
If the above doesn't make sense, then keep reading.
May be quick revesion is necessary:_
1. In multi org environment(like uk + france in one db), each Multi-Org Table will have a
column named org_id. Tables like invoices are org sensitive, because UK has no purpose to see
and modify french invoices. Hence a invoice table is a candidate for ORG_ID column.
By doing so, UK Responsibities will filter just UK Invoices. This is possible because in Apps,
Invoice screens will use ap_invoices in their query and not AP_INVOICES_ALL.
2. Vendor Sites/Locations are partitined too, because UK will place its ordersfrom dell.co.uk
whereas france will raise orders from dell.co.fr. These are called vendor sites in Oracle
Terminology.
3. Any table that is mutli-org (has column named org_id), then such table name will end with
_all
4. For each _all table , Oracle provides a correspondong view without _all. For examples create
or replace view xx_invoices as select * from xx_invoices_all where org_id=fnd
_profile.value('org_id').
5. At the time of inserting records in such table, org_id column will always be populated.
6. If you ever wish to report across all operating units, then select from _all table.
7. _all object in APPS will be a synonym to the corresponding _all table in actual schema. For
example po_headers_all in apps schema is a synonym for po_headers_all in PO schema.
8. When you connect to SQL*Plus do the below
connect apps/apps@dbapps ;
--assuming 101 is French Org Id
execute dbms_application_info.set_client_info ( 101 );
select tax_code from ap_tax_codes ;
---Returns FRVAT
--assuming 102 is UKOrg Id
execute dbms_application_info.set_client_info ( 102 );
select tax_code from ap_tax_codes ;
---Returns UKVAT

Now some screenshots

Applications in Oracle Apps


In this training chapter I will explain what Application means, in Oracles context.
As a thumbrule, for one module there is one single application.
Uptill 8 years ago, it was mandatory for each table to be registered against an Application in Oracle Financials; but
now such a relation no longer exist.
Oracle is a mixture of various applications like Payables, General Ledger, Payroll, Human Resources,
manufacturing. You can call these modules, but officially these are called applications. Hence the name Oracle

Applications(i think)
Is there a relation between application and table:Indirectly/logically there is, as the table is owned by a specific schema, and then a schema is related to an
Application( though logically, as this relation is not enforced by the System).
What precautions do I take when creating a new table in oracle apps:Ans: Find out from DBA's the schema in which your custom tables are meant to be created. Create the desired table
in custom schema. Note: If your custom table will support multi-org, then its name must finish with _all and also it
must have a integer column named org_id
Qns: For an Oracle Apps developer, what else must be the consideration with respect to Application.
Ans: I will jump the training ship to explain this. In case you do not understand, then wait for the training lesson on
concurrent programs.
a. Each program has an executable. For example reports have rdf, sql*plus has .sql file, forms has .fmx, Unix Shell
Script has .prog(in apps) & D2k libraries have .plx
b. When you register an executable with Oracle Apps, you must then register this against an Application.
c. Each application is mapped to a specific path,say to a directory in unix box. For example, Applicaton XXPO (that
holds PO Customizations) may map to /home/oracle/apps/appl/po
d. Say you have developed/customized a report for PO Module. Assume your report executable name is
XXPOPRINT.rdf . If you register this executable with XXPO applicaton, then this rdf must be copied/ftp'ed to
/home/oracle/apps/appl/po
e. When running this report in Oracle Apps, oracle will ask below series of questions to itself
I see that user is running XXPOPRINT.rdf, which applicaton is this report registered against? Oh well, it is XXPO
application, then where is the directory location where I can expect to find this file? Oh ok, application definition of
XXPO is mapped to /home/oracle/apps/appl/po (as per application definition), hence lets pick the rdf from
/home/oracle/apps/appl/po/reports/US
Here lies the significance of applicaton in oracle apps.
Now some notes:1. Profile options can be defined at application level too.
2. All the Forms & Reports are attached to an Application.
3. Each application has a base path, which effectively is also the Environment variable on operating system.

The below image can be clicked to see how applications are defined in Oracle Apps. One needs
to navigate to System Administrator responsibilotu. and select Menu /Application/Register.
As a developer, it is not your responsibility to define this, however I suggest that you understand
this well.

Oracle Apps Deployment Training

When you are a fresh new Oracle Apps developer, your fundamental question is...where to find
the piece of code that you are being asked to customize?
Before I begin to explain you this, first some fundamentals.
1. You will most likely find that any implementation of oracle apps will involve at least two
machines, i.e. Database tier and then at least one web tier.
2. Oracle thought very logically to decide which executable runs on database tier and which on
web/forms tier(also known as mid-tier).
Any executable that has intense database operations is stored at database tier. To give you some
examples.... sql files, oracle report java concurrent programs, sql*loader are all deployed in
database tier of Oracle Applications.
3. Any executable that has intense UI operations is deployed at forms tier. Examples are Oracle
Forms fmx files, jsp files, pll/plx etc.
Qns: The above sounds good in most cases, but what if you have to build a form that has intense
database processing.
Ans: Well the form will still be deployed in the mid-tier, otherwise your form will never be run.
However, for such forms, you must handle most of the database processing within pl/sql
packages. The api's that you build in pl/sql must have well defined parameters.
I am saddened to see that some apps programmers write tons of sql code/DMLs inside the oracle
forms triggers. In this era of high speed networks, such aproach may be justified to an extent, but
what if some other developer desires to use validations developed for your form in other areas of
apps.? Hence building pl/sql api's is the preferred approach.
Qns: Why do we have multiple middle tiers for one database.
Ans: Most implementations install multiple mid-tiers to distribute the user load. The user
requests are first sent to a load balancer switch, this switch the decides which middle tier to use.
Hence, if one server has 1000 user cpacity, then you can have 5mid tiers to handle 5000
concurrent users.
Qns: That's fine for the theory, but how do multiple mid-tiers impact my forms deployment?
Ans: You will need to deploy your forms file to each middle tier machine (unles shared
APPL_TOP) has been implemented.
Qns: Where do I pick the fmb files delivered by oracle?
Ans: These are picked from $AU_TOP/forms/us
Qns: Where do I deploy the fmx file on mid tier, assuming a purchasing screen has been
customized.
Ans: This will be deployed at $XXPO_TOP/forms/us
Basically by deployment I mean that fmx file will be copied to xxpo_top/forms/us
Have you read the previous article on applications?
Qns: Where do I deploy a pl/sql package?

Ans: All of the pl/sql packages are installed in apps schema.


This includes your custom packages and also oracle delivered packages.
Qns: Ehere do we create the database views?
Ans: Views will be created in apps schema too.
Qns: How do I generate fmx, should this be done on pc or on the mid tier?
Ans: This must always be done on the mid tier
For example use below steps
Step 1
FORMS60_PATH=$FORMS60_PATH:$AU_TOP/forms/US
Step 2
export FORMS60_PATH
Step 3
cd $XXPO_TOP/forms/US
Step 4 ----Below in one single line
f60gen module=XXPOSCREEN.fmb userid=apps/apps module_type=form batch=no
compile_all=special
Qns:I have deployed the form at $XXPO_TOP but I can't run it,I get message can not find form
Ans: Firstly find out the application to which this form is registered against. In reality the forms
are attached to form functions and it is the form function that is attached to an application
Qns: How can I generate CUSTOM.pll or any other Forms Library
Ans:
----Below statements in one single line
cd $AU_TOP/resource
f60gen module=$AU_TOP/resource/CUSTOM.pll userid=apps/apps
output_file=./CUSTOM.plx module_type=LIBRARY
f60gen module=$AU_TOP/resource/XX_POENT.pll userid=apps/apps
output_file=./XX_POENT.plx module_type=LIBRARY
Qns: All the above sounds good, but how on earth do I connect to Mid Tier to generate forms
Ans: For Mid-Tier server, you will be provided with a Unix Username & Password. Before you
start moaning, let me clarify that I assume that hosting o/s will be Unix. As soon as you logon to
your mid-tier, your environment should automatically be setup based on scripts within .profile
file. To know whether your environment has been setup on Unix box, do the below:
echo $FND_TOP
If the above returns blank, then it means you need to contact your DBAs to find out why
environment variables are not being populated on your sign-on to Unix

...Ditto for DB Tier


Concurrent Programs in
| Print |
Oracle Apps
Written by Anil Passi
Wednesday, 25 October 2006
An article on very basics of Concurrent Program, for beginners that follow
http://getappstraining.blogspot.com.

E-mail

Lets first discuss the below scenario


Being a developer, you have just developed a SQL script or a PL/SQL package procedure. The
end user wants to be able to run this script ad-hoc or they wish to schedule this to run every
night.
Question : How can an end-user be given control to run a script developed by a developer, given
that an end user will never have access to apps password(and rightly so)?
Answer: This script can be attached to a Concurrent Program via a concurrent program
executable. The user will then be given access to this Concurrent Program.
Question : But how will the end user or Oracle Apps make this script run every 10hours daily?
Answer : A concurrent program can be scheduled to run at desired intervals. The schedule is
defined at the time of submission.
Question: What are the different types of scripts/programs that can be attached to concurrent
programs?
Answer :
A sql script
A Sql*Loader program
Java program
Oracle Report
Pl/SQL program ( or call it a stored procedure/package procedure)
Host script, like a unix shell script
Pro*C/Spawned
Perl
Question: What are the basic steps when defining a concurrent program.
Answer: Broadly speaking there are three steps when developing a concurrent program in
Oracle Apps
Step 1. Make Oracle Apps identify the executable
Step 2. Provide a handle to the executable by means of defining a concurrent program
Step 3. Make this concurrent program accesible to selected users via their responsibility.
Question: Please can you describe the above steps in detail
Answer:
Step 1. Make Oracle Apps identify the executable
In Oracle Apps we have something called as concurrent program executable. Concurrent

program executable is defined to register a script or a procedure for its usage within oracle apps.
Step 2. Provide a handle to the executable by means of defining a Concurrent Program.
We need to define a concurrent program and attach that to the executable defined in above step.
Step 3. Make this concurrent program accesible to selected users via their responsibility.
We do this by adding the concurrent program to something called as request group. The request
group is either associated with a responsibility or is passed in as a parameter to the function
request form function. Don't worry if you do not understand this step, I will be writing a
dedicated article to explain this step.
Question : Please explain the steps for defining a pl/sql concurrent program, with screenshots
and with almost real life example?
Answer:
1. Create a table and a stored procedure in pl/sql
create table xx_hello_world_tab
(

message_text VARCHAR2(100)
,creation_date DATE
) ;
CREATE OR REPLACE PROCEDURE
xx_register_user_prc(errbuf
OUT VARCHAR2,retcode
OUT VARCHAR2) IS
BEGIN
INSERT INTO xx_hello_world_tab VALUES ('Hello World' ,SYSDATE);
END xx_register_user_prc;
SELECT * FROM xx_hello_world_tab ;

--Zero records will be returned here


2. Note the two parameters, namely errbuff and retcode
These parameters for used for the interaction between the concurrent program and the pl/sql
Program. I suggest to the beginners not to spend much time on these parameters.
3. Define an executable attached to this procedure.
This can be done by navigating to the responsibility Application Developer, and selecting the
menu /Concurrent/Executable

4. Define the concurrent program


This can be done by navigating to responsibility Application Developer and then selecting
menu /Concurrent/Program

5. Attach this program to a report group.


Go to System Administrator responsibility, and select
/Security/Responsibility/Request

Now, we can navigate to the Receivables Manager and submit the concurrent request.

After the completion of the request, we check the table

Concurrent manager in
| Print |
Oracle Apps

E-mail

Written by Anil Passi


Wednesday, 25 October 2006
Lets discuss the very basics of Concurrent Managers, again the very basics for the beginners that
read http://getappstraining.blogspot.com
Two things are obvious:1. Concurrent Manager is related to Concurrent Programs
2. Concurrent manager manages the concurrent(oops I mean parallel) execution of
concurrent programs.
So what's left to explain?.....Well nothing much, but I gave a commitment to one of my
readers that I shall write something about concurrent managers today. And now when I
begin to write, I realize it is worth writing something in plain English on this topic.
Lets explain this with some Q&A
Question : How to run a concurrent program?
Answer: In oracle apps you have a concurrent program submission screen. You can submit
the concurrent program from that screen.
Question: What happens when you submit a concurrent program?
Answer: There is something known as Concurrent Manager that runs in the background all
the time. This background process, called Concurrent Manager ideally will be running 24x7.
As the name suggests, purpose of a concurrent manager is to manage the submitted
concurrent programs.
Question: When I submit a concurrent program( or call it concurrent request), how does
concurrent manager pick this up?
Answer: Concurrent manager will be running in the background waiting for a concurrent
program to be submitted. As soon as a concurrent program is submitted, it then gets put in
an execution queue by concurrent manager.
Question: Why does the Concurrent manager put a concurrent program into a queue? Why
doesn't the manager simply let the program run?
Answer: Because at any given point in time a concurrent manager can run no more than
say 10 programs concurrently. This figure of 10 is configurable of course. First the manager
puts a submitted program into a queue, next the manager checks if there is a slot available
(i.e. Less than 10 programs are currently running). If a slot is found available, the concurrent
manager then runs the program, or else it keeps the concurrent program in a queue with
status Pending.
Question: If we have two concurrent programs, that must never run in parallel(oops I mean
concurrently)....can concurrent manager manage such scenarios?
Answer: Of course it can. When you define a concurrent program, you can specify if there
are any incompatible programs. If incompatible concurrent programs exist, then concurrent
manager will wait for the incompatible program to complete.
Question: Is that all what concurrent manager does?
Answer: Much more, if interested, then read on.
Concurrent manager is responsible for below things too..
Managing the printer:An Oracle Report is registered as a concurrent program too. During submission or during the
definition of concurrent program, we can specify the printer where report gets printed.

Concurrent manager will send the output of the program to that printer.
Managing the programs completion statusFor example a pl/sql concurrent program can set retcode=2 to make a program complete
with warning. Hence concurrent manager not just executes the program, but it manages the
completion status of the program too.
Classpath of a java program:A concurrent program can be of type java too. If for this specific concurrent program you
wish to use a set of java libraries, then you can specify the path of that library in concurrent
program definition. Concurrent manager will amend the CLASSPATH to reflect the path of
the java library.
Interaction with host concurrent programWhen running a host concurrent program, the concurrent manager passes the apps
password as a parameter to the unix script
Tracing a concurrent program
Concurrent manager enable the session trace for the concurrent program, if enable trace
checkbox is checked in program definition. You can then go to user dump directory and do
tkprof on the file.
Optimization options:The concurrent program definition provides an option to specify optimization mode, like
choose, fist rows,all rows, rule based etc. The concurrent manager will alter the optimization
mode of the session before the submission of the program. Obviously this option has no
relevance to Host type concurrent program.
More? ...well I am bored with concurrent managers now, I guess you too are by now....

Value set basics in


| Print |
Oracle Apps
Written by Anil Passi
Thursday, 26 October 2006
An article on Value Sets, for beginners that follow http://getappstraining.blogspot.com
Question: What is value set?
Answer: It is a set of values

E-mail

Question: Why do we need value sets?


Answer: You do not always want a user to enter junk free text into all the fields. Hence, Oracle
Apps uses value set to validate that correct data is being entered in the fields in screen.
Question: Is value set attached to all the fields that require validations?
Answer : A big NO
Question: Then where lies the usage of value sets?
Answer: Broadly speaking, value sets are attached to segments in Flexfields. You can argue that
value sets are also attached to parameters of concurrent program(but in reality oracle treats
parameters as Descriptive Flexfields)
Question: This is insane, flexfields havent been covered in http://getappstraining.blogspot.com

as yet?
Answer: Agreed, hence lets restrict value set explanation to their usage in concurrent program
parameters.
Question: Any examples?
Answer: For the namesake, lets add a Parameter to the concurrent program that we defined in
Concurrent Program Training Lesson link. Lets add a parameter named cost centre, the
values to this parameter must be restricted to one of the three values, i.e. HR, SEC, IT.
At the time of submission of the concurrent program the user should be able to pick a cost centre
from a list. This is where value set gets used.
Lets now define a simple value set as described above.
Step 1. Go to Application Developer, and select menu /Validation/Set

Step 2. Now define a value set of type Independent. We will cover the other most widely used
Type Table latter.

Step 3. Now, lets add three independent values to the value set for this Cost Centre list. Hence
click on menu Values within Validation

Step 4. Here we add the values for IT, HR, SEC to this independent value set.

CONTROL-S to save the data


Step 5. Now let us go back to Concurrent Program that we created in earlier training lesson and
Click on Parameters

Step 6. Now lets create a parameter, and attach the value set that we created to this parameter.

Step 7.
Now to test this, lets go to receivables manager and click on Requests.

Click on Request,
Step 8.
Submit New Request, and then click on OK.

Step 9
Now, we can see the values defined in the value set here.

Lookup Types and Lookup codes in


| Print |
Oracle Apps
Written by Anil Passi
Thursday, 26 October 2006
An article on Lookups, for beginners that follow http://getappstraining.blogspot.com
Question : What is a lookup in Oracle Apps
Answer: It is a set of codes and their meanings.
Question: Any examples?
Answer: The simplest example is say a lookup type of Gender.
This will have definitions as below
Code Meaning
------------------

E-mail

M
F
U

Male
Female
Unknown

Question: But where is it used, any examples of its usages?


Answer: Let us say that there is a table for employees, and this table named PER_PEOPLE_F &
has following columns
---FIRST_NAME
LAST_NAME
DATE_OF_BIRTH
GENDER
Question: Will the gender column in above table hold the value of M or F or U?
Answer: Correct, and the screen that displays people details will in reality display the meaning
of those respective codes (i.e. Male, Female, Unknown etc) instead of displaying the code of M
or F or U
Question: hmmm...so are lookups used to save the bytes space on database machine?
Answer: Noooo. Imagine a situation as below
a. There are 30,000 records in people table of which 2000 records have gender value = U. In the
screen, their Gender is being displayed as "Unknown". Now lets say you want this to be
changed to "Undisclosed". To implement this change, all you have to do is to change the
meaning of the lookup codes for lookup type GENDER. Hence it will look like
Code Meaning
------ ------------M
Male
F
Female
U
Undisclosed
Here lies the beauty of lookups, you do not need to modify 2000 odd records in this case.
Question : Any other usage of lookups?
Answer : Sure, lets take another example. In HRMS, there is a field named Ethnicity. By default
Oracle ERO delivers the below values
Lookup code
lookup meaning
-----------------------------------AS
Asian
EU
European
Now, if your client wants to track Ethnicity at a granular level, they can amend the Oracle
delivered lookup definition as below
Lookup code
lookup meaning
-----------------------------------ASI
Asian-Indian

ASP
EU

Asian-Pakistani
European

Hence these values will then be available in the list of values for Ethnicity field.
Question: Are we saying that all the lookups delivered by oracle can be modified?
Answer: Depends. If oracle has a lookup called termination status, and if based on the
termination status code Oracle has some rules defined within Payroll Engine....!! Surely Oracle
Payroll Engine will not like it if you end date an existing status code or add a new status code to
termination. For this very reason, Oracle flags some lookups as System lookups, and the lookup
entry screen will not let you modify those lookup codes.
Question: OK, what if I do not wish to modify existing Lookup codes, but only wish to add new
Lookup codes to an existing Oracle delivered Lookup Type?
Answer: You can do so, provided the Oracle delivered Lookup Type is flagged as Extensible.
Please see the screenshot
Question: Can we add our own new lookup types?
Answer: Yes you can, for this you will first define a lookup type and will then define a set of
lookup codes against the Lookup Type. In our example above, GENDER is the LOOKUP_TYPE
Question: Does a LOOKUP_TYPE get attached to a Descriptive Flexfieldjust like Value
Sets?
Answer: Not really. There is no direct relation between lookup and Descriptive Flexfield.
Now, the screenshots. Click on the menu as below to invoke Lookup Screen.

Once in the screen, you can define your lookup type and lookup codes as below.

Difference between Lookups and Value Sets


I hope you have read the previous articles on Value Sets and also on Lookups.
It is important for the learners to read things in Sequence. Hence you may decide to browse
through the Training Index Page.

Difference 1
Value sets can be attached to parameters of a concurrent program, whereas Lookups can't.
Difference 2
Certain types of Lookups are maintainable by the users too, for example HR Users will maintain
"Ethnic Minority" lookups. Value Sets are almost never maintained by end users, with the
exception of GL Flexfield codes. Value sets are usually maintained by System Administrators.
Difference 3
Value sets can contain values that are a result of an SQL Statement.
Hence it is possible to make Value Set list of values dynamic.
On the contrary, Lookup Codes are Static list of values.
Here comes the end of another simple article...
Descriptive Flexfield Basics in Oracle Apps
Written by Anil Passi
Sunday, 29 October 2006
An article on basics of Descriptive flexfields, for beginners that follow
http://getappstraining.blogspot.com

| Print |

E-mail

A training article on Descriptive flexfields, also refered as DFF


First some basic Question and answers, and then we will do screenshots detailing how flexfields
are configured.
Question: What does DFF mean?
Answer: DFF is a mechanism that lets us create new fields in screens that are delivered by
Oracle.
Question: Oh good, but can these new fields be added without modifying/customization of the
screen?.
Answer: Yes, certainly. Only some setup is needed, but no programmatic change is needed to
setup DFF.
Question: Why the word Descriptive in Name DFF?
Answer: I think Oracle used this terminology because by means of setup...you are describing the
structure of these new fields. Or may be Oracle simply used a silly word to distinguish DFF
from KFF(discussed in latter training lesson).
Question: Are these DFF's flexible?
Answer: A little flexible, for example, depending upon the value in a field, we can make either
Field1 or Field2 to appear in DFF.

Question: So we create new fields in existing screen, but why the need of doing so?
Answer: Oracle delivers a standard set of fields for each screen, but different customers have
different needs, hence Oracle lets us create new fields to the screen.
Question: Are these new fields that get created as a result of DFF free text?
I mean, can end user enter any junk into the new fields that are added via DFF?
Answer: If you attach a value set to the field(at time of setup of dff), then field will no longer be
free text. The entered value in the field will be validated, also a list of valid values will be
provided in LOV.
Question : Will the values that get entered by the user in dff fields be updated to database?
Answer: Indeed, this happens because for each field that you create using DFF will be mapped
to a column in Oracle Applications.
Question: Can I create a DFF on any database column?
Answer: Not really. Oracle delivers a predefined list of columns for each table that are meant for
DFF usage. Only those columns can be mapped to DFF segments. These columns are named
similar to ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3 ETC. Usually Oracle provides upto 15
columns, but this number can vary.
Question: Can I add hundreds of fields to a given screen?
Answer: This depends on the number of attribute columns in the table that screen uses. Also,
those columns must be flagged as DFF enabled in DFF Registration screen. Don't need to worry
much about this because all the ATTRIBUTE columns are by default flagged for their DFF
usage.
Question: Hmmm, I can see that DFFs are related to table and columns...
Answer: Yes correct. Each DFF is mapped to one table. And also each segment(or call it field) is
mapped to one of the attribute columns in that table.
Question: I want these fields to appear in screen only when certain conditions are met. Is it
possible?
Answer: Yes, we have something known as Context Sensitive Descriptive Flexfields.
In Order to do this, we will follow the below steps(screenshots will follow) :1. Navigate to the DFF Registration screen in Oracle Apps and query on Table
AP_BANK_BRANCES. Now click on Reference Field
2. Navigate to DFF Segments screen and query on the Title of the Bank Branch and
Unfreeze the Flexfield and add segments as to Section "GLOBAL Data Elements" as shown in
screenshots.
Here are the screenshots......The descriptions are embedded within the screenshots.
We are in "Bank Branches screen" below, that is available in Payables responsibility. We need to
add a new field as below.

Once having noted down the table, we try to find the Title of the DFF for that Table. We go to
Flexfield/Register

Here we pick the Title of the respective DFF

Query on that DFF Title from Descriptive Flexfield Segment Screen

Add a new segment under "Global Data Elements"

The options for making mandatory or enabling validations for the new field.

Once you finalize the changes, you will be prompted to Freeze the DFF definition. Click on OK

Now, we see the fruits of our configuration

Context Sensitive
| Print |
Descriptive Flexfields
Written by Anil Passi
Saturday, 28 October 2006
An article on Context Sensitive Descriptive Flexfields, for beginners that follow
http://getappstraining.blogspot.com

E-mail

A training article on Context Sensitive Descriptive flexfields.


IMPORTANT:- You must read Basics Flexfield article . This article is an extension to the work
that we did for a simple flexfields.
First some basic Question and answers, and then we will do screenshots detailing how flexfields
are configured.
Question: I want these Flex fields to appear in screen only when certain conditions are met. Is it
possible?
Answer: Yes, you can. Lets take an Example. You have a "Bank Branch" screen where you enter
the Bank names and their branches . There is a field named Branch Type in that screen. You wish
to show & capture following new fields:a. Banks Country of Origin Field ( regardless of bank branch type, we must show this new
field). As we configured in earlier training chapter.

b. If user entered a value of SWIFT in Branch type, then display a new DFF segment "SWIFT
Partner field".
c. If Branch type CHIPS is selected by the user, then display a DFF segment "Chip ID" field.
In Order to do this, we will follow the below steps(screenshots will follow) :1. Navigate to the DFF Registration screen in Oracle Apps and query on Table
AP_BANK_BRANCES. Now click on Reference Field, and ensure that
BANK_BRANCH_TYPE field can be used as a context switch. In our case we add this field
as a reference field.
2. Navigate to DFF Segments screen and query on the Title of the Bank Branch and
Unfreeze the Flexfield and add segments as in screenshot below. Register the
BANK_BRANCH_TYPE field as a reference item.
3. Create the contexts for each possible value of Bank Branch Type field(for which you want
conditional display of fields)....
Hmmmm not clear yet, see the the screenshots and you will surely understand......
Find out the table name for Bank Branch screen, this will enable us to find the DFF that is
available for Bank Branch

The Bank Branch can have one of the following values.

Given that our DFF will be sensitive to what we enter in Bank Branch, we must find out name of
the field(not the display name). This can be done by using examine as shown

We can see that internal name of the Branch Type is "BANK_BRANCH_TYPE". We need to
ensure that a DFF can be made sensitive to the value in BANK_BRANCH_TYPE

Lets navigate to DFF registration screen, and using the table name, we query DFF for
AP_BANK_BRANCHES.

Alternately you can query using DFF title too.

Now lets add BANK_BRANCH_TYPE as a REFERENCE Field, by clicking on Button


Reference

Now we need to define the new fields(segments). This screen is accessed via menu
/Descriptive/Segments . In this screen, lets make BANK_BRANCH_TYPE as the
context/reference. This means that DFF will become sensitive to values in Branch Type field

IMPORTANT: If your requirement is not to have any conditiional logic, then no need for all the
"Reference Field" blaaa. All you need to do is to add your segment to Global Data Elements

When the user selects Type=SWIFT, we see the relevant SWIFT field appear in Flexfield
window

When user selects Type=CHIPS, we see CHIP Id field appearing in Flexfield window.

Here we now see that value entered in DFF field gets stored in the database column,

Value Sets In Oracle Apps


Many thanks to Rakesh Sreenivasa for contributing yet another article for
Get Apps Training

Value Sets
Value Set is a collection of values. It validates the values entered by the user for a
flex-field, report parameters or a concurrent.
The navigation path: Application :- Validation :- Sets

Value Set is associated with the following validations which holds the key to the
value sets.

Types of Validations:
1. None :- Validation is minimal.

2. Independent :- The data input is based on previously defined list of values.

3. Dependent :- The data input is checked against a defined set of values.

4. Table :- The data input is checked against values in a table.

5. Special :- The data input is checked against a flex-field.

6. Pair :- The data input is checked against two flex-field specified range of
values.

7. Translatable independent :- The data input is checked against previously


defined list of values.

8. Translatable dependent :- The data input is checked against defined set of


values.
Significance of $FLEX$
$FLEX$: enables to match the prior segment with either value set name or segment
name.
Let v2 be the value set definition of 2nd parameter and v1 be the value set
definition for the first parameter then
In the value set definition of v2 = value $FLEX$.v1
Note:
Changes You Should Never Make
You should never make these types of changes (old value set to new value set)
because you will corrupt your existing key flex-field combinations data:
. Independent to Dependent
. Dependent to Independent
. None to Dependent
. Dependent to Table
. Table to Dependent
. Translatable Independent to Translatable Dependent

. Translatable Dependent to Translatable Independent


. None to Translatable Dependent
. Translatable Dependent to Table
. Table to Translatable Dependent

Payroll Elements and


| Print |
E-mail
Element Links
Written by Anil Passi
Wednesday, 06 December 2006
Please find an article on Oracle Payroll that explains Elements and Element Links. I will try to
keep this explanation as simple as possible.
Why do we need Oracle Payroll?
We need a Payroll software primarily to calculate net salary for the employees, and also for
regulatory & reporting reasons. Oracle Payroll also helps an Organization manage the costing of
their Employees.
Why do we need elements and element links in Oracle Payroll?
Let me take an example to explain this. Say a pseudo company named "XX Passi Inc" employs
only two type of people:1. Manager Grade
2. Clerk Grade

Lets say this company has a policy that only Manager Grade people must be paid Bonus.
How is Oracle Payroll going to work this out?
For simplicity, think of an element being a record that is attached to employee assignment.
Alternately, think of Element being a variable that is stored in database table[or rather is an array
of variables]. In Oracle Payroll we will define an element named Bonus. This element will be
attached to all the people that have grade of Manager. Against each manager, an amount will
be captured in this element record.
See the screenshots at bottom of article

Right, so bonus amount will be entered against each employee, in their element entry
record?
Correct, however our design demands that only Managers can be assigned Bonus element.

How can we restrict eligibility of bonus element just for Managers, so that Clerks do not
ever get paid the bonus even accidentally?
In Oracle Payroll we have something called as Element Link. Using Element Link, we make an
Element eligible to a person or to a group of people. In this case, we will create an element link
for bonus Element :- linking that to grade "Manager".
Given that we do not link bonus element to Clerk grade, it will not be possible to create a bonus
element entry for a clerk.

Hmmm, by using element links we can apply a filter who can be assigned an element?
Absolutely, and you have various filtration criteria at your disposal. For example, element link
can be created against organization or a payroll(monthly or weekly) etc. Beyond filtration, you
can assign default costing information too and also validations against the entered values.

Does this imply that a Manager can not receive bonus, unless an element link exists to
make Manager grade eligible for Bonus?
Correct. But please note that usage of grades is just one of the many ways by which a group of
people can be made eligible for element. But for simplicity, we stuck to the manager theory in
this article.

Lets do the same example with numbers.


Anil Passi -- Manager
John -- Clerk
Suzy -- Manager
Linda -- Clerk
Anil will get a bonus of $100, whereas Suzy will get $50 bonus.
John and Linda will not be eligible for Bonus element, hence cant be paid bonus.

Element Classification Screen

Define a Bonus element, of type Earning.

Scroll the input value window to see the below fields where input value validations can be
entered.

Create an element link as below.

You can now go to person record, and then assignment screen and click on Element/Entry
button, to enter Bonus Amount of $100 against Anil

Do we have Elements that can hold the Tax figures?


Indeed, Tax related elements are Classified as Deductions. Coming to classification, we use
Classification to group similar Elements together.

Do we create all the Elements from Scratch?


You do at times, but the elements driven by Legislation are delivered pre-installed by Oracle. For
example in UK, National Insurance elements come pre-installed.

Can we capture just one value against each Element?


Wrong, you can capture upto 15 values[via Element Entry] per Oracle Payroll Element.

When the payroll engine runs, does Oracle calculate the first calculates the Deductions and
then Earnings?
You can assign Priority to Element Classifications. If priority of Earning is say 1 and Priority of
say Deduction classification is 2, then Earnings will be calculated first, and then deductions will
be applied latter by the Payroll engine.
Hierarchy
Profile
| Print |
E-mail
Options
Written by Anil Passi
Wednesday, 29 November 2006
This article is an attempt to explain the Hierarchy Profile Options with examples.
Can all the profile options be set at Organization Level and Server level?
You need to set Hierarchy Type field in Profile Option definition to enable that profile to be
eligible for Hierarchy Level. This functionality was introduced in 11.5.9
How to find from SQL*Plus whether a Profile Option is Hierarchy Enabled?
SELECT HIERARCHY_TYPE FROM fnd_profile_options_vl where profile_option_name =
'profile option short name' ;
If the above SQL returns SERVER, then the profile is enabled at Server Level.
If the above SQL returns ORG, then the profile is enabled for Organization Level.
If the above SQL returns SERVRESP, then the profile is enabled for both Server and
Responsibility Level.
Why the need of Organization Level profile option?
For example multiple responsibilities can be attached to same Operating Unit. In such event, it
can get tedious to attach the same profile option to each such responsibility.
By attaching an Organization Level Profile Option to an Operating Unit implies that all such
responsibilities inherit Org Level Profile value.
Will Organization Level Profile override the Responsibility Level Profile?

Yes
Give me some example usages of Server Level Profiles
Managing Timezones
In a single Global DB Instance implementation, you may desire to display different time in UI
screen, depending upon the local timezone. If you have a separate Middle Tier Server for each
timezone, then timezone profile options [Enable Timezone Conversions, Client Timezone,
Server Timezone] can be set at Server Level.
External WWW Facing Mid Tiers
It is possible that for security reasons, you may desire to change the functionality of Application
when its accessed from External WWW facing mid-tier. Such security profiles can be assigned at
server level.
For example, profile option Node Trust Level can be set to a value of external against a server
to flag the specific mid-tier server as External. See Link for details.
Give me some example usages of Organization Level Profiles
Managing Timezones
In a single Global DB Instance implementation, you may desire to display different time in UI
screen, depending upon the local timezone. If you cant afford to have a separate Middle Tier
Server for each timezone, then timezone profile options [Enable Timezone Conversions, Client
Timezone, Server Timezone] can be set at Organization Level, as each Organization assumingly
will be in a specific timezone.
Setting Org Level Profile Option in HRMS
A HRMS Business Group can be assigned to various Oracle HRMS Responsibilities. Keeping a
track of profiles against all such responsibilities, which belong to a specific Business Group can
be tedious. Hence you may simplify this by simply assigning the profile to Business Group
Organisation.
What is the order of precedence for Profiles?
Security Profiles: Site Level >> Application Level >> Resp Level >> User Level
Server Profiles: Site Level >> Server Level >> User Level
Organization Profiles : Site Level >> Organization Level >> User Level
Descriptive Flexfield Basics in
| Print |
Oracle Apps
Written by Anil Passi
Sunday, 29 October 2006
An article on basics of Descriptive flexfields, for beginners that follow
http://getappstraining.blogspot.com

E-mail

A training article on Descriptive flexfields, also refered as DFF


First some basic Question and answers, and then we will do screenshots detailing how flexfields
are configured.
Question: What does DFF mean?
Answer: DFF is a mechanism that lets us create new fields in screens that are delivered by
Oracle.
Question: Oh good, but can these new fields be added without modifying/customization of the
screen?.
Answer: Yes, certainly. Only some setup is needed, but no programmatic change is needed to
setup DFF.
Question: Why the word Descriptive in Name DFF?
Answer: I think Oracle used this terminology because by means of setup...you are describing the
structure of these new fields. Or may be Oracle simply used a silly word to distinguish DFF
from KFF(discussed in latter training lesson).
Question: Are these DFF's flexible?
Answer: A little flexible, for example, depending upon the value in a field, we can make either
Field1 or Field2 to appear in DFF.
Question: So we create new fields in existing screen, but why the need of doing so?
Answer: Oracle delivers a standard set of fields for each screen, but different customers have
different needs, hence Oracle lets us create new fields to the screen.
Question: Are these new fields that get created as a result of DFF free text?
I mean, can end user enter any junk into the new fields that are added via DFF?
Answer: If you attach a value set to the field(at time of setup of dff), then field will no longer be
free text. The entered value in the field will be validated, also a list of valid values will be
provided in LOV.
Question : Will the values that get entered by the user in dff fields be updated to database?
Answer: Indeed, this happens because for each field that you create using DFF will be mapped
to a column in Oracle Applications.
Question: Can I create a DFF on any database column?
Answer: Not really. Oracle delivers a predefined list of columns for each table that are meant for
DFF usage. Only those columns can be mapped to DFF segments. These columns are named
similar to ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3 ETC. Usually Oracle provides upto 15
columns, but this number can vary.
Question: Can I add hundreds of fields to a given screen?

Answer: This depends on the number of attribute columns in the table that screen uses. Also,
those columns must be flagged as DFF enabled in DFF Registration screen. Don't need to worry
much about this because all the ATTRIBUTE columns are by default flagged for their DFF
usage.
Question: Hmmm, I can see that DFFs are related to table and columns...
Answer: Yes correct. Each DFF is mapped to one table. And also each segment(or call it field) is
mapped to one of the attribute columns in that table.
Question: I want these fields to appear in screen only when certain conditions are met. Is it
possible?
Answer: Yes, we have something known as Context Sensitive Descriptive Flexfields.
In Order to do this, we will follow the below steps(screenshots will follow) :1. Navigate to the DFF Registration screen in Oracle Apps and query on Table
AP_BANK_BRANCES. Now click on Reference Field
2. Navigate to DFF Segments screen and query on the Title of the Bank Branch and
Unfreeze the Flexfield and add segments as to Section "GLOBAL Data Elements" as shown in
screenshots.
Here are the screenshots......The descriptions are embedded within the screenshots.
We are in "Bank Branches screen" below, that is available in Payables responsibility. We need to
add a new field as below.

Once having noted down the table, we try to find the Title of the DFF for that Table. We go to
Flexfield/Register

Here we pick the Title of the respective DFF

Query on that DFF Title from Descriptive Flexfield Segment Screen

Add a new segment under "Global Data Elements"

The options for making mandatory or enabling validations for the new field.

Once you finalize the changes, you will be prompted to Freeze the DFF definition. Click on OK

Now, we see the fruits of our configuration

Key
Flexfields | Print |
Basics
Written by Anil Passi
Thursday, 16 November 2006
Please find an article on the very basics of Key Flexfields.

E-mail

Question : We have already covered Descriptive Flexfield in detail in previous article, should
we still bother learning key flexfield?
Answer : Indeed we must learn this. When I myself learnt Oracle Apps, all I had was the cryptic
definitions in Oracle Manual, and it took me weeks to get my head around the differences
between Key Flexfields and Descriptive Flexfields. Now I hope you can learn this crystal clear
in minutes.
Question: Key Flexfields help us capture additional fields, and so does descriptive flexfield too?
What is the deal here?
Answer: Ok, lets assume for a minute that there is no such thing as a key flexfield. All we have
is a descriptive flex (lets assume).
Requirement is this:Your client wants to capture values in following additional fields for a purchase order transaction
and invoices...
Company name: GM
Cost Centre: IT

Project: OFP --means Oracle Fusion Project


Expense Type: OCC -- Oracle Consultant Cost
In a DFF ONLY WORLD, when your client raises Purchase Order to IT Consulting Company, in
PO_DISTRIBUTIONS_ALL table record you will store
ATTRIBUTE1 :- GM
ATTRIBUTE2 :- IT
ATTRIBUTE3 :- OFP
ATTRIBUTE4 :- OCC
When an invoice is received from consulting company, the Payables clerk will capture the
Invoice Line accounting as below in AP_INVOICE_DISTRIBUTIONS_ALL
ATTRIBUTE1 :- GM
ATTRIBUTE2 :- IT
ATTRIBUTE3 :- OFP
ATTRIBUTE4 :- OCC
These 4 text values for fields(above) are physically being duplicated in each module, for the
related/unrelated transactions.
Imagine further when this transaction flows to Oracle General Ledger, would you again expect
oracle to physically store the 4 columns into table GL_JE_LINES? If so your table
GL_JE_LINES will have following values in its DFF (Descriptive Flex) columns....
ATTRIBUTE1 :- GM
ATTRIBUTE2 :- IT
ATTRIBUTE3 :- OFP
ATTRIBUTE4 :- OCC
Surely, such design using a descriptive flexfield will be flawed, as it causes duplication of data at
various places.
Now that you understand why Descriptive flexfield does not fit into this design, lets consider a
new scenario.
Consider an alternate approach.( using KFF )
Lets have a table named gl_code_combinations with following columns.
CODE_COMBINATION_ID
SEGMENT1
SEGMENT2
SEGMENT3
SEGMENT4
Lets capture A SINGLE record in this table as below:CODE_COMBINATION_ID : 10902
SEGMENT1 : GM
SEGMENT2 : IT
SEGMENT3 : OFP

SEGMENT4 : OCC
Note the above combination of 4 fields can be uniquely identified by
10902(CODE_COMBINATION_ID).
In PO_DISTRIBUTIONS_ALL table, we will have below column with value
CODE_COMBINATION_ID : 10902
NOTE: Now we are not storing all four columns here in PO Dist table, as we store the Unique
ID of the record in Key Flexfield table.
Again, in Account Payables, even though the clerk will enter in screen values for four columns
(four each segment), the database will only store value 10902 in column
CODE_COMBINATION_ID of payables distributions table.
Ditto for the entry in GL_JE_LINES table in oracle general ledger, only the ID that references
those 4 columns will be stored.
Hence all the tables(PO Dist, AP Dist, GL JE Lines) will reference just the
CODE_COMBINATION_ID.
Now some Q & A below
Question: Does this mean, for each key flexfield, there will be a dedicated table? And such table
will hold the unique combination of field values that can be reused?
Answer: correct. For gl accounting key flexfield, there is a table named gl_code_combinations.
Other examples are grades in oracle human resources. A grade can be defined as a combination
of say Clerk + Senior or Clerk + Junior. These combinations will be stored in per_grades table.
Question: do all the tables which are used for storing key Flexfields have columns named
segment1,segment2...segmentx?
Answer : Correct, it is a standard practice used by oracle. Thee segments columns are generic
columns so that each client can call them by whatever name as they desire.
Question: Does Oracle deliver Key-Flexfields out of the box, which will pop-up a window with
relevant fields, as configured during setup.
Answer : Yes, and if value sets are attached, the fields can be validated too.
Question : Is there a step by step example of setting up key flexfield.
Answer : Have a look at article for Setting up Special Information Types in HRMS using
Key FlexField .
For change in perspective, I have covered a HRMS Key Flexfield, named Special Information
Types.
Steps for your first pl/sql Concurrent Program in Oracle Apps
I think this topic is already covered partially in one of the previous training lesson[ for
concurrent programs], but I would like to touch base on this again.

Lets revisit some basics first


Question: What are the ingredients for a concurrent program?
Answer: A concurrent executable and a program attached to that executable.
Question: Will executable for a pl/sql concurrent program be a database stored procedure?
Answer: Yes, but in addition to above you can also register a procedure within a package as
an executable. However, you can't make a Function to become the executable for a stored
procedure.
Question: Does this stored procedure need to have some specific parameters, in order to
become an executable of a concurrent program?
Answer: Yes, such procedure must have at least two parameters
( errbuff out VARCHAR2, retcode out NUMBER)
Question: Can we add additional parameters to such pl/sql procedures that happen to be
Conc Prog Executables?
Answer: Sure you can, but those parameters must be defined after the first two
parameters. Effectively I mean first two parameters must always be errbuff and retcode. The
sequence of the remaining parameters must match with the sequence in which parameters
are registered in define concurrent program-parameters window.
Question: Can those parameters be validated or will these parameters be free text?
Answer: These parameters can be attached to a value set, hence this will avoid users
passing free text values.
Question: What are the possible things that a concurrent pl/sql program can do?
Answer: Firstly your stored procedure would have been created in apps. This concurrent
program will connect to "apps schema" from where access to all the tabes across every
module will be available.
You can do the following:1. Insert records in tables(usually interface or temp tables)
2. Update and delete records
3. Initiate workflows
4. Display messages in the output file or the log file of the concurrent program.
5. Make this concurrent program complete with status Error or Warning or Normal.
Question: Please give me an example of a pl/sql concurrent program in Oracle apps in real
life?
Answer: Lets say you have an external application which is integrated with apps. Assume
that it is Siebel application where the new customer records are created. Siebel is
assumingly hosted on a Oracle database from where it has database links to your Oracle
apps database.
In this case, siebel inserts sales order records into your custom staging tables.
You can then develop a concurrent process which will do the following:-------Loop through the records in that staging table
Check if the customer already exists in Oracle AR TCA
If customer already exists, thencall the api to update existing customer
If this is a new customer, then update existing TCA Customer/Party record

Question: Ok, how do I do the above?


Answer: Find the steps below for doing so
Step 1
Connect xxschema/password
Create table xx_stage_siebel_customers ( customer_Id integer, customer name
varchar2(400));
Grant all on xx_stage_siebel_customers to apps ;
Step 2
Connect apps/apps_password
Create or replace synonym xx_stage_siebel_customers for
xxschema.xx_stage_siebel_customers ;
Step 3 ( again in apps schema)
Create or replace procedure xx_synch_siebel_cust ( errbuff out varchar2, retcode out
varchar2 ) is
n_ctr INTEGER := 0 ;
Begin
for p_rec in ( select * from xx_synch_siebel_cust ) LOOP
Select count(*) into n_ctr from hz_parties where party_number = p_rec.customer_number;
If n_ctr=0 then
Hz_party_create(pass appropriate parameters here).
Else
Hz_party_update(pass appropriate parameters here);
End if;
END LOOP ;
delete from xx_synch_siebel_cust ;
End xx_synch_siebel_cust
Step 4
Create concurrent program executable ( for example of screenshot, visit link )
Step 5
Create concurrent program for that executable
Step 6
Add this concurrent program to request group

Вам также может понравиться