122 Azdevg
122 Azdevg
122 Azdevg
Developer's Guide
Release 12.2
Part No. E22957-06
September 2015
Oracle iSetup Developer's Guide, Release 12.2
Copyright © 2009, 2015, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,
transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is
prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software,
any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are
"commercial computer software" pursuant to the applicable Federal Acquisition Regulation and
agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation
of the programs, including any operating system, integrated software, any programs installed on the
hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the
programs. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications.
It is not developed or intended for use in any inherently dangerous applications, including applications that
may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you
shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its
safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this
software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of
their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are
used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron,
the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro
Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products,
and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly
disclaim all warranties of any kind with respect to third-party content, products, and services unless
otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates
will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party
content, products, or services, except as set forth in an applicable agreement between you and Oracle.
Contents
Preface
iii
Send Us Your Comments
Oracle welcomes customers' comments and suggestions on the quality and usefulness of this document.
Your feedback is important, and helps us to best meet your needs as a user of our products. For example:
• Are the implementation steps correct and complete?
• Did you understand the context of the procedures?
• Did you find any errors in the information?
• Does the structure of the information help you with your tasks?
• Do you need different information or graphics? If so, where, and in what format?
• Are the examples correct? Do you need more examples?
If you find any errors or have any other suggestions for improvement, then please tell us your name, the
name of the company who has licensed our products, the title and part number of the documentation and
the chapter, section, and page number (if available).
Note: Before sending us your comments, you might like to check that you have the latest version of the
document and if any concerns are already addressed. To do this, access the new Oracle E-Business Suite
Release Online Documentation CD available on My Oracle Support and www.oracle.com. It contains the
most current Documentation Library plus all documents revised or released recently.
Send your comments to us using the electronic mail address: appsdoc_us@oracle.com
Please give your name, address, electronic mail address, and telephone number (optional).
If you need assistance with Oracle software, then please contact your support representative or Oracle
Support Services.
If you require training or instruction in using Oracle software, then please contact your Oracle local office
and inquire about our Oracle University offerings. A list of Oracle offices is available on our Web site at
www.oracle.com.
v
Preface
Intended Audience
Welcome to Release 12.2 of the Oracle iSetup Developer's Guide.
This guide assumes you have a working knowledge of the following:
• The principles and customary practices of your business area.
If you have never used Oracle E-Business Suite, we suggest you attend one or more of
the Oracle E-Business Suite training classes available through Oracle University.
This manual describes how to set up your development environment, build, test, and
deploy Oracle iSetup Framework Interfaces. For more information on coding standards
followed by the Oracle E-Business Suite development staff and information on
extending the products shipped by Oracle E-Business Suite development, see the Oracle
Application Framework Developer's Guide, available from My Oracle Support Knowledge
Document 1315485.1.
This documentation is written for the application developer and assumes familiarity
with Java and SQL.
See Related Information Sources on page viii for more Oracle E-Business Suite product
information.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle
Accessibility Program website at
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
vii
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support
through My Oracle Support. For information, visit
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Structure
1 Oracle iSetup Framework Interface Registration
2 Oracle iSetup Reportable API
A Oracle Application Object Library Messages for Oracle iSetup
• Release Notes - For information about changes in this release, including new
features, known issues, and other details, see the release notes for the relevant
product, available on My Oracle Support.
Related Guides
viii
You should have the following related books on hand. Depending on the requirements
of your particular installation, you may also need additional manuals or guides.
Oracle iSetup User's Guide
This guide describes how to use Oracle iSetup to migrate data between different
instances of the Oracle E-Business Suite and generate reports. It also includes
information on configuration, instance mapping, and seeded templates used for data
migration.
Oracle E-Business Suite Security Guide
This guide contains information on a comprehensive range of security-related topics,
including access control, user management, function security, data security, and
auditing. It also describes how Oracle E-Business Suite can be integrated into a single
sign-on environment.
Oracle Application Framework Developer's Guide
This guide contains the coding standards followed by the Oracle E-Business Suite
development staff to produce applications built with Oracle Application Framework.
This guide is available in PDF format on My Oracle Support and as online
documentation in JDeveloper 10g with Oracle Application Extension.
Additional Oracle JDeveloper 10g helpsets that apply to Oracle Application Framework
application development include:
• Oracle Application Framework ToolBox Tutorial
Integration Repository
The Oracle Integration Repository is a compilation of information about the service
endpoints exposed by the Oracle E-Business Suite of applications. It provides a
complete catalog of Oracle E-Business Suite's business service interfaces. The tool lets
users easily discover and deploy the appropriate business service interface for
integration with any system, application, or business partner.
The Oracle Integration Repository is shipped as part of the Oracle E-Business Suite. As
your instance is patched, the repository is automatically updated with content
appropriate for the precise revisions of interfaces in your environment.
ix
Do Not Use Database Tools to Modify Oracle E-Business Suite Data
Oracle STRONGLY RECOMMENDS that you never use SQL*Plus, Oracle Data
Browser, database triggers, or any other tool to modify Oracle E-Business Suite data
unless otherwise instructed.
Oracle provides powerful tools you can use to create, store, change, retrieve, and
maintain information in an Oracle database. But if you use Oracle tools such as
SQL*Plus to modify Oracle E-Business Suite data, you risk destroying the integrity of
your data and you lose the ability to audit changes to your data.
Because Oracle E-Business Suite tables are interrelated, any change you make using an
Oracle E-Business Suite form can update many tables at once. But when you modify
Oracle E-Business Suite data using anything other than Oracle E-Business Suite, you
may change a row in one table without making corresponding changes in related tables.
If your tables get out of synchronization with each other, you risk retrieving erroneous
information and you risk unpredictable results throughout Oracle E-Business Suite.
When you use Oracle E-Business Suite to modify your data, Oracle E-Business Suite
automatically checks that your changes are valid. Oracle E-Business Suite also keeps
track of who changes information. If you enter information into database tables using
database tools, you may store invalid information. You also lose the ability to track who
has changed your information because SQL*Plus and other database tools do not keep a
record of changes.
x
1
Oracle iSetup Framework Interface
Registration
Security Setup for Registering the Oracle iSetup Framework (BC4J) API
Follow these instructions for the security setup of the API.
For more information on managing security, see:Oracle User Management, Oracle
E-Business Suite Security Guide.
5. Provide a justification to add the role and click Apply. Return to the main menu.
To Create a Function:
1. Navigate to Functional Administrator.
2. Navigate to Home > Core Services > Functions > Create Function.
4. Click Continue.
To Create a Menu:
1. Click on Create Navigation Menu.
• Type: Interface
Click Apply.
To Create a Grant:
1. Navigate to Home > User Management > Role & Role Inheritance.
• Responsibility - iSetup
8. Click Next.
9. Click Finish.
• Application - This field refers to the application which owns the interface being
registered.
• Type - This field refers to the type of the interface to be created. This field would be
read/display only in the Update flow. For example, the interface defined above has
the type "iSetup Framework".
• Path - The path of the application module. For example, in the API defined above
the path is:
oracle.apps.gl.ispeed.currency.server.CurrSetupAM
Details:
• Supports Filter - This flag indicates if iSetup could enable filtering support for the
interface being registered. If this option is checked, then Oracle provides a filtering
icon in front of this interface in the iSetup UI shipped with Oracle E-Business Suite.
• Supports Transform - This flag indicates whether the API supports transformation
on any attributes. This flag does not need to be set for a Reportable API.
• Supports Update - This flag indicates whether the API supports updates to
preexisting records. That is, at the time of loading the extracted data into the target
instance, if the interface finds any record already existing in the instance, then based
on the business logic it should be able to update the record. This flag does not need
to be set for a Reportable API.
• Override Update - This flag would be functional only if the "Support Update" flag is
checked. Support Update and Override Update flags go hand in hand. This flag
indicates if user has a choice to make a call to override the existing record in the
target instance. This flag does not need to be set for a Reportable API.
2. Click Administration.
• Path: oracle.apps.gl.ispeed.currency.server.CurrSetupAM
5. Click Apply.
3. Click on Apply.
To Create an Extract:
1. Navigate to iSetup > Migrations > Selection Set. Search for iSetup Custom API
Demo, select it, and click on Extract.
3. Search for iSetup Custom Extract and click on the iSetup Custom Extract link.
4. Wait for the Phase to be marked as Completed. Click on the Refresh button to
confirm that it is Completed.
Note: You need to follow the same steps and register the API on the
Central Instance and the Target Instance.
Typographical Conventions
This chapter uses the following typographic conventions to distinguish important
elements from the body of the chapter.
SuppliersVO.
*/
public void createSupplier()
{
OAViewObject vo = getSuppliersVO();
vo.insertRow(vo.createRow());
}
Command and example syntax adhere to the conventions in the following table:
Convention Explanation
/* A C-style comment.
*/
*/
// A Java comment.
Setting Up JDeveloper
Refer to My Oracle Support Knowledge Document 416708.1 to find out the patch
number for the patch with the appropriate version of JDeveloper for the Oracle
E-Business Suite that you need. Download this patch for JDeveloper.
Note: You can build, test, and deploy Oracle iSetup Framework
interfaces on Oracle E-Business Suite Release 12.0.6 and later. These
instructions use Release 12.0.6 as an example.
To Set Up JDeveloper:
1. Unzip the JDeveloper patch to the folder JDeveloper_12.0.6.
2. You can add iSetup framework tutorial shipped with patch to your developer.
Alternatively, you can go through this chapter to create BC4J objects on your own.
5. To open the example code, select File > Open in JDeveloper and navigate to the
location where TutorialCode is present. Select iSetupReportableAPI.jws in the
TutorialCode folder and click Open. To compile the above code, add the iSetup
Framework Library as described in Steps 10 and 11, below. To create your own
BC4J Objects, please follow the process described below.
Click OK.
The window "Oracle Applications Project Wizard" opens.
7. Complete the following steps in the Oracle Applications Project Wizard window.
• Step 1 of 3: Click on Next. Enter Project Name, Directory Name, and Default
Package Name (for example, 'oracle.apps.az.isetup.server').
• Step 2 of 3: Check the box "Use Repository for Design Time". If you have
already defined the database connection select it from the list or else click on
New. The window "Create Database Connection Wizard" opens.
• Step 4 of 4: Click on Test Connection to ensure that all the details you supplied
above are correct.
9. Now you are done creating the new OA Project. Click Finish.
10. In the Applications Navigator right-click on the project and navigate to Project
Properties > Libraries > Add Library.
• Click on New.
• Enter Library Name using the navigation path iSetup > Select Class Path and
click on Add Entry.
• Browse to the directory where the iSetup Tutorial files have been unzipped
(Refer to Step 3). Select iSetFwk.jar. Click OK in Create Library Dialog Pane.
3. Click Next.
• Click on Next, accepting the defaults, until you reach step 6 of 7: Attribute
Settings.
• Step 6 of 7: Now mark the unique key attributes (Unique keys are the developer
keys of your API. Unique Keys should not contain any sequence IDs. Based on
unique key columns, you can uniquely identify a record. In this example, the
CurrencyCode view object attribute uniquely identifies a record.
• AZ_ATT_DISPLAY_MSG: AZW_FWK_CURRENCY
• AZ_ATT_DISPLAY_APP: AZ
3. After entering all the properties for filtering parameters, click OK.
• Note that the Application Module is created with following two files:
• ReportCurrenciesAM.xml
• ReportCurrenciesAMImpl.java
..........
• In the iSetup Migrator UI, a LOV can be linked to each filtering parameter. This
feature is optional. You may skip this if you do not want the LOV. To enable
this feature, the API needs to override BEViewObjectImpl.getSqlForLov
method to return the LOV SQL, which should select the distinct values of the
filtered column. Add the following piece of code to the
ReportCurrenciesVOImpl.java file.
• Now right-click on the workspace and select Rebuild. Ensure that there are no
compilation errors.
Copy the Application Module and View Object related files to the JAVA_TOP of the
instance. During copy don't disturb the directory structure. Here you need to copy
the folder
<JDeveloper12.0.6>\jdevbin\jdev\myclasses\oracle\apps\az\isetup\serv
er
to
<$JAVA_TOP>\oracle\apps\az\isetup\server
2. For testing purposes, execute the following query against the instance database.
Note: This query is purely for testing purpose only. After testing
and if your API is working as expected, remove the below inserted
record from the database and register the API as described in the
section Registering the iSetup Framework (BC4J) API, page 1-7.
Where
:1 => DISPLAY_NAME => Any user friendly name to identify the
API. In this case, please substitute Report Currencies for
DISPLAY_NAME
:2 => PATH => Java path to refer AM. In this case, substitute
oracle.apps.az.isetup.server.ReportCurrenciesAM for PATH.
3. Reports can be generated as described in the Oracle iSetup User's Guide. You will
need to create a Custom Selection Set by selecting the data object created above. In
our example, the navigation path is Report Currencies > Create Extract > Create
Report. The detailed process can be found in the Oracle iSetup User's Guide.
4. Once you are done with testing the interface, you can deploy it on to any Oracle
E-Business Suite instance. Follow the steps described in the section Registering the
iSetup Framework (BC4J) API, page 1-7 to register the iSetup reportable API to the
iSetup Interface Repository.
AZW_FWK_LANGUAGE "Language"
AZW_FWK_CURRENCY "Currency"