Skip Headers

Oracle iSetup Developer's Guide
Release 12.1
Part Number E15842-01
Go to Table of Contents
Contents
Go to previous page
Previous
Go to next page
Next

Oracle iSetup Reportable API

Oracle iSetup Reportable API

This chapter explains how to write a iSetup Reportable API for Oracle E-Business Suite Release 12.0.6 and later.

Typographical Conventions

This chapter uses the following typographic conventions to distinguish important elements from the body of the chapter.

Command and Example Syntax

Syntax:

OAPageContext.getParameter("<parameterName>");

Example:

/*
** Creates a SupplierEOImpl entity object and a corresponding row in the 
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
plain monotype Used for code fragments and examples.
< Italic monotype in angle brackets > Indicates developer-supplied values.
... An ellipsis indicates that the actual code extends beyond the example shown.
/*
*/
A C-style comment.
/**
*/
A Javadoc comment.
// A Java comment.
Indentation The Oracle standard indentation helps to show code structure.

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.

Download the Tutorial attachment to My Oracle Support Knowledge Document 843397.1 to get the Oracle iSetup Framework Library and sample code used in this document.

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.

  3. Unzip the Tutorial.zip. You should have the following contents:

  4. Navigate through the folder JDeveloper_12.0.6/jdevbin/ and click on jdeveloper.exe

  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.

  6. Click on Applications Navigator tab > Right-click on Applications > New OA Workspace > Enter the workspace file name and directory name. Ensure that the "Add a new OA Project" box is checked.

    the picture is described in the document text

    Click OK.

    The window "Oracle Applications Project Wizard" opens.

  7. Complete the following steps in the Oracle Applications Project Wizard window.

  8. Click Next. Perform the steps required to create a database connection.

    Click Finish to return to the Oracle Applications Project Wizard.

  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.

    the picture is described in the document text

  11. Add a new library:

    the picture is described in the document text

  12. Click OK in Add Library Dialog Pane.

  13. Click OK in Project Properties Dialog Pane.

To Create the iSetup Framework Reportable Interface

  1. Create View Object: Right-click on the Project and click on New > Select ADF Business Components: View Object.

    the picture is described in the document text

  2. Click on OK. The "Create View Object Wizard" window opens.

  3. Click Next.

  4. Perform the following in the Create View Object screens:

    Note that the View Object is created with following two files:

  5. Filtering attributes need to be marked if the iSetup Reportable API has to support filtering records. APIs are responsible for determining which filtering parameters are allowed and to which view object attributes that these filtering parameters map. In order to achieve these goals, the APIs need to register the filtering parameters by marking view object attributes as filtering parameters as shown below:

    For the attributes that need to be filtered on, the APIs need to add the following three properties

    Optional properties are as follows:

    Properties AZ_ATT_DISPLAY_MSG and AZ_ATT_DISPLAY_APP are used to show the label of the filtering parameter in the iSetup Migration UI pages. These properties are optional. If you do not set the values for these properties, then the VO attribute name would be used as the display name.

    To set the above properties you need to follow following steps.

    In this example, attribute CurrencyCode of ReportCurrenciesVO is the filtering parameter.

    1. Select ReportCurrenciesVO in Applications Navigator of JDeveloper. In the Structure Pane, select and right-click on the CurrencyCode view object attribute and select 'Edit CurrencyCode'. Then select 'Custom Properties' in Attribute Editor wizard. For Name enter: AZ_FILTER_NAME and for Value enter: CURRENCY. Click on Add and Apply.

    2. Repeat the above procedure for the properties (Optional): AZ_ATT_DISPLAY_MSG and AZ_ATT_DISPLAY_APP. In this example the values are given as follows:

      • AZ_FILTER_NAME: CURRENCY

      • AZ_ATT_DISPLAY_MSG: AZW_FWK_CURRENCY

      • AZ_ATT_DISPLAY_APP: AZ

    3. After entering all the properties for filtering parameters, click OK.

    the picture is described in the document text

To Create an Application Module

Perform the following steps to create an application module.

  1. Right-click on the project and click on New. Select ADF Business Components: Application Module.

    the picture is described in the document text

  2. Click OK. The "Create Application Module" wizard opens. Click Next.

  3. Perform the steps in the Create Application Module window.

To Test the Interface in JDeveloper

  1. Right-click on ReportCurrenciesAM application module and select Test.

    the picture is described in the document text

  2. The Oracle Business Component Browser opens. Select Connection Name to the instance on to which you need to test and click on Connect.

    the picture is described in the document text

  3. A Java frame window ‘Oracle Business Component Browser’ opens up. Click on the View Object you need to test. In this example, we added ReportCurrenciesVO1 to the application module, so we would click on ReportCurrenciesVO1. All the records that need to be fetched with the SQL query will be returned.

    the picture is described in the document text

  4. Click on File > Exit to close the Testing mode.

To Test and Deploy Interface in an Oracle E-Business Suite Instance

  1. Navigate to the JDeveloper folder where your code resides. By default when you create workspace and project, this folder is usually created here:

    <JDeveloper12.0.6>\jdevbin\jdev\myclasses 

    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\server 

    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.

    Insert Record Query
    INSERT
       INTO az_apis
      (
        API_NAME,
        APPLICATION_SHORT_NAME,
        SEQ ,
        DISPLAY_NAME,
        DESCRIPTION,
        COMMIT_IF_WARNING,
        TYPE_CODE,
        METHOD_NAME,
        PATH,
        CREATED_BY,
        CREATION_DATE,
        LAST_UPDATED_BY,
        LAST_UPDATE_DATE,
        LAST_UPDATE_LOGIN,
        API_CODE,
        SEQ_NUM,
        API_DESC,
        COMMIT_IF_WARNING_FLAG,
        API_TYPE,
        REPORT_LAYOUT,
        FILTERING_PARAMETERS,
        DATA_SOURCE_NAME,
        UPDATABLE_FLAG,
        CHANGE_UPDATABLE_FLAG,
        ALLOW_SET_TARGETVAL_FLAG,
        ALLOW_FILTER_FLAG,
        API_STANDALONE_FLAG,
        ACTIVE,
        DISABLE_REPORT_FLAG
      )
      VALUES
      (
        NULL  ,
        'AZ'  ,
        NULL  ,
        :1,
        NULL  ,
        NULL  ,
        NULL  ,
        'importFromXML',
        :2,
        1,
        to_timestamp('03-JAN-07','DD-MON-RR HH.MI.SSXFF AM'),
        1,
        to_timestamp('21-MAR-07','DD-MON-RR HH.MI.SSXFF AM'),
        0,
        :3,
        NULL,
        NULL,
        'N',
        'BC4J',
        'MULTIPLE',
        NULL,
        NULL,
        NULL,
        NULL,
        NULL,
        'Y',
        'Y',
        'Y',
        NULL
      );
     
    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 =>	API_CODE => A unique identifier to register the API. Naming convention is prefix with Application Short Name + “_” + API Name without any spaces. In this case, substitute AZ_Currencies for API_CODE.
    
    	Delete Record Query
    		DELETE
       			FROM az_apis
      			WHERE api_standalone_flag = 'Y'
    AND api_code= 'AZ_Currencies';
    
  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 to register the iSetup reportable API to the iSetup Interface Repository.