Oracle Application Technical Manual

169
1 REF: #202, 2 nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad. :8125552893, :[email protected] ORACLE APPLICATIONS 11i & R12 PLSQL XML PUBLISHER REPORTS ORACLE APPS REPORTS SQL WORK FLOW CONVERSIONS INTERFACES FORM TECHNICAL DOCUMENT PREPARATION RESUME PREPARATION MOCK INTERVIES DISCOVER REPORTS BI PUBLISHER

description

Oracle Application Technical Manual

Transcript of Oracle Application Technical Manual

Page 1: Oracle Application Technical Manual

1REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

ORACLE

APPLICATIONS 11i & R12

PLSQL

XML PUBLISHER REPORTSORACLE APPS REPORTS

WORK FLOW

SQL

INTERFACES CONVERSIONS

FORM PERSONALIZATION

TECHNICAL DOCUMENT PREPARATION RESUME PREPARATION

MOCK INTERVIES

DISCOVER REPORTSBI PUBLISHER REPORTS

Page 2: Oracle Application Technical Manual

INDEXS.NO NAME OF THE TOPICS PAGE NO.

1 USING OF AD_DD PACKAGE 3-6

2 MULTI ORG AND MOAC 7-14

3 PROFILES 14-19

4 FLEX FIELDS 19-21

5 VALUE SETS 22-35

6 DEFAULT TYPES 35-36

7 AIM METHODOLIEGES 36-36

8 ORACLE REPORTS 37-47

9 USER EXISTS 48-49

10 QUERIES FOR SOME OF THE REPORTS 49-53

11 INTERFACES 53-56

12 ASL CONVERSION 56-58

13 PROCESS OF INBOUND 58-74

14 SQL *LOADER 75-85

15 OUT BOUND INTERFACE 86-97

16 FORMS 97-116

17 FORM PERSONALIZATION 116-125

18 TCA 125-129

19 APPS INTRODUCTION PRESENTATIONS

2REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 3: Oracle Application Technical Manual

Using AD_DD Package to register Database Component in AOL:

Oracle Applications comes with thousands of seeded database tables, there can be numerous applications in which one might be required to create a custom table to be used. In most of the applications all you need is to create a table in a schema and use it directly in your applications. Flexfields and Oracle Alert are the only features or products that require the custom tables to be registered in Oracle Applications (Application Object Library) before they can be used.You register your custom application tables using a PL/SQL procedure in the AD_DD package. Therefore you only need to register those tables (and all of their columns) that will be used with flexfields or Oracle Alert.You can also use the AD_DD API to delete the registrations of tables and columns from Oracle Application Object Library tables should you later modify your tables. If you alter the table later, then you may need to include revised or new calls to the table registration routines. To alter a registration you should first delete the registration, and then re-register the table or column. Remember, you should delete the column registration first, then the table registration. You should include calls to the table registration routines in a PL/SQL script. Though you create your tables in your own application schema, you should run the AD_DD procedures against the APPS schema. You must commit your changes for them to take effect.The AD_DD API does not check for the existence of the registered table or column in the database schema, but only updates the required AOL tables. You must ensure that the tables and columns registered actually exist and have the same format as that defined using the AD_DD API. You need not register views.

Syntax for Table Registration :procedure register_table ( p_appl_short_name in varchar2, p_tab_name in varchar2, p_tab_type in varchar2, p_next_extent in number default 512, p_pct_free in number default 10, p_pct_used in number default 70);1Syntax for Column Registration :procedure register_column (p_appl_short_name in varchar2, p_tab_name in varchar2, p_col_name in varchar2, p_col_seq in number, p_col_type in varchar2, p_col_width in number,

3REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 4: Oracle Application Technical Manual

p_nullable in varchar2, p_translate in varchar2, p_precision in number default null, p_scale in number default null);

Syntax of Delete table :procedure delete_table (p_appl_short_name in varchar2, p_tab_name in varchar2);

Syntax of delete column :procedure delete_column (p_appl_short_name in varchar2, p_tab_name in varchar2, p_col_name in varchar2);

Explanation :Variable Name DESCRIPTION 

p_appl_short_name  The application short name of the application that owns the table (usually your custom application). 

p_tab_name  The name of the table (in uppercase letters). 

p_tab_type  Use ’T’ if it is a transaction table (almost all application tables), or ’S’ for a ”seed data” table (used only by Oracle Applications products). 

p_pct_free  The percentage of space in each of the table’s blocks reserved for future updates to the table (1–99). The sum of p_pct_free and p_pct_used must be less than 100. 

p_pct_used  Minimum percentage of used space in each data block of the table (1–99). The sum of p_pct_free and p_pct_used must be less than 100. 

p_col_name  The name of the column (in uppercase letters). 

p_col_seq  The sequence number of the column in the table (the order in which the column appears in the table definition). 

4REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 5: Oracle Application Technical Manual

p_col_type  The column type (’NUMBER’, ’VARCHAR2’, ’DATE’, etc.). 

p_col_width  The column size (a number). Use 9 for DATE columns, 38 for NUMBER columns (unless it has a specific width). 

p_nullable  Use ’N’ if the column is mandatory or ’Y’ if the column allows null values. 

p_translate  Use ’Y’ if the column values will be translated for an Oracle Applications product release (used only by Oracle Applications products) or ’N’ if the 

values are not translated (most application columns). 

p_next_extent  The next extent size, in kilobytes. Do not include the ’K’. 

p_precision  The total number of digits in a number. 

p_scale  The number of digits to the right of the decimal point in a number. 

Example :

CREATE TABLE TEST_DESC ( RESOURCE_NAME VARCHAR2 (150), RESOURCE_TYPE VARCHAR2 (100), ATTRIBUTE_CATEGORY VARCHAR2 (40), ATTRIBUTE1 VARCHAR2 (150), ATTRIBUTE2 VARCHAR2 (150), ATTRIBUTE3 VARCHAR2 (150), ATTRIBUTE4 VARCHAR2 (150), ATTRIBUTE5 VARCHAR2 (150), ATTRIBUTE6 VARCHAR2 (150) );

Table Example:BEGIN AD_DD.REGISTER_TABLE ('FND','TEST_DESC','T'); END;

5REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 6: Oracle Application Technical Manual

Column Example:

BEGIN AD_DD.REGISTER_COLUMN ('FND', 'TEST_DESC','RESOURCE_NAME', 1, 'VARCHAR2', 150, 'Y', 'N'); AD_DD.REGISTER_COLUMN ('FND', 'TEST_DESC','RESOURCE_TYPE', 2, 'VARCHAR2', 100, 'Y', 'N'); AD_DD.REGISTER_COLUMN ('FND', 'TEST_DESC','ATTRIBUTE_CATEGORY', 3, 'VARCHAR2', 40, 'Y', 'N'); AD_DD.REGISTER_COLUMN ('FND', 'TEST_DESC','ATTRIBUTE1', 4, 'VARCHAR2', 150, 'Y', 'N'); AD_DD.REGISTER_COLUMN ('FND', 'TEST_DESC','ATTRIBUTE2', 5, 'VARCHAR2', 150, 'Y', 'N'); AD_DD.REGISTER_COLUMN ('FND', 'TEST_DESC','ATTRIBUTE3', 6, 'VARCHAR2', 150, 'Y', 'N'); AD_DD.REGISTER_COLUMN ('FND', 'TEST_DESC','ATTRIBUTE4', 7, 'VARCHAR2', 150, 'Y', 'N'); AD_DD.REGISTER_COLUMN ('FND', 'TEST_DESC','ATTRIBUTE5', 8, 'VARCHAR2', 150, 'Y', 'N'); AD_DD.REGISTER_COLUMN ('FND', 'TEST_DESC','ATTRIBUTE6', 9, 'VARCHAR2', 150, 'Y', 'N'); END;

Do not forget to COMMIT after running the above steps. The table is now ready to be used in Oracle Alerts or Flex fields.

Frequently asked questions

1. What is the use of AD_DD package? 2. Why do we need to register the table with oracle applications? 3. Will my table get deleted if I use Delete table procedure of AD_DD package? 4. Do I need to register all the columns of a table? 5. How can I see the code of AD_DD Package?

6REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 7: Oracle Application Technical Manual

Multi Org or MOAC :

Multi org :Use a single installation of any Oracle Applications product to support any number of organizations, even if those organizations use different sets of books.

Flow :Business Group

Set of Books

Legal Entity

Operating Unit

Inventory Organization

Sub Inventory

Stock Locations

Items

Major Features : Multiple Organizations in a Single Installation Secure Access :You can assign users to particular organizations. This ensures accurate

transactions in the correct operating unit. Multiple Organizations Reporting : You can set up your Oracle Applications

implementation to allow reporting across operating units by setting up the top reporting level. You can run your reports at the set of books level, legal entity level, or operating unit level

Business Group:

7REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 8: Oracle Application Technical Manual

The business group represents the highest level in the organization structure, such as the consolidated enterprise, a major division, or an operation company. The business group secures human resources information. For example, when you request a list of employees, you see all employees assigned to the business group of which your organization is a part.

Set Of Books:A financial reporting entity that uses a particular chart of accounts, functional currency, and accounting calendar. Oracle General Ledger secures transaction information (such as journal entries and balances) by set of books. When you use Oracle General Ledger, you choose a responsibility that specifies a set of books. You then see information for that set of books only.Table : GL_SETS_OF_BOOKS or GL_LEDGERS

Legal Entity:A legal company for which you prepare fiscal or tax reports. You assign tax identifiers and other legal entity information to this type of organization.Table : HR_LEGAL_ENTITIES

Operating unit:An organization that uses Oracle Cash Management, Order Management and Shipping Execution, Oracle Payables, Oracle Purchasing, and Oracle Receivables. It may be a sales office, a division, or a department. An operating unit is associated with a legal entity. Information is secured by operating unit for these applications. Each user sees information only for their operating unit.Table :HR_OPERATING_UNITS

Inventory Organization:An organization for which you track inventory transactions and balances, and/or an organization that manufactures or distributes products. Examples include (but are not limited to) manufacturing plants, warehouses, distribution centers, and sales offices. The following applications secure information byOracle Inventory, Bills of Material, Engineering, Work in Process,Master Scheduling/MRP, Capacity, and Purchasing receiving functions.

Table : ORG_ORGANIZATIONS MTL_SYSTEM_ITEMS_B

Subinventory:

8REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 9: Oracle Application Technical Manual

Which is another organization inside of the Inventory organization will be used to define the locations under these location items will be placed.

Multiorg Table:It is a table contains the data which is related to multiple operating units all the multiorg table names will be end with '_ALL'.

like PO_HEADER_ALL PO_LINES_ALL AP_CHECKS_ALL and so on

Note: In all these tables we will find one common column called "ORG_ID" This column will be populated internally by the system as per the User Operating Unit ID

Client_Info:It is one the RDBMS vaiabel which contains the User Operating Unit value (ORG_ID) Multiorg View:It is a view which is created based on the Multiorg table which contains the WHERE clause WHERE Org_ID = :Client_Info.

Note: While development of RICE Components we are suppose to Use Multiorg Views not Multi Org Tables.Because if we use Multiorg tables we will get all the operating units data if we use multiorg view we will get the operating units data which is related for that particular user .

org_id is at operating unit level where as organization_id is at inventory level in multiorg implementationOrgId: Org Id is an unique ID for the Operating Unit.

Organisation Id: The Organisation Id is an ID for the Inventory Organisation which is under an Operating Unit.

MOAC: Multi Operating Unit Access Control is a major Feature that Oracle has introduced in R12.In 11i, when users had to enter or process data for multiple operating units, they had to login to different responsibilities because each responsibility could only access one operating unit. So if there were a centralized payment processing center where users processed payments for multiple

9REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 10: Oracle Application Technical Manual

organizations, they would have to keep logging in and out of different responsibilities to process payments for a different organization or operating unit.Now in Release 12, Multi-Org Access Control enables companies that have implemented Shared Services operating model to efficiently process business transactions by allowing users to access, process, and report on data for an unlimited number of operating units withina single application’s responsibility.

To accomplish this

Multi-org views have been removed, and replaced with synonyms. For example, MY_TABLE would no longer be a view defined on MY_TABLE_ALL, but rather a synonym which points to MY_TABLE_ALL

The data restriction is accomplished by assigning a virtual private database (VPD) policy to the synonym. This policy allows the system to dynamically generate restricting conditions when queries are run against the synonym.

What is a Virtual Private Database• This is a security feature of the Oracle Database Server 10G

• Security Policies can be applied to database object to control access to specific rows and columns in the object

• Security Policies can be different for each DML action– Select – Insert– Update– Delete

