Sie sind auf Seite 1von 51

CRP for Oracle R12

5:41 PM General Articles 23 comments

Conference Room Pilots (CRPs) are interpreted by different organizations in different


ways and can be used in a variety of project types. The R12 project will have 3
conference room pilots followed by user acceptance testing (UAT). The overall goals
will be to allow discrete transactional areas of the solution to be validated, with later
CRPs building towards demonstrating end to end business scenarios in the new
solution.

CRP1 will include:


Process: An overview of current client process and best practice process
recommendations from ESolutions.
System: Demonstration of a subset of the standard Oracle R12 functionality, with
small amounts of representative data. (CRP1 is not a user training session. User
participants will not follow along on their own PCs.)
Scope: Discussion of ESolutions recommendations for best practice where
applicable to client. Scope review based on ESolutions recommendations together
with the steering committee recommendations to determine the scope baseline for
the Oracle R12 project. Gathering of high-level requirements - identify how well the
application meets business needs, and identify gaps, whilst still in the design phase
of the project.
User Input: An opportunity for users to ask questions and get feedback on the
proposed configuration and use of the software. Business attendees will provide
many observations and areas of feedback to the project team which will be
recorded by the functional team. If these cannot be resolved during the session they
will be processed once the CRP is completed with feedback provided to the
representatives prior to the next CRP.

Between CRP1 and CRP2:


1) Detailed requirements gathering interviews will be conducted.
2) As-Is business process modelling and gap analysis.
3) Draft to-be process flows and initial software configuration completed prior to the
CRP2.
4) Prioritization of requirements/processes (based on business ranking and level of
config/customization/development required) to be demonstrated in CRP2 or CRP3.
5) Completion of requirements for bucket one for custom development delivered
to technical team.
CRP2 will include:
Process:Functional leaders walk cross-functional teams and potential system users
through flow charts. Review of key business scenarios against predefined scripts.
The scenarios will be driven from the business process and requirements mapping
activities carried out earlier in the project to show how the business processes, are
mapped onto system functionality.
System:Functional leaders will take the group through on-line scenario exercises.
Various questions and additions to the foreseen problems are raised and alternative
approaches are tested.
User Input:User will use predefined scripts to carry out key process in the system.
Most issues should be resolved by the team during the exercises or delegated for
further action. Signoff by the business on high priority requirements.
Scope:Requests for additional functionality (an increase to the baselined
requirements) would need to be handled as part of the scope management process
within the project and that observations raised are not automatically included in
scope. Changes to the scope baseline will result in change requests to the steering
committee.

Between CRP2 and CRP3:


1) Finalization of To-Be process models and gap resolution.
2) Detailed requirements validation and sign-off.
3) Completion of requirements for bucket two of requirements for custom
development delivered to technical team.
4) Development of training materials.

Objectives of CRP3:
Process:Functional leaders walk cross-functional teams and potential system users
through final To-Be process models.
System:Most converted data available for review in CRP environment.
Some RICE (Reports, Interfaces, Conversions, Enhancements / Extensions)
components available for business review.
User Input:User will be hands-on in the system completing real business scenarios
from end-to-end.
Validate that any gaps identified during CRP2 have been addressed.
Continue to uncover any system / process issues and potential future phase
business requirements.
Scope:Requests for additional functionality (an increase to the baselined
requirements) would need to be handled as part of the scope management process
within the project and that observations raised are not automatically included in
scope. Only items critical for go-live will be considered.

In summary the CRP sessions will focus on the following:

CRP-1: Discrete transactional activities


CRP-2: Proposed business processes (No RICE custom Reports, Interfaces,
Conversions, Enhancements / Extensions)
CRP-3: End to end business scenarios. Processes with converted data and some
RICE components
UAT: Test 100% of functionality and end-to-end integration testing including all RICE
components

SQL Loader Overview


10:52 AM SQL Loader 2 comments

SQL*Loader is a bulk loader utility used for moving data from external files into the
Oracle database. It supports various load formats, selective loading, and multi-table
loads.

Below are the examples of loading data into Tables using different methods

Load Fixed length Data Records


LOAD DATA
INFILE *
INTO TABLE load_delimited_data
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
( data1,
data2
)
BEGINDATA
11111,AAAAAAAAAA
22222,"A,B,C,D,"

Load Positional Data Records


LOAD DATA
INFILE *
INTO TABLE load_positional_data
( data1 POSITION(1:5),
data2 POSITION(6:15)
)
BEGINDATA
11111AAAAAAAAAA
22222BBBBBBBBBB

Skip First 2 Header Records while Loading


LOAD DATA
INFILE *
INTO TABLE load_positional_data
SKIP 2
( data1 POSITION(1:5),
data2 POSITION(6:15)
)
BEGINDATA
NNNNNNNNNNNNNNN
UUUUUUUUUUUUUUU
11111AAAAAAAAAA
22222BBBBBBBBBB

Loading Data into Multiple Tables


LOAD DATA
INFILE *
REPLACE
INTO TABLE emp
WHEN empno != ' '
( empno POSITION(1:4) INTEGER EXTERNAL,
ename POSITION(6:15) CHAR,
deptno POSITION(17:18) CHAR,
mgr POSITION(20:23) INTEGER EXTERNAL
)
INTO TABLE proj
WHEN projno != ' '
( projno POSITION(25:27) INTEGER EXTERNAL,
empno POSITION(1:4) INTEGER EXTERNAL
)

Skip Certain Columns while Loading DataLOAD DATA


TRUNCATE INTO TABLE T1
FIELDS TERMINATED BY ','
( field1,
field2 FILLER,
field3
)

Erroneous data after loading with SQL Loader

