Showing posts with label oracle. Show all posts
Showing posts with label oracle. Show all posts

Tuesday, October 8, 2013

Advanced: Viewing all workflows owned by all users using Workflow Administrator responsibility



Below listed are the ways of assigning a role to view all workflows in Oracle Applications

Note: A role is created automatically when a new user or a responsibility is defined in Oracle Applications. These roles are available in the table wf_local_roles which is consolidate in the view wf_roles.

1)      From Oracle Applications, Workflow Administrator responsibility
a.       Navigate to the responsibility à Administration tab à Workflow Configuration and select the Workflow System Administrator value from the LOV field. 
b.      Set to ‘*’ if all users are given access to view all workflows

2)      Using Backend (database) Update
a.       Get the role at the level which the access needs to be provided
User Level
In order to assign workflow admin access to view all workflows in Oracle then select the role for the user created in Oracle Applications from the view wf_roles, this is stored in the column ‘NAME’ of the view.
Example: SYSADMIN (or) PATRICK

Responsibility Level
In order to assign workflow admin access to view all workflows for all users through a responsibility in Oracle then select the role for the responsibility created in Oracle Applications from the view wf_roles, this is stored similar to above in the column ‘NAME’ of the view.
FORMAT: FND_RESP|FND|<RESP_SHORT_NAME>|STANDARD

b.      Update the table WF_RESOURCES which holds the access information using the role arrived from step 2.a. Prior to update always check what is stored currently and get a backup of the information, which is easier to revert back the changes.
UPDATE WF_RESOURCES
SET TEXT=<ROLE_NAME>
WHERE NAME = 'WF_ADMIN_ROLE';
COMMIT;

3)      Default using AUTOCONFIG
When autoconfig is run, the default admin role defined in the CONTEXT file is picked and configured. This context file is specific to application server and stores most of the default configuration variables. The value for wfadmin is stored in the variable 's_wf_admin_role'. Once you ahve sourced the environment file you can echo the context file location using $CONTEXT_FILE variable and then search for the variable in the file. The value from this file will be considered when the next autoconfig is run.

Example:
<username oa_var="s_wf_admin_role">FND_RESP|FND|FNDWF_ADMIN_WEB|STANDARD</username>

Running Autoconfig
$OAD_TOP/admin/scripts/$CONTEXT_NAME/adautocfg.sh (11i)
$ADMIN_SCRIPTS_HOME/adautocfg.sh (R12)

Monday, September 30, 2013

Script: Oracle Applications package to create and insert (FND) LOOKUP Types & Values

Below is a sample script to create lookup types in Oracle and also to load lookup values for the corresponding lookup types using standard Oracle APIs. I have used the FND Application ID to create lookups and customization level is user. There are many other ways to load data into lookups, we can also use FNDLOAD which is a very good option to migrate data lookups from one instance to another.
DECLARE
   ln_rowid    VARCHAR2 (1000);
   ln_rowid1   VARCHAR2 (1000);