If the org has more than an operating unit (least level)then the org structure can be called as multi-org.MOAC provided the role based access, shared services, to perform multiple tasks across different operation units from within single application responsibility, It is controlled by MO: Security profile

Database Multi-Org Access Control

10REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 11: Oracle Application Technical Manual

In 11I versions of the E-business Suite you may have used standard applications procedures such as

DBMS_APPLICATION_INFO.SET_CLIENT_INFO or FND_CLIENT_INFO.SET_ORG_CONTEXT

These are superseded in Oracle Release 12 by the procedure MO_GLOBAL.INIT.

The MO_GLOBAL.INIT procedure accepts one parameter, Application Short Name. (SQLGL)

In order for the procedure to work, the FND_GLOBAL.APPS_INITIALIZE procedure must also be run so that the MO_GLOBAL package can see the Application Profile Options Values defined in the in the E-business Suite.

BEGINFND_GLOBAL.APPS_INITIALIZE(USER_ID,RESP_ID,RESP_APPL_ID);MO_GLOBAL.INIT(‘SQLGL’);

END;

• Responsibilities are assigned a Security Profile which is a group of Operating Units• Assignment is through the profile option ‘MO: Security Profile’ set at the Responsibility

Level.• So from one responsibility you can perform transactions and report on transactions from

multiple operating units• R12 implements MOAC through DB Synonyms that replace the old Multi-Org Views

Pre-R12 Multi-Org Architecture

• Base data tables exist in the product schema with a naming convention of %_ALL. The data in this table is striped by ORG_ID (Operating Unit).

• A view in the APPS schema provides the Multi-Org filtering based on the statement below in the where clause. SUBSTRB(USERENV ('CLIENT_INFO'), 1, 10)

R12 Multi-Org Architecture• Base data tables exist in the product schema with a naming convention of %_ALL. The

data in this table is striped by ORG_ID (Operating Unit).• A synonym in the APPS schema provides the Multi-Org filtering based the Virtual

Private Database feature of the Oracle 10G DB Server

11REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 12: Oracle Application Technical Manual

• Pre-R12 you could set your SQL session context for multi-org with the following:

BEGIN  dbms_application_info.set_client_info(2);    END;OrFND_GLOBAL.APPS_INITIALIZE to set your context

• In R12 you can set your SQL session context for a single OU with the following:

BEGIN execute mo_global.set_policy_context('S',2); END;

• The ‘S’ means Single Org Context

• 2 is the ORG_ID I want set• In R12 you can set your SQL session context for multiple OU’s with the following:

BEGIN execute mo_global.set_org_access(NULL,64,‘ONT'); END;

• 64 is the Security Profile you want to use

• ‘ONT’ is the application short name associated with the responsibility you will be using

How to find the Security Profiles :

select psp.SECURITY_PROFILE_NAME, psp.SECURITY_PROFILE_ID, hou.NAME, hou.ORGANIZATION_ID from PER_SECURITY_PROFILES psp, PER_SECURITY_ORGANIZATIONS pso, HR_OPERATING_UNITS hou where pso.SECURITY_PROFILE_ID = psp.SECURITY_PROFILE_ID

12REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 13: Oracle Application Technical Manual

and pso.ORGANIZATION_ID = hou.ORGANIZATION_ID

Tables Information each level :Level Table Profile Column Module

Business Group

HRFV_BUSINESS_GROUPS

HR:Business Group ID

BUSINESS_GROUP_ID

HRMS

Set Of Books OR Ledgers

GL_SETS_OF_BOOKS or

GL_LEDGERS

GL:Set of Books Name

GL:Ledger_name

SET_OF_BOOKS_ID or LEDGER_ID

GL

Legal Entity HR_LEGAL_ENTITIES

Operating Unit

HR_OPERATING_UNITS

MO:Operating Unit ORG_ID PO,AP,OM,AR,PA,CM

Inventory Organization

ORG_ORGANIZATION_DEFINITIONS

MFG_ORGANIZATION_ID

ORGANIZATION_ID

INV,WIP,PROD,BOM,ENG,MRP PO Receipts

SubInventory

Stock Locations

Items

MTL_SECONDARY_

INVENTORIES

MTL_ITEM_LOCATIONS

MTL_SYSTEM_ITEMS

Requstions

RFQ,Quotations,PO

PO Receipts

rcv_shipment_hreaders

rcv_shipment_lines

rcv_transactions

13REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 14: Oracle Application Technical Manual

Questions :

What is Multiorg? What is the Diff between ORG_ID and ORGANIZATION_ID? Why the PO Receipt functionality will come at Inventory organization level? how the System Will Identify user is working for so and so operating Unit? What is Client_info? how to Implement Multiorg in Reports and at SQL prompt? What is Business group, Legal Entity,Operating Unit,Inventory Organizations? What are the Modules will come at operating Unit level? What is the flow of Multiorg? How to Identify the Multiorg Table? Wat is the Diff between Multiorg Table and Multiorg View? While Developing RICE Components we will use Multiorg Table or Multiorg View? Why there is no _ALL for PO_VENDORS How will you findout Multiorg Succesfully Implemented?

Profile :

Profile is one of the changeable option it will change the way of application execution.When User Log into the application and select the the resp or Appl system will automatically captures all the profile value as per the profile values application will run.

When we want assign any profile value we have four levels,we have to select any one of the level.

Site : this is lowest level to assign the Profile values site values are applicable for all the users.when we install Application by default site level values will be assigned.

Application: These values are applicable for the users who are having the access for the application. If user is eligible for both application and site level values then application level value will override the site level value.

Responsibility: We will select the responsibility name assign the value which is applicalbe only for the users who are having the access for specified responsibility.Responsibility level value will override both application and site level values.

14REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 15: Oracle Application Technical Manual

User: This is highest level in the profile option.we will select the user name and assign the profile value which is applicable only for this user.User level value will override all other profile level values.

Diff between Application and Responsibility:

Both are Group of Forms(Menu),Group of ConcurrentPrograms(Request Group),Group of Users (Data group)

But Application as per the Business functionality requirement Responsibility will group as per the position requirement. Applciation is nothing Colletion of Forms,Reports and Program which are related for specific business functionality.

Responsibility is nothing but Colletion of Forms,Reports and Program which are related for specific Position in the Organization.

Example :

We have to create One Responsibility For the Clerk. Which is accesable by all the Clerks.It Contains the Forms and Reports which are required for the Clerk.We have to Create new Responsibility for the Manager,Which is accesable by all the Managers.It COntains the Forms and Reports which are required for the manager.Where as Application includes all the Forms,Reports and Programs.If we assign the application to the user he will access all the forms and Reports. Instead of that we will create the responsibility and we will assign to the User.

Some of the Imp Profile Names: GL:Set Of Books MO:Operating Unit Hr:Business Groups MFG_ORGANIZATION_ID USER_ID RESP_ID USERNAME RESP_NAME

15REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 16: Oracle Application Technical Manual

We can find all the Profile details in Application Developer Responsibility.We can assign the Profile values in System Administrator Responsibility.

Application Developer=>Profile =>Press CTRL+F11 we can find all the profiles.

System administrator=>profile=>System=> Select Profile name, Level =>Find buttonthen assign the Profile value.

Note: Most of the profile values will be assigned at Responsibility Level.

Retrieve the Profile Value from Backend:(SQL,PL/SQL,Forms,Reports)======================================

Fnd_Profile.Get('ProfileName',local Variable);

local Variable:= Fnd_Profile.Value('Profile Name');

Both API's will be used to retrieve the Profile value frombackend

Get() is ProcedureValue() is Function

Oracle Has provided both Procedure and Function becuase in some of the areas we can notuse procedure then we can use function.For Ex: in SELECT clause we can not use procedure we have to go for using the Function.

Example1 :1)We would like to display the Set of Books name

User name Respname in the first page of the report.

1)Define the Local Variable2)Goto before Report Trigger write the follwoing API :P_SOBNAME:= Fnd_Profile.value('GL_SET_OF_BKS_NAME'); :USERNAME := Fnd_Profile.value('USERNAME'); Fnd_Profile.Get('RESP_NAME',

16REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 17: Oracle Application Technical Manual

:RESPNAME);3)Goto Layout model Header section and Display the Variable Name.4)Submit from Diff Users and test the Output we can find the Difference.

Example2:Develop the PL/SQL Program for vendor Name updation. Vendor name should be updated if "OPERATIONS" user submit the Program for other users should not get update.

Parameters are VendorID VendorName

Create Or Replace Procedure ven_update(Errbuf OUT varchar2, Retcode OUT varchar2,

v_id IN number, v_name IN varchar2) as

l_name varchar2(100);beginl_name:=Fnd_Profile.value('USERNAME');If l_name = 'OPERATIONS' thenUPDATE PO_VENDORSSET VENDOR_NAME = v_nameWHERE VENDOR_ID =v_id;commit;Fnd_File.Put_line(Fnd_File.Output,'vendorname has updated succesfully');ElseFnd_File.Put_line(Fnd_File.Output,'Access Denied for updateion');End If;End;

Note: We can pass the profile value as default value by using Profile default type. Select Default type = profile,Default Value= Profile NameWhen we are passing Profile value as default we are suppose to hide the Parameter because profile is confidential Information we are not suppose to give permission formodifications.Profile Tables:

FND_PROFILE_OPTIONS FND_PROFILE_OPTION_VALUES

17REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 18: Oracle Application Technical Manual

FND_PROFILE_OPTIONS_TL

Examples of Profiles:

User profile example(11i or R12) :BEGIN fnd_global.apps_initialize(fnd_global.user_id ,fnd_global.resp_id ,fnd_global.resp_appl_id );END;

ORG_ID Example(11i):BEGINfnd_client_info.SET_ORG_CONTEXT(fnd_profile.VALUE('ORG_ID'));END;

Resp Initialization Example :BEGINMO_GLOBAl.INIT('SQLGL');END;

ORG_ID Example(R12):BEGINmo_global.SET_POLICY_CONTEXT('M','204');END;

FND API’S :

FND_PROFILE.GET:Gets the current value of the specified user profile option, or NULL if the profile does not exist.procedure FND_PROFILE.GET(name IN varchar2, value OUT varchar2);name The (developer) name of the profile option whose value you want to retrieve. value The current value of the specified user profile option as last set by PUT or as defaulted

in the current user's profile. EX: FND_PROFILE.GET ('USER_ID', user_id);Example :DECLARE

18REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 19: Oracle Application Technical Manual

p_org_id NUMBER;BEGIN fnd_profile.get('ORG_ID', p_org_id); DBMS_OUTPUT.put_line('ORG_ID :' || p_org_id);END;

FND_PROFILE.VALUEworks exactly like GET, except it returns the value of the specified profile option as a function resultfunction FND_PROFILE.VALUE (name IN varchar2) return varchar2; Example:select fnd_profile.VALUE('ORG_ID') from dual;

QUESTIONS : How to initialize Applications? How to get Conc Program Request Id? How to submit conc program / how to call program from pl/sql?

What are the default arguments for pl/sql program? RETCODE and ERRBUFF How to set org context ? how to display messages in log and out ? What is Difference between Value and Get? When did u use? What are new profiles in R12? Which is the highest or lowest level in Profiles? In which table profiles will store?

Flexfields

Oracle flexfields is one of the most important parts of Oracle Applications. It is because of the flexfields that the Oracle Applications is so generic in nature and can be used to suit any industry

19REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 20: Oracle Application Technical Manual

or organization. A flexfield, as the name suggests, is a flexible data field that your organization can customize to your business needs without programming. A flexfield is a field made up of sub–fields, or segments. While flexfields do not require programming, they do allow you to perform significant customizations to the Oracle Applications, so they do require enough explanation for you to get the most out of the features they provide

Basic Business Requirement :

Have “intelligent fields”—fields comprised of one or more segments, where each segment has both a value and a meaning.

Rely upon your application to validate the values or the combination of values that you enter in intelligent fields.

Have the structure of an intelligent field change depending on data in your application. Capture additional information if you so choose. Customize data fields to your meet your business needs without programming. Query intelligent fields for very specific information.

Flex Fields are 2 types: Key Flexfields Descriptive Flexfields

Key Flexfields :key flexfield is a field made up of segments, where each segment has both a value and a meaning. You can think of a key flexfield as an “intelligent” field that your business can use to store information represented as “codes.

KFF name Application Name

Table Staructure Column

Accounting FlexfieldAssets KFFCategory FlexfieldLocation FlexfieldSales Tax Location FlexfieldTerritory FlexfieldItem CatalogsItem CategoriesStock LocatorsSystem Items

GLFAFAFAARARINVINVINVINV