Our Database is created with below settingsCHARACTER SET "UTF8"


NATIONAL CHARACTER SET "WE8ISO8859P1"
NLS_LANGUAGE = AMERICAN
NLS_TERRITORY = AMERICA

Include below code in control file to avoid junk data load using SQL
loaderLOAD DATA
CHARACTERSET WE8ISO8859P1
APPEND INTO TABLE XXAP_GENERIC_INVOICES
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(operating_unit
,vendor_number
)

Using SQL Functions for Loader Columns


LOAD DATA
APPEND INTO TABLE
XXAR_INV_AT
FIELDS TERMINATED BY ""
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
DESCRIPTION "NVL(:DESCRIPTION,'Migrated from Legacy')",
TRX_DATE "TO_CHAR(TO_DATE(:TRX_DATE,'YYYYMMDD'),'DD-MON-YYYY')" ,
GL_DATE "TO_CHAR(TO_DATE(:GL_DATE,'YYYYMMDD'),'DD-MON-YYYY')" ,
TAX_RATE "REPLACE(:TAX_RATE,'%','')",
STAGING_TABLE_ID "XXAR_INV_AT_S1.NEXTVAL",
CREATION_DATE SYSDATE,
LAST_UPDATE_DATE SYSDATE
SOURCE "TRIM(REPLACE(:SOURCE,(SUBSTR(:SOURCE,LENGTH(:SOURCE),1)),''))"
)

TKPROF Utility
12:53 PM UNIX 3 comments

1) TKPROF is an utility and a unix command to format Raw trace file which is huge
in size. It essentially formats a trace file into a more readable format for
performance analysis.

2) Trace files are placed by Oracle in user_dump_dest directory as specified in the


init.ora
Use below query to find the location of trace files
select value from v$parameter
where name = 'user_dump_dest';

3) Use the following Unix command on the server:


TKPROF tracefile exportfile [explain=username/password] [table= ] [print= ]
[insert= ] [sys= ] [record=..] [sort= ]
Eg- tkprof ora_12345.trc output.txt explain=scott/tiger sort=(prsela,exeela,fchela)
Here Sort is on elapsed parse time, elapsed executed time and elapsed fetch-time.

How to create Custom Top and User?


8:12 PM UNIX 1 comment

CUSTOM TOP CREATION

cd $APPL_TOP
mkdir xxf/
mkdir xxf/1.0.0/
mkdir xxf/1.0.0/admin
mkdir xxf/1.0.0/bin
mkdir xxf/1.0.0/dll
mkdir xxf/1.0.0/forms
mkdir xxf/1.0.0/help
mkdir xxf/1.0.0/html
mkdir xxf/1.0.0/java
mkdir xxf/1.0.0/jlt
mkdir xxf/1.0.0/lib
mkdir xxf/1.0.0/log
mkdir xxf/1.0.0/mds
mkdir xxf/1.0.0/mesg
mkdir xxf/1.0.0/out
mkdir xxf/1.0.0/resource
mkdir xxf/1.0.0/scripts
mkdir xxf/1.0.0/servlets
mkdir xxf/1.0.0/share
mkdir xxf/1.0.0/sql
mkdir xxf/1.0.0/xml

CUSTOM TOP ENTRY

"export XXF_TOP=$APPL_TOP/xxf/1.0.0" added to custom environment


file- D1FEMP00_phls6015.env

CUSTOM USER CREATION

CREATE USER XXF IDENTIFIED BY xxf123


DEFAULT TABLESPACE apps_ts_tx_data
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
GRANT CONNECT TO XXF;
GRANT RESOURCE TO XXF;
ALTER USER XXF DEFAULT ROLE ALL;
GRANT UNLIMITED TABLESPACE TO XXF;

How to find version of file on server?


8:16 AM UNIX 4 comments

strings -a $INV_TOP/forms/US/INVMWBIV.fmx | grep '$Header'

$Header: INVMWBIV.fmb 120.101.12000000.30 2008/07/17 07:07 ckrishna noship

OR

grep '$Header' $INV_TOP/patch/115/sql/INVTXGGB.pls

/* $Header: INVTXGGB.pls 120.55.12000000.15 2007/10/25 11:02:58 ksaripal ship $


*/

Important Tables in HRMS

Per_all_people_F

per_person_types

per_person_type_usages

per_addresses

per_contact_Relationships

per_periods_of_service

Per_all_assignments_f

per_pay_groups
per_jobs

per_job_Definitions

per_grades

per_grade_definitions

hr_all_positions

hr_all_position_definitions

hr_all_locations

pay_all_payrolls_F

pay_element_entry_values_F

pay_element_entries_F

pay_elements_links_F

pay_element_types_F

now Oracle Payroll Tables


All the HRMS/Payroll tables that are date-tracked will must have two columns:-

Effective_start_date

Effective_end_date

All the objects in Oracle HRMS or Payroll that end with _x have a where clause
where sysdate between Effective_start_date AND Effective_end_date, therefore
you can use the views that return records as of SYSDATE.

The primary keys of the date tracked columns includes Effective_start_date &
Effective_end_date.

PAY_ELEMENT_TYPES_F - Payroll Elements

Firstly, we create some elements, which get created in table PAY_ELEMENT_TYPES_F.


The primary key is a combination of element_type_Id along with Date Track
columns.

When will you join to pay_element_types_f


To display the name of Element in Reports or when you need develop adhoc query
for payroll runs. Normally when Payroll is run , the results are stored in
PAY_RUN_RESULTS, which stores a reference to element_type_Id.

2.PAY_ELEMENT_LINKS_F - Payroll Element Links