BEGIN
   fnd_lookup_types_pkg.insert_row (x_rowid                    => ln_rowid,
                                    x_lookup_type              => 'XXTEST',
                                    x_security_group_id        => 0,
                                    x_view_application_id      => 0,
                                    x_application_id           => 0,
                                    x_customization_level      => 'U',
                                    x_meaning                  => 'XXTEST',
                                    x_description              => 'XXTEST',
                                    x_creation_date            => SYSDATE,
                                    x_created_by               => 0,
                                    x_last_update_date         => SYSDATE,
                                    x_last_updated_by          => 0,
                                    x_last_update_login        => -1
                                   );
   DBMS_OUTPUT.put_line (ln_rowid);
   fnd_lookup_values_pkg.insert_row (x_rowid                    => ln_rowid1,
                                     x_lookup_type              => 'XXTEST',
                                     x_security_group_id        => 0,
                                     x_view_application_id      => 0,
                                     x_lookup_code              => 'XXHR_INFO',
                                     x_tag                      => NULL,
                                     x_attribute_category       => NULL,
                                     x_attribute1               => NULL,
                                     x_attribute2               => NULL,
                                     x_attribute3               => NULL,
                                     x_attribute4               => NULL,
                                     x_enabled_flag             => 'Y',
                                     x_start_date_active        => TO_DATE ('01-JAN-1950',
                                                                            'DD-MON-YYYY'
                                                                           ),
                                     x_end_date_active          => NULL,
                                     x_territory_code           => NULL,
                                     x_attribute5               => NULL,
                                     x_attribute6               => NULL,
                                     x_attribute7               => NULL,
                                     x_attribute8               => NULL,
                                     x_attribute9               => NULL,
                                     x_attribute10              => NULL,
                                     x_attribute11              => NULL,
                                     x_attribute12              => NULL,
                                     x_attribute13              => NULL,
                                     x_attribute14              => NULL,
                                     x_attribute15              => NULL,
                                     x_meaning                  => 'XXHR Information',
                                     x_description              => NULL,
                                     x_creation_date            => SYSDATE,
                                     x_created_by               => 0,
                                     x_last_update_date         => SYSDATE,
                                     x_last_updated_by          => 0,
                                     x_last_update_login        => -1
                                    );
   DBMS_OUTPUT.put_line (ln_rowid1);
   COMMIT;
END;

Thursday, September 5, 2013

Query: List of all APIs in Oracle Applications R12.1.3

I was building APIs for a recent HRMS migration project and was searching all over iRep for the list of APIs, mandatory parameters, data types to actually build my mapping repository. It is a long and time consuming process, this project covers loads of standard as well as extensible migration entities using SIT / EITs & UDTs. So I built this script to find out all the available APIs in Oracle Applications R12.1.3, the below script is limited to HR but can be extended to other modules. I made this consideration as the excels become too huge to be maintained.

The below script would list down all HRMS APIs of PLSQL type and their description, which is very useful for your interface validations and to understand the use of this API.
SELECT   ff.TYPE, ff.irep_method_name, fif.function_id, ff.function_name, fic.class_name, irep_name, fif.description
    FROM fnd_form_functions_vl ff, fnd_irep_function_flavors fif, fnd_irep_classes fic
   WHERE 1 = 1
--and fif.function_id = 49293
     AND fif.function_id = ff.function_id
     AND ff.irep_class_id = fic.class_id
     AND function_name LIKE 'PLSQL%UPDATE_PERSON_ADDRESS'
     AND (irep_name LIKE 'HR%' OR irep_name LIKE 'PER%' OR irep_name LIKE 'PAY%')
ORDER BY 4
The below script would list down all HRMS APIs of PLSQL type and their mandatory parameters, this can be used to build the basic skeleton for your custom wrapper programs.

SELECT   irep_name || '.' || ff.irep_method_name api, fp.param_name, fp.param_direction,
         fp.param_optional, fp.DEFAULT_VALUE, fp.parameter_type
    FROM fnd_form_functions_vl ff,
         fnd_irep_function_flavors fif,
         fnd_irep_classes fic,
         fnd_parameters fp
   WHERE 1 = 1
--     AND fif.function_id = 49293                                                             --49333
     AND fif.function_id = ff.function_id
     AND ff.irep_class_id = fic.class_id
     AND function_name LIKE 'PLSQL%'
     AND (irep_name LIKE 'HR%' OR irep_name LIKE 'PER%' OR irep_name LIKE 'PAY%')
     AND fp.function_id = ff.function_id
     AND param_optional = 'N'
ORDER BY 1, param_sequence

The above script can be modified to list down all HRMS APIs of PLSQL type and the entire list of parameters which could run to lots of rows in your excel export. This can be done by commenting out the param_optional column.


Wednesday, August 21, 2013

Tutorial: Loading images or any blob type files from server to Oracle Database using PLSQL - Part 1

Recently I was working with External tables which is becoming very handy in all the data transfer activities that my work wants to me to perform. They are really cool alternatives to SQL*Loader Utility. I also came across a requirement to load images from your local / server machine to Oracle Database and this is where I wanted to take a look at external tables whether they are equipped to handle images / documents or any other MIME types for that case, the answer was YES and it made my coding world easy to understand and deploy.