GL_CODE_COMBINATIONSFA_ASSET_KEYWORDSFA_CATEGORIES_BFA_LOCATIONSAR_LOCATION_COMBINATIONSRA_TERRITORIESMTL_ITEM_CATALOG_GROUPS

CHART_OF_ACCOUNTS_IDNoNoNoLOCATION_STRUCTURE_IDNoNoSTRUCTURE_ID

20REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 21: Oracle Application Technical Manual

MTL_CATEGORIES_BMTL_ITEM_LOCATIONSMTL_SYSTEM_ITEMS_B

ORGANIZATION_IDORGANIZATION_ID

Descriptive Flexfields :

Descriptive flexfields like the key flexfields provides further scope of customization in Oracle Applications. Descriptive flexfields provide customizable ”expansion space” on your forms. Though the fields on an Oracle Applications form are more than enough to capture all the possible information from the user perspective, but still the users can feel the need of capturing additional information. A descriptive flexfield gives you room to expand your forms for capturing such additional information. A descriptive flexfield appears on a form as a single–character, unnamed field enclosed in brackets ([ ]) as shown in figure

Difference Between DFF and KFF :KFF DFFKFF will be used to Capture the Key Information

SEGMENT columns will be used

We have 30KFF already defined by Oraclewe can customize existing KFF. We are not suppose to define the new KFF. We will not get support from Oracle.

In KFF we will define Structure Column Multiple Strutures to define the Multiple Structures.

DFF Will be used to capture the Extra Information

ATTRIBUTE Columns will be used

We can have max DFF in the Application there is no Limit

In DFF we will Context Field to define

Questions :

21REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 22: Oracle Application Technical Manual

What is difference between KFF and DFF? Tel me any KFF in any module and related table? In which Accounting Flexfields? When did u use DFF in ur experience?

Value sets :

Value-set is a group of values. It can also be thought of as a container of values. The values could be of any data type (Char, Number etc.) A value set is used in Oracle Applications to restrict the values entered by a user. For example, when submitting a concurrent program, we would like user to enter only valid values in the parameter. This is achieved by associating a value set to a concurrent program parameter. A Value Set is characterized by value set name and validation. There are two kinds of validations, format validation and Value validation. In the format validation, we decide the data type, length and range of the values. In the value validation, we define the valid values. The valid values could be defined explicitly, or could come implicitly from different source (like table, another value-set etc.)  Uses Value-set is an important component of Oracle Applications used in defining Concurrent program parameters, Key Flex field and descriptive flex field set of values. 

Some of the scenarios where value-set is used are given below:  In a concurrent program, we may want users to enter only number between 1 and 100 for

a particular parameter. In a concurrent program, we may want users to enter only Yes or No for a particular

parameter. Suppose a concurrent program has two parameters. First parameter is department and

second parameter is employee name. On selecting a particular department, we want to show only those employee names which belongs to the selected department.

22REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 23: Oracle Application Technical Manual

In a descriptive flex field enabled on a particular screen, we want to show only a designated list of values for selection by a user.

In case of accounting reports, we may want users to enter a range of key flex field values (concatenated segments).

How to create Value-Set in Oracle Applications

 Go to System Administrator Responsibility and Navigate to Application => Validation => Set.

 

The following screen shows the Value-Set definition screen:

 

23REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 24: Oracle Application Technical Manual

The various fields are explained below: Value Set Name: Any user defined unique name Description: Description of the value set List type: Three choices are available for this field:

· List of Values· Long List of Values· Pop-List

 The list type defines how the values will appear when this value set is used. Choosing ‘List of values’ displays the values as LOV (showing all the values at once). Choosing ‘Long List of Values’ displays the values as Long List where Search facility will be available. This is used when numbers of values are expected to be large. Choosing pop-list displays the values as pop-list. Security type: Three choices are available for this field:

No Security Hierarchical Security Non-Hierarchical Security

 Format Validation 24

REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad. :8125552893, :[email protected]

Page 25: Oracle Application Technical Manual

Format TypePossible values for this field are:

CharDateDate TimeNumberStandard DateStandard Date TimeTime

Maximum Size: Maximum size of the valuePrecision: Applicable when format type is numberNumbers Only: When this is checked, only numbers are allowedUpper Case Only: This is applicable when Format type is CharRight Justify and Zero-Fill Numbers: Applicable only for NumbersMin Value: Min Value allowedMax Value: Max Value Allowed  

Value set types :

None Dependant Independent: Table Special Pair Translatable In-dependant Translatable dependant Value Sets

 None: when this is chosen, no value-validation is done, only format validation is done. For example, we want a user to enter a value between 1 and 100. In this case, we can set the format validation (by setting format type as Number and Min and Max value of 1 and 100 respectively).

Allow users to enter any value. Only Format Validations will be done

 Independent: When this is chosen, the individual values are defined using the navigation system administrator => Application => Validation => Values. For example, suppose we

25REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 26: Oracle Application Technical Manual

want user to select values of Yes or No for a parameter. We can define Yes and No values for this case.

Provides a predefined list of values. Independent values are stored in an Oracle Application Object Library table.

 Table: When table validation is chosen, the values for the value-set comes from an oracle application table. After choosing this value, click on ‘Edit Information’ button to enter table name, column name and WHERE condition as show in the below screen:

It use your own application tables as value sets for flex field segments and report parameters instead of the special values tables which Oracle Applications provides.

You can also use validation tables with other special arguments to make your segments depend on profile options or field values.

You can use any existing application table, view, or synonym as a validation table.

If we are using non registered table for our value set, then we have to Create the necessary grants and synonyms to APPS Schema.

The value column and the defined ID column in the table must return a unique row for a given value or ID.

If the Hidden Id column is provided the value passed to the report will be Hidden and not the Value column.

Similarly, when you specify :$FLEX$.Value_Set_Name, your flex field segment or report parameter defaults to always use the hidden ID column to compare with your WHERE clause .

We can use Special BIND variable such as :$PROFILES$.Option_name, :$FLEX$.Value_set_name, :block.field in the WHERE clause.

Dependant: This type of validation is chosen when value of this value-set is dependant on some other independent value set. After choosing this validation type, click on Edit Information button to enter the independent value-set as given in the below figure.

Same like Independent Value Set, except the List of Values shown to you will depends on which the Independent value you have selected in the Prior Segment.

Must define your independent value set before you define the dependent value set that depends on it.

26REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 27: Oracle Application Technical Manual

Advisable to create your independent values first. Must create at least one dependent value for each independent value, or else it

wont allow you to enter into that segment or field.

Special: Special validation value sets allow you to call key flex field user exits to validate a flex field segment or report parameter using a flex field within flex field mechanism. You can call flex field routines and use a complete flex field as the value passed by this value set.

Pair: Pair validation value set allows user to pass a range of concatenated Flex field segments as parameters to a report.

Translatable In-dependant and Translatable dependant Value Sets: These value sets are similar to in-dependant and dependant value sets respectively. Only difference is that this type allows values to be translated and shown to the user in the user’s language.

These value sets are similar to Independent and Dependent value sets except that translated values can be displayed to the user. Translatable Independent and Translatable Dependent value sets allow you to use hidden values and displayed (translated) values in your value sets. In this way your users can see a value in their preferred languages, yet the values will be validated against a hidden value that is not translated.

We can convert the Independent value set to a Translatable Independent value set, or a Dependent value set to a Translatable Dependent value set. These are the only types of conversions allowed.

Tables of Value sets :

FND_FLEX_VALUE_HIERARCHIES FND_FLEX_VALUE_SETS FND_ID_FLEX_SEGMENTS FND_FLEX_VALUE_NORM_HIERARCHY FND_FLEX_HIERARCHIES FND_FLEX_VALUE FND_FLEX_VALIDATION_EVENTS FND_FLEX_VALUE_RULE_LINES FND_FLEX_VALUE_RULE FND_FLEX_VALUE_RULE_USAGE FND_RESPONSIBLITY

27REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 28: Oracle Application Technical Manual

FND_TABLES FN

D_FLEX_VALIDATION_TABLES

28REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 29: Oracle Application Technical Manual

$PROFILES$ :

This is used to reference the current value of a profile option in a WHERE clause by prefixing the name of the profile option with $PROFILES$.

Usage:

:$PROFILES$.profile_option_name

A typical example with the use this keyword in a WHERE clause to reference a profile option value.

....WHERE SET_OF_BOOKS_ID = :$PROFILES$.GL_SET_OF_BOOKS_ID

so what happen when ever the SET_OF_BOOKS_ID need to pass the $PROFILES$ options simply reference the value which is retrived at form level.

A list of available Profile options can be found in one of the last post.

Block.field

This is used to references the value of an earlier appearing field on the same form

Using :block.field is different from using a descriptive flex field reference field in that the flex field structure does not change based on the

different :block.field values.

By Using this value set only with flex fields on windows that have the same block.field available.

$FLEX$ :

This is used to references the value from a value set used earlier on the same form

You can refer to the current value of a previously used value set on the same form by using $FLEX$.value_set_name.

......WHERE JOURNAL_TYPE = :$FLEX$.GL_SRS_JOURNAL_TYPE

29REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 30: Oracle Application Technical Manual

$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_nameImportant:

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

30REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 31: Oracle Application Technical Manual

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.locFROM emp e, dept dWHERE 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.

31REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 32: Oracle Application Technical Manual

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:

32REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 33: Oracle Application Technical Manual

The query used in the Default Value test field is as below: Select dname from dept where deptno =:$FLEX$.XX_SCENARIO_1Ensure 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.

33REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 34: Oracle Application Technical Manual

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.

34REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 35: Oracle Application Technical Manual

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.

Questions :35

REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad. :8125552893, :[email protected]

Page 36: Oracle Application Technical Manual

What is value set ?when it will come into picture? How many tapes of value set? Which one u used mostly? What is difference between table and dependent value set? What is $FLEX$ and $PROFILES$? Did u use any time?

Default Types :

When we are hiding the parameter in SRS windows user can’t enter the values that time we can pass values internally by using defaults types.

Constant:If we want to pass constant values as default then we will select default type constant and we will specify the values in default value field.

Current Date: System Date.

Current Time: System Time

Profile: By using the profile option we can pass user profile values as default.

SQL Statement: When we want to pass select statement to rest as default values that time we will select default types as SQL statement and write the select statement in the default values filed. Select statement should not return more then one value.

Segment: When we wanted to pass previous parameter values as default to the next

parameter then we will use segment, select default type as segment give the parameter name in the default values field.

AIM Methodology:

Oracle A.I.M. Methodology encompasses a project management methodology with documentation templates that support the life cycle of an implementation. The life cycle methodology and documentation templates allow A.I.M. to be a very useful tool for managing implementation projects successfully.

Mostly used documents :(will provide example documents)

36REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 37: Oracle Application Technical Manual

CV40 CV60 MD50 MD70 MD120

Oracle Reports :

In this tutorial you will learn about Introduction to Oracle Reports Builder, Report file storage formats, Oracle Reports Builder Tools, Report Wizard, Triggers in Reports, Types of Triggers and Case Study - Creating a Tabular report.Introduction to Oracle Reports Builder :Oracle Reports Builder is a powerful enterprise reporting tool used to build reports that dynamically retrieve data from the database, format, display and print quality reports. Reports can be stored in File or Database (Report Builder Tables). Report file storage formats rdf Report

Binary File Full report definition (includes source code and comments) Modifiable through Builder. Binary, executable Portable if transferred as binary. PL/SQL recompiles on Open/Run

rep Report Binary Run-Only File No source code or comments. Not modifiable binary, executable. Report Executables

Oracle Reports Builder Tools Oracle Reports Builder comes with the following components

Object Navigator Property Palette Data Model Editor Layout Model Editor Parameter Form Editor

Object Navigator :The Object Navigator shows a hierarchical view of objects in the report. Each item listed is called a node and represents an object or type of object the report can contain or reference.

37REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 38: Oracle Application Technical Manual

Property Palette :A Property Palette is a window that displays the settings for defining an Oracle reports object.

Data Model Editor :To specify data for a report, a data model should be defined. A data model is composed of some or all of the following data definition objects.

Queries :Queries are SQL Select statements that fetch data from the oracle database. These statements are fired each time the report is run.

Groups :Groups determine the hierarchy of data appearing in the report and are primarily used to group columns selected in the query. Oracle report automatically creates a group for each query.

Data Columns:Data columns contain the data values for a report. Default data columns, corresponding to the table columns included in each query’s SELECT list are automatically created by oracle reports. Each column is placed in the group associated with the query that selected the column.