This table make payroll elements eligible to a group of people, you create Element
Links.The Primary key is ELEMENT_LINK_ID with date-track columns.

When will you commonly use element_link_Id ?

1. When querying on Element Entry[PAY_ELEMENT_ENTRIES_F], a join can be made


using ELEMENT_LINK_ID

2. The reason Oracle uses ELEMENT_LINK_ID in Element Entry to work out Costing
Segments based on Payroll Costing Hierarchy.

3.PER_ALL_PEOPLE_F - Employee record

It is well known that Employee records are stored in PER_ALL_PEOPLE_F. Its a date
track table with primary key being person_Id. This table also has party_Id, because
Oracle creates a party in TCA as soon as a record in per_all_people_f gets created.

Main usage of per_all_people_f:-

1. To get the name of the person


2. To get the date of birth or tax Id of the person
Note:- The application uses PER_PEOPLE_F, as that is a secured view layer on top of
PER_ALL_PEOPLE_F

4.PER_ALL_ASSIGNMENTS_F - Assignment table

This is the most central table in Oracle Payroll. Payroll engine uses this table as the
main driver.

Why so: Because Element Entries are stored against Assignment record.

This table is date-tracked, with primary key being assignment_Id

Usage of per_all_assignments_f?

1. Find position_Id, hence position, or grade, the organization for the persons
assignment.

2. It has foreign key to person_id. Each person Id can have no more than one
primary assignment at any given point in time.

3. Pay run results and also the pay_assignment actions refers to this table.
5.PER_PERSON_TYPES - Person type

This is the master table for Person Types. Some examples of Person Types are
Employees, Casuals, Applicants etc.

The primary key is person_type_id.

But please do not try joining this with person_type_id in per_all_people_f.

Instead join that to per_person_type_usages_f

_x will give you person_type usage as of SYSDATE.

For any other date, use the classic p_date between effective_start_date and
effective_end_date.
6.PAY_ELEMENT_ENTRIES_F & PAY_ELEMENT_ENTRY_VALUES_F

This Tables effected when element entry is done,two tables get inserted into when
fresh Element Entries are created.

PAY_ELEMENT_ENTRIES_F

Each Element that gets attached to an Assignment will have an entry in


PAY_ELEMENT_ENTRIES_F.

For each assignment you will have one or more records in PAY_ELEMENT_ENTRIES_F
table.

It is logical that PAY_ELEMENT_ENTRIES_F has following columns

Assignment_id

Element_link_id

ELEMENT_TYPE_ID

This table is date-tracked too. Please do not ask my where there was a need to store
both ELEMENT_TYPE_ID and also ELEMENT_LINK_ID in this table.

Just storing the ELEMENT_LINK_ID could suffice. However, i guess Oracle did so for
Performance reasons.

7.PAY_ELEMENT_ENTRY_VALUES_F

This table stores a reference to PAY_ELEMENT_ENTRIES_F.

This table is date-tracked, and its primary key is INPUT_VALUE_ID.


How to Purge Employee Record
In two ways this can be done.

1. US HRMS Manager -> People -> Delete Personal Records. Query the person and
click delete (red cross in the main menu).
2. Call the API HR_PERSON_API.DELETE_PERSON with appropriate parameters.

set the date one day before effective date, and than delete the person record.
Assumtion: The person should not have any absences. Firts delete it, dann delete
the perosn record.

API to use to update employee additional attributes


Use this API
HR_PERSON_API.UPDATE_US_PERSON to update attribute columns

Query : Job Change Date


select papf.employee_number,max(oldpaaf.effective_end_date +1) "Job Change
Date"
from per_all_people_f papf,
per_all_assignments_f oldpaaf,
per_all_assignments_f newpaaf
where papf.person_id = oldpaaf.person_id
and papf.person_id = newpaaf.person_id
and oldpaaf.job_id != newpaaf.job_id
and oldpaaf.effective_end_date < newpaaf.effective_start_date
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
and trunc(sysdate) between newpaaf.effective_start_date and
newpaaf.effective_end_date
group by papf.employee_number

Oracle HR / Payroll Important Tables


Posted November 12th, 2010 by hameed & filed under HR / Payroll Important Tables.
oracle apps / EBS R12
Oracle HR / Payroll Important Tables
The tables that are date-tracked will have two columns:-
Effective_start_date
Effective_end_date
All the objects in Oracle HRMS or Payroll that end with _x have a where clause where sysdate
between Effective_start_date AND Effective_end_date
Hence these are views that return records as of SYSDATE.
The primary keys of the date tracked columns includes Effective_start_date &
Effective_end_date.
PAY_ELEMENT_TYPES_F Payroll Elements
Firstly, we create some elements, which get created in table PAY_ELEMENT_TYPES_F. The
primary key is a combination of element_type_Id along with Date Track columns.
When will you join to pay_element_types_f ?
1. To display the name of Element in Reports
2. When payroll runs, the results are stored in PAY_RUN_RESULTS, which stores a reference
to element_type_Id
INFO: EMPLOYEE_CATEGORY holds in the table *PER_ALL_ASSIGNMENTS_F
6:05 AM HRMS, Info No comments
Employee Category is a lookup. the value that is in per_all_assignments_f for
employee_category is the lookup_code that is stored.
FND_COMMON_LOOKUPS has the column lookup_type with value 'EMP_CAT' and
column lookup_code is the value in per_all_assignments_f
and meaning is value seen in the front end. query the table fnd_common_lookups
where lookup_type = 'EMP_CAT'
and you will understand. you can also query the quickcodes window from hrms resp
in front end for 'employment category' value.

EMPLOYEE_CATEGORY holds in the table *PER_ALL_ASSIGNMENTS_F