There are many ways which we can load image / document type file formats into Oracle Database fields (BLOB Type):- Java methods, DBMS_LOB package or External Tables. This blog post will detail on the DBMS_LOB and External Table to handle loading images / documents stored on a local / server machine as a complete file.

External Table:

1) Create a file (file.txt) for the external table to read with columns ID, file_name, file_name

1,034517.jpg,034517.jpg
2,037608.jpg,037608.jpg
3,045023.jpg,045023.jpg
4,049412.jpg,049412.jpg
5,059125.jpg,059125.jpg
6,066945.jpg,066945.jpg

2) Create a database directory where the file will be stored on the machine

CREATE OR REPLACE DIRECTORY xxfile_dir AS '/usr/tmp/JK'  

3) Save the file 'file.txt' and the files that are referenced inside the file in the directory mentioned in step 2

4) Now connect to database and create an external table with the columns ID, file_name, BLOB column for your file

CREATE TABLE XXLOAD_FILE (
  ID                NUMBER(10),
  FILE_NAME         CHAR(15),
  BLOB_CONTENT      BLOB
)
ORGANIZATION EXTERNAL
(
  TYPE ORACLE_LOADER
  DEFAULT DIRECTORY XXFILE_DIR
  ACCESS PARAMETERS
  (
    RECORDS DELIMITED BY NEWLINE
    BADFILE XXFILE_DIR:'lob_tab_%a_%p.bad'
    LOGFILE XXFILE_DIR:'lob_tab_%a_%p.log'
    FIELDS TERMINATED BY ','
    MISSING FIELD VALUES ARE NULL
    (
      ID                CHAR(10),
      FILE_NAME         CHAR(15),
      BLOB_FILENAME     CHAR(100)
    )
    COLUMN TRANSFORMS (BLOB_CONTENT FROM LOBFILE (BLOB_FILENAME) FROM (XXFILE_DIR) BLOB)
  )
  LOCATION ('file.txt')
)
PARALLEL 2
REJECT LIMIT UNLIMITED;

4) Now you are all done, either call the table using a select statement or in your procedures and load into your document / image tables. You can see that the field BLOB_FILENAME does not match the actual definition as this field is used to actually fetch the file and save it into BLOB_CONTENT field using the COLUMN TRANSFORMS function

select * from XXLOAD_FILE
or
create table XXFILE as
select ID, substr(FILE_NAME,1,instr(FILE_NAME,'.',1)-1) person_no, FILE_NAME, BLOB_CONTENT FILE from XXLOAD_FILE


As this blog post is getting really huge, I would be splitting the tutorial using DBMS_LOB in the next post.

Tuesday, August 6, 2013

Tutorial: Oracle Applications - Custom Key Flexfields

The following are the points that need to be taken into consideration while creating a custom Key Flexfield (KFF)

1) Structure of your custom Key Flexfield table, the table should contain all of the following
- Combination ID column
- Structure ID Column
- Enabled Flag Column
- Summary Flag Column
- Start Date Active & End Date Active Column
- Segment columns

2) Sequence
- A sequence should be created with the same name as the table created appended with '_S'. There is no mapping to table or KFF required.

3) Registration of table created in the Database using inbuilt AD_DD package

4) Registration of Key Flexfield from the front end applications

5) Decide on whether to allow dynamic insertion of flexfield values for the KFF

Friday, August 2, 2013

OA Framework - How to find the correct version of JDeveloper to use with eBusiness Suite 11i or Release 12.x (Doc ID 416708.1)

This is a excerpt from the metalink note, you can download the patch from metalink using patch search.

Identify the OA Framework version in your instance by activating diagnostics and click the "About This Page" from any OAF page. Click the "Technology Components" tab. The OA Framework version in the top row of the table can then be matched to the JDeveloper Patch.

Release 11i

