Академический Документы
Профессиональный Документы
Культура Документы
Copy Number
_____
Document Control
Change Record
5
Author Alex Drexel Alex Drexel Alex Drexel Alex Drexel Bernardine Rodgers Alex Drexel
Change Reference No Previous Document Changes to include more info on Parameter UI and PL/SQL Added Expanded Cols and general edits. Added Reporting Mode Updated API Definitions for 8.3 Removed References to Directory and other tables, columns, and parameters not present in 8.3. Updated Calling Web ADI. Instructed Integrator developers to create their own parameter definitions for upload parameters in section 7.2.1. Noted the parameters in LOV parameter lists that are optional in section 5.1.2. Updates per bug 3901271. Added additional information regarding Java validators and Function security. Added more detail to section Uploading Code Combination Identifier For Key Flexfield Values Updated section added in v1.8. Updated the val obj class to use when defining key flexfields.
10-Mar-04
Alex Drexel
1.6
23-Sep-04
Alex Drexel
1.7
09-Mar-05
Alex Drexel
1.8
17-Mar-05 03-May-05
1.9 2.0
Contributors
Document Reference
Author David Groves Document Name Web ADI Parameters DLD Component Parameters DLD Web ADI PA Download_DLD_CreateDoc Web ADI Download Metadata DLD TokenRedirectNoReview Insert to API and Multi-Table Upload DLD Metadata Importer DLD Web ADI Download Stored SQL DLD Mapping Template Page Flow DLD Metadata Driven Upload Parameters DLD Web ADI Download Passed SQL DLD Integrator Developers Guide
Reviewers
Distribution
Copy No. 1 2 3 4
Contents
Document Control ..................................................................................................................ii Glossary.................................................................................................................................... 6 1. 1.1. 1.2. 2. Overview ................................................................................................................... 9 Functionality ...................................................................................................... 9 Integrator Development ................................................................................... 9 Defining an Integrator ........................................................................................... 11 2.2 Associate Form Function(s) with Integrator ........................................................ 11 To Delete an Association .............................................................................................. 12 To Update an Association ............................................................................................ 12 3. 3.1. 3.2. 3.3. 4. 4.1. 4.2. 5. Adding Interfaces ................................................................................................... 14 Creating a PL/SQL API Interface ................................................................. 14 Creating a Table Interface .............................................................................. 18 Uploading to Multiple Interface Tables or APIs ......................................... 19 Updating Interface Columns/API Parameters .................................................. 20 Create Interface Columns............................................................................... 20 Interface Columns Concepts.......................................................................... 22 Creating Components ............................................................................................ 32 5.1. Creating Table Validated Components ........................................................ 32 5.2. Creating JAVA Validated Components ....................................................... 35 SQL Java Class ............................................................................................................... 37 Validator Java Class ...................................................................................................... 40 Implementing a Group Validator Java Class............................................................. 44 Component Java Class .................................................................................................. 46 Implementing the Component Java Class.................................................................. 47 Metadata for Java Validation .............................................................................................. 51 BNE Parameter Definition Tables ............................................................................... 51 BNE Parameter List Tables........................................................................................... 52 BNE Parameter List Items Table.................................................................................. 53 BNE Component Tables................................................................................................ 53 BNE Interface Column(s) Tables ................................................................................. 54 6. 6.1. 6.2. 6.3. Defining an Importer ............................................................................................. 57 Indicate Importer Type................................................................................... 57 Define Master Parameter List ........................................................................ 58 Enter Metadata for Steps in Master List....................................................... 60
Defining Upload Parameters ................................................................................ 79 Upload Parameters Screen ............................................................................. 79 Create Upload Parameter List ....................................................................... 80 Creating Content .................................................................................................... 82 Stored SQL........................................................................................................ 82 Text File............................................................................................................. 84 Java .................................................................................................................... 86 Reporting Only Documents .................................................................................. 88 Reporting only with Data Entry Interfaces.................................................. 88 Reporting only Interfaces, Mappings and Layouts .................................... 88 Creating Layouts and Mappings.......................................................................... 90 10.1. 10.2. Creating Layouts ............................................................................................. 90 Creating Mappings ......................................................................................... 94 Available Parameters...................................................................................... 97 Sending Parameters to BneApplicaitonService........................................... 99
11.
APPENDIX A Parameter UI........................................................................................... 103 Accessing Parameter UI.............................................................................................. 103 Defining Parameter Lists ............................................................................................ 103 Defining Parameter List Items ................................................................................... 103 Defining a Parameter Definition ............................................................................... 104 Associating a Parameter Definition to a Parameter................................................ 104 Testing Your Parameter List ...................................................................................... 104 APPENDIX B Shipping Your Integrator....................................................................... 106 1.2 Appendix C ........................................................................................................... 108
Open and Closed Issues for this Deliverable ...................................................................... 6 Open Issues....................................................................................................................... 6 Closed Issues .................................................................................................................... 6
Glossary
Asynchronous Call An asynchronous call occurs where the uploading of data to interface tables is a separate process from importing interfaced table data to Oracle Applications (i.e. they dont happen at the same time). When an upload occurs, an import program is called and the request id is returned to the user. Oracle Applications proceeds to run the import program in the background and it is up to the user to manually check whether the import program was successful in its processing. This means the submission of the upload and the completion of the import program are not synchronized, hence the usage of the asynchronous terminology. Client Some software requiring a function to be performed by another piece of software (the Server). Clients pass parameters to Servers Content This is the information that will be downloaded into the Viewer. Multiple Contents can be defined for a single Content Class. The Content that is passed to or selected in the Create Document page flow determines the Content Class that will be used to derive the Content data. Content Column A name defined in metadata to represent a column that exists in the Content. Users map the Content Columns to interface columns/API parameters so that data is downloaded to the appropriate fields in the document. Content Class This is the java code containing the business and processing rules that can be plugged into the Web ADI Download architecture. This code processes the parameters that are passed to Web ADI, to retrieve information from the selected Content. Create Document Page Flow This page flow consists of a set of Web ADI screens from which an end user can select from several parameters to create a document on the client machine. The parameters that a user can select include: Language, Viewer, Integrator, Layout, Content and Mapping. Additional parameters may be required depending on the Content selected. Document Creation Shortcut Settings These settings are the parameters that are supplied to the Create Document page flow. These parameters are passed to the Create Document page flow either when a user selects a Document Creation Shortcut from the Documents page in the Create Document page flow or when the Create Document page flow is called directly from an application or form. (Aside: the Documents page the first page in the Create Document page flow but will not be displayed until a Shortcut has been saved.)
Dynamic Parameter A dynamic parameter is a parameter defined by metadata stored in the Web ADI repository, but its value must be determined at run-time. Integrator An Integrator is a Web ADI term used to encapsulate all of the information required to move data to/from a desktop application into Oracle Applications. An Integrator definition may include information about open interface tables, validation, business rules, and data that can be downloaded. Integrator Developer The Integrator Developer is a developer who defines the metadata required within Web ADI. The metadata includes: the Integrator, table/view definitions, Layouts, Mappings, SQL statements and parameters. The Integrator Developer will usually be a System Administrator or a user with a more advanced understanding of Web ADI, and knowledge of the tables and business rules associated with the product being integrated with. Interface Interface is a Web ADI term for the column definitions from a particular API or Interface table/view to be used for uploading data into the database. Multiple Interfaces can be defined for a single Integrator. Language This is the Language in which a document will be generated, and in which all interaction within the document will be conducted. Layout A Layout tells Web ADI which columns will be displayed in the Desktop Application document and how those columns will be displayed, including formatting. Web ADI provides a set of screens that users and Integrator Developers can use to create their own Layouts. Integrator Developers are able to provide Layouts as seed data. Mapping A Mapping is defined to link the columns from the Content to the columns in a table/API Interface. For example, the columns in a SQL query that are downloaded into an MS Excel spreadsheet are mapped to the columns in an open interface table into which the downloaded information will be uploaded. Parameter A parameter is a name / value pair used to pass information between a client and a server. The parameter may be known by a textural (string) name, or a position in a list. The parameter value must have a data type, which one is known and understood by the client and server. There is generally a description available for the parameter value that is displayed to the user. Example: param name = bne:integrator, datatype = string, param value = 231:JOURNALS_11I with description Journals for Applications 11i.
Server Some software that does a job for a Client. Servers receive parameters from Clients. Static Parameter A static parameter is a parameter completely defined by metadata stored in the Web ADI repository. A static parameter can be read and a value obtained immediately either by a default value stored against it, or a specific stored value. Synchronous Call A synchronous call occurs where the uploading of data to interface tables and import to Oracle Applications occur in one process. A synchronous call entails submitting the import program, waiting for the import program to finish running, determining the success or failure of the import and returning these details to the user. In this scenario, the user will not have to manually check whether the import program completed successfully. Viewer A Viewer is a Web ADI term for the desktop application in which a document will be generated.
1. Overview
1.1. Functionality
Web ADI allows Oracle Applications developers to rapidly create desktop interfaces to their own Applications. They can bring Oracle Application data and business rules to a desktop application such as Excel to give users more flexibility in entering, modifying and modeling data. By updating metadata, Integrator Developers can have Web ADI: Create a formatted document on the desktop containing application specific fields for data entry. Import data from the database or a text file to a document. Provide List of Values within a document. Upload data from the desktop document to Oracle Applications. Validate fields in the document and provide instant feedback (error/confirmation messages) during the upload process.
All of this is done is done over the Web; no client install is necessary. Users need only IE and a viewer installed on their PCs. The viewer currently supported is Excel.
1.2.
Integrator Development
The above functionality is applied to your application through the development of an Integrator. Creating an Integrator involves updating Web ADI tables. This metadata is used By Web ADI to capture the business rules of your product so that they may be enforced on the desktop. Most of the metadata is created through PL/SQL packages and HTML UI. There may be cases when tables are updated through SQL Plus. To enable upload, Integrator Developers must identify the tables or APIs a document will point to. They then describe the columns/parameters of those tables/APIs and how they should be validated. Integrator developers may also describe the program they use to import data from interface tables to application base tables. Web ADI will look at this metadata to automatically call the import program after it has successfully uploaded data to the interface. Parameters shown to users that govern the upload process can also be defined. In addition, users may want to download information into the document, edit then upload to Oracle Applications. To enable download, metadata on what will be downloaded is entered. Information on how the downloaded data is mapped to columns in the document is also created. Some Integrators my only allow users to download information to a document for analysis, and not provide upload. Developing an Integrator involves the following steps: Define an Integrator Define Interfaces Define Interface Columns Create Components Define Importer
This document describes these steps in detail and provides information on how Web ADI can be invoked.
Note: The Apache HTTP listener must be restarted when a record is updated through SQL Plus if the change is to be viewed in the application.
2. Defining an Integrator
A PL/SQL script is available for Integrator Developers to quickly create the core metadata of an Integrator. This includes a data-source type, and an Integrator Definition.
Description The identifier for an application. An example would be 101 for General Ledger A string of 20 chars or less. The only valid characters are: Uppercase 'A'..'Z', '0'..'9' and '_'. This string must be unique within the application ID. The API will use this code to generate the P_INTEGRATOR_CODE. P_INTEGRATOR_CODE = P_OBJECT_CODE + _INTG The Integrator name displayed to users on the Integrator page in the Create Document Page Flow. The standard format for Integrator name is <Product Name> - <Module/Function Name>. An example would be General Ledger - Journals. The language the User Integrator Name will be stored against The Language that the User Integrator Name will be translated from Oracle Applications user ID This is generated by the API. It uniquely identifies your Integrator within your application and can be used when calling the Web ADI service.
P_INTEGRATOR_USER_NAME
Parameter
Description
Description Application ID of your product Enter the code of the Integrator you want to apply the security rule to. Pass INTEGRATOR Security Code uniquely identifies the security rule. Enter FUNCTION A comma separated list of functions that grant access to your integrator. These form functions must exist on your instance or an error will be received when calling the package. Updates CREATED_BY and LAST_UPDATED_BY Columns. The value for this parameter should be the seed user. When extracted to an LDT file, this value should translate to the Oracle user.
P_USER_ID
To Delete an Association
Call the following Package: BNE_SECURITY_UTILS_PKG.DELETE_OBJECT_RULES ( P_OBJECT_APP_ID in NUMBER, P_OBJECT_CODE in VARCHAR2, P_OBJECT_TYPE in VARCHAR2, P_SECURITY_APP_ID in NUMBER, P_SECURITY_CODE in VARCHAR2);
Parameter P_OBJECT_APP_ID P_OBJECT_CODE Description Application ID of your product Enter the code of the Integrator that has the security rule you you want to delete. Pass INTEGRATOR Application ID of your product Pass the security rule you want to delete.
To Update an Association
Call the following Package: BNE_SECURITY_UTILS_PKG.UPDATE_OBJECT_RULES ( P_OBJECT_APP_ID in NUMBER, P_OBJECT_CODE in VARCHAR2, P_OBJECT_TYPE in VARCHAR2, P_SECURITY_APP_ID in NUMBER,
Description Application ID of your product Enter the code of the Integrator you want to apply the security rule to. Pass INTEGRATOR Application ID of your product Security Code uniquely identifies the security rule. Enter FUNCTION A comma separated list of functions that grant access to your integrator. These forrm funcitons must exist on your instance or an error will be received when calling the package.. Updates CREATED_BY and LAST_UPDATED_BY Columns. The value for this parameter should be the seed user. When extracted to an LDT file, this value should translate to the Oracle user.
P_USER_ID
3. Adding Interfaces
A PL/SQL API is provided to create Interfaces for an Integrator. An Interface identifies a database table or PL/SQL API that you will be populating with Web ADI. More than one Interface can be defined for an Integrator; the API must be run each time an Interface is to be added. It is possible to create an Interface that does not provide upload, but only allows users to download data into the document for reporting purposes. If this is what is required, skip to section 8 and create a Content for your Integrator, then run the API described in section 9.2.
3.1.
3.1.1.
Run the following PL/SQL package to create an Interface for a PL/SQL API:
BNE_INTEGRATOR_UTILS.CREATE_INTERFACE_FOR_API (P_APPLICATION_ID IN NUMBER, P_OBJECT_CODE IN VARCHAR2, P_INTEGRATOR_CODE IN VARCHAR2, P_API_PACKAGE_NAME IN VARCHAR2, P_API_PROCEDURE_NAME IN VARCHAR2, P_INTERFACE_USER_NAME IN VARCHAR2, P_PARAM_LIST_NAME IN VARCHAR2, P_API_TYPE IN VARCHAR2, P_API_RETURN_TYPE IN VARCHAR2 DEFAULT NULL, P_UPLOAD_TYPE IN NUMBER, P_LANGUAGE IN VARCHAR2, P_SOURCE_LANG IN VARCHAR2, P_USER_ID IN NUMBER, P_PARAM_LIST_CODE OUT VARCHAR2, P_INTERFACE_CODE OUT VARCHAR2);
Description The identifier for an application. An example would be 101 for General Ledger A string of 20 chars or less. The only valid characters are: Uppercase 'A'..'Z', '0'..'9' and '_'. This string must be unique within the application ID. The package name that contains your PL/SQL API procedure. The language the User Integrator Name will be stored against The Language that the User Integrator Name will be translated from Oracle Applications user ID
Set to the Integrator Code that was created in section 2. Query BNE_INTEGRATORS_TL to look up the code of any Integrator. The procedure name of your PL/SQL API. The user name for the Interface, but is not seen in the UI at this time
P_API_PROCEDURE_NAME P_INTERFACE_USER_NAME
Parameter P_PARAM_LIST_NAME
Description
Your Interface to an API will require an associated list of parameters. Set to be the name of this parameter list. This value will not be seen by users. PROCEDURE or FUNCTION The Function Return Data Type. Set to 0, 1 or 2. 0 = Custom Upload Type (uses BNE_INTERFACES_B.UPLOAD_OBJ_NAME to obtain class name to load). 1= upload to Table. 2 = Upload to PL/SQL API The language your Interface name will be stored against The language the Interface name will be translated from ID to a valid Oracle Applications user ID
Identify Attributes of the PL/SQL API Look up the PARAM_LIST_CODE created in the previous step in the Parameter UI (See Appendix A for more information on Parameter UI). Press the Edit button next to the Attributes label in the Define Parameter list screen. Enter the details about the function name and return type for the PL/SQL function. When you are finished, press Apply and return to the Define Parameter List screen.
Field Name ATTRIBUTE1 ATTRIBUTE2 ATTRIBUTE3 ATTRIBUTE4 Field Description Type of API call. (FUNCTION or PROCEDURE.) Name of PL/SQL function or procedure including the package name. Function Return Data Type. This attribute will be ignored if the API is a PROCEDURE Whether the return value is used to retrieve the error messages (Y/N). This attribute will be ignored if the API is a PROCEDURE. Perform a call to FND_MESSAGES. (Y/N). This attribute is used for a FUNCTION and PROCEDURE
ATTRIBUTE5
Example :
3.1.3.
Use the Add Another Row button to identify all the parameters that exist in your API to the parameter list. A parameter must be added to the list for every PL/SQL function/parameter declaration and PL/SQL parameter for the function call. In addition, the order in which these parameters are defined in the parameter list must be the exact order in which they are defined in the PL/SQL API
3.1.3.1.
After pressing Add Another Row, you will be presented with the Define Parameter Screen. Use this screen to enter the details for each parameter you add the list.
Field Name
Field Description
NAME
Formula
Name of parameter. This value needs to be the exact name of the parameter in your API. This value is not translatable. This is the data Type for the default value for this parameter. Default value for the parameter if known. Description of parameter. E.g. Journals for Applications 11i. This is in the language of the user. Note, a description must be entered if a default value is defined. An environment variable or similar that the default value can be derived from. E.g. $env$.userid 1318 as a number if DATATYPE=NUMBER
Example:
3.1.3.2.
Identify attributes for each parameter you define in the list. User the edit button next to the Attributes label (see above) to access the attributes for each parameter you define. If you have default values defined within your API definition for a particular parameter, these default values must also be set in Attribute 5. For example, if you have NULL being the default value for row_id in your API definition, you must also enter NULL in Attribute 5 when identifying this parameter in the parameter list.
Filed Description PL/SQL parameter name PL/SQL parameter data type. PL/SQL parameter access. (IN / OUT / INOUT) Used for returning error messages. (Y/N) Default value for the PL/SQL parameter. You must use single quotes around any string that is to be used as a default value (i.e. FULL) Size of the variable.
ATTRIBUTE6
Example:
3.1.4.
Create records in BNE_INTERFACE_COLS_B for every PL/SQL API parameter you wish to pass values to from a document on the desktop. Relate a parameter identified in the parameter list with a record in BNE_INTERFACE_COLS_B by entering the parameters sequence number in BNE_INTERFACE_COLS_B.UPLOAD_PARAM_LIST_ITEM_NUM. See Updating Interface Columns/API Parameters for more information on creating records in this table.
3.2.
BNE_INTEGRATOR_UTILS. CREATE_INTERFACE_FOR_TABLE (P_APPLICATION_ID IN NUMBER, P_OBJECT_CODE IN VARCHAR2, P_INTEGRATOR_CODE IN VARCHAR2, P_INTERFACE_TABLE_NAME IN VARCHAR2, P_INTERFACE_USER_NAME IN VARCHAR2, P_LANGUAGE IN VARCHAR2, P_SOURCE_LANG IN VARCHAR2, P_USER_ID IN NUMBER, P_INTERFACE_CODE OUT NOCOPY VARCHAR2);
Description The identifier for an application. An example would be 101 for General Ledger A string of 20 chars or less. The only valid characters are: Uppercase 'A'..'Z', '0'..'9' and '_'. This string must be unique within the application ID. This string will be used to generate P_INTERFACE_CODE. P_INTERFACE_CODE = P_OBJECT_CODE + _INTF. Set to the Integrator code the Interface will be defined under The language the User Integrator Name will be stored against The Language that the User Integrator Name will be translated from Oracle Applications user ID This is generated by the API. It uniquely identifies your Integrator within your application and can be used when calling the Web ADI service. the name of the table you will be updating is the user name for your interface. Currently, this is not seen by users.
P_INTERFACE_TABLE_NAME P_INTERFACE_USER_NAME
3.2.2. Create records in BNE_INTERFACE_COLS_B for every column in your table. Not the INTERFACE_CODE created in 3.2.1. This will be needed to create your interface columns. See Updating Interface Columns/API Parameters for more information on this step.
3.3.
4.1.
4.1.1.
An Interface Columns Integrator is available for you to quickly create/edit interface column metadata.
4.1.1.1.
You must run the following script if you do not see a Web ADI Interface Columns Integrator on the Integrator page of the Create Document Page flow. update bne_integrators_b set enabled_flag = 'Y' where application_id = 231 and integrator_code = 'INTERFACE_COLS';
4.1.1.2.
To quickly create interface columns using Excel, enter the Create Document Page flow and select Web ADI Interface Columns Integrator and the All Columns layout. The APIs you
called in the previous section may have already created many of these records for you. If you want to download records already created for your Interface, select Interface Columns for the Content and enter the Interface Code you created in the previous section 3. Records will be downloaded into Excel, where they can be changed/created and uploaded. 4.1.2. Below is a list of fields that will appear in the spreadsheet and their descriptions. * = Required
Description The identifier for the application. Object Code of the Interface. Select INTERFACE_CODE, INTERFACE_NAME from BNE_INTERFACES_B to get this value. Unique ID for every record that is assigned to the same INTERFACE_CODE. So you could have the same SEQUENCE_NUM for two records in this table, but they would have to be assigned to different INTERFACE_CODEs. 1 indicates that this column/parameter exists in the interface table/API. 2 indicates that the column is an alias that can exist in the layout but is not an actual column in the interface table. Name of the interface table column or API Parameter to be updated. Interface table columns MUST BE ENTERED IN UPPERCASE. Y/N field indicating if this interface column/API parameter will be updated or included in a Web ADI Layout. Identifier of parameters for a PL/SQL API upload. Match this value with the value of SEQ_NUM in BNE_PARAMETER_LIST_ITEMS to identify the parameter being uploaded to. Y/N field. A Y value will force this column/parameter to be included in all layouts for an Integrator. Users will be required to enter a value for this column/parameter in the document. Columns that cannot be set to NULL in the database and parameter values that are required should have this field set to Y. A N value will allow a User to optionally select this column when defining new layouts for an Integrator. All columns/parameters with the ENABLED field set to N should have a NULL value in this column. Y/N field determines whether or not the column/parameter will be displayed in the layout. If NO, the user will not be able to select this column to be included in the layout. If NO and REQUIRED_FLAG = YES, then the column/parameter will be included in the sheet but wont be seen by the user. This configuration can be used with the DEFAULT_VALUE column to have all sheets pass a hidden default value.
INTERFACE_COL_TYPE* (Type)
DISPLAY_FLAG (Display)
DEFAULT_VALUE
SEGMENT_NUMBER GROUP_NAME OA_FLEX_CODE (Flex Code) OA_CONCAT_FLEX (Concat Flex) READ_ONLY VAL_TYPE (Validation Type)
The size of the column in the interface table or character length for a parameter. Web ADI uses this value to validate data in the document. Indicates the form of the DEFAULT_VALUE. Valid values for this field are SQL, ENVIRONMENT, CONSTANT, and TABLELOOKUP. CONSTANT uses the actual value in DEFAULT_VALUE for this field upon upload. ENVIRONMENT Indicates an environmental variable defined in DEFAULT_VALUE . SQL indicates a SQL statement exists in DEFAULT_VALUE that will be used to determine the value to be used for this field during upload. TABLELOOKUP will default the value from another column. Default values are not automatically inserted into the document when it is created, they are derived at upload time. Default value to be used for the field when it uploaded. This value will not be automatically inserted into the document when it is created, but will be used for upload if no value exists for it in the document; i.e., The value in the document will be uploaded if one exists, and the default value will be ignored. Indicate the position within the group. Indicates the group the column/parameter is assigned to Flexfield structure identifier. Concatenates the value entered for this column/parameter into one cell in a spreadsheet. Y/N. If YES, then the user cant change this value and it is placed in the context section of the document. Indicates the Validation Type. Valid values are DESCFLEX, DESCFLEXCONTEXT, DESCFLEXSEG, GROUP, JAVA, KEYFLEX, KEYFLEXSEG, and TABLE. This column is left null if no validation other than validating the DATA_TYPE/FIELD_SIZE /NOT_NULL_FLAG is to be done.
Column (Field) Name VAL_ID_COL (Val id ID) VAL_MEAN_COL (Valid Meaning) VAL_DESC_COL (Valid Desc) VAL_OBJ_NAME (Valid Object)
Description Column to query when Web ADI constructs its SQL Query. This will be the actual value inserted into the Interface Table This is the column that contains the user value for values in VAL_ID_COL. These are the values shown in the LOV shown in the worksheet. Column that contains the description for values in VAL_ID_COL. These values are shown in the description section of the LOV. Table or Java class that is called to validate values in the sheet. If VALTYPE = TABLE, then the name of the table to query is placed in this column (e.g. FND_LOOKUPS). If VALTYPE =JAVA, then specify the Java class to call when validating the column (e.g. oracle.apps.bne.integrator.validators.BneAccountingFlexValidator). Enter an additional Where Clause to add to a Table Validated column. Three values can be entered in this column. 1 = value in database/API must be a number; 2 = value in the database/API must be varchar; 3 = value in the database/API must be a date. Web ADI will use this value to validate data in the document. Indicates that column in the DB or parameter for the API cannot be null. Web ADI uses this value to validate data in the document.. Application ID of component to be called in BNE_COMPONENTS Name of Component from BNE_COMPONENTS that will be called to retrieve the LOV for this field. TABLE and JAVA VAL_TYPES require this field to have a value if an LOV is to be retrieved. See Creating Components for more details. Indicates if value for this column/parameter can be summed up in the document. Indicates whether a column/parameter can be included in a Mapping so that it can be mapped to a content column. (Y/N) Column header for field if in the Header region of the document. This value must be entered if the column header is to appear in the document and if the column is to be displayed in the Mapping and Layout UI. Column header for field if in the Lines region of the document. This value must be entered if the column header is to appear in the document and if the column is to be displayed in the Mapping and Layout UI. Text to appear in the hint section for the column. This is the area between the data entry cells and the Header. Language that will be entered in the TL Table Language prompts will be translated from Flexfield structure identifier. Flexfield structure identifier. Default order in which the columns/parameters are displayed in the document For expanded columns. This is the query that will be run to return the number of periods to be displayed in the worksheet. ID that will be used to populate CREATED_BY and LAST_UPDATED_BY
Prompt Above
User Hint Text Language SOURCE_LANGUAGE OA_FLEX_NUM (Flex Number) OA_FLEX_APPLICATION_ID (Flex Application) DISPLAY_ORDER EXPANDED_SQL_QUERY (User ID)
4.2.
You can have Web ADI run a simple SQL statement to perform validation for a field during upload. This information can also be used to return a list of values within the document. Indicate a field will use Table Validation by entering TABLE in VAL_TYPE. Use the following columns to use a SQL statement for validation during upload: VAL_OBJ_NAME: Enter the Table to be queried. VAL_ID_COL: Enter the column name for the query.
VAL_ADDL_WC: Enter an additional where clause. Tokens can be used when forming the where clause for your query: o o o o o o Profile Options: $PROFILES$.[Profile Option Name] Responsibility ID: $ENV$.RESPID Oracle User ID: $ENV$.USERID Language: $ENV$.LANG Session ID: $ENV$.SESSIONID Application ID: $ENV$. APPID
Use these columns if you want to provide LOVs that use the above SQL statement: VAL_COMPONENT_CODE: Code of the component (from BNE_COMPONENTS_B) that will be used to retrieve the LOV. See Creating Components for more details. VAL_COMPONENT_APP_ID: Application ID that was used to define the component. VAL_MEAN_COL (optional): If entered, values in this column will be displayed to users in the LOV. These meaning values will be entered into the document; ADI will translate them to their corresponding ID values during the upload process.
4.3.
This type of validation/LOV retrieval is used for fields requiring more complex queries against the database. Static SQL cant simply be defined in the repository as in Table Validation. The Web ADI Integrator Developer creates these Java classes. Luckily, the Web ADI development team has created classes that can be used as templates to help developers quickly create their own. See Creating Components for more information. Indicate a field will use Java Validation by entering JAVA in VAL_TYPE. Enter the class name to be used for validation during the upload process in VAL_OBJ_NAME. If a LOV is to be provided, enter the key to the Component that will be used to retrieve the LOV in VAL_COMPONENT_CODE. 4.4. Group Validation
Is validation on one field in your document dependent on the value of another? Do you have several fields that are validated the same way? If so, Group Validation is the answer. It is used to validate values from different
columns at once. This is done when validation involves values in different columns being dependent on one another. It is also done to pool segments having the same validation under a parent whose record defines how validation will be performed for each, rather than entering validation information for all the child records. However, when Group Validation is complete, validation on individual fields is run. If one of the records has a different VAL_OBJ_NAME, that piece of validation code will be run for the field in addition to the group validation. Steps to set up Group Validation: Identify the dependent fields. Create a parent record. It does not appear in the sheet, nor is uploaded. Identify the field as a parent by inserting GROUP for VAL_TYPE. Assign the dependent fields and the parent to the same group. Enter the Java class to perform the group validation in the parents VAL_OBJECT_NAME column.
A simple example of an instance to use group validation is the entered debit and credit columns in the GL Journals Integrator (GL_INTERFACE table). Validation on each field is dependent on the value in the other. An example of one business rule is that the values in ENTERED_DR and ENTERED_CR must not both be null.
INTERFACE_COL_NAME ENTERED_DR ENTERED_CR ENTERED_PARENT DISPLAYED_FLAG Y Y N GROUP ENTERED ENTERED ENTERED VAL_TYPE INTERFACE_COL_TYPE 1 1 2 VAL_OBJ_NAME
GROUP
A parent field must be created to capture values for group validation. ENTERED_PARENT is identified as the parent of the group by inserting GROUP for VAL_TYPE. It does not exist in the interface table, nor will it appear in the sheet for editing. It merely acts as a placeholder for validation; the Java class to perform the Group Validation is assigned to it in VAL_OBJECT_NAME. All three fields are assigned to the ENTERED group.
Note: Remember, validation can be run on individual columns in addition to them being validated as part of a group.
An example where Group Validation is used in conjunction with validation done for individual members of the group is Reference7 and Reference 8 (Reverse Journal, Reversal Period) in the GL Journals Integrator. Group validation is used to verify that a period is entered when Reference7 is Y. In addition to this check, REFERENCE7 TABLE validated and REFERENCE8 is JAVA validated.
INTERFACE_COL_NAME REFERENCE7 REFERENCE8 REVERSAL_PARENT DISPLAYED_FLAG Y Y N GROUP REVERSAL REVERSAL REVERSAL VAL_TYPE TABLE JAVA GROUP INTERFACE_COL_TYPE 1 1 2 VAL_OBJ_NAME FND_LOOKUPS apps.bne.validators.per iodvalidator apps.bne.validators.rev tableformattingvalidato r
Just as in the last example, a parent is created and assigned to a group with the dependent fields. This field will not be uploaded, nor will it be displayed to users. The Java class to perform the group validation is assigned to the parent in VAL_OBJ_NAME. In addition to being Group Validated, REFERENCE7 is being TABLE validated against FND_LOOKUPS (VAL_ID_COL and VAL_ADDL_WC not shown). REFERENCE8 is being JAVA validated with the pervalidator class.
4.5.
Web ADI supports List of Values and the validation of Key Flexfields. Group Validation is used to accomplish this. The following is done to enable Key Flexfield validation/LOV: 4.5.1. Enter records for the Key Flexfield Segments. Indicate Key Flexfield segments by entering KEYFLEXSEG in VAL_TYPE. These fields are not displayed in the spreadsheet but exist in the Table/API. They are not displayed because Web ADI does not know what KFF segments from the interface table to display when creating the document. Assign the segments to a group.
4.5.2.
Create a parent field for the Key Flexfield group. Set INTERFACE_COL_TYPE = 2 since this field does not exist in the interface table. Set DISPLAY_FLAG = Y since this field will be selected in the mapping UI when the user wants the key flexfield to be included in the worksheet. Add this field to the group containing the segment fields. Enter KEYFLEX for VAL_TYPE to identify it as the parent. Enter oracle.apps.bne.integrator.validators.BneKFFValidator in VAL_OBJ_NAME. This is the class that will validate the Key Flexfield. Enter the code that is used to retrieve the Key Flexfield structure in OA_FLEX_CODE. Enter N in OA_CONCAT_FLEX. The segments for Key Flexfields are kept in separate columns in the document. Insert Record into BNE_COMPONENTS_B: 1. 2. 3. APPLICATION_ID: Your application ID COMPONENT_CODE: OA_FLEX COMPONENT_JAVA_CLASS: oracle.apps.bne.integrator.component.BneOAFlexComponent
Enter OA_FLEX for VAL_COMPONENT_CODE (not shown in example below). This value is required to enable List of values for the Key Flexfield Enter your product ID for VAL_COMPONENT_APP_ID.
Example:
INTERFACE_COL _NAME SEGMENT1 SEGMENT2 SEGMENT3
DISPLAYED_ FLAG N N N
INTERFACE _COL_TYPE 1 1 1
OA_FLEX _CODE
OA_CONCAT_ FLEX
VAL_OBJ_NA ME
DISPLAYED_ FLAG Y
GROUP ACCOUNT
VAL_TYPE KEYFLEX
INTERFACE _COL_TYPE 2
OA_CONCAT_ FLEX N
4.6.
There may be a case where you want to display Key Flexfield values to user within the worksheet, but upload the code Combination Identifier (CCID) that represents the Key Flexfield values to a single column in the interface table. 4.6.1. Create a parent field for the Key Flexfield. The INTERFACE_COL_NAME should be the column in your interface table that youre uploading the CCID to. If uploading to an API, the UPLOAD_PARAM_LIST_ITEM_NUM value should match the sequence number in the parameter list of the parameter that captures the CCID. Set DISPLAY_FLAG = Y since this field will be selected in the mapping UI when the user wants the key flexfield to be included in the worksheet. Set INTERFACE_COL_TYPE = 1 since the key flexfield segments displayed in the worksheet will be uploaded as a single value to this column. Enter a new GROUP_NAME for the parent field (youll later assign the segments to this group). Enter KEYFLEXID for VAL_TYPE to identify it as the parent. Enter oracle.apps.bne.integrator.validators.BneKFFValidator in VAL_OBJ_NAME. This is the class that will validate the Key Flexfield Enter the code that is used to retrieve the Key Flexfield structure in OA_FLEX_CODE. Enter N in OA_CONCAT_FLEX. The segments for Key Flexfields are kept in separate columns in the document. Insert Record into BNE_COMPONENTS_B if one does not already exist for your product ID: 1. 2. 3. APPLICATION_ID: Your application ID COMPONENT_CODE: OA_FLEX COMPONENT_JAVA_CLASS: oracle.apps.bne.integrator.component.BneOAFlexComponent
Enter OA_FLEX for VAL_COMPONENT_CODE (not shown in example below). This value is required to enable List of values for the Key Flexfield Enter your product ID for VAL_COMPONENT_APP_ID.
4.6.2.
Indicate Key Flexfield segments by entering KEYFLEXIDSEG in VAL_TYPE. The INTERFACE_COL_NAME needs to be in the following format: [Interface Col Name of Parent field]_SEGMENT1........SEGMENT2..SEGMENTn. Set DISPLAY_FLAG = N. These fields are not displayed in the mapping UI. Set INTERFACE_COL_TYPE = 2 since these fields do not exist in the interface table or API. Assign the segments to a the same group the parent segment belongs to.
Example:
INTERFACE_COL _NAME ACCTCCID_SEGM ENT1 ACCTCCID_SEGM ENT2 ACCTCCID_SEGM ENT3 ACCTCCID
DISPLAYED_ FLAG N N N Y
INTERFACE _COL_TYPE 2 2 2 1
OA_FLEX _CODE
OA_CONCAT_ FLEX
VAL_OBJ_NA ME
GL#
4.7.
Web ADI supports List of Values and the validation of Descriptive Flexfields. Group Validation is used to accomplish this. The following is done to enable Descriptive Flexfield validation/LOV: 4.7.1. Create records for each DFF segment. Indicate a field is a DFF segment by entering DESCFLEXSEG in VAL_TYPE Set DISPLAY_FLAG to N for all segments. This is because Web ADI does not know what DFF segments to display when the sheet is created. The Flexfield structure is returned once the user enters a context value Add the DFF segments to a group by entering a meaningful name for the group in the Group Name field. INTERFACE_COL_TYPE should be set to 1 since the segments exist in the table/API.
4.7.2.
Create a parent record for the group. It will be visible in the document, but does not exist in the table/API Set DISPLAY_FLAG to Y. Set INTERFACE_COL_TYPE to 2. Assign the parent to the group its segments belong to. Set OA_FLEX_CODE to the code that is used uniquely identify the Key DFF structure.
Enter Y for OA_CONCAT_FLEX. The values for all the DFF segments will be concatenated into the context column in the document. Enter DESCFLEX for VAL_TYPE. This indicates that this field is the parent of its DFF group. Enter oracle.apps.bne.integrator.validators.BneDFFValidator for VAL_OBJECT_NAME. This is the Java code that validates DFF segments. Insert Record into BNE_CONTENTS_B: 1. 2. 3. APPLICATION_ID: Your application ID COMPONENT_CODE: OA_FLEX COMPONENT_JAVA_CLASS: oracle.apps.bne.integrator.component.BneOAFlexComponent
Enter OA_FLEX for VAL_COMPONENT_CODE. This entry is required to enable List of Values. Enter your product ID for VAL_COMPONENT_APP_ID.
4.7.3.
Create a context field for the Descriptive Flexfield group. This context segment captures a value that is used to determine the DFF structure is needed. The Context column is visible in the document and exists in the interface table. Enter Y for DISPLAY_FLAG. This field must be available to allow the user to enter a value to retrieve the DFF structure. Enter 1 for INTERFACE_COL_TYPE. Assign to the group. Enter the unique code for the DFF structure in OA_FLEX_CODE. Enter N for OA_CONCAT_FLEX. Enter DESCFLEXCONTEXT for VAL_TYPE. This value indicated that this field is the context segment for the group. Insert Record into BNE_CONTENTS_B: 1. 2. 3. APPLICATION_ID: Your application ID COMPONENT_CODE: OA_FLEX COMPONENT_JAVA_CLASS: oracle.apps.bne.integrator.component.BneOAFlexComponent
Enter OA_FLEX in VAL_COMPONENT_CODE. This will enable the LOV for the context field. Enter your product ID for VAL_COMPONENT_APP_ID.
Example:
INTERFACE_COL_ NAME ATRRUBUTE1 ATTRUBUTE2 ATTRIBUTE3 JOURNAL_LINE_D FF CONEXT DISPLAYE D_FLAG N N N Y Y GROUP JNLLINEDFF JNLLINEDFF JNLLINEDFF JNLLINEDFF JNLLINEDFF VAL_TYPE DESCFLEXSEG DESCFLEXSEG DESCFLEXSEG DESCFLEX DESCFLEXCO NTEXT INTERFACE _COL_TYPE 1 1 1 2 1 OA_FLEX _CODE OA_CONCA T_FLEX VAL_OBJ_NA ME
Y N
.apps.bne.valid
4.8.
Replicating Fields
Web ADI can upload a value entered for a field in a document into multiple interface columns/API parameters. This involves identifying a master field (i.e. the value from this field will be replicated), then referencing that field when creating records for the replicating columns in BNE_INTERFACE_COLS_B. Enter records in BNE_INTERFACE _COLS for the replicated interface columns as follows:
REQUIRED_FLAG Y DISPLAY_FLAG N DEFAULT_TYPE TABLELOOKUP DEFAULT_VALUE $table$.InterfaceName.InterfaceColName
4.9.
Default Values
Default values set in BNE_INTERFACE_COLS_B are generated at upload time. A default value will be uploaded for a column if a value for it does not exist in the document. Enter values in DEFAULT_TYPE and DEFAULT_VALUE in BNE_INTERFACE_COLS_B to have Web ADI generate default values at upload time. If you wish to automatically place default values in the document when it is created, use DEFAULT_TYPE and DEFAULT_VALUE in BNE_LAYOUT_COLS_ALL; See section 9.1.7 for more information. Default values can be stored in metadata. Alternatively, SQL statements, environmental variables, and Java code can all be used to generate default values. DEFAULT_TYPE describes the value in DEFAULT_VALUE. This column has four possible values: SQL: DEFAULT_VALUE is a SQL statement to be run to derive the default value in the document. ENVIRONMENT: DEFAULT_VALUE is an environmental variable to be inserted into the document. Valid variables in DEFAULT_VALUE are DATABASE, OAUSER.ID, SOB.Set.Of.Books.Name, LANGUAGE, and SYSDATE CONSTANT: DEFAULT_VALUE itself will be inserted into the document as a default value. JAVA: DEFAUTL_VALUE contains a Java class that will be run to generate a default value. Expanded Columns
4.10.
You may have a case where the number of columns in the document must be determined at run time. For example, a budget integrator uploading to an interface table containing 60 period columns (PERIOD1_AMOUNT, PERIOD2_AMOUNT,PERIOD60_AMOUNT) would require this functionality. The range of periods the user requires in the document could not be determined at design time. The expanded columns functionality allows an integrator developer to specify a SQL statement that will be used at run time to retrieve the list of columns and column headers. Follow the instructions below to enable expanded columns.
Use the Web ADI Interface Cols Integrator to identify each column in the interface table that could possibly exist in the document. Assign each column to a GROUP called PERIODAMTS Enter EXPANDEDSQLSEG for VAL_TYPE. Mapping Enabled = Y. Type = 1 Display = N Set the SEGMENT_NUMBER sequentially to indicate the order that the columns are to be displayed in the document. This number is also used to match the column name returned from BNE_EXPANDED_COLS_SQL with a column in the document.
4.10.2. Create one record in the spreadsheet to be the Parent segment of the interface columns. This is the row that will be selectable in the LAYOUTS screen. 4.10.2.1. 4.10.2.2. 4.10.2.3. 4.10.2.4. 4.10.2.5. 4.10.2.6. Group Name=PERIODAMTS Val Type = EXPANDEDSQL OA Concat Flex = N Type = 2 Display = Y Mapping Enabled = N
4.10.3. Create a Layout that includes the parent segment by selecting Define Layout from the PHP. Select your integrator and include the parent segment in the lines region of the layout. 4.10.4. Insert into BNE_INTERFACE_COLS_B. EXPANDED_SQL_QUERY for the parent record. 4.10.4.1.1. Define a SQL statement that returns the Group column names and Segment Number reference. This statement should return a result set of 2 fields. The first will be interpreted as the Column name visible to the user. The second will be used to link with the segment number within the Group. This allows Web ADI to link a name with an interface column. Note that bind variables can be used so the SQL statement can be edited at run-time. Example: SELECT PERIOD_NAME, PERIOD_NUM FROM GL_PERIOD_STATUSES WHERE PERIOD_YEAR = 2002 AND APPLICATION_ID = 101 AND SET_OF_BOOKS_ID = 1 AND PERIOD_NUM >= $PARAMS$.PERIODFROM AND PERIOD_NUM <= $PARAMS$.PERIODTO 4.10.4.1.2. When the create doc service is called with the layout that contains the parent segment. Web ADI will run the SQL statement above to determine what segments in the group will appear in the spreadsheet. In the example above, the values for the PERIODFROM PERIODTO parameters would be passed in the http request when the Web ADI service is called at run-time. See calling the Create Doc Page Flow for more information on calling the Web ADI service.
30 Company Confidential - For internal use only
5. Creating Components
A component is an object defined in metadata that provides a list of values for a field in a document. They are the values specified in VAL_COMPONENT_APP_ID and VAL_COMPONENT_CODE in BNE_INTERFACE_COLS_B.
Attention: You must make sure that the code you plug into the Web ADI SDK is functionally secure. Users must be prevented from manipulating a URL or a value in the worksheet that would give them access to restricted values.
5.1.
5.1.1.
Create Component
Insert a record into BNE_COMPONENTS_B and TL tables. This record registers the component and tells Web ADI what Java class to reference when retrieving the LOV and performing validation. APPLICATION_ID COMPONENT_CODE OBJECT_VERSION_NUMBER COMPONENT_JAVA_CLASS PARAM_LIST_APP_ID PARAM_LIST_CODE LANGUAGE SOURCE_LANG USER_NAME The identifier for your application A unique code within your application ID for the component. Set this to 1 Set this to BneOAValueSet The identifier for your application Se t this to the code you create in 5.1.2 Set this to US Set this to US This user value is currently not used by the application.
5.1.2.
This list contains all of the parameters required by the LOV component. Lists have a one to one relationship with Table Validated components. 5.1.2.1. Access the Parameter List UI and enter a name and Code for your parameter list. Make the name meaningful and relate it to the field. The Code needs to be the Code you entered for the component in BNE_COMPONENTS_B.PARAM_LIST_CODE. Check the Persistent Box and add comments if needed. Press Save when finished. Add the Following Parameters to the Parameter list by pressing Add Another Row.
5.1.2.2.
table-column-alias If the table-select-column does not exist in tablecolumns, then enter the table-select-column here to create an alias for the table-column you wish to have inserted into the sheet. This is a comma delimited list. Copy the 231:TABLE_COLUMN_ALIAS parameter definition under your own application ID and use the copy for this parameter. table-select-column Enter the BNE_INTERFACE_COLS_B.INTERFACE_COL_NAM E of the column you wish the selected LOV to update in the document Copy the 231:TABLE_SELECT_COLUMN parameter definition under your own application ID and use the copy for this parameter table-columns Enter the select columns in the query specified in BNE_INTERFACE_COLS_B to be displayed in the lOV. That is, enter one or all values specified in VAL_DESC_COL, VAL_ID_COL VAL_MEAN_COL VAL_MSG_COL. This is a comma delimited list. Copy the 231:TABLE_COLUMNS parameter definition under your own application ID and use the copy for this parameter.
The following parameters are not required for the LOV parameter list. Only add them if you wish to override default behavior:
table-block-size (Use default from definition This determines the number of records that will be displayed in the LOV at one time) Copy the 231:TABLE_BLOCK_SIZE parameter definition under your own application ID and use the copy for this parameter. 10
Default used when this parameter is not added to the list Parameter Name Value Description Parameter Definition
window-height (Use default from definition this indicates the height of the display window) Copy the 231:WINDOW_HEIGHT parameter
Default used when this parameter is not added to the list Parameter Name Value Description Parameter Definition
definition under your own application ID and use the copy for this parameter. 450
window-width (Use default from definition this indicates the width of the display window) Copy the 231:WINDOW_WIDTH parameter definition under your own application ID and use the copy for this parameter. 350
Default used when this parameter is not added to the list Parameter Name Value Description Parameter Definition
window-start-position (Leave blank to use default this is where the LOV window will first appear on the screen). Copy the 231:WINDOW_START_POS parameter definition under your own application ID and use the copy for this parameter Windows default
The parameter definitions you created for the parameters above can be re-used when creating more than one table validated component within your application. The following two parameters will require a new definition to be created every time a parameter list is created for a table validated component. This is because their values are translated and specific to each LOV. Parameter Name Value table-headers Leave blank to use default in parameter definition this is Comma-delimited list of table column headers that will appear in the LOV screen. Press the Definition Button to create definition
Table-headers {Name of Interface Column} (Integrator Name):Components Data Comma-delimited list of table column headers. This parameter has an individual parameter definition so it can get translated default values. String (Enter the headers of each column you wish to appear in the LOV) Checked 100
Display Size
100
Name Value Description Parameter Definition Definition: Name Source Category Description Data Type Default Value Store as Translatable Max Size Display Size
window-caption (Leave blank to use default in parameter definition this is the title to be placed on window caption bar) Enter meaningful description Press the Definition Button to create definition
Window-caption {Name of Inter face column} (Integrator Name):Components Data This is what is displayed in the window caption String Enter what you want to be displayed in the LOV windows caption. Checked 100 100
5.1.3. 5.1.3.1.
Assign Component to a field in BNE_INTERFACE_COLS_B Identify the Interface Column in BNE_INTERFACE_COLS_B that will use the component. You can use the Web ADI Interface Cols Integrator to download your interface column metadata. Update the VAL_COMPONENT_CODE and VAL_COMPONENT_APP_ID (Valid Component) columns in the spreadsheet created by the Web ADI Interface Cols Integrator.
5.1.3.2.
Description Object Code of the Interface. Select INTERFACE_CODE, INTERFACE_NAME from BNE_INTERFACES_B to get this value. Unique ID for every record that is assigned to the same Application ID/ INTERFACE_CODE. So you could have the same SEQUENCE_NUM for two records in this table, but they would have to be assigned to different AppID/Interface Code combinations. Key to Component Application ID that was used to create the above component
5.2.
Your field may require an LOV or validation that is more complex than Table Validation. Valid fields could depend on a number of parameters, including some entered or existing in the document. Complex business rules will require the creation of a Java Validated record in BNE_INTERFACE_COLS_B. Creating a Java validated field involves the following steps: 9 Create Java Class
9 9 9 9 9
Enter a record for the component into BNE_COMPONENTS_B/_TL Create Parameter List for the component Create parameter definitions for the class Attach Parameters required by the class to the Parameter List Assign Component to a column in BNE_INTERFACE_COLS_B. This includes putting the component key in VAL_COMPONENT_CODE, an application ID in BNE_VAL_COMPONENT_APP_ID and entering the Java Class in VAL_OBJ_NAME. Java validation includes the following two types of functionality; provide List of Values for fields in the Web ADI documents and validation of data at upload time. For the purposes of this document, each shall be referred to as LOVs (List of Values) and Upload Validators respectively. Java Validation allows business rules to be used for the following purposes: To determine the data to be displayed to a user in an LOV. To determine whether a value is valid prior to uploading it to the database. There are three main Java classes associated with Java Validation:
1.1.1.1
SQL Java Class This class contains all of the SQL queries required for Java Validation: including LOVs and Upload Validators.
1.1.1.2
Validator Java Class This class contains all the business logic for Java Validation: including LOVs and Upload Validators. The LOV code is separate to the Upload Validator code, but the code for both is maintained in this class. For more complex solutions where the validation of one interface column is conditional upon the validation of one or more other interface columns, a Group Validator will need to be implemented. For example: if any one of three columns is required to contain a value at the time of upload, but none of the columns is defined as a required column, then a Group Validator can be used at Upload time to ensure that one of the three columns contains a value.
1.1.1.3
Component Java Class This class contains all the business logic and setup information for generating the List of Values (LOV) page in the Web ADI document. This class is not required for the implementation of an Upload Validator. As part of the Java Validation implementation, metadata corresponding to the LOV and Upload Validator must be seeded in the BNE database schema. Sample metadata and sample Java Classes are included in the Appendices of this document.
This documentation assumes that you already have fundamental Web ADI objects created, i.e. an Integrator, Interface, Interface Columns, Layout and Mapping. NOTE: Only experienced Java developers should write the three Java classes required to implement an LOV or Upload Validator. 1.1.1.4 Naming Standards The following naming standard is a guideline for naming your Java classes: Prefix each class name with your application short name, e.g. Bne, Gl, etc. Suffix with SQL/Validator/Component depending on the type of class being written.
Use the same name for all three classes that make up the LOV and/or Upload Validator. This usually includes the name of the field in the Web ADI document for which the Java Validation is being implemented. e.g. ApplFieldNameSQL, ApplFieldNameValidator, ApplFieldNameComponent; or BnePeriodNameSQL, BnePeriodNameValidator, BnePeriodNameComponent Use the Java standard of InitCaps for your class names, as shown in the example above.
Both queries are required to ensure that a more accurate and meaningful error message is displayed to the user. For a Java Validator that incorporates several business rules, several queries may be used to generate different Lists of Values dependent on the business rules. The following two examples help to illustrate how this can be done: Example 1 Generic example: IF A and B THEN
Generate List of Values C ELSE IF A Generate List of Values D ELSE Generate List of Values E END IF Example 2 Period Name example: IF an Accounting Date has been entered in the spreadsheet THEN Generate a List of all Periods that include the Accounting Date ELSE Generate a List of all Open or Future Enterable Periods END IF 1.1.1.5 Implementing the SQL Java Class This class must be written as a public class that extends BneBaseSQL. The class only requires a Constructor method. For a Validator/LOV requiring only one SQL query, the following signature should be used for the Constructor:
public BneApplFieldNameSQL(BneWebAppsContext context, String extraSQL)
For a Validator/LOV requiring two or more SQL queries, the following signature should be used for this Constructor:
public BneApplFieldNameSQL(BneWebAppsContext context, int queryNumber, String extraSQL)
The parameters for the SQL Java class Constructor are as follows:
Parameter Context queryNumber extraSQL Value, Description 800, this is the Application ID for Oracle HR. Object version.
1.1.1.6
context This parameter contains all the JDBC session information required to prepare the SQL query.
1.1.1.7
queryNumber This parameter is used to identify the query to be prepared when the Constructor is called. A switch statement is used to hold the different queries using a number to represent each case. It is important to include a default case in the switch statement to handle any invalid query numbers. For example:
switch (queryNumber) { case 1: query.append(SELECT ); break; case 2: query.append(SELECT ); break; default: throw IllegalArgumentException (with meaningful message); }
extraSQL This parameter is used to pass the value selected from the LOV by the user in the Web ADI document. This is only used by the Upload validator, and is appended to the appropriate query to restrict the results using the user-selected value. The pseudocode for the SQL Java class Constructor is as follows:
Build up the query in a StringBuffer Append the string in the extraSQL parameter to the StringBuffer if the extraSQL parameter is not null Call the BneBaseSQL.setQuery method to prepare the SQL query
To summarise how this class will be used: The SQL queries in this class will be run: Firstly to generate the List of Values to be displayed in the List of Values page; and Secondly, to validate the user-selected value at upload time.
For Upload Validation extra SQL is appended to the Where criteria of the query limiting the query results to values matching the user-selected value. Therefore, the value being uploaded is only valid if one or more rows are returned by the query, and invalid when no rows are returned.
There are two types of Java validators: Field Validators and Group Validators. Field Validators Individual interface columns can be validated using a field validator. This is the most common type of validator. Other interface column values for the same record that have been entered in the spreadsheet can be used to help validate the individual interface column. Group Validators An interface column can be part of a group. All columns that form part of the group are validated as a complete set of columns. For example, the SEGMENT columns in the GL_INTERFACE table that make up an Accounting Flexfield account need to be validated as a complete set, not as individual values. So, by identifying each SEGMENT column as being part of an ACCOUNTING_FLEXFIELD_GROUP, when group validation is performed, all of the segment values for the group are collected and validated together as a set. The metadata and code together determine whether a validator is a field or group validator. Refer to the section: Metadata for Java Validation.
1.1.1.8
Implementing a Field Validator Java Class An individual field validator class should be a public class that extends the BneUploadValidator class. The BneUploadDomainInterface and BneUploadValidatorInterface are both implemented in the BneUploadValidator abstract class. All validators should extend the BneUploadValidator class, which provides default implementations of a number of methods in the two Interfaces. The default implementations do not enforce any additional validation.
Methods that MUST be implemented for an Upload Validator startupValidator This method is called once at the beginning of the Upload Validation process. Use this method to perform setup steps that only need to be performed once. For example, look up a profile option value. This value is not different for each row of data, and therefore only needs to be derived once. The signature for this method is as follows:
validateColumn This method is called once for each different value being uploaded for the interface column. If the value being validated is the same as the last value that was validated (in the same upload), the validation will not occur again. The signature for this method is as follows:
public BneUploaderMessage[] validateColumn (BneWebAppsContext context, Hashtable requestParameters, Hashtable columnValues, BneUploadColumn currentColumn)
shutdownValidator This method is called once at the end of the Validation process. Ensure that any SQL handles are closed in this method. The signature for this method is as follows:
public BneUploaderMessage[] shutdownValidator()
Methods that can be optionally implemented The following method can be optionally implemented for an individual field validator: finalValidation This method is processed after all rows have been validated. This allows for validation to be carried out that for the entire set of rows in the Upload document, if required. The signature for this method is as follows:
public BneUploaderMessage[] finalValidation (BneWebAppsContext context, Hashtable requestparameters)
Useful methods provided by the upload interfaces The following protected methods are available for use within your validator class: uploadError This method can be used to simplify the formatting of an Upload Error message. This is an error message and will prevent the upload from occurring. A message should be passed to this method in the msgStr parameter. This message should explain what the error is and how the error can be fixed. The signature for this method is as follows:
protected BneUploaderMessage[] uploadError (BneUploadColumn currentColumn, String msgStr, String className)
uploadException This method can be used to simplify the formatting of an Upload Exception message. This is an error message and will prevent the upload from occurring. Two messages should be passed to this method. The first message should describe the error that has occurred or what caused the error. This message should be passed to the method in the t parameter. The second message should explain how the error can be fixed. This message should be passed to this method in the msgStr parameter. The signature for this method is as follows:
protected BneUploaderMessage[] uploadException (BneUploadColumn currentColumn, String msgStr, String className, Throwable t)
uploadWarning This method can be used to simplify the formatting of a Warning message. This is a warning message only and will not prevent the upload occurring. The signature for this method is as follows:
Methods that MUST be implemented for an LOV getDomainParameters This method must create and return a String array of all the interface column names whose values are required to generate the List of Values. The signature for this method is as follows:
public String[] getDomainParameters ()
getDomainValues This method must generate and return an SQL result set containing the values to be displayed in the List of Values. The signature for this method is as follows:
public BneResultSet getDomainValues (BneWebAppsContext context, Hashtable columnValues, BneCompositeSQLCriteria criteria) throws BneException
Run the SQL (from the SQL class) passing any values required for binding e.g. Any other required values from the columnValues hashtable, Any other required values (derived within the class) Return the SQL result set
Methods that can be optionally implemented for an LOV shutdownValidator This method is called once at the end of the LOV/Validation process. Ensure that any SQL handles are closed in this method. The signature for this method is as follows:
public BneUploaderMessage[] shutdownValidator()
validateGroup This method validates a group of values in a single row. It is called repeatedly throughout the upload validation process. Access to the entire row of data is available via the columnValues Hashtable. The signature for this method is as follows:
public BneUploaderMessage[] validateGroup (BneWebAppsContext context, Hashtable requestParameters, Hashtable columnValues, BneInterface bneinterface,
BneInterfaceCol
interfaceCol)
shutdownValidator This method is called once at the end of the LOV/Validation process. Ensure that any SQL handles are closed in this method. The signature for this method is as follows:
public BneUploaderMessage[] shutdownValidator()
Methods that can be optionally implemented for a Group Validator finalValidation This method is processed after all rows have been validated. This allows for validation to be carried out that for the entire set of rows in the Upload document, if required. The signature for this method is as follows:
public BneUploaderMessage[] finalValidation (BneWebAppsContext context, Hashtable requestparameters)
Useful methods provided by the upload interfaces The following protected methods are available for use within your group Validator class: uploadError This method can be used to simplify the formatting of an Upload Error message. This is an error message and will prevent the upload from occurring. A message should be passed to this method in the msgStr parameter. This message should explain what the error is and how the error can be fixed. The signature for this method is as follows:
protected BneUploaderMessage[] uploadError (BneUploadColumn currentColumn, String msgStr, String className)
uploadException This method can be used to simplify the formatting of an Upload Exception message. This is an error message and will prevent the upload from occurring. Two messages should be passed to this method. The first message should describe the error that has occurred or what caused the error. This message should be passed to the method in the t parameter. The second message should explain how the error can be fixed. This message
should be passed to this method in the msgStr parameter. The signature for this method is as follows:
protected BneUploaderMessage[] uploadException (BneUploadColumn currentColumn, String msgStr, String className, Throwable t)
4.
1.1.1.9
table-detail
false
Default 10 false
Description Oracle UIX Elements to display in the table detail. Determines the number of records to display. Determines if the results are too long to display and restricts first; values are; { true, false } Select column, comma-seperated list of columns to be selected. If aliases exist then use the alias name. Example: NAME,DEPT Display table selection; values are; {true, false} Type of table selection; values are; { SINGLE , MULTIPLE }" Display table filter on select columns; values are; {true, false} Determines if the form is enabled, values are; { true, false } Title to place on window caption bar. Display position of window, values are; {default, manual, centerOwner, centerScreen} Determines if the form window is movable. Width of display window. Height of display window Top position of display window. Left position of display window.
table-select-column
Must be text.
true, false _SINGLE_SELECTION, _MULTIPLE_SELECTION true, false true, false Must be text. default, manual, centerOwner, centerScreen true, false Must be a number. Must be a number. Must be a number. Must be a number. Table 1 Hard-Coded Defaults
Business logic is usually incorporated in the Validator class, however, the same logic can be used in the Component class to determine the type of LOV that is displayed. For example, for a date field, a Calendar may be displayed in one case, but a list of specific dates in another case.
Parameter
Description
context
Parameter
Description
page event
and providing access to generic Baja services. Identifies the LOV page. Interface for events triggered on the page. Encapsulates a servlet request.
getListOfValueParameters method This is an abstract method within the BneAbstractListOfValues class and therefore requires an implementation within the Component class. This method creates a BneParameterList object consisting of one record for each parameter in the parameter list created by the getDomainParameters method call. Each record consists of the Parameter name and a description for the parameter in the format Oracle Applications GL_INTERFACE.<parameter_name> field.. The signature for this method is as follows:
public void getListOfValueParameters ()
handleListOfValues method This is an abstract method within the BneAbstractListOfValues class and therefore requires an implementation within the Component class. This class calls public methods to set up the information for the table that will be displayed in the LOV, for example: setTableFilter, setPageTitle, setTableData, setTableColumns, setTableHeaders, and setTableSelectColumn. Return null from this method. The signature for this method is as follows:
public BneBajaPage handleListOfValues (BneBajaContext context, Page page, PageEvent event, BneLOVControlBean bean) throws BneException
Parameter
Description
Interface providing context information about the current request, and providing access to generic Baja services. Identifies the LOV page. Interface for events triggered on the page. Encapsulates a servlet request. Holds information about the LOV control.
Set the LOV table data using public methods: TableFilter PageTitle TableData TableColumns TableHeaders TableSelectColumns
handlePageParameters method This method retrieves the filter field and filter value from the LOV page using an Http Request. Two String instance variables need to be defined to hold these two values: m_filterField and m_filterValue.The signature for this method is as follows:
private void handlePageParameters (BneBajaContext context, Page page, PageEvent event) throws BneException
Parameter
Description
Interface providing context information about the current request, and providing access to generic Baja services. Identifies the LOV page. Interface for events triggered on the page. Encapsulates a servlet request.
getTableData method This method generates the result set for the LOV by calling the Validator class getDomainValues method. This method processes each record in the result set returned by the getDomainValues method to create a Vector containing all the valid values for the LOV. A DictionaryData construct is created using the data in the Vector. This Validator class shutdownValidator method is called to close off any open SQL handles. The signature for this method is as follows:
public DictionaryData [] getTableData (BneWebAppsContext bneWebAppsContext, BneLOVControlBean bean, Hashtable parameterValues, BneCompositeSQLCriteria criteria) throws BneException
Parameter
Description
This is the BneWebAppsContext that provides us with a valid session to use when preparing the SQL statement. Holds information about the LOV control. This is a hashtable containing the list of all columns and their values which are required for the SQL to derive the list of values. This is of type BneCompositeSQLCriteria and contains all the details for the Component LOV.
getLOVProcessorType method This is an abstract method within the BneAbstractListOfValues class and therefore requires an implementation within the Component class. This method must return an LOV type. The LOV types have been defined using the following constants (include java class oracle.apps.bne.framework.BneConstants to use these contants):
Description Data in the LOV page will be formatted in a table. Not currently used. Used for DFF and KFF LOVs. A date picker will be displayed in the LOV page.
The LOV Processor Type is set at the time the Document is created. The signature for this method is as follows:
public String getLOVProcessorType()
getComponentName method This method returns a hard-coded string containing the name of the component, i.e. BneOAFieldName. getComponentVersion method This method returns a hard-coded string containing the revision number of the component. Use the token $ Revision: $ as your string. This will return the current revision number for the Component class.
Integrator Developers should use the Parameter UI supplied with Web ADI to create the Parameter List, Parameter List Items and Parameter Definitions. The Parameter UI can be accessed using the following URL: http://server:port/oa_servlets/oracle.apps.bne.webui.BneApplicationService?bne:page=BneParameter This section describes each of the columns in the tables listed above. Sample metadata is included in Appendix D - Sample Metadata for the Period Name Java Validation.
Size 15 30 15
Description Application ID eg. 101 for Oracle General Ledger Unique parameter definition code. Must be all Caps Underscores are acceptable. This is a version number for the Parameter Definition. Set to 1 on creation. Increment this number every time a value changes for any of the columns in this record. A meaningful name/description of the Parameter
PARAM_NAME
VARCHAR2
240
Column Name PARAM_SOURCE PARAM_CATEGORY DATATYPE DEFAULT_REQUIRED_FLAG DEFAULT_VISIBLE_FLAG DEFAULT_USER_MODIFYABLE_FLAG DEFAULT_STRING DEFAULT_DATE DEFAULT_NUMBER DEFAULT_BOOLEAN_FLAG DEFAULT_FORMULA VAL_TYPE MAX_SIZE DISPLAY_TYPE DISPLAY_STYLE DISPLAY_SIZE
Data Type VARCHAR2 NUMBER NUMBER VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 DATE NUMBER VARCHAR2 VARCHAR2 VARCHAR2 NUMBER NUMBER NUMBER NUMBER
Description Definition. This is the source requiring the parameter definition. This is a text entry field. Categorys include: Miscellaneous, Position, Appearance, Behaviour, Data, Field. Data Types include: String, Number, Date, Boolean. Is a value required for this parameter? Y/N Is this parameter visible to the user? Y/N Is the user able to change this parameter value? Y/N Set a default value of type VARCHAR2. Set a default value of type DATE. Set a default value of type NUMBER. Set a default value of type boolean. Supply a format mask for the default value. Validation types include: None, Fnd Lookups, Value Set The maximum size of the parameter value. Display Types include: List Box, CheckBox, Radio Buttons, Text Field, Password Field. Display Styles include: None, Vertical Horizontal The size of the value to be displayed to the user. This should not exceed the MAX_SIZE value.
1 240 2 5 1 1 5
BNE_PARAM_DEFNS_TL
Column Name APPLICATION_ID PARAM_DEFN_CODE LANGUAGE SOURCE_LANG USER_NAME DEFAULT_STRING DEFAULT_DESC PROMPT_LEFT
Data Type NUMBER VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2
Description Application ID eg. 101 for Oracle General Ledger Unique parameter definition code. Must be all Caps Underscores are acceptable. Standard Apps Language column. Standard Apps Language column. A meaningful name/description of the Parameter Definition. Set a default value of type VARCHAR2. This is defined in the TL table when the value is to be translated. Set the default description for the parameter. This is an internal representation of the Component parameter and must match an appropriate Component parameter name. See Table Hard-Coded Defaults. This is an internal representation of the Component parameter and must match an appropriate Component parameter name. See Table Hard-Coded Defaults. Describe the purpose of the parameter to the user.
PROMPT_ABOVE
VARCHAR2
240
USER_TIP
VARCHAR2
2000
Size 15 30 15
Description Application ID eg. 101 for Oracle General Ledger Unique parameter list code. Must be all Caps Underscores are acceptable. This is a version number for the Parameter List. Set to 1 on creation. Increment this number every time a value changes for any of the columns in this record. Set to Y to mark this as a permanent parameter list. Comments describing what the list is used for.
PERSISTENT_FLAG COMMENTS
VARCHAR2 VARCHAR2
1 240
BNE_PARAM_LISTS_TL
Size 15 30 4 4 240
Description Application ID eg. 101 for Oracle General Ledger Unique parameter list code. Must be all Caps Underscores are acceptable. Standard Apps Language column. Standard Apps Language column. A meaningful name for the Parameter List.
Size 15 30
Description Application ID eg. 101 for Oracle General Ledger Unique parameter list code. Must be all Caps Underscores are acceptable. (This is the same value used for the Param List in section 2.6.4) Each parameter in a single parameter list must have a unique number. Numbering must start at 1 and increment by one for each parameter. The Parameter Definition Application ID eg. 101 for Oracle General Ledger The unique Parameter Definition code. Set a value of type VARCHAR2. Set a value of type DATE. Set a value of type NUMBER. Set a value of type boolean. Supply a format mask for the value. Description for the value. This is usually the same as the parameter value defined in one of the VALUE columns.
SEQUENCE_NUM
NUMBER
15
PARAM_DEFN_APP_ID (FK1) PARAM_DEFN_CODE (FK1) STRING_VALUE DATE_VALUE NUMBER_VALUE BOOLEAN_VALUE_FLAG FORMULA_VALUE DESC_VALUE
15 30 2000
1 240 240
Column Name
Data Type
Size
Description
Size 15 30
Description This is the APPLICATION_ID for your Application, e.g. The APPLICATION_ID for GL is 101. Unique Component code. This should be as meaningful as possible for the Component, e.g. GL_ACCOUNTING_DATE_COMPONENT. Must be all caps. This is a version number for the Component. Set to 1 on creation. Increment this number every time a value changes for any of the columns in this record. This must be the fully qualified Component java class name, e.g. oracle.apps.bne.integrator.components.BneFieldNameComp onent The Parameter List Application ID. The Parameter List Code.
OBJECT_VERSION_NUMBER
NUMBER
15
COMPONENT_JAVA_CLASS
VARCHAR2
240
NUMBER VARCHAR2
15 30
BNE_COMPONENTS_TL
Size 15 30
Description This is the APPLICATION_ID for your Application, e.g. The APPLICATION_ID for GL is 101. Unique Component code. This should be as meaningful as possible for the Component, e.g. GL_ACCOUNTING_DATE_COMPONENT. Must be all caps. Standard Apps Language column. Standard Apps Language column. A meaningful name for the Component.
4 4 240
Size 15
Size 30
Description APPLICATION_ID for GL is 101. Unique Interface code. This should be as meaningful as possible for the Interface, e.g. GL_INTERFACE_115. Must be all caps. This is a version number for the Interface Column. Set to 1 on creation. Increment this number every time a value changes for any of the columns in this record. Each interface column for a single Interface must have a unique number. Numbering must start at 1 and increment by one for each interface column. The validation type for Java validators is always JAVA. This must be the fully qualified Validator java class name, e.g. oracle.apps.bne.integrator.validators.BneFieldNameValidat or The Component Application ID. The Component Code. LOV Types include: NONE, STANDARD, POPLIST. For Java LOV Components, the type will always be STANDARD. This only applies to Oracle Sales Offline. Set this to N.
OBJECT_VERSION_NUMBER
NUMBER
15
SEQUENCE_NUM
NUMBER
15
VAL_TYPE VAL_OBJ_NAME
VARCHAR2 VARCHAR2
20 240
15 30 30
OFFLINE_LOV_ENABLED_FLAG
VARCHAR2
1.1.1.12
Group Validator/LOV A new record is created in the BNE_INTERFACE_COLS tables for the Validation Group. The exising Interface Column records for the columns to be included in the group validation are updated to be a part of the group. BNE_INTERFACE_COLS_B - Validation Group A new Interface Column is defined for the Group Validator. Metadata for this new interface column should be as follows: (Refer to Appendix E for a Group Validator metadata example)
Size 15 30
Description This is the APPLICATION_ID for your Application, e.g. The APPLICATION_ID for GL is 101. Unique Interface code. This should be as meaningful as possible for the Interface, e.g. GL_INTERFACE_115. Must be all caps. Each interface column for a single Interface must have a unique number. Numbering must start at 1 and increment by one for each interface column. As the parent of a Group, the interface column type must be set to 2. This is the name of the Group with _PARENT appended to it. Is the group/parent column enabled? Y/N The Group Validator will always run when pre-validation is checked in the Upload Parameters page. This column is not used. This is set to the default of N. This column is not used. This is set to the default of N. This column is not used. This is set to the default of N. This column is not used. This is set to the default of N. This column is not used. This is set to the default of N. This is the name of the group. The group/parent interface column and all interface columns to be included in the group must have the same GROUP_NAME.
SEQUENCE_NUM
NUMBER
15
INTERFACE_COL_TYPE INTERFACE_COL_NAME ENABLED_FLAG REQUIRED_FLAG DISPLAY_FLAG READ_ONLY_FLAG NOT_NULL_FLAG SUMMARY_FLAG MAPPING_ENABLED_FLAG GROUP_NAME
NUMBER VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2
15 50 1 1 1 1 1 1 1 30
Size 20 240
Description The Validation Type must be set to GROUP. This must be the fully qualified GroupValidator java class name, e.g. oracle.apps.bne.integrator.validators.BneGroupNameGroup Validator This column is not used. This is set to the default of NONE. This column is not used. This is set to the default of N.
LOV_TYPE OFFLINE_LOV_ENABLED_FLAG
VARCHAR2 VARCHAR2
30 1
BNE_INTERFACE_COLS_B Interface Columns included in the Validation Group For each Interface Column to be validated by the Group Validator/LOV, update the GROUP_NAME column to contain the GROUP_NAME defined by the new Interface Column definition (see above).
Size 15 30 15
Description This is the APPLICATION_ID for your Application, e.g. The APPLICATION_ID for GL is 101. Unique Interface code. This should be as meaningful as possible for the Interface, e.g. GL_INTERFACE_115. Must be all caps. Each interface column for a single Interface must have a unique number. Numbering must start at 1 and increment by one for each interface column. The GROUP_NAME defined against the Group/Parent interface column must be inserted in this column for all Interface Columns to be included in the Group Validation.
GROUP_NAME
VARCHAR2
30
6. Defining an Importer
If an Integrator is uploading to interface tables, it is possible to have Web ADI automatically invoke the program used to move data from the interface tables to application base tables. The upload process will call the import program after records have been inserted into the interface tables. The results of the import program can be retrieved to users. All the information Web ADI needs to call the import program is defined in metadata. The following steps to define an Importer: 9 9 9 Indicate Importer type Define master parameter list Define a parameter list for each parameter (step) in the master list
6.1.
You must choose what import type your integrator will use, then update Web ADI metadata. 6.1.1. Asynchronous Concurrent Request
An asynchronous concurrent request will run in the background after records are inserted into interface tables. The results of the import program are not returned to the user, so they may not know if the data has been imported successfully. Only the request ID is returned, assuring the user that the import process was invoked successfully. Pre-validation functionality offered by Web ADI is usually used with this type of import. Pre-validation should mirror the validation done by the import program. If data is found to be invalid, error messages will be returned to user, records will not be inserted into interface tables, and the import process will not be invoked. This is done to assure users that the data they have uploaded will reach application base tables by successfully passing validation done by the asynchronous concurrent request. Although extra development time may be required to offer pre-validation, Oracle Application System administrators are give flexibility in load balancing resources used for importing data. Users may experience faster upload times compared to the other two methods since the completion of an upload is not dependent on the import program completing. 6.1.2. Synchronous concurrent request
A synchronous concurrent request call will be monitored by Web ADI until its completion. The results of the import program will be returned to users. Prevalidation is not a necessity in this case, since the validation built into the import program is used to generate messages that will be returned to the desktop. Performance may be an issue with this type of import. End users will not complete their upload process until the concurrent request has finished. Oracle Application System administrators must assure that the concurrent requests finish quickly for Web ADI users to avoid long upload wait times. Unlike the asynchronous call, the import program must be called every time an upload is done. Having many users uploading data may put a substantial load on resources during peak hours.
6.1.3.
PL/SQL API
A PL/SQL API call is similar to the synchronous concurrent request call in that Web ADI waits for the import program to finish, and returns messages to the desktop. However, the concurrent request queuing process is not used. The import program is called directly, insuring that the import is run immediately. This eliminates upload wait time due to the concurrent request queuing process, but server resource issues remain since the import program must be called every time an upload is done. 6.1.4. Enter Import type for your Integrator
Update BNE_INTEGRATORS_B.IMPORT_TYPE to indicate the type of import to use. The following values are valid:
Value 1 2 3 Description Asynchronous concurrent request Synchronous concurrent request PL/SQL API
6.2.
The import process is broken down into individual steps/processes that need to occur to perform an import. These steps are metadata driven and can be arranged differently to cater to each type of import. The steps are defined within a master parameter list assigned to the Integrator. With exception to the SUCCESS_MESSAGE, each step/parameter in the master list has its own parameter list to provide the required metadata to complete its part of the import process. 6.2.1. 6.2.1.1. Create Parameter List Access the Parameter list UI and enter a name for your import parameter list. It should be in the form of: (Integrator Name): Import Master List. A parameter list ID will be given as soon as you press Save. Associate the parameter list with your integrator by inserting the PARAM_LIST_ID created above into BNE__INTEGRATORS.IMPORT_PARAM_LIST Attach Parameters to Master List
6.2.1.2.
6.2.2.
The parameters within the master list provide an ordered sequence of basic steps that are to be executed to either retrieve data for other steps in the import or to perform the import. Results of previous steps can be used to execute another step in the list. An IMPORT hashtable exists to provide cashing for values that have been retrieved from steps that have been executed. There are six different types of import steps that can be used to together in performing an import:
Step Name SQL 58 Company Confidential - For internal use only Description A SQL Statement
Step Name PLSQL CONCURRENT_REQUEST SEQUENCE GROUP SUCCESS_MESSAGE ROW_MAPPING ERRORED_ROWS ERROR_LOOKUP CLEANUP_SQL CLEANUP_PLSQL
Description A PL/SQL API call A call to the concurrent request submission API The retrieval of the next value of a sequence The setting up a collection of values to be used as a group. The import process will repeat for each unique key established by the group. A message definition to be returned to the user if the import succeeds. A column mapping between the interface columns and the row ID of the sheet A column definition that can identify which interface table rows that have not successfully imported. A SQL query to lookup the values of rows that have failed to import Run a SQL statement if an exception occurs during any of the upload steps. Run a PL/SQL API if an exception occurs during any of the upload steps.
6.2.2.1.
Master List Rules for Each Import Type Asynchronous Concurrent Request An asynchronous concurrent request call requires a call to FND_REQUEST.SUBMIT_REQUEST and the request ID is returned to the viewer. The rules relating to an asynchronous request are: There must be at least 1 step which is of type CONCURRENT_REQUEST. There must only be one CONCURRENT_REQUEST. There can be any number of PL/SQL, SQL, and sequence steps before the concurrent request. There can be a GROUP step to define what the grouping of rows will be, but there only must be at most one group definition. There may be multiple success messages. There may be a row mapping but one is not required for an import. If a success message is not defined then a standard Web ADI success message will be returned. There must not be any ERROR_LOOKUP, ERRORED_ROWS steps. There may be only one CLEANUP_SQL or CLEANUP_PLSQL step, but not both. The associated parameter lists with each of these parameters will define what the metadata is for the individual steps. Synchronous Concurrent Request Web ADI monitors the concurrent request until it has finished and returns the result of the import to the desktop application. The setup is similar to the Asynchronous call, but ROW_MAPPING, ERRORED_ROWS and ERROR_LOOKUP steps are required. The row mapping provides a oneto-one relationship between the rows in the spreadsheet and the rows in the interface table. This mapping is important for a synchronous Importer as it is the mechanism to report back to users the rows in the spreadsheet that have failed the import.
The rules for a concurrent request are: There must be at least 4 steps: a CONCURRENT_REQUEST, ERRORED_ROWS, ERROR_LOOKUP and ROW_MAPPING. There must only be one ROW_MAPPING, one ERROR_LOOKUP, one ERRORED_ROWS and one CONCURRENT_REQUEST. The CONCURRENT_REQUEST must be followed by the ERRORED_ROWS step, which in turn be followed by the ERROR_LOOKUP step. There can be any number of PL/SQL, SQL, and sequence steps before the concurrent request. There can be a GROUP step to define what the grouping of rows will be, but there only must be at most one group definition. There may be multiple success messages. If a success message is not defined then a standard Web ADI success message will be returned. There may be only one CLEANUP_SQL or CLEANUP_PLSQL step, but not both.
PL/SQL API Call The PL/SQL API call is used when a concurrent request is not to be used as the method of import. An API call does not include a CONCURRENT_REQUEST step. The rules for a PL/SQL API call are: 6.2.2.2. There must be at least one PL/SQL import step. There can be any number of PL/SQL, SQL and sequence calls, but the last call must be PL/SQL. There may be multiple success messages. If a success message is not defined then a standard Web ADI success message will be returned. A single ROW_MAPPING may be defined for the PL/SQL API. A single ERROR_ ROWS may be performed after the PL/SQL API has been called, only if a ROW_MAPPING and single ERROR_LOOKUP exist. The ERRORED_ROWS step must be followed by the ERROR_LOOKUP step. There can be a GROUP step to define what the grouping of rows will be, but there only must be at most one group definition. There must not be any CONCURRENT_REQUEST steps. There may be only one CLEANUP_SQL or CLEANUP_PLSQL step, but not both View the descriptions of each step in 6.3 and add the steps to the master parameter list using the Add Another Row button in the Parameter UI. Use the Step Names described in 6.2.2 for the Parameter Name.
6.3.
Parameter lists and Attributes will need to be defined for each step in the master list. See the selections below for instructions on setting up the metadata for each type of import step. 6.3.1. SQL statement
The SQL statement step type defines the metadata required to perform a SQL clause. If the SQL is a select statement then the values that have been selected can be retrieved back into the collection that is stored for retrieving values from queries that have been executed. Bind variables can be used to define the inputs of the query and Return variables are used to retrieve values from the SQL. Bind variables are used to define Insert and Update statements without knowing the data at design time. The return variables are used in select statements, and represent the columns in the select declaration. Return values are values from columns defined in the select declaration section of the select query (e.g. status from select status from gl_interface). To enable a SQL statement step: 6.3.1.1. 6.3.1.2. Create a new parameter list through the parameter UI. Name the parameter list: (Integrator Name): SQL Step. Enter the parameters for the SQL step parameter list. The first parameter in the list is the SQL statement that is to be executed and the rest of the parameters identify bind/return variables. Below is an example of a SQL step parameter list. The SQL statement is defined in the first parameter and the bind variables used in the SQL statement are defined thereafter:
6.3.1.2.1.
Press Add Another Row to define the SQL statement to run. Once the Define Parameter window opens, set the Data Type to String, and enter the SQL statement into the Value field. Use the following format for a SQL statement: SELECT column_names FROM table_names WHERE column = $PARAM$.parameter_name. DO NOT enter a semi-colon at the end of the SQL statement.
Company Confidential - For internal use only
61
6.3.1.2.2.
Press Add Another Row to define the parameters being used in the SQL statement. The name of the parameter is used to map between the SQL statement and the bind/return variables. In the above definition, the $PARAM$.parameter_name is replaced with the value that is derived from the metadata for the parameter in the parameter list with the same name (i.e parameter_name). This method of replacing $PARAM$ tokens with the associated parameter values works for any SQL statement. The parameter in the SQL statement must be the same case as the parameter name in the list. For select statements, the column_names also needs to be defined as parameters in the list. Make sure to the name of the parameter matches the colum_name in the SQL statement. The parameter in the SQL statement must be the same case as the parameter name in the list.
6.3.1.2.3.
Press the edit button next to the Attributes button in the Parameter Definition screen. The attributes screen will let you enter metadata that determines how the parameter value is derived.
DESCRIPTION Whether the parameter is defining a bind or a return variable. Web ADI stores resulting values for columns in select statements if ATTRIBUTE1=RETURN. The unique name of the bind/return variable to be used in subsequent steps. The value added to the IMPORT hashtable uses the value in this column as the key. The Source the parameter value will be retrieved from.
What value is to be used to get the value from the Source Data type of the bind/return value Position of the return value in the select statement [optional]. Web ADI looks up the value for the parameter in the SQL statement result set by using the column position in the select statement. If no value is supplied for ATTRIBUTE6 or is invalid, then the value will be looked up using the parameter name. Web ADI will have better performance if a valid value is entered in this column.; it will take more time to look up the value if the parameter name is used.
ENV
Value REQUEST
Description Use this source type when parameter values are sent from the upload parameters page. Names (ATTRIBUTE4) need to match the param_name in the parameter list for the UPLOAD_PARAM_LIST.
Note: A limitation of this design is that a above SQL statement is restricted to 6.3.1.3. Enter the parameter list currently ID created in the SQL step parameter in the master list. Open the Define Parameter screen for the SQL 2000 characters.parameter; set the Data Type to Number, and enter the parameter list ID in the Value field.
6.3.1.4.
Example: To execute the SQL call: select je_source_name from gl_je_sources where user_je_source_name = $PARAM$.je_source_param. The je_source_name returned will be stored in the hash table and available for use in a later step. A bind variable will be used to edit the where clause. This value will come from a value the user uploades from the document on the desktop to GL_INTERFACE. USER_JE_SOURCE_NAME. Create the Following Parameters in the SQL step parameter list.
6.3.1.4.1.
Field Name Sequence number Name Value Data Type Sequence number Name SEQ_NUM PARAM_NAME
Description 1 SQL_Statement select je_source_name from gl_je_sources where user_je_source_name = $PARAM$.je_source_name_param String 2 Je_source_name 3 Je_source_param
6.3.1.4.2.
Field Name Value
Define Atributes for each parameter by pressing the edit button next to the Attibutes label in the Define Parameter screen.
For the je_source_name parameter: ATTRIBUTE1 RETURN ATTRIBUTE2 je_source_name 63 Company Confidential - For internal use only
For the je_source_param: ATTRIBUTE1 BIND ATTRIBUTE2 User_je_source_name ATTRIBUTE3 IMPORT ATTRIBUTE4 GL_INTERFACE. USER_JE_SOURCE_NAME ATTRIBUTE5 VARCHAR2 ATTRIBUTE6 1
6.3.1.5.
Enter the parameter list ID created for the SQL step parameter in the master list. Open the Define Parameter screen for the SQL parameter; set the Data Type to Number, and enter the parameter list ID in the Value field.
6.3.2.
The PL/SQL API import step allows for a PL/SQL API to be called to either perform the import or perform setup/value retrieval for the import. The PL/SQL API call will be dynamically generated and values returned from any output parameters will be placed into the IMPORT hash table using the parameter/API name as the key. A parameter list will be created to define the API and the API calls parameters. To enable a PL/SQL API step: 6.3.2.1. 6.3.2.2. Create a parameter list for the PLSQL step. Name it (Integrator Name):PLSQL Step Press the Add Another Row in Define Parameter List screen for the PLSQL step. Name the Parameter: (Procedure Name). Press the edit attributes button to enter information about the PL/SQL procedure.
DESCRIPTION Type of API call. (FUNCTION or PROCEDURE) Name of the PL/SQL function or procedure Function Return Data Type. This must be one of the values defined in rule two of the next section. Whether the return value is used to retrieve the error messages. The returned error message is obtained from the first that provides the message in the following order: FND_MESSAGES, Return Value, Parameter Perform a call to FND_MESSAGES. .
VALID VALUES
Y/N
ATTRIBUTE5
Y/N
6.3.2.3.
Create additional parameters in the list for every parameter in the API call. A record must be created for all the API parameters. Attributes must be defined for every parameter as well. Press the edit attributes button in the Define Parameter screen for each parameter in the list to access the attribute window.
DESCRIPTION PL/SQL parameter name. This name must be unique PL/SQL parameter data type.
VALID VALUES
PL/SQL parameter access. Used for returning error messages. Default value for the PL/SQL parameter. Size of the variable. The source of the value.
BINARY_INTEGER, BOOLEAN, CHAR, CHARACTER, DATE, DEC, DECIMAL, DOUBLE PRECISION, FLOAT, INT, INTEGER, LONG, NATURAL, NCHAR, NUMBER, NUMERIC, NVARCHAR2, PLS_INTEGER, POSITIVE, REAL, SMALLINT, STRING, VARCHAR, VARCHAR2 IN / OUT / INOUT Y/N For a String default value, the default value must be quoted. (I.E. String data value of hello should be defined as hello) IMPORT ENV REQUEST
ATTRIBUTE8 ATTRIBUTE9
ATTRIBUTE10
Name/ID within ATTRIBUTE7 used to identify the value Parameter List ID for mapping between the value provided and the one to be passed into the API parameter Modification clause around parameter (E.g. TO_CHAR(?) )
ATTRIBUTE9 is used to store a Parameter List ID to a parameter list where the parameters provide a mapping between string values. For example, a simple parameter list would convert true/false into Y/N. The records in BNE_PARAM_LIST_ITEMS would look like this:
Column PARAM_NAME STRING_VALUE PARAM_NAME STRING_VALUE DESCRIPTION True Y False N Company Confidential - For internal use only
65
ATTRIBUTE10 is used when the data provided needs to have some formatting applied before it gets passed in as a parameter. This attribute should only be used in very rare cases. The main case where this attribute would be used is for passing a DATE value from the import into a PL/SQL API as a VARCHAR2 parameter. In the situation where a the date is required in MM/ DD/YYYY format, the ATTRIBUTE10 value would be: TO_CHAR(?, MM/DD/YYYY) The ? character is used to represent the parameter being declared.
Value IMPORT
ENV REQUEST
6.3.2.4.
Enter the parameter list ID created above in the PLSQL step parameter in the master list. Open the Define Parameter screen for the PLSQL parameter; set the Data Type to Number, and enter the parameter list ID in the Value field.
6.3.3.
The concurrent request submission step type allows for the definition of the parameters required for a concurrent request. A parameter list is needed to store the definitions the parameters required for calling FND_REQUEST.SUBMIT_REQUEST. 6.3.3.1. Step. 6.3.3.2. Seq
66 Company Confidential - For internal use only
Create a parameter list through the parameter list UI. Give the Parameter list a name in the form of: (Integrator name): Concurrent Request Use the Add Another Row button to add the following parameters to the parameters list. 1
Seq
5N (Add as many parameters to the list as needed by your import program) (Name of parameter) String (Leave Blank)
Seq Name
67
6.3.3.2.1.
Field ATTRIBUTE1 ATTRIBUTE2 ATTRIBUTE3 ATTRIBUTE4
Add the following Attributes to all the parameters in the list except the Last Parameter.
DESCRIPTION Type of API call. (FUNCTION or PROCEDURE) Name of the PL/SQL function or procedure Function Return Data Type. This must be one of the values defined in rule two of the next section. Whether the return value is used to retrieve the error messages. The returned error message is obtained from the first that provides the message in the following order: FND_MESSAGES, Return Value, Parameter Perform a call to FND_MESSAGES. . VALID VALUES
Y/N
ATTRIBUTE5
Y/N
6.3.3.2.2.
6.3.3.2.3.
Enter the parameter list ID created above in the CONCURRENT_REQUEST step parameter in the master list. Open the Define Parameter screen for the CONCURRENT-REQUEST parameter; set the Data Type to Number, and enter the parameter list ID in the Value field.
6.3.4.
Sequence ID Retrieval
The sequence retrieval is used to retrieve the next value from a database sequence and place it into the IMPORT hashtable. Only one parameter needs to be defined in this steps parameter list.
68 Company Confidential - For internal use only
Create a parameter list using the parameter UI. Name the list (Integrator Name): Sequence Press the Add Another Row button to add a parameter to the list. The Data Type should be String. The name you enter for the parameter is the key you will use to reference the sequence value from the hash table. Enter the name of the sequence in the Value field. Example:
DESCRIPTION l_run_id String GL_JOURNAL_IMPORT_S
6.3.4.4.
Enter the parameter list ID created above in the SEQUENCE step parameter in the master list. Open the Define Parameter screen for the SEQUENCE step parameter; set the Data Type to number, and enter the parameter list ID in the Value field.
6.3.5.
Group Definition
The Group Definition creates a collection of columns that identify rows that are imported together as a group. The grouping assures that all steps in an Importer (excluding GROUP and ROW_MAPPING steps) are repeated for every group of records found in the interface table. Columns are identified in the parameter list to form the primary key for determining the unique set of interface table records. A common usage for the group step is to save values uploaded by the user to the hash table, which can then be referenced by later steps. For example, perhaps your users are entering Person ID into a spreadsheet, which must then be used as a parameter in the call to a PL/SQL import program (PLSQL step). To accomplish this, the TABLENAME.PERSON.ID would be added to the group definition. During upload, Web ADI will look to see what value was uploaded to TABLENAME.PERSON.ID and store it in the hash table. This value can then be used when calling an import program (PLSQL step). 6.3.5.1. 6.3.5.2.
Field Name
Create a parameter list in the Parameter UI. Make the Name of this list (Integrator Name): Group Step. Use the Add Another Row button to create a parameter in the list for every column you wish to be part of the group.
DESCRIPTION Table name. Column name. E.g. GL_INTERFACE.SET_OF_BOOKS_ID
All the steps in the master list are executed for every group of records uniquely identified by the group definition. As a consequence, you are unable to repeatedly perform all of the steps except for one and then run that step separately. For example, you could not run the SQL to insert into the GL_INTERFACE_CTL table multiple times but only submit a concurrent request once.
Company Confidential - For internal use only
69
If a master parameter list contains both a GROUP definition and a CONCURRENT_REQUEST, each group that is imported will have a new request ID. The viewer will have multiple messages returned to it with the different concurrent request IDs. Enter the parameter list ID created above in the group step parameter in the master list. Open the Define Parameter screen for the GROUP parameter; set the Data Type to Number, and enter the parameter list ID in the Value field.
6.3.5.3.
6.3.6.
Success Message
The success message step defines what message is returned to the desktop when the import process has been successfully completed. Replaceable tokens can be inserted into the string to show the request ID or other values returned from the IMPORT hash table. The tokenized values can be defined by appending the $import$.requestid or $import$.<key for IMPORT>. The success message is unique among the import steps as it can be defined without having to have a separate parameter list defined. Since this string will be translated into other languages, a parameter definition must be defined that contains the string as a default value. 6.3.6.1. 6.3.6.2. Look up the master parameter list and press the Update button next to the SUCCESS_MESSAGE parameter. Press the Definition button in the Define Parameter screen; set the Data Type to String, and enter the success message in the Default value field. An example would be: Journal Import Request ID $import$.requested.
6.3.7.
Row Mapping
The Row Mapping step enables Web ADI to match a row in the interface table with its corresponding row in the spreadsheet. Columns in the interface table are identified in this step to create the primary key in identifying unique records in both the spreadsheet and interface table. Web ADI will map the interface table rows to spreadsheet rows using this key. In most cases this set of columns will be the primary key of the interface table. The primary use of this mapping is to be able to return error messages for individual rows that failed. The name field for each parameter stores the column names that are to be used in the mapping. 6.3.7.1. 6.3.7.2.
Field NAME Data Type
Create a parameter list using the Define Parameters UI. Use the Add Another Row button to add a parameter for every column required to be in the mapping (uniquely identifies records).
DESCRIPTION Column name. E.g. GL_INTERFACE.SET_OF_BOOKS_ID String
6.3.7.3.
Enter the parameter list ID created above in the Value field for the ROW_MAPPING step record in the master list. Make sure the Data Type is set to Number.
Company Confidential - For internal use only
71
If there are no columns in the interface that can provide a one-to-one mapping between the interface row and the row in the spreadsheet, then the best that the error reporting can be is a message in the upload page stating that there was an error with the import.
6.3.8.
The Errored Row Definitions step enables Web ADI to identify rows that have failed the import. A SQL query is defined that will be run by Web ADI to determine the rows that did not pass validation done by the import program. The SQL Query can contain Bind variables which can be used to provide input values into the query. The query provided must contain at least one column in the select clause but the SELECT statement can be SELECT * and the error rows step will know what columns are in the interface table. It is reccomended that SELECT * be used to make sure all of the necessary values are retireved in the SQL statement.
6.3.8.1. 6.3.8.2.
Create a parameter list with the parameter list UI. Use the Add Another Row button to create the first parameter in the list. Set the Data Type to String and enter the SQL query into the value field. 6.3.8.3. Add addiitonal parameter s to the parameter list for each bind variable in the SQL statement. Define the following attributes for each bind variable parameter:
ATTRIBUTE ATTRIBUTE1 ATTRIBUTE2 ATTRIBUTE3 DESCRIPTION Whether the parameter is defining a bind variable. The name of the bind/return variable (can be used in subsequent calls) The source of the value. VALID VALUES BIND
ATTRIBUTE4 ATTRIBUTE5
What name is to be used to get the value from the collection Data type of the bind/return value
6.3.8.3.1.
A description of the values from ATTRIBUTE3: IMPORT Value will come from a previously executed SQL query, PL/SQL call, Sequence number retrieval or from the group definition. ENV An environment variable REQUEST Value will come from the HTTP request (Upload Parameters).
6.3.8.4.
72
Enter the parameter list ID created above into the value field in the ERRORED_ROWS parameter in the master parameters list. Make sure the Data Type for the ERRORED_ROWS parameter is Number.
Company Confidential - For internal use only
Example: Define Errored Rows query where the errored all errored records in the GL_INTERFACE have the value EM01 in the STATUS Create a parameter list and add the first parameter which will contain the following SQL statement in the Value field.
SELECT * FROM GL_INTERFACE WHERE REQUEST_ID = $PARAM$.request_id AND STATUS = EM01 6.3.8.5.2. Add a parameter to the list for the request_id bind variable. Set name to request_id. Set Attribute1 = BIND; Attribute2 = requested; Attribute3 = IMPORT; Attribure5 = requested; Attribure6=NUMBER
6.3.9.
The error message lookup step is used to retrieve full textual error messages for the errored rows. This functionality does not apply for an asynchronous call since the import process stops after the request has been made. A SQL statement is entered in metadata to run for every errored row. Error codes in the status column can be used to look up meaningful messages. These messages then can be returned to the viewer. There can only be one return variable from the SQL statement. This variable is a VARCHAR2 error message that will be returned to the user. 6.3.9.1. 6.3.9.2. 6.3.9.3. Create a parameter list using the parameter list UI. Use the Add Another Row button to add the first parameter to the list. This parameter is the SQL statement that is to be executed Use the following format for a SQL statement: SELECT column_names FROM table_names WHERE column = $PARAM$.parameter_name. Create parameters in the list for each bind/return variable that exists in the SQL statement. The name of each parameter is used as the mapping between the SQL statement and the bind/return variables. Make sure the parameter name in the SQL statement and in the parameter use the same case. In 6.3.9.2, the $PARAM$.parameter_name is replaced with the value that is derived from the metadata for the parameter in the parameter list with the name of parameter_name. The column_names also needs to be defined as parameters in the list. "column_name should be entered as the name for the parameter in the list.
Description 1 The SQL statement Parameter List ID created for the ERROR_LOOKUP step
Description N Name of the bind/return parameters used in the SQL statement Parameter List ID created for the ERROR_LOOKUP step
6.3.9.4.
Define attributes for each parameter in the list except the first. The details of the parameters attributes are as follows:
DESCRIPTION Whether the parameter is defining a return or a bind variable The name of the bind/return variable (can be used in subsequent calls) The source of the value.
ATTRIBUTE4
ATTRIBUTE5 ATTRIBUTE6
What name is to be used to get the value from the collection. If ATTRIBUTE3 =INTERFACE_TABLE then the value of will provide what the interface & column name for the INTERFACE_TABLE. Data type of the bind/return value Position of the return value in the select statement [optional]
6.3.9.5.
Enter the parameter list ID created above into the value field in the ERROR_LOOKUP step parameter in the master list. Make sure the Data Type is set to number. Example: A call to FND_LOOKUPS for errored rows in GL_INTERFACE. Create a parameter list and add the fololwing parameters.
6.3.9.6. 6.3.9.6.1.
Column Name Sequence Number Value Data Type Sequence Number Name Data Type Sequence Number 74
Description 1 SELECT MEANING FROM FND_LOOKUPS WHERE LOOKUP_TYPE = PSP_SUSP_AC_ERRORS AND LOOKUP_CODE = $PARAM$.error_code String 2 Meaning String 3 Company Confidential - For internal use only
6.3.9.6.2.
Column For the Meaning Parameter: ATTRIBUTE1 ATTRIBUTE2 ATTRIBUTE3 ATTRIBUTE4 ATTRIBUTE5 ATTRIBUTE6 For the error_code parameter ATTRIBUTE1 ATTRIBUTE2 ATTRIBUTE3 ATTRIBUTE4 ATTRIBUTE5 ATTRIBUTE6
DESCRIPTION
6.3.10.
The Cleanup SQL statement step defines the metadata required to run a SQL statement, but will only be run when an exception occurs in one of the other import steps. If the SQL is a select statement then the values that have been selected are saved to the IMPORT hash table. Bind variables can be used to define what is used in the query and Return variables will be used to retrieve values from the SQL. Bind variables are used in both SQL and Insert/Update statements to allow the statement to be defined without knowing the data at design time. The return variables are only used in select statements, and represent the columns in the select declaration. Return values are values from columns defined in the select declaration section of the query (e.g. the status part of select status from gl_interface). The first parameter in the list is the SQL statement that is to be executed and the rest of the parameters will provide the details of the bind/return variables.
75 Company Confidential - For internal use only
6.3.10.1. Create a parameter list using the parameter list UI. 6.3.10.2. Use the Add Another Row button to create the first parameter in the list that contains the SQL statement. Set the Data Type to String. Enter the SQL statement in the Value filed in the Define Parameter screen. Use the following format for the SQL statement: SELECT column_names FROM table_names WHERE column = $PARAM$.parameter_name 6.3.10.3. Use the Add Another Row button to add parameters to the list for every bind and return variables defined in the SQL statement. The parameter name will be used as the mapping between the SQL statement and the bind/return variables. In the above definition, the $PARAM$.parameter_name will replaced with the value that is derived from the metadata for the parameter in the parameter list with the name of parameter_name. This method of replacing $PARAM$ tokens with the associated parameter values works for any SQL statement not just select statements. For select statements, the column_names will also need to be defined as parameters in the list where the column_name will also be the name of the parameter. The values returned from the columns in the select statement will be retrieved by going through the parameter list and for every parameter that has ATTRIBUTE1=RETURN 6.3.10.3.1.1.
ATTRIBUTE ATTRIBUTE1 ATTRIBUTE2 ATTRIBUTE3
What name is to be used to get the value from the collection Data type of the bind/return value Position of the return value in the select statement [optional]
6.3.11.
The Cleanup PL/SQL API import step allows for a PL/SQL API to be called if an exception occurs in any of the import steps. This step can be used to roll back work done in steps prior to the error. From the metadata the PL/SQL API call will be dynamically generated and run. The first parameter in the parameter list will define the API and the API calls parameters. 6.3.11.1.
76 Company Confidential - For internal use only
Create a parameter list using the Parameter UI. Set the Name of the parameter list to (Integrator Name):CLEANUP_SQL .
6.3.11.2. Press Add Another Row to create the first parameter in the list. This parameter will describe the API. Assign the following attributes to the parameter:
ATTRIBUTE ATTRIBUTE1 ATTRIBUTE2 ATTRIBUTE3 ATTRIBUTE4 ATTRIBUTE5 DESCRIPTION Type of API call. (FUNCTION or PROCEDURE) Name of the PL/SQL function or procedure Function Return Data Type Whether the return value is used to retrieve the error messages Perform a call to FND_MESSAGES. . VALID VALUES
Y/N Y/N
6.3.11.3.
Add additional parameters to the list for each of the parameters within the API call. Assign the following attributes to each parameter:
ATTRIBUTE ATTRIBUTE1 ATTRIBUTE2 DESCRIPTION PL/SQL parameter name. Name must be unique. PL/SQL parameter data type. VALID VALUES
PL/SQL parameter access. Used for returning error messages. Default value for the PL/SQL parameter. Size of the variable. The source of the value.
BINARY_INTEGER, BOOLEAN, CHAR, CHARACTER, DATE, DEC, DECIMAL, DOUBLE PRECISION, FLOAT, INT, INTEGER, LONG, NATURAL, NCHAR, NUMBER, NUMERIC, NVARCHAR2, PLS_INTEGER, POSITIVE, REAL, SMALLINT, STRING, VARCHAR, VARCHAR2 IN / OUT / INOUT Y/N If the default value is a string, then the value entered for this attribute must be quoted. IMPORT ENV REQUEST
ATTRIBUTE8 ATTRIBUTE9
ATTRIBUTE10
Name/ID within ATTRIBUTE3 used to identify the value Parameter List ID for mapping between the value provided and the one to be passed into the API parameter Modification clause around parameter (E.g. TO_CHAR(?) )
77
ATTRIBUTE9 is used to store a Parameter List ID to a parameter list where the parameters provide a mapping between string values. E.g. A simple parameter list would convert true/false into Y/N.
Company Confidential - For internal use only
An example of this would be: Mapping List: Parameter 1 name=true, value=Y Parameter 2 name=false, value= N
ATTRIBUTE10 is used when the data provided needs to have some formatting applied before it gets passed in as a parameter. This attribute should only be used in very rare cases. The main case where this attribute would be used is for passing a DATE value from the import into a PL/SQL API as a VARCHAR2 parameter. In the situation where a the date is required in MM/ DD/YYYY format, the ATTRIBUTE10 value would be: TO_CHAR(?, MM/DD/YYYY) Note: The ? character is to be used to represent the parameter being declared.
7.1.
The Upload Parameters screen is accessed by pressing Parameters after selecting Upload from the Oracle menu. This screen presents users with options that affect how their data is uploaded to Oracle Applications. Parameters are arranged vertically in a single column. Below is an example:
7.1.1.
The browser window title bar can be edited by updating BNE_INTEGRATORS_TL.TITLE_BAR The Primary Header can be edited by updating BNE_INTEGRATORS_TL.UPLOAD_HEADER. Its default value is Upload Parameters The parameters that exist in the upload parameters screen are determined by the upload parameter list you create for your Integrator. The order of the parameters in the list determines the order in which the parameters are displayed. The following widgets can be used to render parameters in the Upload Parameters screen: o Check Box o Radio Button o Pull Down list o Text Field o Password Field
Company Confidential - For internal use only
79
7.2.
A parameter list will be created for an Integrator to define all the parameters that will be used for upload. Some parameters will have default values and not be displayed in the Upload Parameters screen; others will be defaulted but displayed. Parameter values can also be selected by users in the Upload Parameters screen. The following steps cover the creation of an upload parameter list for your Integrator. 7.2.1. Define parameter list
A parameter list will be created that contains all upload parameters. Three specific parameters must always be defined in an upload list, and others can be added that relate to the import program being used. 7.2.1.1. Use the parameter list UI to define a parameter list. Use the Add Another Row button to add the following parameters to the list:
Column Name Sequence Definition Description 1 Copy the 231:ROWS parameter definition under your own application ID and use the copy for this parameter. Bne:rows Y True 2 Copy the 231:VALIDATION parameter definition under your own application ID and use the copy for this parameter. Bne:validation Y True 3 Copy the 231:IMPORT parameter definition under your own application ID and use the copy for this parameter. Bne:import Y Company Confidential - For internal use only
Name Value 80
Description True
7.2.1.2.
7.2.1.2.1.
Add additional parameters to the list if you have any parameters for your import program that need to be chosen by the user at upload time, or just seen by the user as upload time (view default being used). You may also define parameters and their values that need to be passed to the import program that are not seen or displayed to the user (not visible, but passed in the background). Press the Definition button in the Define Parameter window to indicate more information about each parameter. Tips: Parameters in a list can be set so that they do are not displayed to users in the upload parameters screen. Use the Default Required, Default Visible, and Default user Modifiable checkboxes to determine how the parameter will be displayed. Parameters that rely on runtime data to determine whether or not to display can be linked to a class that will set this value when run. Enter the class name in the Java Processor Class field. Display type indicates the type of widget to use in displaying the parameter to users. Check Box, Radio Button, List Box, Text Box, and Password Field are the supported display types. Radio buttons and list boxes can retrieve their valid values from value sets or from FND_LOOKUPS. Use the Validation Type field to indicate how the parameter will be validated and enter the Value Set ID or FND_LOOKUP.LOOKUP_TYPE in the validation value field. Use the Display Style field to display radio buttons vertically or horizontally.
7.2.2. 7.2.2.1.
Assign Upload Parameter List to Integrator Assign the parameter list to your Integrator by updating BNE_INTEGRATORS_B.UPLOAD_PARAM_LIST with the parameter list ID created in 7.2.1.1.
8. Creating Content
Web ADI has the ability to import data into a document as it is being created on the desktop. Integrator developers create Content definitions to identify the data to be downloaded, and any required parameters. This data can come from a variety of sources. Enter a SQL statement in metadata Allow users to import data from a text file Create a Java class to dynamically generate source data and provide custom UI for parameter entry.
This chapter section describes the process of enabling each of these types of Content in Web ADI metadata. Attention: You must make sure that the code you plug into the Web ADI SDK is functionally secure. Users must be prevented from manipulating a URL or a value in the worksheet that would give them access to restricted values.
8.1.
Stored SQL
A SQL statement can be plugged into metadata that is run by Web ADI to retrieve a result set, which is imported into the document using a mapping (maps fields in SQL statement to fields in document; see section 9.2). You may specify bind variables in the SQL statement, whose values can be passed at runtime. Each Stored SQL statement requires a Content definition. Follow the steps below to define a stored SQL Content. 8.1.1. Create Content Definition
Call the following PL/SQL API to create the Content: BNE_CONTENT_UTILS.CREATE_CONTENT_STORED_SQL (P_APPLICATION_ID IN NUMBER, P_OBJECT_CODE IN VARCHAR2, P_INTEGRATOR_CODE IN VARCHAR2, P_CONTENT_DESC IN VARCHAR2, P_COL_LIST IN VARCHAR2, P_QUERY IN VARCHAR2, P_LANGUAGE IN VARCHAR2, P_SOURCE_LANGUAGE IN VARCHAR2, P_USER_ID IN NUMBER, P_CONTENT_CODE OUT NOCOPY VARCHAR2);
82 Company Confidential - For internal use only
P_QUERY
The SQL statement that will be run to generate the data to be downloaded to the desktop. This SQL statement can contain bind variables in the form of $PARAM$.ParameterName. Example: SELECT PERIOD_NAME, START_DATE, END_DATE FROM GL_PERIOD_STATUSES WHERE START_DATE >= $PARAM$.startDate AND END_DATE <= $PARAM$.endDate Out parameter that uniquely identifies the content. This is generated based on P_OBJECT_CODE.
Languge the P_CONTENT_DESC will be stored against. Languate P_CONTENT_DESC will be translated from. The ID of your Application will be used to populate the WHO columns
Note: The parameters above (startDate, endDate) must be defined in the parameter list attached to the Content.
8.1.2.
If your SQL statement contains bind variables, a parameter list must be created to supply values for each of the variables. The parameter list should contain parameters for all the variables you have defined in your SQL statement. 8.1.2.1. Use the Parameter UI to create a parameter list. Use the following format for a name: (Integrator Name) Content: (Meaningful description).
8.1.2.2. 8.1.2.2.1.
Add a parameter to the list for every parameter that appears in the SQL. The name of the parameter must exactly match the parameter name used in the SQL statement (must also be in the same case). Press the Definition button for each parameter to add details on how the parameter will behave. Instructions entered into the user tip field will be displayed to users who must enter a value for this parameter after choosing the Content. You can indicate what UI widget web ADI will use to render the parameter value selection to the user. The method in which the parameter value is validated is also indicated in this parameter definition. Insert into BNE_CONTENTS_B.PARAM_LIST_CODE and PARAM_LIST_APP_ID. This is the code of the list you created in 8.1.2.1. Create Content Columns
8.1.2.3. 8.1.3.
The content columns define the columns in the select statement that can be mapped to fields in the document. A record must be created for every source column you wish to map and download to a document. The PL/SQL AP you ran to create the content automatically creates these columns based on P_COL_LIST parameter. The actual column names have been entered into a TL table and will be visible to users when creating mappings to associate columns in the select statement to columns in the document. You may want to edit the TL table to make the column names more meaningful to users. 8.1.3.1.
Column Name CONTENT_CODE* SEQUENCE_NUM* LANGUAGE* SOURCE_LANG* USER_NAME*
Update BNE_CONTENT_COLS_TL
Description Unique Code of Content Ordinal number specifying the content Language USER_NAME will be defined against. Language USER_NAME will be translated from. User name of Content source. E.g. User ID. This is what will display for this column in the Mapping UI
8.2.
Text File
It is possible to import a text file into a document. Use the following steps to implement this type of Content for your Integrator. Only one Text File Content needs to be created to allow users to import text files.
8.2.1. 8.2.1.1.
84
Create Content Definition Call the BNE_Content_Utils.CREATE_CONTENT_TEXT package and pass it the following parameters:
BNE_CONTENT_UTILS.CREATE_CONTENT_TEXT
Company Confidential - For internal use only
(P_APPLICATION_ID P_OBJECT_CODE P_INTEGRATOR_CODE P_CONTENT_DESC P_NO_OF_COLS P_COL_PREFIX P_LANGUAGE P_SOURCE_LANGUAGE P_USER_ID P_CONTENT_CODE
IN NUMBER, IN VARCHAR2, IN VARCHAR2, IN VARCHAR2, IN NUMBER, IN VARCHAR2, IN VARCHAR2, IN VARCHAR2, IN NUMBER, OUT NOCOPY VARCHAR2)
This package will create the content definition, parameter list and all of the content columns that will be seen in the mapping UI. Descriptions of each parameter:
Parameter P_APPLICATION_ID P_OBJECT_CODE Description The identifier for the application. A string of 20 chars or less. The only valid characters are: Uppercase 'A'..'Z', '0'..'9' and '_'. This string must be unique within the application ID. This string will be used to generate P_CONTENT_CODE. P_CONTENT_CODE = P_OBJECT_CODE + _CNT.
P_INTEGRATOR_CODE
P_CONTENT_DESC P_NO_OF_COLS
P_COL_PREFIX
The code of the Integrator you wish to crate the content for. Query BNE_INTEGRATORS_B.INTEGRATOR_CODE for this value. Text File The maximum number of columns in your text files. Then number of content columns the API creates is determined by this parameter. Then name for each content column will be set numerically (1, 2, 3..P_NO_OF_COLS). A prefix will be added to the front of each number if a value for P_COL_PREFIX is set. This prefix will be appended to the beginning of each content column name that appears in the mapping UI. Passing this parameter is optional.
Unique Key for Content. This is generated from the P_OBJECT_CODE.
Language P_CONTENT_DESC will be defined against. Languate P_CONTENT_DESC will be translated from. The ID of your Application will be used to populate the WHO columns
Company Confidential - For internal use only
8.3.
Java
It is possible to create your own Content Class for download. This may be done if the simple UI prompting users for parameter values required for download is inadequate. In addition, passing a SQL statement, or plugging a SQL statement into metadata to generate a result set may not be viable options. Steps to implement a Java Content: 9 Create the Java class Create Content Definition Create Parameter Definitions Create Parameter List for the Content Create Content Columns Create the Java Class
9 9 9 9
8.3.1.
8.3.2.
Call the BNE_Content_Utils.CREATE_CONTENT_DYNAMIC_SQL package. PROCEDURE CREATE_CONTENT_DYNAMIC_SQL (P_APPLICATION_ID P_OBJECT_CODE P_INTEGRATOR_CODE P_CONTENT_DESC P_CONTENT_CLASS P_COL_LIST P_LANGUAGE P_SOURCE_LANGUAGE P_USER_ID IN IN IN IN IN IN IN IN IN NUMBER, VARCHAR2, VARCHAR2, VARCHAR2, VARCHAR2, VARCHAR2, VARCHAR2, VARCHAR2, NUMBER, OUT NOCOPY VARCHAR2);
P_CONTENT_CODE
Parameter Description
Description The identifier for the application. The code for the content definition. A string of 20 chars or less. The only valid characters are: Uppercase 'A'..'Z', '0'..'9' and '_'. This string must be unique within the application ID. The Code of the Integrator you wish to crate the content for. Query BNE_INTEGRATORS.INTEGRATOR_CODE for this value. Text File oracle.apps.bne.webui.control.NameDownloadControl Tab delimited list of the columns that will exist in the result set generated by your Java class. These column names must match the names that appear in the select statement generated by your Java Class. These columns will be mapped to columns in the document. Language P_CONTENT_DESC will be defined against Language P_CONTENT_DESC will be translated from. The ID of your Application will be used to populate the WHO columns Unique key for your content. This is generated from the P_OBJECT_CODE. P_CONTENT_CODE = P_OBJECT_CODE + _CNT
Note: You may want to update BNE_CONTENT_COLS_TL.USER_NAME to provide more meaningful names for users to see in the Mapping UI. 8.3.3. 8.3.3.1. 8.3.3.1.1. 8.3.3.2. Create Parameter List for Content Use the Parameter UI to create a parameter list for the content. Add a parameter to the list for every parameter required by the content class. Press the definition button in the Define Parameter screen to determine how these parameters will be selected by users in the Web ADI Create Document Page flow. Insert the parameter list code created in 8.4.3.1 into BNE_CONTENTS_B.PARAM_LIST_CODE and PARAM_LIST_APP_ID for the content created in 8.4.2.
9.1.
The Interfaces, Layouts and Mappings that have been created for uploading data can be used to generate Reporting Only documents. This can be done by setting the bne:reporting parameter to Y when the Web ADI service is called. This parameter is displayed in the Web ADI Pageflow as Reporting Only. If the box is checked, then the document you create will not have the upload option.
9.2.
Interfaces, Mappings and Layouts can be flagged as reporting only. This means that regardless of the bne:reporting parameter value, when a layout is selected that is based on a Reporting Interface, the resulting document will always be generated without the upload option. This method of providing reporting documents can be used when you simply want to download Content to a document that will never be uploaded. To enable users to download a Content for reporting purposes: 9.2.1. Run the Following API to create an Interface and Mapping based on the Content.
BNE_CONTENT_UTILS. ENABLE_CONTENT_FOR_REPORTING (P_APPLICATION_ID IN NUMBER, P_OBJECT_CODE IN VARCHAR2, P_INTEGRATOR_CODE IN VARCHAR2, P_CONTENT_CODE IN VARCHAR2, P_LANGUAGE IN VARCHAR2, P_SOURCE_LANGUAGE IN VARCHAR2, P_USER_ID IN NUMBER, P_INTERFACE_CODE OUT NOCOPY VARCHAR2, P_MAPPING_CODE OUT NOCOPY VARCHAR2);
Description The identifier for the application. The code for the Mapping and interface to be created. A string of 20 chars or less. The only valid characters are: Uppercase 'A'..'Z', '0'..'9' and '_'. This string must be unique within the application ID. The Code of the Integrator you wish to crate the interface and mapping for. Query BNE_INTEGRATORS.INTEGRATOR_CODE for this value. The code of the content you wish to create the interface and mapping for. Company Confidential - For internal use only
P_INTEGRATOR_CODE P_CONTENT_CODE 88
Description US US The ID of your Application will be used to populate the WHO columns The code of the interface that will be created.
The name of the Interface that is created will be {Content Name} Reporting Interface. The name of the Mapping that is created will be {Content Name} Reporting Mapping. 9.2.2. Once the API has been run, Layouts can be created for a reporting Interface that will allow users to create their documents.
A Layout is a parameter given to the Create document service that indicates what columns are to be included in a document. The placement of these columns within the document is also indicated by the Layout. Layouts can be seeded with your application. Layouts can be defined to create documents that do not offer upload, in addition to ones that provide upload capability. UI exists for Layout creation: 10.1.1. 10.1.2. Select Define Layout on the self service home page Select an Integrator and press Go.
10.1.3. The following screen shows all of the Layouts that have been defined for an Integrator. The Reporting column indicates layouts that can only be used to create document that do not provide upload. Press Define Layout to create a new layout, or update, duplicate or delete existing layouts.
10.1.4. Enter a Name and Key for your Layout and select a Field List. The Key is a unique code that that is used to reference the Layout when calling the BneApplicationService. It must be a string of 20 characters or less. The only valid characters are: Uppercase 'A'..'Z', '0'..'9' and '_'. 10.1.5. Select a Field List. The Field list selection determines the group of columns available to you when determining which columns to include in your Layout. It also determines whether or not your Layout can be used to create a document for upload purposes. The first selection in the drop down box will allow a Layout to be generated for upload. This Field list contains all of the columns defined for Interfaces created for upload (BNE_INTERFACES_B.UPLOAD_TYPE = 1). All of the other values in the LOV provide lists of columns that can be used to create Layouts that do not offer upload.
10.1.6.
10.1.7.
Select the optional fields to be included in the Layout and their location (header/Lines).
Note: UI does not exist to define the column order in the document when a particular Layout is used. Update BNE LAYOUT COLS.SEQUENCE NUM to accomplish this. 10.1.8. Enter default values you would like to automatically appear for columns when the document is created. There are five types of defaults you may set: 10.1.8.1. None Default Type when no Default Value is set. 10.1.8.2. Constant - Default Type used when the actual value in Default Value is used as the default. 10.1.8.3. Environment Default Type when Default Value is an environmental variable. Valid environmental variables are: language, oauser.id, database, sob.SetOfBooksName, and sysdate., sob.setofbooksname, sob.setofbooksid, sob.chartofaccountsid, sob.periodsetname, sob.accountedperiodtype, sob.currencycode, sob.latestencumbranceyear, sob.adbflag, sob.consolidationflag, sob.transactioncalendarid, sob.mandate, sob.maxdate 10.1.8.4. Parameter Default type when Default Value is the name of a parameter passed to BneApplicaionService. 10.1.8.5. SQL Default Type used when a SQL statement is entered into Default Value. Web ADI will run this SQL and automatically populate the document with the result. If more than one value is returned from the query, the first value returned will be used. You may use the following tokens in the SQL statement entered in Default Value: $profile$.profileName $env$.userid $env$.appid $env$.respid $env$.language
10.2.
Creating Mappings
A Mapping links Content columns to Interface columns. This relationship between the columns in the result set of a download and the destination column is needed for Web ADI to import data into the document. UI exists for Mapping Creation (Note that Mappings for reporting Interfaces are not created through the Mapping UI, but are created by the API in section 9.2): 10.2.1. 10.2.2. Select Define Mapping on the Self- Service home page. Select an Integrator and press Go.
10.2.3.
Select the Content you wish to map and press GO. This screen will not appear if you only one Content exists for the chosen Integrator.
10.2.4.
10.2.5. Enter a Name and Key for your Mapping and the number of columns it will Map. The Key is a unique code that is used to reference the Mapping when calling the BneApplicationService. It can be a string of 20 chars or less. The only valid characters are: Uppercase 'A'..'Z', '0'..'9' and '_'.
10.2.6.
Use the LOVs to match Content columns with Interface columns. Press Apply when finished.
11.1.
Available Parameters
Core Parameters
11.1.1.
Core parameters are fundamental the Create Document Page flow, not to any control. They must be supplied for a document to be created. If they are not passed by the calling form function, then users will be prompted for values in the Create Document Page Flow.
Parameter Bne:page bne:language Bne:reporting bne:viewer Required X Description Set to BneCreateDoc to call the Create Document Page flow. The language to display in the Viewer. E.g. US. This parameter does not have a dependency on another parameter. Set to Y to create documents that do not offer upload. Set to N to create documents that offer upload capability. The Viewer to use. The value of this parameter must be in the form of Application ID:Viewer Code.. E.g. bne:viewer=231:WORD2000. This parameter does not have a dependency on another parameter. The Integrator to use. This value is dependent on bne:viewer. The value of this parameter must be in the form of Application ID:Integrator Code.. E.g. bne:integrator=231:JOURNALS_115. The Layout to use when generating the document. This value is dependent on the bne:integrator value. The value of this parameter must be in the form of Application ID:Layout Code.. E.g. bne:layout=231: FUNCT_ACT_SINGLE_11I. The data to import into the viewer. This parameter is dependent on the Integrator. The value of this parameter must be in the form of Application ID:ContentCode.. E.g. bne:content=231:NONE.
bne:integrator
bne:layout
bne:content
Note that bne:page=BneCreateDoc must be used to invoke the create document process. All other parameters may not be set in the call, but can be left for users to choose at runtime through the Create Document UI.
97 Company Confidential - For internal use only
11.1.2.
Content specific parameters are parameters specified in metadata for a particular Content being used. Depending on bne:content, any number of parameters may be required. These are listed in the parameter list attatched to the Content. Use the value in BNE_CONTENTS_B.PARAM_LIST_CODE for the Content to find the required list of parameters in the parameter UI. Bne:map is also required if a Content other than None is selected. This parameter points to a mapping defined in metadata that relates source and destination columns.
Parameter Content Parameters Required Description Any of the parameters defined in the parameter list associated with the content being passed. The list is identified in BNE_CONTENTS_B.PARAM_LIST_CODE. Look up this parameter list in the Parameter UI to get a list of available parameters. This parameter is dependent on the content. It specifies the mapping to be used for download. The value of this parameter must be in the form of Application ID:Mapping Code.. E.g. bne:map=231:INTERFACE_TABLE_MAP
bne:map
11.1.3. Pageflow Parameters Pageflow Parameters determine how the Web ADI Page flow will behave to users.
Parameter bne:redirect-portal
Required
Description A URL to redirect the user to after the Viewer has been created. If this is not supplied, the user will be redirected to their personal home page. The value can be any valid URL starting with http:// or https:// Example: bne:redirect-portal=http://www.oracle.com. If this parameter is sent with any value the Create Document Review page will not be displayed. Example: bne:noreview=anything
bne:noreview
11.1.4.
Upload Parameters
The upload parameters you have defined for your Integrator may be passed to the document creation service. Use the value in BNE_INTEGRATORS_B.UPLOAD_PARAM_LIST_CODE and UPLOAD_PARAM_LIST_APP_ID for your Integrator to view the required list of parameters in the parameter UI. To pass an upload parameter you have to provide values that are correct for the parameter. Then you can add the parameter to the URL as &<paramName>=<paramValue>
98 Company Confidential - For internal use only
Example: http://adi.us.oracle.com/servlets/oracle.apps.bne.webui.BneApplicationService?bne:page=BneCreateDoc&bne:language=US&bne:rows=FLAGGED&bne:val idation=NONE&bne:import=false You can also send the upload parameters in a list: http://adi.us.oracle.com/servlets/oracle.apps.bne.webui.BneApplicationService?bne:page=BneCreateDoc&bne:language=US&bne:param-list=231:LIST_ON As long as the passed parameter is defined in UPLOAD_PARAM_LIST_CODE tied to the Integrator and has a valid value, that value will be used as an upload parameter, and not the default value defined in metadata. The passed parameters are stored in the worksheet. Therefore, the passed parameters will be used even if user saves the sheet, logs out of Self-Service and uploads at a later time.
11.2.
Core parameters are sent on the HTTP command line in three different ways: Application ID: Code. E.g. bne:integrator=231:JOURNALS_115 Application Short Name: Code. E.g bne:integrator= BNE:JOURNALS_115 USER_NAME: USER_NAME in TL table. E.g. bne:integrator=USER_NAME: General Ledger - Journals
Content and Upload parameters are defined by the Integrator developer and are sent in the form of name=value&name=value. Example: http://adcsrv06.au.au.oracle.com:8080/servlet/BneApplicationService?bne:page=BneCreateDoc&bne:language=US&bne:viewer=231:EXCEL2000&bne:integr ator=BNE:JOURNALS_115&bne:layout=231:FUNCT_ACT_SINGLE&bne:content=231:ADDRESS&firstname=Jim SQL wild cards are supported for Codes and USER_NAME values. E.g. bne:layout=BNE:USER%. If a Wild Card returns one parameter value, then users will not be prompted to select that value in the Create Document Page Flow. If multiple parameter values are returned, users will be prompted to select a value from the filtered list. Note: Wildcards cannot be used for Application IDs or Application Short Names. Profile options and environmental variables can be referenced when sending parameter values to BneApplicationService. The formats to use when referencing profile options and environmental variables are $Env$.variable_name and $Profiles$.profile_name respectively. For example, Web ADI will reference profile
99 Company Confidential - For internal use only
option XXXX for the current applications user to resolve the Integrator value when bne:integrator=231:$Profiles$.XXXX is passed. You must make sure the resolved parameter value conforms to one of the three different parameter standards mentioned earlier in this section. 11.2.1. Secured List of Values
You may pass more than one value for a parameter. If this is done, the LOV for the parameter in the Create Document Page flow will be limited to the list of parameter values passed to the create document service. For example, you may want to limit the list of layouts available to a user. If no parameter is passed for bne:layout, all of the layouts defined for an Integrator will be selectable on the Layout Page in the Create Document Page Flow. You can limit the list of available layouts a person has access to by having the form function pass a comma separated list of Application ID/Short Name:layout codes or USER_NAME: Strings to the bne:layout parameter. E.g. bne:layout=231:TST1,BNE:TST2,USER_NAME:test3,USER_NAME:test4%. When the user navigates to the layout page after clicking the form function, he or she will only have the test1, test2, test3, test4, test41 and test412 layouts to choose from. 11.2.2. URL Encoding
When sending parameters in the URL, you must play by URL rules. This means invalid characters must be escaped. Parameters may be sent on the URL as GET parameters (in the browsers address field on the end of the URL), or as POSTed data from a HTML form. To convert a String, each character is examined in turn: The ASCII characters 'a' through 'z', 'A' through 'Z', '0' through '9', and ".", "-", "*", "_" remain the same. The space character ' ' is converted into a plus sign '+'. All other characters are converted into the 3-character string "%xy", where xy is the two-digit hexadecimal representation of the lower 8-bits of the character. If you are sending from a HTML form, this is done for you. If it is seeded in a form-function, strings with the % wildcard and URLS (in bne:redirect-portal) need attention. Example: Sending the following parameters bne:language be:layout bne:redirect-portal Am% 231:FUNCT_ACT http://www.google.com/search?sourceid=navclient&q=servlet redirect http
http://adi.us.oracle.com/servlet/oracle.apps.bne.webui.BneApplicationService?bne:page=BneCreateDoc&bne:language=Am%25&bne:layout=231:FUNCT_ACT &bne:redirect-portal=http%3A%2F%2Fwww.google.com%2Fsearch%3Fsourceid%3Dnavclient%26q%3Dservlet+redirect+http The characters that were converted: % --> %25, : --> %3A, / --> %2F, ? --> %3F, = --> %3D, & --> %26, space --> + Note: Parameter values that have an & or % in their names cannot be passed. Avoid creating parameters of this kind in metadata. 11.2.3. Length Limitations
If data is POSTed to BneApplicationService (ie a HTML for that does a POST), large amounts of data may be sent to us. If data is GETed to BneApplicationService (A GET is performed when a URL is entered directly into the IE Address line, when an HTML form calls BneApplicaitonService, and when a Self-Service form function calles BneApplicaitonService), then you are limited to a total address length of about 1800 characters. This is a browser restriction.
11.2.4.
Parameter Lists
Rather than passing all the parameters to Web ADI at runtime, you may save the parameters and their values in metadata. This is done by defining a parameter list and calling that list at runtime. Create Parameter List in Metadata using the Parameter List UI Note the Parameter List Code. Call Create Doc with parameter bne:param-list=Application ID/Short Name::Code.
Any parameters in the list will over-ride parameters sent on the http command line. Example: http://adi.us.oracle.com:8080/servlet/oracle.apps.bne.webui.BneApplicationService?bne:page=BneCreateDoc&bne:language=US&bne:paramlist=SQLGL:F_SINGLE_JNL_FR If the F_SINGLE_JNL_FR Parameter List has a parameter bne:language=FR, then the value used is FR.
101 Company Confidential - For internal use only
11.2.5.
At the end of the Create Document Page flow, users are presented with the option of saving a document creation shortcut. Shortcuts can be saved in two ways: Selections are saved to shortcut that will appear on the first page of the Create Document Page Flow. All users must do is select the shortcut, and all of their saved parameter values will be used to generate a document. Selections are saved to a Self-Service Form Function. The name you enter for the shortcut will be used to create the Function Name and User Function Name (BNE_Shortcut Name). A system administrator must search for this form function and attach it to a menu so it appears in the PHP.
Only the core and content specific parameters are saved as document creation shortcuts. bne:redirect-portal, bne:review, bne:param-list or passthrough params are not saved. This is because of a limit to the amount of data that can be saved to a self-service menu item.
APPENDIX A Parameter UI
Parameter UI was included with Web ADI 8.2. This allows you to quickly create, duplicate, and delete, Parameter Lists, Parameter List Items, Parameter Definitions and Attributes.
Accessing Parameter UI
1. 2. 3. 4. Click on the Create Doc link from the Web ADI menu. Replace BneCreateDoc with BneParameter The Define Parameter List page should be displayed. This can also be imbedded in the form function on your Self-Service page. Log into Applications as System Administrtor. Navigate to Applicaton=>Function and create a new form function with the following values:
Field Function Type Parameters HTML Call Value BNE_DEFINE_PARAMS SSWA SERVLET Bne:page=BneParameter oracle.apps.bne.webui.BneApplicationService
Enter a meaningful Name for the Parameter. If creating a parameter list for a component, see the list of parameters to add to the parameter list in section 5.1.4.
2.
3. 4.
Enter values for all other fields. All three values: Data Type, Value, and Description must be entered, either all three against the Parameter, or all three against the Parameter Definition. Values entered against the Parameter will take precedence over values entered against the Parameter Definition. Data Type must be String if you are defining a component for a parameter. Click on the Save button. To save the Parameter in the List, and to save these changes to the database, click the Save button at the bottom of the Define Parameter List page.
3. 4.
The following lcts are available but are generally not used for extraction because they relate to runtime information: bneuserset.lct User Settings bnelaylob.lct Extracts data from the BNE_LAYOUT_LOBS table. bnefile.lct Extracts data describing text files that have been uploaded to the middle tier.
Note: The Application Short Name of your product is a required parameter when running the above lcts.
1.2
Appendix C
/* * +=======================================================================+ * | Copyright (c) 2003 Oracle Corporation, Redwood Shores, CA, USA | * | All rights reserved. | * +=======================================================================+ * | HISTORY | * | | * | 27-Jun-2003 John Smith Created. | * | | * +=======================================================================+ */ package oracle.apps.bne.utilities.oa; import java.io.BufferedReader; import java.io.InputStreamReader; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import oracle.apps.bne.exception.BneException; import oracle.apps.bne.framework.BneTrace; import oracle.apps.bne.framework.BneWebAppsContext; import oracle.apps.bne.utilities.sql.BneBaseSQL; import oracle.apps.fnd.common.VersionInfo; /** * Class BneOAPeriodNameSQL * <p> * This class contains all of the SQL queries required for the Period Name * LOV and Upload validation. * * @author John Smith * @version $Revision: $ $Date: $ */ public class BneOAPeriodNameSQL extends BneBaseSQL { // Field RCS_ID public final static String RCS_ID = "$Header: $"; // Field RCS_ID_RECORDED
public final static boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion(RCS_ID, "oracle.apps.bne.utilities.oa"); /** * Method: BneOAPeriodNameSQL * <p> * Construct the object. * You must call super() within this constructor. * To properly destruct this object and clean up any cursors YOU MUST run close(); * * @param context - This is all the session information for the current user session. * @param queryNumber - The number identifying the query to be used to create the SQL Handle. * Valid query numbers are: * 1 - query to retrieve all open and future enterable budget periods. * 2 - query to retrieve all open and future enterable periods containing a specific * date (Actual Journals only) * 3 - query to retrieve all open and future enterable periods (Actual Journals only) * 4 - query to retrieve all open and future enterable periods containing a specific * date (Encumbrance Journals only) * 5 - query to retrieve all open and future enterable periods (Encumbrance Journals only) * @param extraSQL - The string to contain the additional SQL criteria to limit the SQL result * set to the value selected by the user in the Web ADI document. When calling the * constructor for the LOV component, pass null to this parameter. * * @throws SQLException on any SQL problem. * @throws BneException on any internal WebADI problem. */ public BneOAPeriodNameSQL(BneWebAppsContext context, int queryNumber, String extraSQL) throws SQLException, BneException { super(); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameSQL:BneOAPeriodNameSQL() Start"); if (context == null) { throw new IllegalArgumentException("BneOAPeriodNameSQL - parameter: context, a valid context must be passed to this constructor."); } Connection con = context.getJDBCConnection(); StringBuffer qry = new StringBuffer(); switch ( queryNumber ) { case 1: qry.append("SELECT "FROM "WHERE "AND "AND "AND "AND
109 Company Confidential - For internal use only
DISTINCT PS.PERIOD_NAME, PS.PERIOD_YEAR, PS.PERIOD_NUM " + GL_PERIOD_STATUSES PS, GL_BUDGET_PERIOD_RANGES BPR, GL_BUDGET_VERSIONS BV, GL_BUDGETS B " + B.SET_OF_BOOKS_ID = ? " + BV.BUDGET_VERSION_ID = ? " + B.BUDGET_NAME = BV.BUDGET_NAME " + BV.BUDGET_VERSION_ID = BPR.BUDGET_VERSION_ID " + BPR.PERIOD_YEAR = PS.PERIOD_YEAR " +
"AND "AND "AND "AND "AND "AND "AND "AND break; case 2: qry.append("SELECT "FROM "WHERE "AND "AND break;
PS.PERIOD_NUM BETWEEN BPR.START_PERIOD_NUM AND BPR.END_PERIOD_NUM " + BV.BUDGET_TYPE = B.BUDGET_TYPE " + UPPER(B.BUDGET_TYPE) = 'STANDARD' " + PS.SET_OF_BOOKS_ID = ? " + PS.APPLICATION_ID = 101 " + PS.PERIOD_TYPE = ? " + PS.PERIOD_YEAR <= B.LATEST_OPENED_YEAR " + PS.ADJUSTMENT_PERIOD_FLAG = 'N' ");
PS.PERIOD_NAME, PS.START_DATE, PS.END_DATE, PS.PERIOD_NUM, PS.PERIOD_YEAR " + GL_PERIOD_STATUSES_ACTUAL_V PS " + PS.SET_OF_BOOKS_ID = ? " + TRUNC(PS.START_DATE) <= TRUNC(?) " + TRUNC(PS.END_DATE) >= TRUNC(?) ");
case 3: qry.append("SELECT PS.PERIOD_NAME, PS.START_DATE, PS.END_DATE, PS.PERIOD_NUM, PS.PERIOD_YEAR " + "FROM GL_PERIOD_STATUSES_ACTUAL_V PS " + "WHERE PS.SET_OF_BOOKS_ID = ? "); break; case 4: qry.append("SELECT "FROM "WHERE "AND "AND break; PS.PERIOD_NAME, PS.START_DATE, PS.END_DATE, PS.PERIOD_NUM, PS.PERIOD_YEAR " + GL_PERIOD_STATUSES_ENC_V PS " + PS.SET_OF_BOOKS_ID = ? " + TRUNC(PS.START_DATE) <= TRUNC(?) " + TRUNC(PS.END_DATE) >= TRUNC(?) ");
case 5: qry.append("SELECT PS.PERIOD_NAME, PS.START_DATE, PS.END_DATE, PS.PERIOD_NUM, PS.PERIOD_YEAR " + "FROM GL_PERIOD_STATUSES_ENC_V PS " + "WHERE PS.SET_OF_BOOKS_ID = ? "); break; default: throw new IllegalArgumentException("BneOAPeriodNameSQL - parameter: queryNumber, must be a number from 1 to 5."); } if (extraSQL != null && !extraSQL.trim().equals("")) { qry.append("AND " + extraSQL); } qry.append(" ORDER BY PS.PERIOD_YEAR DESC, PS.PERIOD_NUM DESC "); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameSQL:BneOAPeriodNameSQL() SQL = " + qry);
110 Company Confidential - For internal use only
Appendix D Sample Validator Class - BneOAPeriodNameValidator (GL Journals Period Name LOV/Validator)
/* * +=======================================================================+ * | Copyright (c) 2003 Oracle Corporation, Redwood Shores, CA, USA | * | All rights reserved. | * +=======================================================================+ * | HISTORY | * | | * | 27-Jun-2003 John Smith Created. | * | | * +=======================================================================+ */ package oracle.apps.bne.integrator.validators.gl; import java.sql.Date; import java.sql.SQLException; import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Enumeration; import java.util.Hashtable; import import import import import import import import import oracle.apps.bne.exception.BneException; oracle.apps.bne.exception.BneFatalException; oracle.apps.bne.exception.BneMissingParameterException; oracle.apps.bne.exception.BneSQLException; oracle.apps.bne.framework.BneConstants; oracle.apps.bne.framework.BneLogger; oracle.apps.bne.framework.BneTechStack; oracle.apps.bne.framework.BneTrace; oracle.apps.bne.framework.BneWebAppsContext;
import oracle.apps.bne.integrator.upload.BneUploadColumn; import oracle.apps.bne.integrator.upload.BneUploaderMessage; import oracle.apps.bne.integrator.validators.BneUploadValidator; import oracle.apps.bne.repository.BneResourceString; import import import import import import
112 Company Confidential - For internal use only
import oracle.apps.bne.utilities.sql.BneResultSet; import oracle.apps.fnd.common.VersionInfo; /** * Class BneOAPeriodNameValidator * <p> * Implementation of BneUploadValidatorInterface and BneUploadDomainInterface * for the Period Name interface column for the "General Ledger - Journals" * Integrator. * <p> * The implementation of the BneUploadValidatorInterface validates the * Period Name interface column. * <p> * The implementation of the BneUploadDomainInterface generates a List of Values * for the Period Name interface column. * * @author John Smith * @version $Revision: $ $Date: $ */ public class BneOAPeriodNameValidator extends BneUploadValidator { /** Field RCS_ID */ public final static String RCS_ID = "$Header: $"; /** * RCS version insertion into <code>VersionInfo</code> on class loading. */ public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion(RCS_ID, "oracle.apps.bne.integrator.validators.gl"); // The public public public public public following constants refer to each of the SQL queries that exist in the BneOAPeriodNameSQL class. static final int BUD_JOURNAL_NO_ACCT_DATE = 1; static final int ACT_JOURNAL_WITH_ACCT_DATE = 2; static final int ACT_JOURNAL_NO_ACCT_DATE = 3; static final int ENC_JOURNAL_WITH_ACCT_DATE = 4; static final int ENC_JOURNAL_NO_ACCT_DATE = 5; These messages
// Logger to be used as needed. All log messages will be written to the bne.log file. // will NOT be transalated, and are to be used for debugging purposes only. private BneLogger m_Logger = BneLogger.getInstance(); // Hashtable to store cached SQL Handles. private Hashtable m_Statements = null; /** * Method: startupValidator * * This method initializes the SQL statement cache for the Period Name validator. *
113 Company Confidential - For internal use only
* @param context - All the valid session information for the current user session. * @param requestParameters - A hashtable containing the document and upload page parameters and * their associated values. * @param columnValues - A hashtable containing all the values for the current upload row in the spreadsheet. * @return Any relevant upload messages. */ public BneUploaderMessage [] startupValidator(BneWebAppsContext context, Hashtable requestParameters, Hashtable columnValues) { m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.startupValidator() Start"); m_Statements = new Hashtable(); // Initialise the SQL statement cache. m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.startupValidator() End"); return (new BneUploaderMessage [0]); } /** * Method: getDomainParameters * * <p>Get the domain parameters. This is the union of all parameters that will be used for the LOV Component. */ public String[] getDomainParameters () { return(new String[] {"SET_OF_BOOKS_ID", "ACTUAL_FLAG", "ACCOUNTING_DATE", "BUDGET_VERSION_ID", "PERIOD_NAME"}); } /** * Method: getDomainValues * * <p>This method gets the values to be displayed in the Period Name Cabo/UIX LOV page. * * <p>The following parameters are used within this method: * * SET_OF_BOOKS_ID * ACTUAL_FLAG * ACCOUNTING_DATE * BUDGET_VERSION_ID * PERIOD_NAME * Period Type - this is derived from the Set of Books Details record. * * <p> * Period Name LOV and Validation for Actual and Encumbrance Journals is only available for * Oracle Applications 11i and above. * * @param context - All the valid session information for the current user session. * @param columnValues - A hashtable containing all the values for the current row in the spreadsheet.
114 Company Confidential - For internal use only
* @param criteria - All the details for the Period Name LOV component. * * @return SQL result set of Periods * * @throws BneException * */ public BneResultSet getDomainValues (BneWebAppsContext context, Hashtable columnValues, BneCompositeSQLCriteria criteria) throws BneException { m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() Start"); SimpleDateFormat tempDateFormat = new SimpleDateFormat("yyyy-MM-dd"); tempDateFormat.setLenient(false); String String String String Date long long actualFlag budgetString sobIDString tempAccountingDate accountingDate budgetVersionId setOfBooksId = = = = = = = null; null; null; null; null; -1; -1;
// If the user has entered criteria in the filter fields on the LOV page, // add this restriction to the query by placing it in the extraSQL parameter // which will be passed to the BneOAPeriodNameSQL constructor. if (criteria != null) { extraSQL = criteria.evaluate(extraSQL); } // Get the value for the ACTUAL_FLAG interface column. actualFlag = (String)columnValues.get("ACTUAL_FLAG"); if (actualFlag == null) { throw new BneMissingParameterException(BneResourceString.getMlsString("LOV_NO_ACTUAL_FLAG")); } // Get the Set of Books ID value from the spreadsheet. sobIDString = (String)columnValues.get("SET_OF_BOOKS_ID"); if (sobIDString == null) { throw new BneMissingParameterException(BneResourceString.getMlsString("UPL_ER_NO_SOB")); }
115 Company Confidential - For internal use only
else { setOfBooksId = Long.parseLong(sobIDString); } // Get all the Set of Books information for the current user. BneSOBDetails sob = BneSOBDetails.getSOBDetails(context); // Confirm the Set of Books in the spreadsheet matches the current user's Set of Books. if (setOfBooksId != sob.getSetOfBooksID()) { throw new BneMissingParameterException(BneResourceString.getMlsString("UPL_ER_SOB_MATCH")); } if ("B".equals(actualFlag)) //Budget Journal { // Get the Budget Name referenced by BUDGET_VERSION_ID interface column name budgetString = (String)columnValues.get("BUDGET_VERSION_ID"); if (budgetString == null || budgetString.trim().equals("")) { m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() No Budget Name in the Spreadsheet."); throw new BneMissingParameterException(BneResourceString.getMlsString("UPL_ER_NO_BUDGET_VERSION")); } else { try { // Get the Budget Version ID using the BneOACurrencyCodeSQL class. // NOTE: Instead of calling using the BneOACurrencyCodeSQL class, the relevant query could // have alternatively been included in the BneOAPeriodNameSQL class. This is simply a case of // reusing of existing code. The BneOACurrencyCodeSQL class is not included in this document. budgetVersionId = Long.parseLong(BneOACurrencyCodeSQL.getBudgetId(context, budgetString)); } catch (SQLException e) { String errMsg = BneResourceString.getMlsString("UPL_ER_BUDGET_VERSION_ID"); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() Error retrieving budget version Id " + e); throw new BneSQLException(errMsg, e); } } String accountedPeriodType = sob.getAccountedPeriodType(); try { SQLHandle = new BneOAPeriodNameSQL(context, BUD_JOURNAL_NO_ACCT_DATE, extraSQL.getStatement()); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() SQLHandle created to Budget Query."); BneSQLStatement sqlStmt = new BneSQLStatement(SQLHandle.getQuery(), new Object []{ new Long(setOfBooksId), new Long (budgetVersionId), new Long(setOfBooksId), accountedPeriodType });
116 Company Confidential - For internal use only
sqlStmt.append("", extraSQL.getBindValues()); rs = SQLHandle.getBneResultSet(sqlStmt.getBindValuesAsArray()); } catch (Exception e) { throw new BneFatalException (e.toString()); } } // Check that this is an 11i instance - Period Name support is only available for Actual and Encumbrance // journals in Applications 11i and above. else if ((BneTechStack.getMiddleTierAppsRelease() > 11) && ("A".equals(actualFlag) || "E".equals(actualFlag))) { try { //Get the Accounting Date value from the spreadsheet. tempAccountingDate = (String)columnValues.get("ACCOUNTING_DATE"); if (tempAccountingDate == null || tempAccountingDate.equals("")) //if there is no Accounting Date { if ("A".equals(actualFlag)) { SQLHandle = new BneOAPeriodNameSQL(context, ACT_JOURNAL_NO_ACCT_DATE, extraSQL.getStatement()); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() SQLHandle created to + Actual Query - no Accounting Date in spreadsheet."); } else { SQLHandle = new BneOAPeriodNameSQL(context, ENC_JOURNAL_NO_ACCT_DATE, extraSQL.getStatement()); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() SQLHandle created to + Encumbrance Query - no Accounting Date in spreadsheet."); } BneSQLStatement sqlStmt = new BneSQLStatement(SQLHandle.getQuery(), new Object []{ new Long(setOfBooksId) }); sqlStmt.append("", extraSQL.getBindValues()); rs = SQLHandle.getBneResultSet(sqlStmt.getBindValuesAsArray()); } else // If an Accounting Date has been entered in the spreadsheet by the user, then the LOV is limited to // Periods that contain the Accounting Date. { java.util.Date utilDate = tempDateFormat.parse(tempAccountingDate); accountingDate = new java.sql.Date(utilDate.getTime()); if ("A".equals(actualFlag)) {
117 Company Confidential - For internal use only
SQLHandle = new BneOAPeriodNameSQL(context, ACT_JOURNAL_WITH_ACCT_DATE, extraSQL.getStatement()); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() SQLHandle created to Actual + Query - limit by Accounting Date."); } else { SQLHandle = new BneOAPeriodNameSQL(context, ENC_JOURNAL_WITH_ACCT_DATE, extraSQL.getStatement()); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() SQLHandle created to + Encumbrance Query - limit by Accounting Date."); } BneSQLStatement sqlStmt = new BneSQLStatement(SQLHandle.getQuery(), new Object []{ new Long(setOfBooksId), accountingDate, accountingDate }); sqlStmt.append("", extraSQL.getBindValues()); rs = SQLHandle.getBneResultSet(sqlStmt.getBindValuesAsArray()); } } catch (Exception e) { m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() Caught unknown exception: " + e); throw new BneFatalException (e.toString()); } } // If this is an Actual or Encumbrance journal on an 11.0 instance, throw an exception as // this is not supported. else { m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() Exception: Period Name cannot be + uploaded for Actual and Encumbrance Jnls in R11.0 "); throw new BneFatalException (BneResourceString.getMlsString("UPL_ER_PERIOD_NAME_LOV")); } m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.getDomainValues() End"); return rs; } /** * Method: validateColumn * * <p>This method validates the Period Name on a per-line basis. * * @param context - All the valid session information for the current user session. * @param requestParameters - A hashtable containing the document and upload page * parameters and their associated values. * @param columnValues - A hashtable containing all the values for the current upload row in the spreadsheet. * @param currentColumn - Information about the column being uploaded. This includes the * column name and value.
118 Company Confidential - For internal use only
* @return An empty BneUploaderMessage array is returned when the column is valid, and a * BneUploaderMessage array containing relevant upload messages is returned when * the column is invalid. Messages can be error, exception or warning messages. * Warning messages will not stop the Upload process. */ public BneUploaderMessage [] validateColumn(BneWebAppsContext context, Hashtable requestParameters, Hashtable columnValues, BneUploadColumn currentColumn) { m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.validateColumn() Start"); SimpleDateFormat tempDateFormat = new SimpleDateFormat("yyyy-MM-dd"); tempDateFormat.setLenient(false); BneUploadColumn BneUploadColumn BneUploadColumn boolean Date long long String String String String tempBudgetName tempActualFlag tempAccountingDate accountingDateFlag accountingDate setOfBooksId budgetVersionId budgetName periodName actualFlag key = = = = = = = = = = = null; null; null; false; null; -1; -1; null; null; null; null;
// Get the interface name to allow for retrieval of the column values - i.e. GL_INTERFACE String tableName = currentColumn.getInterfaceName(); BneSQLStatement extraSQL = new BneSQLStatement(" PS.PERIOD_NAME LIKE ?"); Object sqlHandleObject Object[] row BneOAPeriodNameSQL SQLHandle try { // Get all information for the ACTUAL_FLAG upload column. tempActualFlag = (BneUploadColumn)columnValues.get(BneStringUtils.concatSeperatorUnlessEmpty(tableName, "ACTUAL_FLAG", BneConstants.BNE_DEFAULT_SEPARATOR)); if ( tempActualFlag == null ) { throw new Exception(BneResourceString.getMlsString("UPL_ER_ACTUAL_FLAG")); } BneSOBDetails sob = BneSOBDetails.getSOBDetails(context); // Get all the Set of Books information for the current user. setOfBooksId = sob.getSetOfBooksID(); periodName = (String)currentColumn.getColumnValueAsObject(); // Get the PERIOD_NAME column value from the spreadsheet. // Get the ACTUAL_FLAG column value from the ACTUAL_FLAG upload column information. actualFlag = (String)tempActualFlag.getColumnValueAsObject();
119 Company Confidential - For internal use only
if ( "B".equals(actualFlag) ) // Budget Journal { // Get all information for the BUDGET_VERSION_ID upload column. tempBudgetName = (BneUploadColumn)columnValues.get(BneStringUtils.concatSeperatorUnlessEmpty(tableName, "BUDGET_VERSION_ID", BneConstants.BNE_DEFAULT_SEPARATOR)); if ( tempBudgetName == null) { currentColumn.flagColumnAsInvalid(); String msgStr = BneResourceString.getMlsString("UPL_ER_NO_BUDGET_VERSION"); return (uploadError(currentColumn, msgStr, "BneOAPeriodNameValidator")); } else { // Get the BUDGET_VERSION_ID column value from the BUDGET_VERSION_ID upload column information. budgetVersionId = Long.parseLong(tempBudgetName.getColumnValue()); } // Get Period Type from the SOB details. String accountedPeriodType = sob.getAccountedPeriodType(); // Cache on composite key of: // actualFlag value, Set of Books ID value, accountingDateFlag // Use commas as separators. key = actualFlag + "," + setOfBooksId + "," + accountingDateFlag; m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.validateColumn key = " + key); // Next, get the cached SQL Handle based on the key, however if it does not exist, // it must be created and added to the cache. sqlHandleObject = m_Statements.get(key); SQLHandle = null; if (sqlHandleObject != null) { SQLHandle = (BneOAPeriodNameSQL)sqlHandleObject; } else { SQLHandle = new BneOAPeriodNameSQL(context, BUD_JOURNAL_NO_ACCT_DATE, extraSQL.getStatement()); m_Statements.put(key, SQLHandle); } m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.validateColumn() " + ", budgetName = " + budgetName + ", accountedPeriodType = " + accountedPeriodType + ", setOfBooksId = " + setOfBooksId + ", periodName = " + (String)currentColumn.getColumnValueAsObject()); row = SQLHandle.getFirstRow(new Object []{ new Long(setOfBooksId), new Long(budgetVersionId),
120 Company Confidential - For internal use only
new Long(setOfBooksId), accountedPeriodType, periodName }); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.validateColumn() got " + ((Integer)row [0]).intValue()); // If one or more rows are returned from the query, then the column value is Valid. if (((Integer)row[0]).intValue() > 0) { currentColumn.flagColumnAsFineGrainValid(); return (new BneUploaderMessage[0]); } else { String msgStr = BneResourceString.getMlsString("UPL_ER_PERIOD_INVALID"); return (uploadError(currentColumn, msgStr, "BneOAPeriodNameValidator")); } } else if ((BneTechStack.getMiddleTierAppsRelease() > 11) && ("A".equals(actualFlag) || "E".equals(actualFlag))) { // Period Name is not a mandatory interface column therefore the column is defined as FineGrainValid when it // does not contain a value. if (periodName == null || periodName.equals("")) { currentColumn.flagColumnAsFineGrainValid(); return (new BneUploaderMessage[0]); } tempAccountingDate = (BneUploadColumn)columnValues.get(BneStringUtils.concatSeperatorUnlessEmpty( tableName, "ACCOUNTING_DATE", BneConstants.BNE_DEFAULT_SEPARATOR)); if (tempAccountingDate == null) { throw new Exception (BneResourceString.getMlsString("UPL_ER_NO_ACCOUNT_DATE")); } // Set the accountingDateFlag to false to mark that the SQL result set is not // limited by accountingDate - first we want to check that the period is in an open // or future-enterable period. The accounting date is not required for this check. accountingDateFlag = false; key = actualFlag + "," + setOfBooksId + "," + accountingDateFlag; m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.validateColumn key = " + key); sqlHandleObject = m_Statements.get(key); SQLHandle = null; if (sqlHandleObject != null) { SQLHandle = (BneOAPeriodNameSQL)sqlHandleObject; } else
121 Company Confidential - For internal use only
{ // The following query ensures that the Period is an open or future-enterable period. (This is the // first business rule that is checked) if ("A".equals(actualFlag)) { SQLHandle = new BneOAPeriodNameSQL(context, ACT_JOURNAL_NO_ACCT_DATE, extraSQL.getStatement()); } else { SQLHandle = new BneOAPeriodNameSQL(context, ENC_JOURNAL_NO_ACCT_DATE, extraSQL.getStatement()); } m_Statements.put(key, SQLHandle); } m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.validateColumn() " + ", setOfBooksId = " + setOfBooksId + ", periodName = " + (String)currentColumn.getColumnValueAsObject()); row = SQLHandle.getFirstRow(new Object []{ new Long( setOfBooksId ), periodName }); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.validateColumn() got " + ((Integer)row[0]).intValue()); // if the query returns no rows, then return an Upload error. if (((Integer)row[0]).intValue() <= 0) { String msgStr = BneResourceString.getMlsString( "UPL_ER_PERIOD_INVALID"); return (uploadError(currentColumn, msgStr, "BneOAPeriodNameValidator")); } // Set the accountingDateFlag to true to mark that the SQL result set is // limited by accountingDate. This tests that the Accounting Date falls within // the selected Period. accountingDateFlag = true; key = actualFlag + "," + setOfBooksId + "," + accountingDateFlag; m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.validateColumn key = " + key); sqlHandleObject = m_Statements.get(key); SQLHandle = null; // The following query ensures that the Period includes the accounting date. (This is the second // business rule that is checked) if (sqlHandleObject != null) { SQLHandle = (BneOAPeriodNameSQL)sqlHandleObject; }
122 Company Confidential - For internal use only
else { if ("A".equals(actualFlag)) { SQLHandle = new BneOAPeriodNameSQL(context, ACT_JOURNAL_WITH_ACCT_DATE, extraSQL.getStatement()); } else { SQLHandle = new BneOAPeriodNameSQL(context, ENC_JOURNAL_WITH_ACCT_DATE, extraSQL.getStatement()); } m_Statements.put(key, SQLHandle); } java.util.Date utilDate = tempDateFormat.parse(tempAccountingDate.getColumnValue()); accountingDate = new java.sql.Date(utilDate.getTime()); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.validateColumn() " + ", setOfBooksId = " + setOfBooksId + ", accountingDate = " + accountingDate.toString() + ", periodName = " + (String)currentColumn.getColumnValueAsObject()); row = SQLHandle.getFirstRow(new Object []{ new Long(setOfBooksId), accountingDate, accountingDate, periodName }); m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.validateColumn() got " + ((Integer)row[0]).intValue()); // If one or more rows are returned from the query, then the column value is Valid. // i.e. The Accounting Date falls within the selected Period. if (((Integer)row[0]).intValue() > 0) { currentColumn.flagColumnAsFineGrainValid(); } else { String msgStr = BneResourceString.getMlsString("UPL_ER_PER_NO_ACTDT"); return (uploadError(currentColumn, msgStr, "BneOAPeriodNameValidator")); } } currentColumn.flagColumnAsFineGrainValid(); return (new BneUploaderMessage[0]); } catch (Exception e) { // Return an upload error for any unexpected exceptions. String msgStr = BneResourceString.getMlsString("UPL_ER_OBTAIN_PERIOD"); return (uploadException(currentColumn, msgStr, "BneOAPeriodNameValidator", e)); } } /** * Method: shutdownValidator
123 Company Confidential - For internal use only
* * <p>This method closes the Period Name validator. Any open cursors are closed in * this method. * * @return Any relevant upload messages. An empty array of BneUploaderMessage is returned * when there are no errors. */ public BneUploaderMessage [] shutdownValidator () { m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.shutdownValidator() Start"); if (m_Statements != null) { Enumeration stmts = m_Statements.keys(); while (stmts.hasMoreElements()) { Object k = stmts.nextElement(); Object o = m_Statements.get(k); BneOAPeriodNameSQL SQLHandle = (BneOAPeriodNameSQL)o; SQLHandle.close(); m_Statements.remove(k); } m_Statements = null; } m_Logger.log(BneTrace.TRACE, "BneOAPeriodNameValidator.shutdownValidator() End"); return (new BneUploaderMessage[0]); } }
Appendix E Sample Component Class - BneOAPeriodNameComponent (GL Journals Period Name LOV)
/* * +=======================================================================+ * | Copyright (c) 2003 Oracle Corporation, Redwood Shores, CA, USA | * | All rights reserved. | * +=======================================================================+ * | HISTORY | * | | * | 27-Jun-2003 John Smith Created. | * | | * +=======================================================================+ */ package oracle.apps.bne.integrator.component.gl; import java.sql.ResultSetMetaData; import java.sql.SQLException;
124 Company Confidential - For internal use only
import java.util.Hashtable; import java.util.Vector; import javax.servlet.http.HttpServletRequest; import import import import import import import import oracle.apps.bne.exception.BneException; oracle.apps.bne.exception.BneParameterException; oracle.apps.bne.exception.BneSQLException; oracle.apps.bne.exception.BneMissingParameterException; oracle.apps.bne.framework.BneBajaContext; oracle.apps.bne.framework.BneBajaPage; oracle.apps.bne.framework.BneConstants; oracle.apps.bne.framework.BneWebAppsContext;
import oracle.apps.bne.integrator.component.BneAbstractListOfValues; import oracle.apps.bne.integrator.validators.gl.BneOAPeriodNameValidator; import oracle.apps.bne.parameter.BneParameter; import oracle.apps.bne.parameter.BneParameterList; import oracle.apps.bne.repository.BneResourceString; import oracle.apps.bne.utilities.sql.BneCompositeSQLCriteria; import oracle.apps.bne.utilities.sql.BneResultSet; import oracle.apps.bne.utilities.sql.BneSimpleSQLCriteria; import oracle.apps.bne.webui.control.BneLOVControlBean; import oracle.apps.fnd.common.VersionInfo; import oracle.cabo.servlet.Page; import oracle.cabo.servlet.event.PageEvent; import oracle.cabo.ui.data.DictionaryData; /** * Class BneOAPeriodNameComponent * * * @author John Smith * @version $Revision: $ $Date: $ */ public class BneOAPeriodNameComponent extends BneAbstractListOfValues { /** Field RCS_ID */ public final static String RCS_ID = "$Header: $"; /** * RCS version insertion into <code>VersionInfo</code> on class loading. */
125 Company Confidential - For internal use only
public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion(RCS_ID, "oracle.apps.bne.integrator.component.gl"); /** * Private variables */ private BneWebAppsContext m_bneWebAppsContext = null; private BneOAPeriodNameValidator m_validator = null; private String[] m_validatorParameters = null; // // Basic Filter Search Values // private String m_filterField = null; private String m_filterValue = null; /** * Method: getLOVProcessorType * <p> * The viewer processes the Period Name LOV as a TABLE. * * @return the viewer processor type TABLE. */ public String getLOVProcessorType() { return BneConstants.BNE_LOV_TYPE_TABLE; } /** * Method: init * <p> * This method instantiates the BneOAPeriodNameValidator class and calls getDomainParameters * to create a String array of the interface column names required by the Component. * * @param context The interface providing context about the current http request, and * providing access to generic Baja Services. * @param page Identifies the Period Name LOV page. * @param event The interface for events triggered on the Period Name LOV page. Encapsulates * a servlet request. * */ public void init (BneBajaContext context, Page page, PageEvent event) { if (m_validator == null) { m_validator = new BneOAPeriodNameValidator(); m_validatorParameters = m_validator.getDomainParameters(); } }
126 Company Confidential - For internal use only
/** * Method: handleListOfValues * <p> * This method returns a BneBajaPage containing display information for the Period Name LOV page. * * @param context The interface providing context about the current http request, and * providing access to generic Baja Services. * @param page Identifies the Period Name LOV page. * @param event The interface for events triggered on the Period Name LOV page. Encapsulates * a servlet request. * @param bean Holds information about the Period Name LOV. * * @return a BneBajaPage * * @throws BneException * */ public BneBajaPage handleListOfValues (BneBajaContext context, Page page, PageEvent event, BneLOVControlBean bean) throws BneException { BneWebAppsContext ctx = context.getBneWebAppsContext(); BneCompositeSQLCriteria searchCriteria = null; Hashtable parameterValues = new Hashtable(); String tableHeaderString = BneResourceString.getMlsString("LOV_PERIOD_NAME"); String[] tableHeaders = {tableHeaderString}; String[] tableColumns = {"PERIOD_NAME"}; String[] tableSelectColumn = {"PERIOD_NAME"}; handlePageParameters(context, page, event); for (int index = 0; index < m_validatorParameters.length; index++) { String validatorValue = getParameterValue(ctx, m_validatorParameters[index]); if (validatorValue != null) { parameterValues.put(m_validatorParameters[index], validatorValue); } } if ((m_filterValue != null) && !m_filterValue.trim().equals("")) { searchCriteria = new BneCompositeSQLCriteria(); BneSimpleSQLCriteria simpleCriteria = new BneSimpleSQLCriteria(BneSimpleSQLCriteria.NONE, "PS.PERIOD_NAME", BneSimpleSQLCriteria.TYPE_NONE, BneSimpleSQLCriteria.LIKE, m_filterValue, BneSimpleSQLCriteria.TYPE_STRING); simpleCriteria.setSearchsCaseInsensitivity(true); searchCriteria.addCriteria(simpleCriteria); }
127 Company Confidential - For internal use only
setTableFilter(true); setPageTitle(getParameterValue(context.getBneWebAppsContext(), "window-caption")); setTableData(getTableData(ctx, bean, parameterValues, searchCriteria)); setTableColumns(tableColumns); setTableHeaders(tableHeaders); setTableSelectColumn(tableSelectColumn); return null; } /** * Method: getListOfValueParameters * <p> * This method creates a BneParameterList object consisting of one record for each parameter in the * m_validatorParameters String array (created in the init method). * * @throws BneParameterException */ public void getListOfValueParameters () throws BneParameterException { for (int index = 0; index < m_validatorParameters.length; index++) { String parameterName = m_validatorParameters[index]; String desc = "Oracle Applications GL_INTERFACE." + parameterName + " field."; addComponentParameter(new BneParameter(parameterName, "", desc)); } } /** * Method: handlePageParameters * <p> * This method does an http get to retrieve the values entered in the filter fields in the Period Name LOV page. * * @param context The interface providing context about the current http request, and * providing access to generic Baja Services. * @param page Identifies the Period Name LOV page. * @param event The interface for events triggered on the Period Name LOV page. Encapsulates * a servlet request. * * @throws BneException */ private void handlePageParameters (BneBajaContext context, Page page, PageEvent event) throws BneException { HttpServletRequest httpRequest = context.getServletRequest(); m_filterField = httpRequest.getParameter("listOfValues:bne:filterField"); m_filterValue = httpRequest.getParameter("listOfValues:bne:filterValue");
128 Company Confidential - For internal use only
} /** * Method: getTableData * * * @param bneWebAppsContext All the valid session information for the current user session. * @param bean Holds information about the Period Name LOV control * @param parameterValues This is a hashtable containing the list of all columns and their * values that are required by the SQL that will derive the list of values. * @param criteria This contains all the details for the Period Name LOV Component. * * @return a DictionaryData object containing all the Period values that will be displayed on the LOV page. * * @throws BneException * */ public DictionaryData [] getTableData (BneWebAppsContext bneWebAppsContext, BneLOVControlBean bean, Hashtable parameterValues, BneCompositeSQLCriteria criteria) throws BneException { DictionaryData sqlRow = null; Vector myRows = new Vector(); BneResultSet rs = null; ResultSetMetaData rsmd = null; try { String columnValue = null; rs = m_validator.getDomainValues(bneWebAppsContext, parameterValues, criteria); if (rs != null) { rsmd = rs.getResultSet().getMetaData(); while (rs.next()) { sqlRow = new DictionaryData(); for (int i = 1; i <= rsmd.getColumnCount(); i++) { columnValue = rs.getString(i); if (columnValue == null) { sqlRow.put(rsmd.getColumnName(i), ""); } else { sqlRow.put(rsmd.getColumnName(i), columnValue);
129 Company Confidential - For internal use only
} } myRows.addElement(sqlRow); } } } catch (SQLException e) { throw new BneSQLException(BneResourceString.getMlsString("UPL_PERIOD_NAME_SQL_EXCEPTION"), e); } catch (BneMissingParameterException mpe) { bean.addError(mpe.getMessage()); } finally { m_validator.shutdownValidator(); } DictionaryData[] allData = new DictionaryData [myRows.size()]; for (int index = 0; index < myRows.size(); index++) { allData[index] = (DictionaryData) myRows.elementAt(index); } return allData; } /** * Method: getComponentName * * @return a String containing the name of the Component. * */ public String getComponentName () { return "BneOAPeriodName"; }
/** * Method: getComponentVersion * * @return a String containing the revision identifier for the Component. * */ public String getComponentVersion () {
130 Company Confidential - For internal use only
1.2.1.1.1
BNE Parameter Definition Sample Metadata for the Period Name Validator/LOV The following three parameter definitions are defined for the Period Name example included in Appendices A, B and C:
1.2.1.2
BNE_PARAM_DEFNS_B
Column Name APPLICATION_ID PARAM_DEFN_CODE OBJECT_VERSION_NUMBER PARAM_NAME PARAM_SOURCE PARAM_CATEGORY DATATYPE DEFAULT_REQUIRED_FLAG DEFAULT_VISIBLE_FLAG DEFAULT_USER_MODIFYABLE_FLAG VAL_TYPE MAX_SIZE DISPLAY_TYPE DISPLAY_STYLE DISPLAY_SIZE APPLICATION_ID PARAM_DEFN_CODE OBJECT_VERSION_NUMBER PARAM_NAME PARAM_SOURCE PARAM_CATEGORY DATATYPE DEFAULT_REQUIRED_FLAG DEFAULT_VISIBLE_FLAG DEFAULT_USER_MODIFYABLE_FLAG DEFAULT_NUMBER VAL_TYPE MAX_SIZE DISPLAY_TYPE DISPLAY_STYLE DISPLAY_SIZE APPLICATION_ID PARAM_DEFN_CODE OBJECT_VERSION_NUMBER PARAM_NAME PARAM_SOURCE PARAM_CATEGORY DATATYPE DEFAULT_REQUIRED_FLAG DEFAULT_VISIBLE_FLAG DEFAULT_USER_MODIFYABLE_FLAG VAL_TYPE MAX_SIZE DISPLAY_TYPE DISPLAY_STYLE DISPLAY_SIZE
Column Value 231 OA_PER_NAME_WIN_CAP 1 Web ADI Components: OA_PERIOD_NAME window-caption WEBADI:Components 3 1 N Y Y 1 100 4 1 100 231 TABLE_BLOCK_SIZE 1 table-block-size WEBADI:Components 5 2 N Y Y 25 1 100 4 1 10 231 TABLE_SELECT_COLUMN 1 table-select-column WEBADI:Components 5 1 N Y Y 1 100 4 1 20
BNE_PARAM_DEFNS_TL
Column Name APPLICATION_ID PARAM_DEFN_CODE LANGUAGE SOURCE_LANG USER_NAME DEFAULT_STRING DEFAULT_DESC PROMPT_LEFT PROMPT_ABOVE USER_TIP APPLICATION_ID PARAM_DEFN_CODE LANGUAGE SOURCE_LANG USER_NAME DEFAULT_DESC PROMPT_LEFT PROMPT_ABOVE USER_TIP APPLICATION_ID PARAM_DEFN_CODE LANGUAGE SOURCE_LANG USER_NAME PROMPT_LEFT PROMPT_ABOVE USER_TIP
Column Value 231 OA_PER_NAME_WIN_CAP US US Title to place on window caption bar. Search and Select Period Name Search and Select Period Name window-caption window-caption Title to place on window caption bar. 231 TABLE_BLOCK_SIZE US US Determines if the number of records to display. Number of records to show in an lov table-block-size table-block-size Determines if the number of records to display. 231 TABLE_SELECT_COLUMN US US Select column, comma-seperated list of columns to be selected. If aliases exist then use the alias name. Example: NAME,DEPT table-select-column table-select-column Select column, comma-seperated list of columns to be selected. If aliases exist then use the alias name. Example: NAME,DEPT
BNE Parameter List Sample Metadata for the Period Name Validator/LOV
The following parameter list is defined for the Period Name example included in Appendices A, B and C: BNE_PARAM_LISTS_B
Column Value 231 COMP_PERIOD_NAME 1 Y This list is used for the OA_PERIOD_NAME Component.
BNE_PARAM_LISTS_TL
BNE Parameter List Items Sample Metadata for the Period Name Validator/LOV
BNE_PARAM_LIST_ITEMS
Column Name APPLICATION_ID PARAM_LIST_CODE SEQUENCE_NUM PARAM_DEFN_APP_ID PARAM_DEFN_CODE STRING_VALUE DESC_VALUE APPLICATION_ID PARAM_LIST_CODE SEQUENCE_NUM PARAM_DEFN_APP_ID PARAM_DEFN_CODE PARAM_NAME APPLICATION_ID PARAM_LIST_CODE SEQUENCE_NUM PARAM_DEFN_APP_ID
Column Value 231 COMP_PERIOD_NAME 1 231 TABLE_SELECT_COLUMN PERIOD_NAME PERIOD_NAME 231 COMP_PERIOD_NAME 2 231 OA_PER_NAME_WIN_CAP window-caption 231 COMP_PERIOD_NAME 3 231
BNE_COMPONENTS_TL Table
BNE Interface Column(s) Sample Metadata for the Period Name Validator/LOV
BNE_INTERFACE_COLS_B Table
Column Name APPLICATION_ID INTERFACE_CODE OBJECT_VERSION_NUMBER SEQUENCE_NUM VAL_TYPE VAL_OBJ_NAME VAL_COMPONENT_APP_ID VAL_COMPONENT_CODE LOV_TYPE OFFLINE_LOV_ENABLED_FLAG
Column Name APPLICATION_ID INTERFACE_CODE SEQUENCE_NUM INTERFACE_COL_TYPE INTERFACE_COL_NAME ENABLED_FLAG REQUIRED_FLAG DISPLAY_FLAG READ_ONLY_FLAG NOT_NULL_FLAG SUMMARY_FLAG MAPPING_ENABLED_FLAG GROUP_NAME VAL_TYPE VAL_OBJ_NAME LOV_TYPE OFFLINE_LOV_ENABLED_FLAG
Column Value 231 GL_INTERFACE_115 138 2 REVERSAL_PARENT Y N N N N N N REVERSAL GROUP oracle.apps.bne.integrator.validators.gl.BneOAReversalGroupValidator NONE N
BNE_INTERFACE_COLS_B Including Interface Columns in the Validation Group For each Interface Column to be validated by the Group Validator/LOV, update the GROUP_NAME column to contain the GROUP_NAME defined by the new Interface Column definition (see above). Continuing the above example, two interface columns use the REVERAL group:
Column Name APPLICATION_ID INTERFACE_CODE SEQUENCE_NUM INTERFACE_COL_NAME GROUP_NAME APPLICATION_ID INTERFACE_CODE SEQUENCE_NUM INTERFACE_COL_NAME GROUP_NAME Column Value 231 GL_INTERFACE_115 58 REFERENCE7 REVERSAL 231 GL_INTERFACE_115 59 REFERENCE8 REVERSAL
ID
1
Issue
Update with info on creating classes for Java validators and LOVs
Resolution
Get Info from Tony
Responsibility
Target Date
Impact Date
Closed Issues
ID
Issue
Resolution
Responsibility
Target Date
Impact Date