INFO: AIM Documents for Techies & Techno Functional


2:36 AM AIM, Info No comments
MD050 - Module Design - By Functional Consultants

MD070 - Technical Document Design - By Technical Consultants


MD020 - Testing Document Design - By Functional Consultants
MD0120 - Migration/ User Training - By Technical Consultants
CV040 - Conversion of Functional Document - By Functional Consultants
CV060 - Conversion of Technical Document - By Technical Consultants

How : How to enable the DFF for the Lookup?


3:38 AM DFF, How No comments
If you want to enable the DFF and enter some additional entries in Lookups you just
need to follow the below steps

STEPS FOR YOU:

Create a DFF
Login to System Administrator
Application -> Flexfield -> Descriptive -> Segments
Search for Application = Application Object Library
Title = Common Lookups

You can see referenced field as "LOOKUP_TYPE"

Now if you want to enable your lookup, you need to uncheck "Freeze Flexfield
Definitions" checkbox on the top left the DFF Segments screen.
this enables you to enter new DFF entries.

Now, enter create a line under Context Field Values

Under "Code" enter your lookup ex: XXPHR_DEDUCT_ELEMENTS

Click on Segments

Enter the number, name, prompt, column and value set(if you have one)

save and compile the DFF.

Now, switch the responsibility to Application Developer to see the DFFs enabled in
lookup

Open the common lookups screen and query for the lookup name you have given
under "Code" of DFF setup.

and thus your DFF is enabled.

Phases in Implementation
The picture below depicts the various phases in implementation of an Oracle Application
Project.
Picture courtesy: UST Global

Top 35 SQL Interview Question asked in Oracle Apps R12 Technical Interview
or
SQL TOP 35 Frequently asked question in Technical Interview

Frequently asked Technical (SQL) question in Oracle apps r12 -:

1. To find EVEN NUMBER

select * from emp where rowid in (select decode(mod(rownum,2),0,rowid,


null) from emp);

2. To find EVEN NUMBER

select * from emp where rowid in (select


decode(mod(rownum,2),0,null ,rowid) from emp);
3. To find the 5th MAX salary

select distinct sal from emp e1 where 5 = (select count(distinct sal)


from emp e2 where e1.sal <= e2.sal);

4. To find the 9th MIN salary in the emp table.

select distinct sal from emp e1 where 9 = (select count(distinct sal)


from emp e2 where e1.sal >= e2.sal);

5. How can we use Rownum function/How can get output for first 10 row output

select * from emp where rownum <= &Enter_row_num;

6. How can get output for Last 10 row output

select * from emp minus select * from emp where rownum <= (select
count(*) - &Enter_row_num from emp);

7. Use of Not in,Not Exists and /Department name without allocation of any Employee in it .
select * from dept where deptno not in (select deptno from emp);

OR

select * from dept a where not exists (select * from emp b where
a.deptno = b.deptno);

8. To find 21 Max salaries ?

select distinct sal from emp a where 21 >= (select count(distinct sal)
from emp b where a.sal <= b.sal) order by a.sal desc;
9. To find 11 Min salaries ?

select distinct sal from emp a where 11 >= (select count(distinct sal)
from emp b where a.sal >= b.sal);

10. To find nth maximum salary of employee with distinct function ?

select distinct hiredate from emp a where &n = (select count(distinct


sal) from emp b where a.sal >= b.sal);

11. Example of Left or right join

select empno,ename,b.deptno,dname from emp a, dept b where a.deptno(+)


= b.deptno and empno is null;

select empno,ename,b.deptno,dname from emp a, dept b where a.deptno =


b.deptno(+) and empno is null;

12. To delete duplicate Records from Table

delete from emp a where rowid != (select max(rowid) from emp b where
a.empno=b.empno);

13. Use of Group by Function

select count(EMPNO), b.deptno, dname from emp a, dept b where


a.deptno(+)=b.deptno group by b.deptno,dname;

14. Use of Mathmatical Function in query

select ename,sal/12 as monthlysal from emp;


15. Select all record "OR"

select * from emp where deptno=90 or deptno=40;

16. Select all record Using Less then and greater then.

select * from emp where deptno=40 and sal>1100;

17. Use of "Not in" by example

select * from emp where job not in ('SALESMAN','CLERK');

18. Use of "IN" by example

select * from emp where empid in('10','20','30');

19. Select all records where ename starts with 'Sonu' and its lenth is 8 char.

select * from emp where ename like'Sonu___';

20. Select all records where ename end with 'Chauhan'/Use of "%"

select * from emp where ename like'%Chauhan';

21. Use of Count function

select count(MGR),count(sal) from emp;

22. Use Formula in select


select ename,(sal+nvl(comm,0)) as totalsal from emp;

23. Select any salary <15000 from emp table using subquery

select * from emp where sal> any(select sal from emp where
sal<15000);

24. Select all salary <5000 from emp table using subquery

select * from emp where sal> all(select sal from emp where sal<5000);

25. Select all the employee group by deptno and sal in descending order.

select ename,deptno,sal from emp order by deptno,sal desc;

26. How can I create an empty table emp1 with same structure as emp?

Create table emp1 as select * from emp where 3=5;

27. How to retrive record where sal between 3000 to 7000? / Use of "Between"

Select * from emp where sal>=3000 And sal<7000

28. Select all records where dept no of both emp and dept table matches.

select * from emp where exists(select * from dept where


emp.deptno=dept.deptno)

29. How to use Union between two table

(Select * from emp) Union (Select * from emp1)


30. To find Intersect/Common attribute value

(Select * from emp) Intersect (Select * from emp1)