Formula Columns :Formulas can be entered in formula columns to create computed columns. Formulas can be written using PL/SQL syntax. Formula columns are generally preceded by CF_ to distinguish from other columns. Summary Columns :Summary columns are used for calculating summary information like sum, average etc. This column uses a set of predefined oracle aggregate functions. Summary columns are generally preceded by CS_ to distinguish them from other columns.

Placeholder Columns :used to hold the values at runtime act as a global variables in reports

Data Links :Data links are used to establish parent-child relationships between queries and groups via column matching.

38REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 39: Oracle Application Technical Manual

Layout Model Editor :A report layout editor contains the following layout objects

Frames :Frames surround other layout objects, enabling control of multiple objects simultaneously

Repeating Frames : Repeating frames acts as placeholders for groups (I.e repeating values) and present rows of data retrieved from the database. Repeating frames repeat as often as the number of rows retrieved.

Fields :Fields acts as placeholders for columns values. They define the formatting attributes for all columns displayed in the report.

Boilerplate :Boilerplate consists of text (label of the column) and graphics that appear in a report each time it is run.

Parameter Form Editor :Parameter form is a runtime form used to accept inputs from the user.

Parameters :Parameters are variables for a report that accept input from the user at runtime. These parameter values can then be used in the SQL select statements to retrieve data conditionally. Oracle reports creates a set of system parameters at runtime namely report destination type, number of copies etc.

Report Wizard : When we create a default Tabular Report using report wizard, the wizard will take

you through the below mentioned pages Report Style Tabular, Form-Like, Mailing Label, Form Letter, Group Left, Group

Above, Matrix, Matrix with Group Query Type Choose whether to build a SQL query or an Express query. Data Enter a SELECT statement to retrieve the report data Displayed Fields Select the fields that you want to display in the output. Fields to Total Select the fields that you want to summarize. Labels for Fields Alter the labels that appear for each field and the width of each

field.

39REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 40: Oracle Application Technical Manual

Template Select the template that you want to use for this report. A template contains standard information such as company logo, date, and so on.

Note: The above steps are different for each report style.

Group Left & Have an additional page: ‘Groups’ Group Above styles Matrix Reports styles Have 3 additional pages: ‘Matrix Rows’ ‘Columns’ ‘Cells’ Mailing Label & Have 4 pages: ‘Report Style’ ‘Data’ Form Letter styles ‘Text’ ‘Template’

The difference between Mailing Labels and Form Letters is, Mailing Label shows multiple records on one page while Form Letter shows one record on each page.

Triggers in Reports Types of Triggers Formula Triggers: Formula triggers are PL/SQL functions that populate columns of type Formula.

Format Triggers: Format triggers are PL/SQL functions executed before the object is formatted. These triggers are used to dynamically change the formatting attributes and used to conditionally print and not to print a report column value. These triggers return Boolean values TRUE or FALSE. If the return value of the format trigger is FALSE, the value is not displayed.

Action Triggers: Action triggers are used to perform user-defined action. These triggers do not return any value.

Validation Triggers: Validation triggers are PL/SQL functions that are executed when a parameter value is entered and the cursor moves to the next parameter. These triggers return Boolean value TRUE / FALSE.

Report Triggers: Report triggers enable execution of PL/SQL functions at specific time during execution and formatting of report.

Before Parameter Form:Fires before the Runtime Parameter Form are displayed. Can access the PL/SQL global variables, report level columns and manipulate accordingly.

40REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 41: Oracle Application Technical Manual

After Parameter Form : Fires after the Runtime Parameter form are displayed. Used to validate the parameter values.

Before Report :Fires before the report is executed but after the queries is parsed and date is fetched.

Between Pages :Fires before each page of the report are formatted, except the very first page. This page is used to customize page formatting.

After Report :Fires after the report previewer are exited, or after report output is sent to a specified destination.

Oracle Reports Registration in APPS :(new development)Registration Steps : 1. we can receive the MD50,we can analysis and will prepare MD70 Document and will send for approval(report manager).2. Once we got approval, we can start development of Report.3. Develop the Report according client requirement.4. Once development completed we need to move execution file to Corresponding server path.

41REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 42: Oracle Application Technical Manual

5.Go to System Administrator Responsibility and Create Executable.Navigation : ConcurrentàProgram àExecutable

42REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 43: Oracle Application Technical Manual

Executable: Set the executable name as we like here we entered the name as per the program.Short Name: Set the short name of the executable as related to the executable because we have to remember them.Application: Select the Appropriate Application from the list of applications here we selected the Oracle Receivables because we saved our report (valueset.RDF) in the AR (Receivables) folder only.Description: This field is not a mandatory field if we want to describe the concurrent program executable we use this field.Execution Method: There are eleven execution methods we can choose what ever we want as per the requirements.Execution file name: Enter execution file name without extension.

4.Once Executable created then we need to Concurrent program. and save executable short name.

43REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 44: Oracle Application Technical Manual

Navigation : ConcurrentàProgramàDefine

Program: Enter the Program name as we like it user defined program.Short Name: The short name is also like the short name in the executable form..Application Name: Select the application name as Oracle Receivables. Description: This field is not a mandatory field if we want to describe the concurrent program we use this field.Executable: Name: Set the executable name as the short name of the executable which we givein the previous Executable form.

Method: when we enter the executable name there in the name field it was automatically

44REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 45: Oracle Application Technical Manual

Parameters (Button): If there are any parameters for our report then we go with the parameters button. We get the window called parameters when we go with the button. Program and Application will come automatically.

45REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 46: Oracle Application Technical Manual

Seq : we need to enter sequence of our parameter.Parameter : Enter name of parameter,it is user defined one.Value Set : select value set name, which has been created.default type : if we are using any default types then we can choose required one.Token : this one predefined functionality, this can provide mapping between oracle report parameters to concurrent program parameters. we need to enter here bind variable name.Once completed we want to save the form and we need to attach this concurrent program to request group.

Attaching Concurrent program to Request Group :Navigation :Security àResponsibilityà Request

Group : select the Specified Request Group, it is available as list of value.

46REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 47: Oracle Application Technical Manual

Application : Enter Name of Application here, means for which application we are going to submit our program.Code : Enter User defined Unique code.Request : Type : Enter specified type Request group.Name : Select our concurrent program here.Applications: it will come Automatically whenever we have entered our concurrent program.once all operations completed and save the form then switch to Corresponding Responsibility.

Submit Concurrent Program : Switch to particular responsibility (Payables or Receivables)Navigation : Menu àViewà Requests

47REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 48: Oracle Application Technical Manual

Here choose ur Concurrent Program and enter Required parameters. and click submit button. once ur program submitted and completed then u will get ur out put of ur report.

48REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 49: Oracle Application Technical Manual

Customization Report (Tickets) :

1.Based on ticket number , down rdf file from server to local machine

2. open in Report Builder and do modifications and compile and move same path of server.

3.Submit the Concurrent Program from particular responsibility.

User Exits :

User Exits are 3GL programs used to transfer the control from the report builder to Oracle Applications or any and it will perform some actions and return to the report builder. There are five types of user exits those are.

FND SRWINIT FND SRWEXIT

49REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 50: Oracle Application Technical Manual

FND FORMAT_CURRENCY FND FLEXSQL FND FLEXIDVAL

FND SRWINIT: Used to write in before report trigger. It is used to fetch the concurrent request information and also used to set the profile options.Example :BEGINSRW.USER_EXIT('FND SRWINIT');END;

FND SRWEXIT: We will write this in after report trigger. Used to free the memory which has been allocated by the other user exitsExample:BEGINSRW.USER_EXIT('FND SRWEXIT');END;

FND FORMAT_CURRENCY: This is used to convert amounts or currency from one currency to other currency values and also used to display currency amounts in formats.Example:SRW.USER_EXIT(‘FND FORMAT_CURRENCY’,Code = ‘currency_code’,Display_width=’15’,Amount = ‘:cf_feb’,Display = ‘:cd_feb’);Return (:cd_feb);

FND FLEXSQL: This is used to get the data from flex fields. We will use in formula columns.

FND FLEXIDVAL: This is used to get the data from flex fields. We will use them in formula columns.

50REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 51: Oracle Application Technical Manual

Queries for some Reports :

List of Vendor Sites with no invoices, no PO’s :

Select sites.vendor_site_id, vend.segment1 Vendor#, vendor_name, sites.vendor_site_code, vend.end_date_active VEND_INACTIVE, sites.inactive_date SITE_INACTIVEfrom po_vendor_sites_all sites, po_vendors vend, ap_invoices_all inv, po_headers_all POwhere vend.vendor_id = sites.vendor_idand sites.vendor_site_id = inv.vendor_site_id(+)and inv.vendor_site_id is nulland sites.vendor_site_id = po.vendor_site_id(+)and po.vendor_site_id is nulland sites.inactive_date < sysdateorder by vendor_name, vendor_site_code;Duplicate Vendor List :select pv1.vendor_name,pv2.vendor_name DUP_VENDOR_NAME,pv1.segment1 VENDOR_ID,pv2.segment1 DUP_VENDOR_ID,pvsa1.vendor_site_code SITE_CODE,pvsa2.vendor_site_code SITE_CODE,pvsa1.address_line1,pvsa2.address_line1 DUP_ADDRESS_LINE1,pvsa1.zipfrom po_vendors pv1, po_vendors pv2, po_vendor_sites_all pvsa1,po_vendor_sites_all pvsa2where pvsa1.vendor_site_id pvsa2.vendor_site_idand substr(replace(pvsa1.address_line1, ‘ ‘),1,20) = substr(replace(pvsa2.address_line1, ‘ ‘),1,20)

51REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 52: Oracle Application Technical Manual

and pvsa1.zip = pvsa2.zipand pv1.vendor_id = pvsa1.vendor_idand pv2.vendor_id = pvsa2.vendor_idand pv1.vendor_id pv2.vendor_id and pvsa1.address_line1 ‘YOUR ADDEDSS’order by 1;Vendors with no Invoices :select segment1 VENDOR NBR,vendor_name NAME,vendor_site_code SITE_CODE,end_date_active VEND_INACTIVE,inactive_date SITE_INACTIVEfrom po_vendors vend,po_vendor_sites_all sites,ap_invoices_all invwhere vend.vendor_id = sites.vendor_idand sites.vendor_site_id = inv.vendor_site_id(+)and inv.vendor_site_id is null;Query : Transactions Posted from AR TO GL :SELECT l.subledger_doc_sequence_value “Doc Number”,l.effective_date “GL Date”,l.accounted_dr “Debit”,l.accounted_cr “Credit”,l.description “Description”,l.reference_4 “AR Number”,l.reference_9 “AR Type”FROM gl_je_lines l, gl_je_headers hWHERE je_source = ‘Receivables’AND h.je_header_id = l.je_header_idAND h.set_of_books_id = AND h.period_name =Query : To Extract revenue distribution lines in AR :SELECT distinct c.customer_name, c.customer_number, c.customer_id,t.customer_trx_id, t.trx_number, ct.NAME invoice_type,

52REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 53: Oracle Application Technical Manual

l.line_number, t.org_id, cc.segment1, cc.segment2,cc.segment3, cc.segment4, cc.segment5, cc.segment6, d.gl_date,d.cust_trx_line_gl_dist_id, d.code_combination_id,d.account_classFROM ra_cust_trx_types_all ct,ra_customers c,ra_customer_trx_all t,ra_customer_trx_lines_all l,gl_code_combinations cc,ra_cust_trx_line_gl_dist_all dWHERE 1 = 1AND t.cust_trx_type_id = ct.cust_trx_type_idAND t.bill_to_customer_id = c.customer_idAND d.customer_trx_id = t.customer_trx_idAND d.customer_trx_line_id = l.customer_trx_line_id(+)AND d.code_combination_id = cc.code_combination_idAND TRUNC (d.gl_date) >= TO_DATE (’01-01-2009′, ‘DD-MM-YYYY’)AND d.posting_control_id = -3AND d.account_set_flag = ‘N’AND d.account_class = ‘REV’Query: AR Query to get open invoices for single/All customers :To get open invoice for single customer /for all customer from the table ar_payment_schedules_all , you can modify the query how you want to get the details select aps.*FROM ra_customer_trx_all ra,ra_customer_trx_lines_all rl,ar_payment_schedules_all aps,ra_cust_trx_types_all rt,hz_cust_accounts hc,hz_parties hp,

53REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 54: Oracle Application Technical Manual