OA Framework 5.10 patchJDeveloper 9i Patch
ATG.PF.H (patch 3438354 or Oracle Applications 11.5.10)Patch 4045639 9IJDEVELOPER WITH OA EXTENSION ARU FOR FWK.H
ATG PF CU1 (patch 4017300)Patch 4141787 9IJDEVELOPER WITH OA EXTENSION ARU FOR CU1
ATG PF CU2 (patch 4125550)Patch 4573517 Oracle9i JDeveloper with OA Extension for 11.5.10 CU2
11i.ATG_PF.H RUP3 (patch 4334965)Patch 4725670 9IJDEVELOPER WITH OA EXTENSION ARU FOR 11i10 RUP3
11i.ATG_PF.H RUP4 (patch 4676589)Patch 5455514 9IJDEVELOPER WITH OA EXTENSION ARU FOR 11i10 RUP4
11i.ATG_PF.H RUP5 (patch 5473858)Patch 6012619 9IJDeveloper With OA Extension ARU FOR 11i10 RUP5
11i.ATG_PF.H.RUP6 (patch 5903765)Patch 6739235 9IJDeveloper With OA Extension ARU FOR 11i10 RUP6
Patch 6469392 9IJDEVELOPER WITH OA EXTENSION ARU FOR 11I10 RUP6
11i.ATG_PF.H.delta.7 (patch 6241631)Patch 8751878 9I JDEVELOPER WITH OA EXTENSION ARU FOR 11I RUP7


Release 12.0

ATG Release 12 VersionJDeveloper 10g Patch
12.0.0Patch 5856648 10g Jdev with OA Extension
12.0.1  (patch 5907545)Patch 5856648 10g Jdev with OA Extension
12.0.2  (patch 5484000 or 5917344)Patch 6491398 10g Jdev with OA Extension ARU for R12 RUP2 (replaces 6197418)
12.0.3  (patch 6141000 or 6077669)Patch 6509325 10g Jdev with OA Extension ARU for R12 RUP3
12.0.4 (patch 6435000 or 6272680)Patch 6908968 10G JDEVELOPER WITH OA EXTENSION ARU FOR R12 RUP4
12.0.5 (No new ATG code released)No new JDev patch required
12.0.6  (patch 6728000 or patch 7237006)Patch 7523554 10G Jdeveloper With OA Extension ARU for R12 RUP6

Release 12.1

ATG Release 12.1 VersionJDeveloper 10g Patch
12.1 (Controlled Release - only included for completeness)Patch 7315332 10G Jdev with OA Extension ARU for R12.1 (Controlled Release)
12.1.1 (rapidInstall or patch 7303030)Patch 8431482 10G Jdeveloper with OA Extension ARU for R12.1.1
12.1.2 (patch 7303033 or patch 7651091)Patch 9172975 10G JDEVELOPER WITH OA EXTENSION ARU FOR R12.1.2
12.1.3 (patch 9239090 or patch 8919491)Patch 9879989 10G JDEVELOPER WITH OA EXTENSION ARU FOR R12.1.3
12.1.3.1 (patch 11894708)Patch 9879989 10G JDEVELOPER WITH OA EXTENSION ARU FOR R12.1.3

Downloads: Oracle Workflow Builder / Client / Standalone for Windows

Below listed are the links to Oracle Workflow Builder with loads of variant to versions and compatibility. I have listed the compatibility changes for latest Windows Operating Systems (Platforms).

Download Links:

Patch 2053572 Is Required To Install Oracle 9i Workflow Client

Patch 2610507 Oracle Workflow Builder Release 2.6.1 

Patch 3031420 Workflow Builder 2.6.3.0.1
 
Patch 4066964 Workflow Client for Apps 11i10 ( 2.6.3.01 ) running Windows 7 Ultimate ( 64 Bit )

Patch 6970344 Workflow Builder client 2.6.3 is certified for Windows XP, Vista and Windows 7 (32-bit and 64-bit) users with Oracle E-Business Suite 11i, 12.0 and 12.1.  


Compatibility:



Setting Compatibility Mode Manually