31. Use of "Minus"

(Select * from emp) Minus (Select * from emp1)

32. Count the total sal deptno wise where more than 2 employees exist.

SELECT deptno, sum(sal) As totalsal FROM emp GROUP BY deptno HAVING


COUNT(empno) > 2

33. Example of Subquery

SELECT * FROM AP_EXPENSE_REPORT_HEADERS_ALL WHERE EMPLOYEE_ID IN


( SELECT PERSON_ID FROM PER_ALL_PEOPLE_F WHERE EMAIL_ADDRESS =
&Email_id )

34. Example of Union

SELECT PO_HEADER_ID FROM PO_headers_all


union
SELECT PO_HEADER_ID FROM PO_lines_all

35 Example of Function Like Sum ,Avg etc

SELECT avg(RATE) from PO_headers_all

What are the differences between system, extensible, and user lookup types in
Oracle Apps R12?
KULDEEP CHAUHAN 5/08/2016 01:15:00 am

What are the differences between system, extensible, and user lookup types in Oracle Apps
R12?
OR
Type of Lookups in Oracle Apps R12

User

Insertion of new codes is allowed

Updating of start date, end date, and enabled fields is allowed

Deletion of codes is allowed

Updating of tag is allowed

Extensible

Deletion of lookup type is not allowed

Insertion of new codes is allowed

Updating of start date, end date, enabled fields, and tag is allowed only if the code is not
'seed data'

Deletion of codes is allowed only if the code is not 'seed data'

Updating of module is not allowed

System

Deletion of lookup type is not allowed

Insertion of new codes is not allowed

Updating of start date, end date, and enabled fields is not allowed

Deletion of codes is not allowed

Updating of tag is not allowed

Updating of module is not allowed


Definition of Lookup in Oracle Apps R12 Or What is Lookup in Oracle Apps R12? Or
What is the main purpose of lookups in Oracle Apps R12?

KULDEEP CHAUHAN 5/08/2016 01:27:00 am

Definition of Lookup in Oracle Apps R12


Or
What is Lookup in Oracle Apps R12?
Or
What is the main purpose of lookups in Oracle Apps R12?

The main purpose of a lookup is to keep programs flexible and easier to configure. Lookups are
an approach of creating a configurable list of values in E-Business Suite. One of the simplest
examples of a lookup type is gender. A gender lookup will have definitions as shown next:

Code Meaning
M Male
F Female
U Unknown

Suppose that there is a table for employees named PER_ALL_PEOPLE_F and it has the
following columns:

FIRST_NAME
LAST_NAME
DATE_OF_BIRTH
GENDER

The screen that displays an employees gender will display a value of Male, Female, or
Unknown. However, the database column PER_ALL_PEOPLE_F.GENDER will store a value of
M, F, or U. Hence, the screen displays the meaning, whereas the database columns reference
the lookup via a lookup code.
If in the future your organization wants the users to see Undisclosed instead of Unknown,
you will have to make a change to just one record in the lookups table via the lookup screen. By
doing so, you will avoid having to update thousands of records in PER_ALL_PEOPLE_F. Your
new lookup will look like the following:
Code Meaning
M Male
F Female
U Unknown

Here lies the power of the lookups; you do not need to modify thousands of records in a
transactional table. A simple change via the lookup screen will suffice. Using the lookup screen,
you can either create new custom lookups or modify existing lookups.

What are the differences between system, extensible, and user lookup types in Oracle Apps
R12?ORType of Lookups in Oracle Apps R12

User

Insertion of new codes is allowed

Updating of start date, end date, and enabled fields is allowed

Deletion of codes is allowed

Updating of tag is allowed

Extensible

Deletion of lookup type is not allowed

Insertion of new codes is allowed

Updating of start date, end date, enabled fields, and tag is allowed only if the code is not
'seed data'

Deletion of codes is allowed only if the code is not 'seed data'

Updating of module is not allowed

System

Deletion of lookup type is not allowed

Insertion of new codes is not allowed


Updating of start date, end date, and enabled fields is not allowed

Deletion of codes is not allowed

Updating of tag is not allowed

Updating of module is not allowed

The following table shows the differences between system, extensible, and user lookup types:

Brief, some pre-seeded lookups given by Oracle cannot be modified. For example, Oracle has a
lookup type called a termination type as shown in above figure. Oracle has some rules defined
within the Payroll Engine program that read the value of a termination type code for employees
before calculating their final salaries. Such lookup codes, if changed, can affect the logic within
the Payroll Engine. For this reason, Oracle flags some lookups as system lookups, and the
Lookup Entry screen will not let you modify those lookup codes.

How can a lookup type be directly attached to a flexfield segment to do validations in Oracle
Apps R12?

To do this, create a value set of Table type that validates against FND_LOOKUP_VALUES using
the desired lookup. In this manner, you can validate flexfield segments against lookup values.

The point here is that a lookup type cannot be directly attached to a flexfield segment to do
validations; however, it is indirectly possible to do so.

Examples and use cases where we use lookups in Oracle Apps R12.

Example: Interfacing Data to Third-Party Systems


Sometimes there is a need to create a database view that becomes the source of information
for data transfer to other third-party systems. You might have to put filtration rules in place; for
example, for HRMS Extract, people with person types Employee and Applicant should be
extracted. To achieve this, instead of hard-coding Employee and Applicant in the database view,
you can do the following:

1-Create a lookup type XX_EXTRACT_EMPLOYEE_TYPES.


2-Add lookup codes Employee and Applicant to this lookup type.
3-In the database view, join the HR Person Types from HR Tables with
FND_LOOKUP_VALUES for this lookup type.