hz_cust_acct_sites_all hcasa_bill,hz_cust_site_uses_all hcsua_bill,hz_party_sites hps_bill,ra_cust_trx_line_gl_dist_all rctWHERE 1 = 1AND ra.customer_trx_id = rl.customer_trx_idAND ra.customer_trx_id = aps.customer_trx_idAND ra.org_id = aps.org_idAND rct.customer_trx_id = aps.customer_trx_idAND rct.customer_trx_id = ra.customer_trx_idAND rct.customer_trx_id = rl.customer_trx_idAND rct.customer_trx_line_id = rl.customer_trx_line_idAND ra.complete_flag = ‘Y’AND rl.line_type IN (‘FREIGHT’, ‘LINE’)AND ra.cust_trx_type_id = rt.cust_trx_type_idAND ra.bill_to_customer_id = hc.cust_account_idAND hc.status = ‘A’AND hp.party_id = hc.party_idAND hcasa_bill.cust_account_id = ra.bill_to_customer_idAND hcasa_bill.cust_acct_site_id = hcsua_bill.cust_acct_site_idAND hcsua_bill.site_use_code = ‘BILL_TO’AND hcsua_bill.site_use_id = ra.bill_to_site_use_idAND hps_bill.party_site_id = hcasa_bill.party_site_idAND hcasa_bill.status = ‘A’AND hcsua_bill.status = ‘A’AND aps.amount_due_remaining<> 0AND aps.status = ‘OP’

Interfaces Interfaces are used in Oracle Applications to integrate external systems and Data

Conversion. The interfaces are mainly used to either transfer data from Oracle Applications to a flat

file or data from legacy system to Oracle Applications. Used extensively at the time of Data Conversion from legacy/ old systems to a fresh

implementation of Oracle Applications. Used also at regular intervals when data transfer is from other live systems if the systems

are not defined in Oracle Applications implementation.54

REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad. :8125552893, :[email protected]

Page 55: Oracle Application Technical Manual

Oracle provides flexible and flexible tools in the form of Interface programs to import the master and transactional data like Customers, Invoices, and Sales Orders etc from external systems into Oracle Applications.

Types of InterfacesThere are two major types of Interfaces:

Inbound Interface: These interfaces are used to transfer data from external systems to Oracle Applications.

Outbound Interface:  These interfaces are used to transfer data from Oracle Applications to external systems.

Inbound Interface:Two other distinctions of Inbound Interface:

Open Interface: If the interface logic is provided by Oracle Applications, it is called an Open Interface.

Custom Interface: If the interface logic needs to be developed by the implementation team, it is called a Custom Interface.

Process 1 of Inbound:

Datafile (Legacy data)

Prepare delimited data file

Temporary tables

Validate data

Load into Interface Tables

Run Concurrent Program to load the data into Apps Base tables

Process 2 of Inbound:

55REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 56: Oracle Application Technical Manual

Data file (Legacy data)

Prepare delimited data file

Temporary tables

Validate data

Run required API (application program interface) to load the data into Apps Base table

Script To find Oracle API's for any module:

Following script and get all the packages related to API in Oracle applications, from which you can select APIs that pertain to AP. You can change the name like to PA or AR and can check for different modules

select substr(a.OWNER,1,20), substr(a.NAME,1,30), substr(a.TYPE,1,20) , substr(u.status,1,10) Stat, u.last_ddl_time, substr(text,1,80) Description from dba_source a, dba_objects u WHERE 2=2 and u.object_name = a.name and a.text like '%Header%' and a.type = u.object_type and a.name like 'PA_%API%' order by a.owner, a.name;

Difference between Interface and API

56REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 57: Oracle Application Technical Manual

API OPEN INTERFACE An API (Application Programming

Interface) is inbuilt program through which  data’s can be transferred to Oracle base tables  directly without writing the program for validating or inserting in Interface tables.

Oracle defines an API as "A set of public programmatic interface that consist of a language and message format to communicate with an operating system or other programmatic environment, such as databases,Web servers, JVMs, and so forth. These messages typically call functions and methods available for application development."

But through User Interface, we have to write  codes for validation and insertion of data’s in Interface tables and then in Oracle base tables

there is no such thing as an interface to Oracle=2 there are only "open" interfaces.

ASL Conversion:

Stage Table :

create table xx_asl_staging

( asl_staging_id number not null, item varchar2(40 byte) not null, vendor_business_type varchar2(25 byte), attribute6 varchar2(150 byte) not null, vendor_name varchar2(150 byte) not null, asl_status varchar2(20 byte), disable_flag varchar2(1 byte),

57REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 58: Oracle Application Technical Manual

supplier_item varchar2(80 byte), owning_organization_name varchar2(240 byte), creation_date date not null, comments varchar2(240 byte), record_status varchar2(50 byte), error_code number, error_message varchar2(200 byte), created_by number not null, last_update_date date not null, last_updated_by number not null)

Private API's:

Though Oracle does not have any public api's to load this but you can get advantage of using these two API's for managing approval supplier list.

PO_ASL_THS.insert_row Po_Asl_Attributes_Ths.Insert_row Po_Asl_Documents_Ths.Insert_Row

Base Tables :

PO_APPROVED_SUPPLIER_LIST PO_ASL_ATTRIBUTES

Process to execute Inbound :

58REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 59: Oracle Application Technical Manual

1. Create data file in delimited format.

2.create table stage table particular schema.

59REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 60: Oracle Application Technical Manual

3.Create synonym for that table in apps schema.

60REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 61: Oracle Application Technical Manual

4.Then develop the control file.

5.Then move this data file and control files into particular server path(custom top àBIN)

6.Register this control file in Oracle apps with execution method as SQL * Loader

61REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 62: Oracle Application Technical Manual

62REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 63: Oracle Application Technical Manual

7. Create Concurrent Program for that Executable and this program to Request Group.

63REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 64: Oracle Application Technical Manual

64REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 65: Oracle Application Technical Manual

65REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 66: Oracle Application Technical Manual

66REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 67: Oracle Application Technical Manual

67REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 68: Oracle Application Technical Manual

68REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 69: Oracle Application Technical Manual

8.Then Develop the PLSQL Package to validate and move the data from stage table to interfaceTable in apps schema.

9.Then Register this Package in to Oracle Applications with executable name as PLSQL Stored Procedure.

69REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 70: Oracle Application Technical Manual

70REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 71: Oracle Application Technical Manual

10.Then Create Concurrent Program and add to Request Group and Submit to validate and move data from stage table to Interface Table.

71REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 72: Oracle Application Technical Manual

72REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 73: Oracle Application Technical Manual

73REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 74: Oracle Application Technical Manual

74REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 75: Oracle Application Technical Manual

11.Submit the Standard Concurrent Program to move the data from Interface Table to Base Table.

75REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 76: Oracle Application Technical Manual

SQL*Loader:

SQL*Loader is a high-speed data loading utility that loads data from external files into tables in an Oracle database. SQL*Loader accepts input data in a variety of formats, can perform filtering, and can load data into multiple Oracle database tables during the same load session. SQL*Loader is an integral feature of Oracle databases and is available in all configurations.

am4

TYPES of FILES :

CONTROL :

The control file is a text file written in a language that SQL*Loader understands. The control file describes the task that the SQL*Loader is to carry out. The control file

tells SQL*Loader where to find the data, how to parse and interpret the data, where to insert the data, and more.

It also contains the names and locations of the bad file and the discard file. Some of above information (such as name and location of the input file) can also be

passed to SQL*Loader as command-line parameters.

76REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 77: Oracle Application Technical Manual

It’s also possible for the control file to contain the actual data to be loaded. This is sometimes done when small amounts of data need to be distributed to many sites, because it reduces (to just one file) the number of files that need to be passed around.

control_ file_name  Specifies the name, which may include the path, of the control file. The default extension is .ctl.

LOG FILE:

The log file is a record of SQL*Loader’s activities during a load session. And path_ file_name Specifies the name of the log file to generate for a load session. You may include a path as well. By default, the log file takes on the name of the control file, but with a .log extension, and is written to the same directory as the control file.

BAD :

This file contains data which errored out due to data issuesand path_ file_name Specifies the name of the bad file. You may include a path as part of the name. By default, the bad file takes the name of the control file, but with a .bad extension, and is written to the same directory as the control file.

DATA :

DATA file contains legacy data in delimted format or .CSV or .txt or .dat and path_ file_name Specifies the name of the file containing the data to load. You may include a path as part of the name. By default, the name of the control file is used, but with the .dat extension.

DISCARD :

While SQL*Loader is being executed it creates a discard file for records that do not meet any of the loading criteria. The records contained in this file are called discarded records. Discarded records do not satisfy any of the WHEN clauses specified in the control file. These records differ from rejected records. Discarded records do not necessarily have any bad data. A discarded record is never inserted into the Oracle table.and path_ file_name Specifies the name of the discard file. You may include a path as part of the name. By default, the discard file takes the name of the control file, but it has a .dis extension.

77REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 78: Oracle Application Technical Manual

Structure of a Control file:

OPTIONS (SKIP = 1,)   –The first row in the data file is skipped without loadingLOAD DATA INFILE ‘$FILE’             — Specify the data file  path and nameAPPEND                       – type of loading (INSERT, APPEND, REPLACE, TRUNCATEINTO TABLE “APPS”.”BUDGET”   – the table to be loaded intoFIELDS TERMINATED BY ‘|’           – Specify the delimiter if variable format datafileOPTIONALLY ENCLOSED BY ‘”‘   –the values of the data fields may be enclosed in “TRAILING NULLCOLS     – columns that are not present in the record treated as null(Colomn mapping)

OPTION statement precedes the LOAD DATA statement. The OPTIONS parameter allows you to specify runtime arguments in the control file, rather than on the command line. The following arguments can be specified using the OPTIONS parameter. SKIP = n – Number of logical records to skip (Default 0)LOAD = n — Number of logical records to load (Default all)ERRORS = n — Number of errors to allow (Default 50)ROWS = n   — Number of rows in conventional path bind array or between direct path data saves (Default: Conventional Path 64, Direct path all)BINDSIZE = n – Size of conventional path bind array in bytes (System-dependent default)SILENT = {FEEDBACK | ERRORS | DISCARDS | ALL} — Suppress messages during run (header, feedback, errors, discards, partitions, all)DIRECT = {TRUE | FALSE} –Use direct path (Default FALSE)PARALLEL = {TRUE | FALSE} — Perform parallel load (Default FALSE)

LOADDATA statement is required at the beginning of the control file.

INFILE: INFILE keyword is used to specify location of the datafile or datafiles. INFILE* specifies that the data is found in the control file and not in an external file. INFILE ‘$FILE’, can be used to send the filepath and filename as a parameter when registered as a concurrent program.INFILE   ‘/home/vision/kap/import2.csv’ specifies the filepath and the filename.Example where datafile is an external file:

78REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 79: Oracle Application Technical Manual

LOAD DATAINFILE   ‘/home/vision/kap/import2.csv’INTO TABLE kap_empFIELDS TERMINATED BY “,”( emp_num, emp_name, department_num, department_name )

Example where datafile is in the Control file:

LOAD DATAINFILE *INTO TABLE kap_empFIELDS TERMINATED BY “,” ( emp_num, emp_name, department_num, department_name )BEGINDATA7369,SMITH,7902,Accounting7499,ALLEN,7698,Sales7521,WARD,7698,Accounting7566,JONES,7839,Sales7654,MARTIN,7698,Accounting

Example where file name and path is sent as a parameter when registered as a concurrent programLOAD DATAINFILE ‘$FILE’INTO TABLE kap_empFIELDS TERMINATED BY “,” ( emp_num, emp_name, department_num, department_name )TYPE OF LOADING:INSERT   — If the table you are loading is empty, INSERT can be used.APPEND  — If data already exists in the table, SQL*Loader appends the new rows to it. If data doesn’t already exist, the new rows are simply loaded. REPLACE — All rows in the table are deleted and the new data is loadedTRUNCATE — SQL*Loader uses the SQL TRUNCATE command.INTOTABLEis required to identify the table to be loaded into. In the above example INTO TABLE “APPS”.”BUDGET”, APPS refers to the Schema and BUDGET is the Table name.FIELDS TERMINATED BY specifies how the data fields are terminated in the datafile.(If the file is Comma delimited or Pipe delimited etc)

79REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 80: Oracle Application Technical Manual

OPTIONALLY ENCLOSED BY ‘”‘ specifies that data fields may also be enclosed by quotation marks.TRAILINGNULLCOLS clause tells SQL*Loader to treat any relatively positioned columns that are not present in the record as null columns.

Loading a fixed format data file:LOAD DATAINFILE ‘sample.dat’INTO TABLE emp(      empno         POSITION(01:04)   INTEGER EXTERNAL,ename          POSITION(06:15)   CHAR,job            POSITION(17:25)   CHAR,mgr            POSITION(27:30)   INTEGER EXTERNAL,sal            POSITION(32:39)   DECIMAL EXTERNAL,comm           POSITION(41:48)   DECIMAL EXTERNAL,deptno         POSITION(50:51)   INTEGER EXTERNAL)

Steps to Run the SQL* LOADER from UNIX:At the prompt, invoke SQL*Loader as follows: sqlldr USERID=scott/tiger CONTROL=<control filename> LOG=<Log file name>SQL*Loader loads the tables, creates the log file, and returns you to the system prompt. You can check the log file to see the results of running the case study.

Skip columns:You can skip columns using the ‘FILLER’ option.Load Data–––TRAILING  NULLCOLS(name Filler,Empno ,sal)

Process Steps :

80REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 81: Oracle Application Technical Manual

CREATE TABLE testdept(deptno NUMBER(2) NOT NULL,dname VARCHAR2(14),loc VARCHAR2(13));

Create the SQL*Loader Control and Data file and place them in Server(ex: $CUSTOM_TOP/bin). Create or check the interface table structures in the backend.

Control file: test.ctl

Data file: test.

Go to System administrator or Application Developer > Concurrent > Executables. Define a Concurrent Program Executable. Choose the Execution Method as SQL*Loader and give the Execution File Name as the name of the SQL*Loader control file. Save your work.

81REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 82: Oracle Application Technical Manual

Go to Application Developer > Concurrent > Program. Define the Concurrent Program. Attach the executable defined above.

82REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 83: Oracle Application Technical Manual

Go to parameters of the concurrent program. Create a parameter to take the server path of the data file. You can also place the default value.Attach the Concurrent program to a Responsibility through a Request Group.Go to that Responsibility and Run the Concurrent Program. If successful check the output file that have all data uploading information.

OUTPUT FILE :

Number to load: ALLNumber to skip: 0Errors allowed: 50Bind array: 64 rows, maximum of 256000 bytesContinuation: none specifiedPath used: Conventional

83REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 84: Oracle Application Technical Manual

Table TESTDEPT, loaded from every logical record.Insert option in effect for this table: INSERT   Column Name                  Position   Len  Term Encl Datatype—————————— ———- —– —- —- ———————DEPTNO                               FIRST     *   ,  O(“) CHARACTER           DNAME                                NEXT     *   ,  O(“) CHARACTER           LOC                                     NEXT     *   ,  O(“) CHARACTER           Table TESTDEPT:  7 Rows successfully loaded.  0 Rows not loaded due to data errors.  0 Rows not loaded because all WHEN clauses were failed.  0 Rows not loaded because all fields were null.Space allocated for bind array:49536 bytes(64 rows)Read   buffer bytes: 1048576Total logical records skipped:           0Total logical records read:               7Total logical records rejected:          0Total logical records discarded:        0Run began on Thu Aug 12 09:41:55 2010Run ended on Thu Aug 12 09:41:56 2010Elapsed time was:      00:00:00.11CPU time was:           00:00:00.01Check in the backend whether the tables got updated or not. 

 The Bad and Discard files will be created in /conc/out file of the server.

Maximizing SQL*Loader Performance:84

REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad. :8125552893, :[email protected]

Page 85: Oracle Application Technical Manual

SQL*Loader is flexible and offers many options that should be considered to maximize the speed of data loads. These include:   Use Direct Path Loads - The conventional path loader essentially loads the data by using standard insert statements. The direct path loader (direct=true) loads directly into the Oracle data files and creates blocks in Oracle database block format. The fact that SQL is not being issued makes the entire process much less taxing on the database. There are certain cases, however, in which direct path loads cannot be used (clustered tables). To prepare the database for direct path loads, the script $ORACLE_HOME/rdbms/admin/catldr.sql.sql must be executed.

Disable Indexes and Constraints. For conventional data loads only, the disabling of indexes and constraints can greatly enhance the performance of SQL*Loader.

Use a Larger Bind Array. For conventional data loads only, larger bind arrays limit the number of calls to the database and increase performance. The size of the bind array is specified using the bindsize parameter. The bind array's size is equivalent to the number of rows it contains (rows=) times the maximum length of each row.

Use ROWS=n to Commit Less Frequently. For conventional data loads only, the rows parameter specifies the number of rows per commit. Issuing fewer commits will enhance performance.

Use Parallel Loads. Available with direct path data loads only, this option allows multiple SQL*Loader jobs to execute concurrently.

$ sqlldr control=first.ctl parallel=true direct=true $ sqlldr control=second.ctl parallel=true direct=true

 

Use Fixed Width Data. Fixed width data format saves Oracle some processing when parsing the data. The savings can be tremendous, depending on the type of data and number of rows.

Disable Archiving During Load. While this may not be feasible in certain environments, disabling database archiving can increase performance considerably.

Use unrecoverable. The unrecoverable option (unrecoverable load data) disables the writing of the data to the redo logs. This option is available for direct path loads only.

85REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 86: Oracle Application Technical Manual

SQL*Loader’s Capabilities: SQL*Loader can read from multiple input files in a single load session. SQL*Loader can handle files with fixed-length records, variable-length records, and

stream-oriented data. SQL*Loader supports a number of different data types, including text, numeric, zoned

decimal, packed decimal, and various machine-specific binary types. Not only can SQL*Loader read from multiple input files, but it can load that data into

several different database tables, all in the same load session. SQL*Loader allows you to use Oracle’s built-in SQL functions to manipulate the data

being read from the input file. SQL*Loader includes functionality for dealing with whitespace, delimiters, and null data. In addition to standard relational tables, SQL*Loader can load data into object tables,

varying arrays (VARRAYs), and nested tables. SQL*Loader can load data into large object (LOB) columns. SQL*Loader can handle character set translation between the input data file and the

database.

86REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 87: Oracle Application Technical Manual

Outbound Interface:

Process:Gather the data from Oracle apps using SQL

Use UTL_FILE to insert the data into files and store in appropriate server path.

Select *from v$parameter where name like ‘%utl%’;

87REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 88: Oracle Application Technical Manual

Once developed and compiled then create Concurrent Program for procedure.

--------------------------------------------------------------------------------------

--- COC PROG NAME:xx_outbound

--- FILE NAME :INV_ITEM

--- APPLICATION :INV

--- REQST GROUP :GL

--- FILE LOCATED IN SERVER :/ed22/ora510/eld1appl/inv/11.5.0/sql

--------------------------------------------------------------------------------------

88REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 89: Oracle Application Technical Manual

CREATE OR REPLACE PROCEDURE INV_ITEM(ERRBUF OUT VARCHAR2, RETCODE OUT VARCHAR2)AS

CURSOR C1 IS SELECT MSI.SEGMENT1 ITEM ,

OOD.ORGANIZATION_NAME ORG_NAME ,

MC.SEGMENT1||','||MC.SEGMENT2 CAT ,

MCS.CATEGORY_SET_NAME CAT_SET

FROM MTL_SYSTEM_ITEMS_B MSI ,

ORG_ORGANIZATION_DEFINITIONS OOD ,

MTL_ITEM_CATEGORIES MIC ,

MTL_CATEGORIES MC ,

MTL_CATEGORY_sETS MCS

WHERE MSI.ORGANIZATION_ID=OOD.ORGANIZATION_ID

--AND OOD.ORGANIZATION_ID=204

AND MSI.INVENTORY_ITEM_ID=MIC.INVENTORY_ITEM_ID

AND MSI.ORGANIZATION_ID=MIC.ORGANIZATION_ID

AND MIC.CATEGORY_ID=MC.CATEGORY_ID

AND MIC.CATEGORY_SET_ID=MCS.CATEGORY_SET_ID

--AND MSI.SEGMENT1='10-40W Oil'

;89

REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad. :8125552893, :[email protected]

Page 90: Oracle Application Technical Manual

l_id utl_file.file_type;

l_count number default 0;

begin

-- SELECT * FROM V$PARAMETER WHERE NAME LIKE'utl_file%'

l_id:=utl_file.fopen('/ed22/ora510/eld1db/9.2.0/appsutil/outbound/ELD1_eld1','inv.txt','w');

FOR C2 IN C1 LOOP

l_count:=l_count+1 ;

utl_file.put_line(l_id ,C2.ITEM ||'_'||

C2.ORG_NAME ||'_'||

C2.CAT ||'_'||

C2.CAT_SET

);

END LOOP;

utl_file.fclose(l_id);

FND_FILE.PUT_LINE(FND_FILE.OUTPUT ,'NO OF RECOEDS LOADED'||l_count);

FND_FILE.PUT_LINE(FND_FILE.OUTPUT ,'SUBMITED BY '||FND_PROFILE.VALUE('USERNAME'));

90REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 91: Oracle Application Technical Manual

FND_FILE.PUT_LINE(FND_FILE.OUTPUT ,'RESP NAME '||FND_PROFILE.VALUE('RESP_NAME'));

EXCEPTION

WHEN UTL_FILE.invalid_path THEN

FND_FILE.PUT_LINE(FND_FILE.LOG,'INVALID PATH');

WHEN OTHERS THEN

FND_FILE.PUT_LINE(FND_FILE.LOG,'ERR ACCOURED IN PROGRAM');

END INV_ITEM;

Then Register this Package in to Oracle Applications with executable name as PLSQL Stored Procedure.

91REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 92: Oracle Application Technical Manual

92REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 93: Oracle Application Technical Manual

Then Create Concurrent Program and add to Request Group and Submit to validate and move data from stage table to Interface Table.

93REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 94: Oracle Application Technical Manual

94REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 95: Oracle Application Technical Manual

95REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 96: Oracle Application Technical Manual

96REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 97: Oracle Application Technical Manual

Submit the Standard Concurrent Program then check corresponding server path for data file.

LIMITATIONS of UTL_FILE :

To create a file it is required to initially create a directory..

CREATE DIRECTORY temp AS "/user/test/"

this would create the directory inthe unix box with name temp under the path /user/test.

now using the UTL_FILE.FOPEN we can read or write to a file.

UTL_FILE.FOPEN(/user/test/temp,testfile01,W,50)

97REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 98: Oracle Application Technical Manual

the above command will create a file by name testfile01 under the specified path in Write mode containing each line a max of 50 character.

A max of 50 files can be open simultaneaously and max line size is 50 char these are some of limitations of UTL_FILE

Questions:

What process you have followed to develop Inbound Interface? What are the Interface tables? What are the Base tables? What is the Standard program has used to import data? How to track the errors in Interface? What are the Validations you have done? Tell me some of tech errors which you have faced? Have you used "Autonomous Transaction" in Interface? What is the diff between Inbound and Outbound? Whether you have used UTL_FILE or SQL*loader? What is format of Data file? Whether your Interface is scheduled or manually running? (Scheduled) What is the Difference between Conversion and Interface?

Form :

It is a developmental tool that is used for designing data entry and query screens. It is a front-end tool that runs in a Graphical User Interface (GUI).

GUI Concepts:These concepts holds good for any user-interface.To develop an effective GUI there are 4 basic stages:

1. Define User Requirements 2. Plan the User Interface

98REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 99: Oracle Application Technical Manual

3. Build the User Interface Elements (Create/Modify elements/functionality) 4. User Feedback (Holds Key on the functionality and basis of the requirement)

Let’s move on to Forms DeveloperThere are 3 components involved in the application development

1. Form Builder 2. Form Compiler 3. Form RuntimeForm builder consists of following tools to perform a specific task1. Object Navigator 2. Layout Editor 3. Property Palette 4. PL/SQL Editor 5. Menu Editor 6. Object LibraryObject Navigator: It’s a hierarchal representation of all objects.Layout Editor: It provides a virtual representation of the application user interface.Property Palette: Each object in the form module has a property associated to it. Developer can view/set properties for one/multiple object.PL/SQL Editor: Programmatically to enhance the functionality and appearance of an application.Menu Editor: Create menu as per applications requirement and can add various functionality to various menu options.Object Library: Creation of objects on some default specification. Storing some standard objects that can be re-used in other forms/menu.Blocks: Logically related interface items are grouped into functional units called Blocks.Types of Block:Data Block: It is associated with or bound, to a database table or view or a set of stored procedures.Control Block: It is not associated with any database table but items that will control the behavior of the application.Let’s move on to the next scheme of things…Canvas: It is a surface inside a window on which we place the interface that end user interacts.Types of Canvas: 1. Stacked Canvas 2. Content Canvas 3. Horizontal Toolbar 4. Vertical Toolbar

99REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 100: Oracle Application Technical Manual

5. Tab CanvasLet’s discuss briefly about the triggers in this section, for more information you can look through the Forms Builder Help Topics.Note: The hierarchy of Objects in a form isForm BlockRecordItemTriggers: These are program units which enhance the functionality of a form/application.The following triggers can be used to enhance the functionality of the form:Block Processing Triggers: It fires in response to events related to record management in block.e.g., When_Create_Record,When_Clear_Block,…Interface Event Triggers: It fires in response to events that occur in form interface.e.g., When_Button_Pressed,When_Checkbox_Changed,…Master-Detail Triggers: It fires automatically when defined master-detail relationship between blocks. (Master-Detail relationship discussed further in the document)e.g.,On_Checkdelete_Master,On_Clear_Details,…Message Handling Triggers: It fires to issue appropriate error and information messages in response to runtime events.

Registering New Forms in Oracle Apps 11i :In this tutorial you will learn how to Register New Forms in Oracle Apps 11i , registering form functions, creating menu of functions and creating responsibilities.Document SummaryThis document describes the process of registering new forms in oracle applications. Registering a FormNavigation – Application Developer -> Application->Form

100REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 101: Oracle Application Technical Manual

Click on Form and you will see following screen.

101REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 102: Oracle Application Technical Manual

FieldsForm : Enter the file name of your form (the name of the .fmx file) without extension. Your form filename must be all uppercase, and its .fmx file must be located in your application directory structure.Application : Enter the name of the application which will own this form.User Form Name : This is the form name you see when selecting a form using the Functions window.Description : Enter a suitable description for your form. Register Form FunctionsNavigation – Application Developer -> Application->Function

102REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 103: Oracle Application Technical Manual

Click on Function and you will see following screen

103REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 104: Oracle Application Technical Manual

Click on the form tab and you will see following screen

104REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 105: Oracle Application Technical Manual

FieldsFunction : Enter a unique function name for your function. This function name can be used while calling this program programmatically. This name is not visible to the user through other forms.Form : Select the form name which you have registered.Application : Select the application name for your form.Parameters : Enter the parameters that you want to pass to your form function. E.g. Query_only.

Creating Menu of FunctionsNavigation – Application Developer -> Application->Menu

105REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 106: Oracle Application Technical Manual

Click on Menu and you will see following screen

106REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 107: Oracle Application Technical Manual

FieldsMenu : Enter the descriptive name for the menu. This name is not visible to the user.User Menu Name : The user menu name is used when a responsibility calls a menu.Menu Type : The options in menu type include:

Standard - for menus that would be used in the Navigator form Tab - for menus used in self-service applications tabs Security - for menus that are used to aggregate functions for data security or specific

function security purposes, but would not be used in the Navigator form Seq : Enter a sequence number.Prompt : Enter the prompt that the users will see for the menu.Submenu : If you want another menu to be called from this menu, then enter this menu name in this field.Function : Enter the form function name in this field.Description : Enter a suitable description for the menu.

107REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 108: Oracle Application Technical Manual

Grant :The Grant check box should usually be checked. Checking this box indicates that this function is automatically enabled for the user. If this is not checked then the function must be enabled using additional data security rules.View Tree :Click on View Tree Button and you will see following screen with the full hierarchy of the menu.

Creating ResponsibilitiesNavigation – System Administrator -> Security->Responsibility->Define

108REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 109: Oracle Application Technical Manual

Click on Define button and you will see following screen in front of you. 

109REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 110: Oracle Application Technical Manual

FieldsResponsibility Name : Enter the responsibility name for the new responsibility.Application : Enter the application name you want to associate the new responsibility to.Responsibility Key : The responsibility key is a unique identification for the responsibility. This is used in the loader programs for internal purposes.Description : Enter a suitable description for the new responsibility.Effective Dates : Enter the date range in which the responsibility will be active in the From and To fields.Available From : In the available from field box, select whether you want this responsibility to be available from Oracle applications or from Oracle Self Service Web Applications or from Oracle mobile Applications.Data Group : The data group defines the database user name that oracle applications use to connect to the database when you connect to applications using this responsibility.Menu Name : Enter the menu name that you want to associate with this responsibility.

110REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 111: Oracle Application Technical Manual

Web Host Name : If your Web Server resides on a different machine from your database, you must designate the host name (URL) here. Otherwise, the Web Host Name defaults to the current database host server.Web Agent Name : Enter the PL/SQL Agent Name for the database used by this responsibility. If you do not specify an Agent Name, the responsibility defaults to the agent name current at log-on.Request Group : The request group would define which requests the users with this responsibility can run. If no request group is assigned to this responsibility then the users with this responsibility will not be able to run requests for which he is not the owner.

Enter the ‘Request group’ name and ‘Application’ name for the request group that you want to assign to this responsibility.

Questions :

1. What is the significance of attaching a request group to a responsibility?

2. What is the significance of attaching a data group to a responsibility?

3. How we relate a function to a form?

4. What is a difference between submenu and function?

5. What is the significance of responsibility in oracle applications?

Form Personalization :

Using the Form Personalization you have option to alter Oracle code at runtime bypassing important validation logic.Form Personalizations allows you to fundamentally alter the behavior of the seeded product forms that Oracle provides you to access data..Form Personalizations looks very simple and easy things,but sometime this may jeopardize the integrity of your data. Therefore developer and solution provider context , you must have a clarity in architectural understanding.

111REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 112: Oracle Application Technical Manual

Personalization form automatically queries the function, form and pre-defined personalization rules, if any exists for the specific form. For example, the form name is INVTOMAI i.e. Move Order form on which the personalization form is opened.

Personalization FormThe Personalization form mainly contains four sections.

Rules Conditions Context Actions

For each function (a form running in a particular context based on parameters passed to it), we can specify one or more Rules. Each Rule consists of an Event, an optional Condition, the Scope for which it applies, and one or more Actions to perform.

112REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 113: Oracle Application Technical Manual

RulesRules administer the personalization needs to be implemented on the form. Each rule contains a sequence number, description and level (Rules may now be specified as acting either at the Function level (the default) or at the Form level). The rule can be activated or de-activated using the “Enabled” checkbox. The rule can be deleted when no longer needed.Defining rules doesn’t identify, when the rule should get evaluated or applied. For each rule, there should be conditions attached, which power the execution of the rule.

ConditionsConditions decide the event the rule to be executed. Each condition mainly contains three sections i.e. Trigger Event, Trigger Object and Condition.

Condition Tab with Trigger events

Trigger Event specifies the occurrence where the rule should be executed.

WHEN-NEW-FORM-INSTANCE: once, when the form starts up. WHEN-NEW-BLOCK-INSTANCE: each time the cursor moves to a new block. WHEN-NEW-RECORD-INSTANCE: each time the cursor moves to a new record. WHEN-NEW-ITEM-INSTANCE: each time the cursor moves to a new item. WHEN-VALIDATE-RECORD: each time the current record has any change that needed

to be validated. SPECIAL1 through SPECIAL45: each time the user selects a menu entry from

:

113REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 114: Oracle Application Technical Manual

Trigger Object is the object on the form to determine at what level the rule should be executed.   The value can be “” or “”Condition is an optional SQL code fragment that is evaluated when the Event occurs; if it evaluates to TRUE then the Actions are processed.Processing Mode is a pop-list which controls when the Rule should be processed i.e., Rules can be applied while not in Enter-Query mode (the default), only in Enter-Query mode, or in both modes.ContextContext manages to whom the personalization should apply. This is similar to the concept of using profile options in Oracle Applications. The various levels are Site, Responsibility, Industry and User. During runtime, the values provided in the context are evaluated and personalization rules will be applied. Usage of context is very vital in implementing the personalization to prevent the inappropriate users accessing these customizations of the form.

Context levelsWhile saving a Rule, if no Context rows have been entered the form will automatically create a row at the Site level.

ActionsActions decide the exact operation to be performed when the event occurs and the condition evaluates to true during the runtime.Each Action consists of one of the following:

setting a Propertydisplaying a Messageexecuting a Builtinenabling a Menu/Special entry

114REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 115: Oracle Application Technical Manual

Action TypesEach action contains a sequence number, description and language. Actions can be enabled, disabled or deleted. Based on the action type selected, the fields on the right sector of the actions tab will be refreshed, where the action parameters are entered.

Insert 'Get' Expression… button can be used to automatically construct the expression.Insert Item Value… button can be used to consider the item name along with colon (:) Example :TOMAI_MAIN_HEADER_BLK.REQUEST_NUMBERValidate used to test if the syntax of your string is valid. If the evaluation fails, the processing engine will return an ORA error as if the string had been part of a SQL expression. Otherwise, it will display the text exactly as it would appear at runtime in the current context.Apply Now used to apply the changes immediately to the target form to test its effect.

Tables :

• FND_FORM_CUSTOM_RULES• FND_FORM_CUSTOM_ACTIONS• FND_FORM_CUSTOM_SCOPES• FND_FORM_CUSTOM_PROP_LIST• FND_FORM_CUSTOM_PROP_V

115REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 116: Oracle Application Technical Manual

Examples :How to make Reason field from Corrections form mandatory using Personalization?

That can be achieved as follows:

0. Navigate to Enter Corrections form : Receiving / Receiving Corrections

1. Click / Help / Diagnostics / Custom Code / Personalizethe Form Personalizations opens

2.Function Name = RCV_RCVTXECOForm Name = RCVTXECODebug Mode = Off

Enter:Seq = 1Description = make Reason Field REALLY MandatoryLevel = FunctionEnabled flag is checked.

Condition:Trigger Event = WHEN-VALIDATE-RECORDTrigger Object = RCV_TRANSACTIONCondition = :RCV_TRANSACTION.REASON_CODE is nullProcessing Mode = Both

Actions:Seq = 1Type = MessageMessage Type = ShowMessage Text = Please enter reason code

Seq = 2116

REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad. :8125552893, :[email protected]

Page 117: Oracle Application Technical Manual

Type = BuiltinLanguage = AllEnabled flag is checkedBuiltin Type = RAISE FORM_TRIGGER_FAILURESave it.

3. Close the form. Then reopen the form to test.

Form Personalization Failed To Change Prompt Of China Localization Field 'Expatriate'  

Using Form Personalization feature to change the prompt of the 'Expatriate' item in the 'Miscellaneous' tab of the PEOPLE form to 'Foreigner Flag'.  Upon re-entering the form, find the prompt has not changed.

EXPECTED BEHAVIORExpect the personalization should stay once applied.

STEPSThe issue can be reproduced at will with the following steps:1. Log into China HRMS responsibility2. Navigate to PEOPLE form3. Select Help > diagnostics > Custom Code > Personalize from the pull down menu- Enter Seq and Description- Go to ACTIONS tab, enter Description and click on 'Select By Text...'- Select PERSON.LOC_ITEM08- Put the desired text in 'Value'- Save- Close the form and re-enter

The form personalization should be done in the following way:

1. Open the PEOPLE form and select Help > Diagnostics > Custom Code > Personalize from the pull down menu.  This will open the Personalizations form

2. Do the following to change the prompt of 'Expatriate'

117REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 118: Oracle Application Technical Manual

Seq       Description                 Level          Enabled--------------------------------------------------------------------10         Change Prompt           Function     Yes

Under CONDITION tab, enter the following:

 Trigger Event: WHEN-NEW-ITEM-INSTANCE Trigger Object: PERSON.LOC_ITEM06 Condition: :PERSON.LOC_ITEM06 IS NULL OR  :PERSON.LOC_ITEM06 IS NOT NULL Processing Mode: Not in Enter-Query Mode

Enter CONTEXT if required:

Level     Value--------------------------User      XXXXX

Note: XXXXX is the name of the user

- Save

Go to ACTIONS tab and enter the following:

Seq     Type          Description           Language    Enabled-------------------------------------------------------------------------10       Property     Change prompt     All              Yes

Object Type: Item

118REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 119: Oracle Application Technical Manual

Target Object: PERSON.LOC_ITEM08Property Name: PROMPT_TEXTValue: Foreigner

- Save and click on 'Apply Now' button - Close the form

- Reopen the PEOPLE form.  As expected, the prompt 'Expatriate' in 'Miscellaneous' tab has now changed to 'Foreigner'.

How to force the form fields to use upper case/lower case using forms personalization feature ?

1. Navigate to the form where you want to enforce upper case/lower case in the form field.

2. Select Help ->Diagnostics > Custom Code -> Personalize.

3. Enter sequence number and description of the personalization rule.

4. In the Conditions tab, enter the following values:Trigger Event :WHEN-NEW-BLOCK-INSTANCETrigger Object : Enter the triggering object where the field validation is required.

5. In the Actions tab, enter the following values:Type : Property Object Type : ItemTarget Object : Block_Name.Field_NameProperty Name :CASE_RESTRICTIONValue : UPPERCASE or LOWERCASE

6. Save the changes and exit Forms personalization form for the changes to take effect.

How to change the color of a field using form personalizations ?

119REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 120: Oracle Application Technical Manual

The following example changes the color of the USER.DESCRIPTION field on the Users form.

1. Create the following action on the WHEN-NEW-FORM-INSTANCE condition of your form with the appropriate field name:

2. ACTIONSSeq: 10Type: PropertyLang: All

Object Type: ITEMTarget Object : USER.DESCRIPTIONProperty Name: BACKGROUND_COLORValue: r255g238b168

you can do the same thing for the FOREGROUND_COLORThe Value can be any RGB value

How to insert or update a database column based on some calculation using Forms Personalization. ?Solution

 1.Navigate to the Form which is having the LOV Item

2.Open the Personalization form from the pull down menu Help => Diagnostics => Custom Code =>    Personalize.

3. Implement the following Personalization rule :

You can use FORMS_DDL Builtin Type of the action Builtin:

Seq: 10Description: Update Database Column      Trigger Event: <Select a appropriate trigger name>      Trigger Object: <Select the name of the appropriate object >       Condition: <condition when the database column will be updated>       Processing Mode: Both

120REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 121: Oracle Application Technical Manual

       Context:       Level: Site       Value: Null

Seq: 10Type : BuiltinBuiltin Type : FORMS_DDLArgument :     =’Declare        Begin       Insert Into <table_name>(<column_name>) values('||  (:<block_name><item_name_1> +                   :<block_name><item_name_2>) ||');        Commit;        End;’

 4.Save the personalization rule.

How to disable or alter the display property of a tab page in Oracle Application Forms?

In Oracle Application Release 11.5.10, the functionality can be easily achieved by usingForms Personalization

1)Navigate to the Form in which you would like to modify the Tab Page.2)Navigate to Help->Diagnostics->Custom Code->Personalize3)Enter the correct Sequence and appropriate Description  a)Let the Triggering event be WHEN-NEW-FORM-INSTANCE  b)Go To Actions Tab and specify the Sequence and 'Property' value in Type Field.  c)Object Type=>Tab page  d)Target Object=>Select Tab Page Name which is to be modified  e)Property Name=>Enabled/Displayed  f)Value=>False

