Wednesday, April 30, 2014

How to migrate AME Setups

How To Migrate AME Setups

 

 

For Oracle AME configuration movement oracle provided different FNDLOAD commands, which are located under two places but oracle only recommends to use .lct files located under $AME_TOP

$AME_TOP/patch/115/import
$PER_TOP/patch/115/import

Below definitions can be downloaded/uploaded using available FNDLOAD Scripts.

1.       AME Conditions

2.       AME Groups

3.       AME action type usages

4.       AME Rules

 

1)      AME Conditions

amesconk.lct used for downloads and upload of AME Conditions

Syntax for Download

FNDLOAD apps/Password 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesconk.lct <yourfile>.ldt AME_CONDITIONS APPLICATION_SHORT_NAME="<Appl Short Name>" TRANSACTION_TYPE_ID="<Trans Type Id>" CONDITION_KEY="<Condition Key>

Syntax for upload

FNDLOAD apps/password 0 Y UPLOAD $AME_TOP/patch/115/import/amesconk.lct <yourfile>.ldt

    Note: Do not use amescond.lct config file to download, it only support for seeded one

2)      Approval Groups

For migrating AME Approval Groups, use LCT Configuration file named amesappg.lct

Syntax for Download

FNDLOAD apps/password 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesappg.lct <yourfile>.ldt AME_APPROVAL_GROUPS APPROVAL_GROUP_NAME="<ApprovalGroup Name>"

Syntax for Upload

FNDLOAD apps/password 0 Y UPLOAD $AME_TOP/patch/115/import/amesappg.lct <yourfile>.ldt

3)      AME Rules

For Migrating AME Rule use amesrulk.lct configuration file. In order to build the download command for AME Rules, you will require the following information
APPLICATION_SHORT_NAME
TRANSACTION_TYPE_ID
RULE_KEY

Syntax for Download

FNDLOAD apps/password 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesrulk.lct <yourfile>.ldt AME_RULES APPLICATION_SHORT_NAME="<Appl Short Name>" TRANSACTION_TYPE_ID="<Transaction Type Id>" RULE_KEY="<Rule Key>"

Syntax for Upload

FNDLOAD apps/password 0 Y UPLOAD $AME_TOP/patch/115/import/amesrulk.lct <yourfile>.ldt

 

4)      AME Action Type Usages

To download AME Action Type Usages use amesacus.lct. The list of parameters for downloading the AME Action Type Usages is the same as those for AME Rules.

Syntax for Download


FNDLOAD
apps/password 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesacus.lct <yourfile>.ldt AME_ACTION_USAGES APPLICATION_SHORT_NAME="<Appl Short Name>" TRANSACTION_TYPE_ID="<Trans Type Id>" RULE_KEY="<Rule Key>"

Syntax for Upload

 

FNDLOAD apps/password 0 Y UPLOAD $AME_TOP/patch/115/import/amesacus.lct <yourfile>.ldt 

NOTE: Using FNDLOAD you can only download the standard objects in AME (like attributes, conditions, rules etc) but cannot download those
entities which are specific to an instance. For e.g. Static Approval Groups, List Modification Conditions etc cannot be migrated using FNDLOAD.

Oracle Support Note:- How To Migrate AME Setups From One Instance To Another (Doc ID 1168883.1)

How To Migrate Fast Formulas From One Instance To Another Instance

How to Compile Payroll Fast Formula

 

 

Here is the simple way to compile your payroll fast formula; you can compile single formula or maybe you can compile all formulas using bulk concurrent program.

Single Formula uses FFXBCP program to compile fast formula, this is recommended by oracle. Please refer my old post migrating Payroll Fast Formulas.

-- To Compile One Fast Formula

-- Please make sure you have given correct formula name, their is a possibility to have multiple records with same formula name

-- To avoid selecting multiple records please pass correct formula id or name by changing cursor query

 

DECLARE

 

 CURSOR csr_formula_name IS

   SELECT ff.formula_name,

          ft.formula_type_name

     FROM ff_formulas_f ff,

          ff_formula_types ft

    WHERE ff.formula_type_id = ft.formula_type_id

      AND ff.formula_NAME = 'ANIL_NI_CALC2013';

 

   ln_req_id        NUMBER(10);

   --Please change below values based on your user, responsibility and application

   ln_user_id       NUMBER:=0;

   ln_resp_id       NUMBER:=51800;

   ln_resp_appl_id  NUMBER:=800;

BEGIN

 

     -- Initialize your application here

  FND_GLOBAL.APPS_INITIALIZE(ln_user_id,ln_resp_id,ln_resp_appl_id);

  -- Submit concurrent Request, it will compile all formulas

 

   FOR csr_formula_name_rec IN csr_formula_name

   LOOP

     l_req_id := fnd_request.submit_request(

                        application    => 'FF',

                        program        => 'SINGLECOMPILE',

                        argument1      => csr_formula_name_rec.formula_type_name,

                        argument2      => csr_formula_name_rec.formula_name);

   COMMIT;

   DBMS_OUTPUT.PUT_LINE('Request ID :' || ln_req_id);

   END LOOP;

  

  

END ;

 

--// This program is used to compile all formulas

DECLARE

 

   ln_req_id        NUMBER(10);

  --Please change below values based on your user, responsibility and application

   ln_user_id       NUMBER:=0;

   ln_resp_id       NUMBER:=51800;

   ln_resp_appl_id  NUMBER:=800;

BEGIN

 

  -- Initialize your application here

  FND_GLOBAL.APPS_INITIALIZE(ln_user_id,ln_resp_id,ln_resp_appl_id);

  -- Submit concurrent Request, it will compile all formulas

 

  ln_req_id := fnd_request.submit_request(

                    application    => 'FF',

                    program        => 'BULKCOMPILE',

                    argument1      => '-W',

                    argument2      => '%',

                    argument3      => '%');

 

   COMMIT;

   DBMS_OUTPUT.PUT_LINE('Request ID :' || ln_req_id);    

                 

END;