So through this manner, Lookup also gives you the flexibility to change hard-code Value in
Code.

Example of $FLEX$ Syntax Used In Value


Set
Example of $FLEX$ Syntax Used In Value Set ($flex$ in oracle apps)

Example of using :$FLEX$.Value_Set_Name to set up value sets where one


segment depends on a prior segment that itself depends on a prior segment. Suppose
you have a three-segment flexfield where the first segment is Country, the second
segment is State, and the third segment is District. You could limit your third segment's
values to only include Districts that are available for the Address specified in the first two
segments. Your three value sets might be defined as follows:

Segment Name Country_Segment


Value Set Name Country_Value_Set
Validation Table Country_Table
Value Column Country_NAME
Description Column Country_DESCRIPTION
Hidden ID Column Country_ID
SQL Where Clause (none)

Segment Name State_Segment


Value Set Name State_Value_Set
Validation Table State_Table
Value Column State_Name
Description Column State_DESCRIPTION
Hidden ID Column State_ID
SQL Where Clause WHERE Country_ID =
:$FLEX$.Country_Value_Set

Segment Name District_Segment


Value Set Name District_Value_Set
Validation Table District_Table
Value Column District_NAME
Description Column District_DESCRIPTION
Hidden ID Column District_ID
SQL Where Clause WHERE Country_ID =
:$FLEX$. Country_Value_Set
AND Country_ID =
:$FLEX$.State_Value_Set

In this example, Country_ID is the hidden ID column and Country_Name is the value
column of the Country_Value_Set value set. The Model segment uses the hidden ID
column of the previous value set, Country_Value_Set, to compare against its WHERE
clause. The end user never sees the hidden ID value for this example.

"Example of $FLEX$ Syntax Used in Oracle Apps ($flex$ in oracle apps) "
Query to find Locked Object in Oracle Apps R12

How can find Locked Object in Oracle Apps R12 ?or How can find Locked object name and
Oracle User name in Oracle Apps R12 ?
Query 1 -

SELECT b.owner
, b.object_name
, a.oracle_username
, a.os_user_name
FROM v$locked_object a
, all_objects b
WHERE a.object_id = b.object_id

Query 2 -

SELECT c.owner
, c.object_name
, c.object_type
, b.SID
, b.serial#
, b.status
, b.osuser
, b.machine
FROM v$locked_object a
, v$session b
, dba_objects c
WHERE b.SID = a.session_id
AND a.object_id = c.object_id;

Query 3 -

SELECT a.session_id
, a.oracle_username
, a.os_user_name
, b.owner "OBJECT OWNER"
, b.object_name
, b.object_type
, a.locked_mode
FROM ( SELECT object_id
, session_id
, oracle_username
, os_user_name
, locked_mode
FROM v$locked_object ) a
, ( SELECT object_id
, owner
, object_name
, object_type
FROM dba_objects ) b
WHERE a.object_id = b.object_id;
How can make entry for "TNSNAMES.ORA" on the local host for Oracle Application
(In Oracle Apps R12).

KULDEEP CHAUHAN 8/26/2016 10:54:00 am

TNSNAMES.ORA entry to runs Oracle Application R12 at local Host


OR
TNS Entry steps to runs Oracle Application R12

Please follow the given steps -:

1- Go to Host Desktop Screen

2- Press Home key + R and Type 'drivers'

Then Press Enter .

3- Now Go to Folder etc < Hosts


Then

Then
In the Host File please make entry for -

IP Address | Hostname | SID

As - 192.168.1.5 ebs.example.com EBSDB

Important -: Default setup for Oracle Vision Instance to connect database and Application

Host - Host IP Address - 192.168.1.5

Port - Port Number - 1521

SID - Service Identification - EBSDB

Note - You can also Explorer the path directly .Follow the given below directory for the
same .

C:\Windows\System32\drivers\etc

How to Debug Oracle Applications:


Download PDF
There are three major ways in which one can debug the Oracle Applications. This is
applicable to all the released versions in Oracle. Let me give a brief on how to
proceed with each of them.

Pre-Requisites:

- You must have the backend access to database and the Unix Box.

- Must be well versed with SQL and PL/SQL

- Must have a good idea about the functional flow of the Applications.

- Access to System Administrator Responsibility in Oracle Applications.

Lets begin with the methods. As already mentioned, there are three ways of
debugging the Applications and they are:

1. Debug Log

2. Trace and TkProf

3. FRD Log

Lets discuss the ways in which this can be obtained and how to read them.

Debug Log Messages:

This is one of the most commonly used debug methods. This gives a fair idea of the
application as of which package is failing and which value is not getting passed to
which parameter and so on.. more importantly, the backend data flow.

Step 1:

========

The first and foremost thing in this process is to enable the debug messages. This
can be achieved by setting the following Profile Options at the User Level.

Please note that you can set the profile options only if you have the access to
System Administrator Responsibility.

FND: Debug Log Enabled YES -- Enables Debugging messages.

FND: Debug Log Filename NULL -- To store the file in an external file, if NULL,
the values are written in a table

FND: Debug Log Level STATEMENT -- Most detailed log

FND: Debug Log Module % -- Application specific, if %, it is enabled for all

applications, else values can be ar%, ap%

Step 2:

======

Once the Profile options are set, the next step is to find the initial value from where
our debugging routine will start. To identify this value, you will have to login to the
Database by using SQL Developer/TOAD and then execute the following Query:

SELECT MAX(LOG_SEQUENCE)
FROM FND_LOG_MESSAGES

This will give a value. Keep this value for future references.

Step 3:

======