Prior to Oracle Application Release 11.5.10, this functionality can be achieved by writingfollowing code in the CUSTOM.pll

if event_name='WHEN-NEW-FORM-INSTANCE' and form_name='<Form Name' then SET_TAB_PAGE_PROPERTY(<tab_page_name>,<ENABLED/VISIBLE>,<PROPERTY_TRUE/PROPERTY_FALSE>);

121REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 122: Oracle Application Technical Manual

end if;  In the above code the internal name of the Tab Page should be specified.This can be found by opening the forms in the Form Builder.

How can the Add button be excluded from the Purchase Order form, so that users can only update the purchase orders, but not create new ones?

It is not possible to exclude the Add button in the Purchase Order form using the standard function exclusions, but the same thing can be achieved via the Form Personalization, as follows:

1. Open the Purchase Order entry form:

2. Help -> Diagnostics -> Custom Code -> Personalize

Seq = 1Description = <description>, e.g. TestLevel = FunctionEnabled = checked

Condition:Trigger Event = WHEN-NEW-RECORD-INSTANCETrigger Object = PO_HEADERSProcessing Mode = Not in Enter-Query Mode

ContextLevel = UserValue = <user name> (the users names that should not have access to create a new PO can be added here).

If all users for a custom responsibility need not have the access, then one can use Level = Responsibility, Value = <custom responsibility name>)