To set compatibility mode before running the executable follow these steps;

  1. Right click on the 'setup.exe' for the application
  2. Select 'Troubleshoot Compatibility' and the 'Program Compatibility' window should open
  3. Click the option 'Try recommended settings'
  4. The 'Windows compatibility mode' should be set to 'Windows XP (Service Pack 2)' or 'Windows XP (Service Pack 3)'
  5. Click the 'Start the program...'
  6. If the 'User Account Control' window opens with the message, 'Do you want to allow the following program from an unknown publisher to make changes to this computer?', select 'Yes'
  7. The 'Oracle Universal Installer' window should now open allowing installation of the application

Let Windows Set Compatibility Mode

  1. Run the 'setup.exe' for the application
  2. If the 'User Account Control' window opens with the message, 'Do you want to allow the following program from an unknown publisher to make changes to this computer?', select 'Yes'
  3. When the 'Oracle Universal Installer' window tries to open the following Error window appears:
  4. Click the 'OK' button and the 'Program Compatibility Assistant' window will open
  5. Select the option, 'Reinstall using the recommended settings'
  6. If the 'User Account Control' window opens with the message, 'Do you want to allow the following program from an unknown publisher to make changes to this computer?', select 'Yes'
The 'Oracle Universal Installer' window should now open allowing installation of the application

Tuesday, July 30, 2013

Whitepaper: An Idea - Solution Framework for Operational BI in Oracle Applications

Problem Statement:

Oracle Applications provides many features for end users to enter and maintain information through Oracle Forms, OAF & ADF pages, Oracle Reports. Sometimes these pages show less or no real-time information related to the entity that is being entered or maintained in Oracle Applications.

Solution Statement:

The following methodology would provide a path to collect and display operational, summarized additional information while entering or maintaining data entities in Oracle Applications.





Considerations:

-          Performance considerations need to be taken care in implementing this concept
-          Proper infrastructure should be in place to have quick access to operational information
-          Separate schedules need to be built-on, to retrieve and show relevant data
-          Heavy customization / enhancement on already existing forms & OAF, ADF pages
-          Separate repository for easy maintenance and performance consideration



Tools & Architecture:

Platform / Tool
Feature to use for real time data display
Forms 9i & 10g
Extending forms with Java for real-time information
OAF Pages
Partial Page Rendering
ADF
ADF Faces components – partial page render
HTML pages
JavaScript & AJAX (Which are not supported by Oracle)



Challenges

-          System Architecture (Design, ODS)
-          Query Performance
-          Infrastructure Cost
-          Data
o   Data acquisition
o   Data Storage
o   Data Delivery

Search This Blog

Labels

oracle oracle applications 11i 12.1 PLSQL SQL database index r12 12 API HRMS PL application r12.1.3 table whitepaper AR DOCUMENT_CATEGORY Database Options Oracle Application Setup Packages Sequences Stand-alone System Profile Options Tables Tuning User-defined types Views autoinvoice compatibility concurrent developer document documents of record download impact import increase issue lookup manager master object names oracle workflow performance receivables script technology windows workflow APP-PAY-06841 ATG BI BLOB DBMS_LOB DFF DIRECTORY Dynamic FND FNDLOAD HR_CHANGE_START_DATE_API IN IN OUT Jdeveloper 11g KFF MIME Materialized views OA Framework OAF ORACLE_LOADER OUT Private synonyms Problem Problem Statement SQL*LOADER SSHR Starters Tutorial WebService XP ad_dd administrator all all workflows amateur architecture assi assignment attachments breadth first search builder category change client column columns compression consideration create create_shared_type custom flexfield cyclic graph data flow data structure data structures depth first search employee external tables field file flex flex field flexfield fnd_irep_classes fnd_irep_function_flavors fnd_lookup_types_pkg fnd_lookup_values_pkg functionality graph image infrastructure insert_row integrated SOA gateway invisible indexes irep jdev jdeveloper key key flexfield keywords latest start date list list of APIs load logging mandatory metalink node noob operating system operational BI package package maximum length parameters patch per_shared_types_api person procedures query queue quick start record registering registration reserved results solution stack standalone start date subcategory technical traverse traversing a graph type update_start_date upload values vertex view vista wf wf_local_roles windows 7

Total Pageviews