Now, try to reproduce the issue and ensure that you try to stay on track in
reproducing the issue and leave out extraneous steps so that you don't end up with
debug messages that are not relevant to your issue. It is ideal to not have anyone
else using the Responsibility you have enabled debug for, so that only messages
pertaining to your testcase are picked up.

Step 4:

======

Once the issue is reproduced, stop at the step next to the error, like Click OK to the
error and then the next step is to ensure that you retrieve the debug log messages
generated by your test case. To retrieve the messages, execute the below query in
SQL Developer/TOAD.

SELECT MESSAGE_TEXT, MODULE


FROM FND_LOG_MESSAGES
WHERE LOG_SEQUENCE > &max_log_from_step2
ORDER BY LOG_SEQUENCE;

Now, spool this file to an excel sheet and save it in your system.
Step 5:

======

The next step in the process is to read the retrieved messages. Here is how you can
interpret the messages generated.

Here is how a sample debug file looks like:

create_person (+)

LoadDataSources (+)

cacheSetupForOtherEntities (+)

G_DATASOURCE_LOADED = N

l_str = 'USER_ENTERED'

l_str = 'USER_ENTERED'

l_str = 'USER_ENTERED'

l_str = 'USER_ENTERED'

l_str = 'USER_ENTERED'

l_start = 5

i=1

l_entity_name = 'HZ_PERSON_PROFILES'
l_entity_id = -1

i_content_source_type.COUNT = 0

l_str =

i=2

l_entity_name = 'HZ_ORGANIZATION_PROFILES'

l_entity_id = -2

i_content_source_type.COUNT = 1

l_str = 'USER_ENTERED'

total = 7

cacheSetupForOtherEntities (-)

p_mixnmatch_enabled = N

p_selected_datasources = 'USER_ENTERED'

LoadDataSources (-)

do_create_party (+)

validate_person (+)

first_name or last_name is mandatory. x_return_status = S


head_of_household_flag in lookup YES/NO. x_return_status = S

deceased_flag in lookup YES/NO. x_return_status = S

after validating date_of_birth and date_of_death against SYSDATE x_return_status = S

(+) after validating the date_of_death and date_of_birth... x_return_status = S

created_by_module is madatory field. x_return_status = S

validate_person (-)

l_mixnmatch_enabled = N

l_selected_datasources = 'USER_ENTERED'

do_create_update_party_only (+)

do_create_party_name (+)

l_party_name = ALLY TIONG

do_create_party_name (-)

Generated person key : TNG.ALC

validate_party (+)

validate_party (-)
hz_parties_pkg.Insert_Row (+)

hz_parties_pkg.Insert_Row (-)

do_create_update_party_only (-)

do_create_party_profile (+)

do_create_person_profile (+)

hz_person_profiles_pkg.Insert_Row (+)

do_create_person_name (+)

do_create_person_name (-)

l_person_name = ALLY TIONG

hz_person_profiles_pkg.Insert_Row (-) x_profile_id = 2783499

do_create_person_profile (-)

do_create_party_profile (-)

do_process_classification (+)

party_id =

do_process_classification (-)
Event Name:oracle.apps.ar.hz.Person.create Event Key:oracle.apps.ar.hz.Person.create382123Max

For every (+), the control is getting into that Package and for every (-), the
control is coming out of that package. It also depends on what kind of debugging
messages are coded in those packages where the control enters and processes the
code and then passes to the next level.

P.S: Almost all the packages in Oracle Applications, has debugging messages
enabled, however, there are exceptions, where packages may not have debugging
enabled, hence, will not be shown in the debug file.

To find the cause of the issue, the first thing to find in a debug file, is the word
Exception. This will be showing the package name where the error occurs. Just,
open the package in SQL Developer/TOAD and see the SQL being fired.

Check for the values which are being passed to this SQL and see the exception
block of the script. On analyzing further, you will mostly be able to find the value
which is not getting passed or the wrong value being passed to this SQL and the
reason for the error.

Once this is identified, you have to check the Application Settings and modify it
accordingly to have the correct value to be passed to the SQL to prevent it from
erroring out.

I will be posting the other two debugging methods in my coming posts.

Forms Personalization and Custom.PLL


Download PDF

What is this?

Oracle Supplied forms are the seeded forms and have a standard functionality attached to
them. Whenever there is a need to change the functionality or change the look and feel of the
forms, we use Forms Personalization or Custom.PLL.

Custom.PLL or Forms personalization is used to alter the standard functionality of an Oracle


Seeded form without affecting the base form and without altering its coding. In older versions,
prior to 11i, Custom.PLL was most prominently used for adding additional features in the seeded
form but the latest version of Oracle EBS comes with the feature called as Forms
Personalization which allows even an end user to alter the seeded forms functionality using an
user interface called the Personalization form.
Advantages of Forms Personalization over Custom.PLL

Forms personalization can be used by an user with limited PL/SQL knowledge.


Changes take place immediately on reopening the form.
Anything which can be done using Custom.PLL can be done using Forms Personalization also.
Personalizations are stored in base tables related to Form Personalization.

Restrictions of Custom.PLL and Forms Personalization:

It is not possible to create any new item in the Standard form using Custom.PLL or Forms
Personalization.

How to

Normally a user with some basic knowledge of Oracle Forms and PL/SQL is allowed to modify a
standard form. This can be achieved by setting the profile Option

FND: Diagnostics (Set to Yes at User Level)


Hide Diagnostics (Set to NO by default)

This enables the diagnostics menu when the particular user logs in and provides access to the
personalization form. Once the form is open, the user can make any modifications for the
specific form and then save and check the effect.
Custom.PLL is mainly used by the developers who have a vast knowledge of PL/SQL and can
attach any logic using PL/SQL which in-turn will implement the business logic when the form
opens. To achieve this, the developer has to first edit Custom.PLL and then add the code in it,
compile and save it in the UNIX box and then deploy it in the applications. The changes will be
reflected only the next time when the application is restarted.