Action:Seq = 1Type = Property

122REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 123: Oracle Application Technical Manual

Object Type = BlockTarget Object = PO_HEADERSProperty Name = INSERT_ALLOWEDValue = FALSE

3. Save.

Limitations of Forms Personalization:

This feature has several significant limitations due to the architecture of Oracle Forms and/or the e-Business Suite.

User can only change what Oracle Forms allows at runtime. For example, the following

cannot be changed:

User cannot create new items

User cannot move items between canvases

User cannot display an item, which is not on a canvas (thus, individual flexfield

segments cannot be displayed)

User cannot set certain properties such as the Data type of an Item.

User cannot change frames, graphics, or boilerplate

User cannot hide the item that currently has focus

Form Personalization can only respond to events that are centrally processed and

dispatched by APPCORE. These are limited to:

WHEN-NEW-FORM-INSTANCE, WHEN-NEW-BLOCK-INSTANCE,

WHENNEW-RECORD-INSTANCE, WHEN-NEW-ITEM-INSTANCE. These

events occur as the user moves focus within the form.

WHEN-VALIDATE-RECORD (in many but not all forms). This event occurs

whenever changes have been made to the current record in the current block.

SPECIAL1 through SPECIAL45. These occur when the user selects entries from

the Tools, Reports and Actions drop down menus. 123

REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad. :8125552893, :[email protected]

Page 124: Oracle Application Technical Manual

Product-specific events. These are typically documented in implementation

manuals, such as 'Configuring, Reporting and System Administration in Oracle

HRMS'.

Form Personalization can only respond to events that are centrally processed and

dispatched by APPCORE. These are limited to:

WHENNEW-RECORD-INSTANCE

should read

WHEN-NEW-RECORD-INSTANCE

User can see only the events that are being passed by enabling the 'Show Events' option

in the Custom Code menu.

Certain personalization must be performed at specific events:

To specify the Initial Value of an Item, user must perform that action in the

WHEN-NEW-RECORD-INSTANCE event of the block that contains the item.

Special menu entries can only be created at form start up (WHEN-NEW-FORM

INSTANCE)

Both the Personalization form and the runtime-processing engine will report errors for

these cases and skip processing of them.

Certain objects may not be available to user to change, or cannot be validated:

o If a Tab within a form has no items directly rendered on it, that Tab will not

appear in the list of objects that user can modify. In some cases, making that Tab

the active tab before invoking the Personalization feature may cause it to be

detected.

o The object types GLOBAL and PARAMETER cannot be detected, thus these

fields have no LOVs to restrict their input. Use the 'Validate' or 'Apply Now'

buttons to determine if the values users have entered actually exist. Note that

124REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 125: Oracle Application Technical Manual

GLOBAL variables are dynamically created, so whether they exist or not can be a

matter of timing.

Most significantly, this may interfere with, or be overridden by, base product code; any

change user make might interfere with the normal operation of the form. This can

manifest itself in several ways, such as:

User may make a personalization but it does not take effect, because there is code

in the form that overrides it. In some cases user may be able to perform user

personalization by moving the Trigger Event to a 'lower' level, such as block or

item-level.

User personalization may simply produce the wrong result, because user change

interacted with the base code in unexpected and untested ways. At best this error

will occur immediately upon the personalization being applied; at worst it could

affect some later processing which does not appear to be directly related to the

object or event.

In extreme cases, user changes may prevent the form from running at all, making

it difficult to open the Personalization screen to remove the offending

personalization unless user turn off Custom Code. Because of this, it is critical

that any change be thoroughly tested in a Test environment. See the

'Troubleshooting, Support, and Upgrade considerations' section later in this

chapter for more information.

Use of the Apply Now button does not always work if dependent on the results of another

action.

Forms Personalization is not possible for any flexfield structure or segments.

The argument (sql) length for creating a record group must be within 2000 Characters.

Populating LOV dynamically from a Record Group must be against the WHEN-NEW-

ITEM-INSTANCE of that LOV item. 125

REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad. :8125552893, :[email protected]

Page 126: Oracle Application Technical Manual

The use of the action “RAISE FORM_TRIGGER_FAILURE” may not work properly in

some triggers.

Use of Builtin Action "Raise Form_Trigger_Failure" and pressing the button "Apply Now" will show the message "One or more required fields are missing values".

It is not possible to use server-side functions that have OUT parameters as the condition to execute the actions.

Expected user is an Admin/Developer

Knowledge of Oracle Developer is extremely desirable

Knowledge of PL/SQL, Coding Standards and/or APIs required in some cases.

Normal rules for customizations apply

Extensive testing in a Test environment is required.

A patch does not touch user code, but user still must re-test after applying a patch.

TCA :TCA is a data model that supports the entry and management of entities that you interact with. So lets revisit the concept.Trading Community Architecture is a Very flexible, very robust model which defines the components involve in trading within in E-business Suite.The implementation of technology and applications to allow users to create and maintain relationships among entities,The universal data schema for customers, prospects, suppliers, distributors, resellers, consortiums, bank across all Oracle EBS applications

TCA not only allows for the tracking of relationships between the implementing organization and its trading partners, but also tracks relationships between the trading partners themselves.

126REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 127: Oracle Application Technical Manual

PARTIES127

REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad. :8125552893, :[email protected]

Page 128: Oracle Application Technical Manual

      The related tables are as follows:-

HZ_PARTIES : Stores information about parties. HZ_FINANCIAL_PROFILE : Stores information about the financial accounts. HZ_CREDIT_RATINGS : Stores information about the credit rating of parties HZ_REFERENCES : Stores information about reference given by one party about another. HZ_CERTIFICATIONS : Stores information about the certifications given by other

parties.

PARTIES – TYPE PERSON  

HZ_PERSON_PROFILES : Stores details information about people. HZ_PERSON_LANGUAGES :Stores information about the language that a person

speaks, reads or writes HZ_PERSON_INTEREST : Stores information about a person’s personal interests. HZ_ CITIZENSHIP : Stores information about a person’s claimed nationality. HZ_EDUCATIONS : Store information about a person educations. HZ_EMPLOYMENT_HISTORY : Stores information about where the person has been

employed.

 PARTIES – TYPE ORGANIZATION The tables are as follows:-

HZ_ORGANIZATION_PROFILES : Stores details information about credit rating, financial statistics, socio-economic and corporate linkage information.

HZ_STOCK_MARKETS :Stores information about the selling and buying of financial instruments.

HZ_SECURITY_ISSUED : Stores information about financial instruments such as stocks and bonds that has been issued by the organization.

HZ_INDUSTRIAL_CLASS_APP : It is a intersection tables that link industrial classifications stores in HZ_INDUSTRIAL_CLASSES .

HZ_INDUSTRIAL_CLASSES : Stores information about names and descriptions of industrial classifications.

128REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 129: Oracle Application Technical Manual

HZ_FINANCIAL_REPORTS : Store information details of financial reports that describe the financial status of the party.

HZ_INDUSTRIAL_REFERENCE : Stores information about industrial reference for organization.

CUSTOMER ACCOUNTS

HZ_CUST_ACCOUNTS : Stores information about the relationship, if a party becomes a customer. Basically stores information about customer accounts.

HZ_CUST_ACCT_SITES_ALL : Stores information about customer sites. One customer can have more then multiple sites.

HZ_CUST_SITE_USES_ALL : Stores information about site uses or business purpose. A Single customer site can have multiple sites uses such as Bill To or Ship To.

HZ_CUST_ACCT_RELATE_ALL : Stores information about relationships between customer accounts.

HZ_CUST_ACCOUNT_ROLES : Stores information about the roles that parties perform in customer accounts.

HZ_BILLING_PREFERENCES : It describe the invoicing format preferred by customer accounts or customer account sites.

HZ_CUSTOMER_PROFILES : Stores credit information for a customer account and customer account sites.

HZ_CUST_PROFILE_AMTS : Stores profile amount limits for every currency defined for a customer account or customer account site profile.

HZ_CUST_PROF_CLASS_AMTS :Stores customer profile class amount limits for currency.

HZ_CUST_PROFILE_CLASSES : Stores standard credit profile classes.

CONTACT POINTS

HZ_CONTACT_POINTS : Stores electronic methods of communicating with entities such as parties, party site. Each record in this table represents s different means of contacting an entity.

129REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]

Page 130: Oracle Application Technical Manual

HZ_CUST_CONTACT_POINTS : This table is used to tie a contact point to a customer account, customer account site or customer account role.

HZ_CONTACT_RESTRICTIONS : It stores information about restrictions on contacting parties.

SITES/LOCATIONS

HZ_PARTIES_SITES : Stores information about parties and locations.  Because there is a many-to-many relationship between parties and locations.

HZ_PARTIES_SITE_USES : Stores information about the party site uses and business purposes. A party site can have multiple site uses such as ‘bill to’ or ‘ship to’ and each site is stores as a record in this table.

HZ_LOCATIONS : Stores information about the locations, namely, address information HZ_LOC_ASSIGNMENTS : It ties locations stored in HZ_LOCATIONS to a LOC_ID

stored in AR_LOCATIONS_COMBINATIONS

130REF: #202, 2nd Floor, Ramakrishna Nivas, Near Almas Restarant, SR Nagar, Hyderabad.

:8125552893, :[email protected]