Some typical uses

Changing the property of an Item. It can be any property associated with the item.

Calling a different form and passing a value from the calling form to the called form.

Addition of special menus apart from the standard menu.

Displaying custom messages for debugging purposes.

Feel free to post your comments and your queries.

$FLEX$ and $PROFILES$


Download PDF
What is $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:

$FLEX$ must always be in capitals.

A : must precede the declaration of $FLEX$.

The previous value set name must have already been assigned and saved on a different
parameter.

:$PROFILES$.Profile_option_name

Important:

$PROFILES$ must be always in capitals.

: must always precede the declaration.

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 working of this concurrent program, lets submit this

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

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$.

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.

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.

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.

Enabling Descriptive Flexfield in Oracle Applications

Summary:
The key for enabling a Descriptive Flexfield is to identify the Base table of the related form and
then use the table name to query the Descriptive Flexfield Title. Once the title of the Descriptive
Flexfield is obtained, then we just have to Query the name in the Application Developer
responsibility and then add the desired columns. This will enable the Descriptive Flexfield.

Getting Started:
Lets enable the Descriptive Flexfield of Purchase Order form. The initial screen looks as shown
below and the DFF field is Disabled.

Get the name of the view from which this form is created using the Tools=>Record History
option

Use the utility TOAD to find the base table of this view. We will find that the base table involved
here is PO_HEADERS_ALL.

Now, switch to Application Developer Responsibility and open the form for registering the
Flexfields.

Navigation:

Application Developer => Flexfields => Descriptive => Register

The window which opens is as shown below:


Now, query this form by providing the values for Application as Purchasing and the Table Name
as PO_HEADERS_ALL. The result will be as shown below:

Once the window is queried, then select the Title PO Headers from this window and then
navigate to
Application Developer => Flexfield=> Descriptive => Segments
Now, query this window using the title and the application name. The window is as shown
below:

Now, uncheck the freeze flexfield definition and then add the context field values as per the
need. This is illustrated in the screen below.

Here, I have added A and B as the code and Global Data Elements is default and is always
enabled.

Now, select the code and then add columns to it. It is shown as below

When clicked on Segments, we will get the window as below. We then specify the columns
which will get displayed when this code is selected.

If desired, we can attach the value set also to restrict the user from entering any garbage value.

Now, save this and follow the same steps for enabling the other code(B) also and also ensure
that to show the difference between code A and code B, enable three columns in Code B.

Now, the last step is to specify a default value to the Context Field. I am providing here a
reference field as TYPE_LOOKUP_CODE. Ensure that the checkboxes are checked. The
screen is as below.

Once this is done, we then have to compile the flexfield and save the window. For compiling the
Flexfield definition, we need to first save the window and then check the freeze flexfield
checkbox and then click on Compile.

Now, Login to Purchasing responsibility and then open the Purchase Order form.

This window shows that the DFF field is now enabled. When we click on the DFF window, we
will be getting a screen as below
When the LOV is clicked, we get the values populated by the reference column which we gave
as TYPE_LOOKUP_CODE'.It is shown below

Now, based on the value selected we will get the corresponding columns which is shown in the
subsequent screen.

Hence, this is how a flexfield works. When the data is saved, it will be saved in the base table
on the corresponding Attribute columns as specified in the Application developer responsibility.

Your comments and queries are always appreciated.


Flexfields in Oracle Applications

What is a Flexfield?
As the name suggests, a Flexfield is a flexible field. A flexfield is a field made up of
segments. Segments are nothing but columns of the base table. Each segment has a
name that can be assigned and a set of valid values. There are two types of Flexfields
in Oracle Applications and they are called as
Key Flexfield
Descriptive Flexfield
With both of these flexfields, users get the ability to customize their application to match
their business needs without programming.

When and where are these flexfields used?


Descriptive Flexfields are used in places whenever the user feels a need of extra
information apart from the Oracle supplied standard information in the forms.
Key Flexfields are used whenever there is a need for storing Key information related to
the organization.

What is the difference between Key and Descriptive flexfields?

Key flexfield is used to store the key information about an organization whereas
Descriptive flexfields are used to store any additional related information.

Key Flexfield values are stored in Segment columns in the base table whereas
descriptive flexfield values are stored in the Attribute columns of the base table.

Key Flexfields are non-updatable and mostly have only restricted values as input
(Attached Value sets) wheras a the fields in Descriptive Flexfield are updatable.

Key flexfields do not have any context sensitive segments whereas Descriptive flexfields
can be made into context sensitive fields.

Key Flexfields are the mandatory fields whereas descriptive flexfields are not mandatory
by default but can be made mandatory.

What are the Base Tables involved in Flexfields creation?


The tables involved are
FND_FLEX_VALUES_TL, FND_ID_FLEXS, FND_FLEX_VALUES,
FND_FLEX_VALUE_SETS, FND_ID_FLEX_STRUCTURES

Query to find the number of oracle Supplied key flexfields in each application

SELECT fa.application_name application, COUNT (fif.application_id) flexfield_count


FROM fnd_id_flexs fif, fnd_application_tl fa
WHERE fif.application_id = fa.application_id
GROUP BY fa.application_name

A sample output of this query is as below:

These were some of the basics involved with Flexfields in Oracle Applications. The next
post will be on how to enable a Descriptive Flexfield in Oracle Applications.

Please feel free to post your comments or queries

Das könnte Ihnen auch gefallen