Apps To Fusion

.......Our Journey from Apps To Fusion

 
  • Increase font size
  • Default font size
  • Decrease font size
We have launched several Development, Functional and DBA Trainings. Visiti http://focusthread.com/training

FNDLOAD AME Objects

We have in the past articles seen various examples of FNDLOAD, for both AOL objects and web ADI. In this article, you will see how to move AME Definitions from one instance to another. The confusing thing about AME FNDLOAD is that these scripts are available in two locations, which are
$AME_TOP/patch/115/import
$PER_TOP/patch/115/import
It is recommended to use the LCT files in $AME_TOP where possible.

In this article, you will learn to download and upload the following AME Components
1. AME Conditions
2. AME Groups
3. AME action type usages
4. AME Rules

Where are the LCT Configuration files for AME
These are in $AME_TOP/patch/115/import
$ ls –lx
amesaagc.lct  amesaatc.lct  amesactu.lct  amesacus.lct 
amesappg.lct  amesappo.lct   amesapty.lct  amescond.lct
amesconk.lct  amescvar.lct  amesicls.lct  amesiclu.lct 
amesmatr.lct  amesmatt.lct  amespdan.lct  amesrule.lct
amesrulk.lct  US

 

I want to download AME Conditions. How can I do that.
For downloading and uploading custom AME Conditions, you need to use LCT file amesconk.lct. Please note that Oracle also delivers another LCT file named amescond.lct. However amescond.lct works only for the standard/seeded AME conditions. In order to download custom AME Conditions, you must use amesconk.lct

 

What is the information required to download AME Conditions.
In order to download any object that is associated with a given AME Transaction type, you will need the Application Short Name and the AME Transaction Type short name. Both of these can be found from AME Configuration screens. However for downloading AME Conditions, you need to know something known as AME Condition Key. All these details can be found by running the SQL Statement as shown below
select
FA.APPLICATION_SHORT_NAME,
       ACA.TRANSACTION_TYPE_ID,
       ACON.CONDITION_
KEY,
      
ACON.CONDITION_ID,
      
ACON.CONDITION_TYPE,
      
AATT.NAME,
      
nvl(ACON.PARAMETER_
ONE, null),
      
nvl(ACON.PARAMETER_TWO,
null),
      
nvl(ACON.PARAMETER_THREE,
null),
      
nvl(ACON.INCLUDE_UPPER_LIMIT,
null),
      
nvl(ACON.INCLUDE_LOWER_LIMIT,
null),
      
to_char(ACON.LAST_UPDATE_DATE,
'YYYY/MM/DD HH24:MI:SS'),
      
substrb(FND_LOAD_UTIL.OWNER_NAME(ACON.LAST_UPDATED_BY),
1, 100) OWNER
 
from AME_ATTRIBUTE_USAGES AAU,
      
AME_ATTRIBUTES       AATT,
 
    
AME_CALLING_APPS     ACA,
      
AME_CONDITIONS       ACON,
      
AME_STRING_VALUES    ASV,
      
FND_APPLICATION_VL   FA
where /*:APPLICATION_SHORT_NAME is not null
  
and :TRANSACTION_TYPE_ID is not null
  
and FA.APPLICATION_SHORT_NAME like :APPLICATION_SHORT_NAME
  
and */
ACON.CONDITION_ID = ASV.CONDITION_ID(+)
  
and FA.APPLICATION_ID = ACA.FND_APPLICATION_ID
/*   and ((:TRANSACTION_TYPE_ID = 'NULL' and ACA.TRANSACTION_TYPE_ID is null) or
      
ACA.TRANSACTION_TYPE_ID like :TRANSACTION_TYPE_ID)*/
  
and ACON.ATTRIBUTE_ID = AATT.ATTRIBUTE_ID
  
and AAU.APPLICATION_ID = ACA.APPLICATION_ID
  
and AAU.ATTRIBUTE_ID = AATT.ATTRIBUTE_ID
/*   and (:ATTRIBUTE_NAME is null or
      
(:ATTRIBUTE_NAME is not null and AATT.NAME like :ATTRIBUTE_NAME))
*//*   and (:CONDITION_
KEY is null or (:CONDITION_KEY is not null and
      
ACON.CONDITION_
KEY like :CONDITION_KEY))
 
*/
and ACON.CONDITION_TYPE in ('pre', 'auth')
  
and AATT.NAME not in
      
(
'ALLOW_DELETING_RULE_GENERATED_APPROVERS',
       
'ALLOW_REQUESTOR_APPROVAL', 'AT_LEAST_ONE_RULE_MUST_APPLY',
       
'EFFECTIVE_RULE_DATE', 'EVALUATE_PRIORITIES_PER_ITEM',
       
'USE_RESTRICTIVE_ITEM_EVALUATION')
  
and sysdate between AAU.START_DATE and
      
nvl(AAU.END_DATE - (
1 / 86400), sysdate)
  
and sysdate between AATT.START_DATE and
      
nvl(AATT.END_DATE - (
1 / 86400), sysdate)
  
and sysdate between ACA.START_DATE and
      
nvl(ACA.END_DATE - (
1 / 86400), sysdate)
  
and sysdate between ACON.START_DATE and
      
nvl(ACON.END_DATE - (
1 / 86400), sysdate)
order
by ACON.creation_date desc

--Note this SQL will return the most recently created AME Conditions on top
--Therefore you can find the condition key

 

How can I download the AME Condition?
After knowing the Application Short Name, Transaction Type Short Name, and Condition Key, you can then run the FNDLOAD command for downloading the AME Condition as shown below, one single line

FNDLOAD apps/appsPassword 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesconk.lct XX_FOCUSTHREAD_HR_AME_COND.ldt AME_CONDITIONS APPLICATION_SHORT_NAME='PER' TRANSACTION_TYPE_ID='SSHRMS' CONDITION_KEY='143353006:10371'

Of course the values for PER, SSHMS and ‘143353006:10371’ are derived from the SQL statement shown as above.

 

How can I upload the AME Condition?
In order to upload this AME Condition, run the command as shown below
FNDLOAD apps/appsPassword 0 Y UPLOAD $AME_TOP/patch/115/import/amesconk.lct XX_FOCUSTHREAD_HR_AME_COND.ldt

 

How can I download and upload AME Approval Groups?
For migrating AME Approval Groups, you will use LCT Configuration file named amesappg.lct. In order to use this LCT file in FNDLOAD command, you must find out the name of the approval group. Use the SQL as shown below to find the AME Approval Group Name

select apg.name,
      
nvl(apgtl.user_approval_group_name, apg.name),
      
nvl(apgtl.description, apg.description),
      
replace(apg.query_string, fnd_global.local_chr(13), null),
      
apg.is_static,
      
to_char(apg.last_update_date,
'YYYY/MM/DD HH24:MI:SS'),
      
substrb(FND_LOAD_UTIL.OWNER_NAME(apg.LAST_UPDATED_BY),
1, 100) OWNER
 
from ame_approval_groups apg,
       (
select approval_group_id, user_approval_group_name, description
         
from ame_approval_groups_tl
        
where language = userenv('LANG')) apgtl
where sysdate between apg.start_date and
      
nvl(apg.end_date - (
1 / 86400), sysdate)
  
and apg.is_static = 'N'
  
and apg.approval_group_id = apgtl.approval_group_id(+)
/*   and (:APPROVAL_GROUP_NAME is null or (:APPROVAL_GROUP_NAME is not null and
      
apg.name like :APPROVAL_GROUP_NAME))*/

ORDER
BY apg.CREATION_DATE DESC

 

 

To download the Approval group, use the command that is similar to as shown below
FNDLOAD apps/appsPassword 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesappg.lct XX_FOCUSTHREAD_HR_APP_GRP.ldt AME_APPROVAL_GROUPS APPROVAL_GROUP_NAME='XX_FT_3RD_LEVEL_APPROVER'

 

In order to upload the Approval Group in new environment, use the command as shown below
FNDLOAD apps/appsPassword 0 Y UPLOAD $AME_TOP/patch/115/import/amesappg.lct XX_FOCUSTHREAD_HR_APP_GRP.ldt

 

To download the AME Rule, use amesrulk.lct
In order to build the download command for AME Rules, you will require the following information
     
APPLICATION_SHORT_NAME
      TRANSACTION_TYPE_ID
      RULE_KEY
All these can be derived by running the SQL Statement as shown below
--ame rules sql
select ARUL.RULE_KEY,
      
ARUL.RULE_ID,
      
AAT.NAME,
      
AA.PARAMETER,
      
to_char(ARUL.RULE_TYPE),
      
nvl(ARULTL.DESCRIPTION, ARUL.DESCRIPTION),
      
AIC.NAME,
      
to_char(ARUL.LAST_UPDATE_DATE,
'YYYY/MM/DD HH24:MI:SS'),
      
substrb(FND_LOAD_UTIL.OWNER_NAME(ARUL.LAST_UPDATED_BY),
1, 100) OWNER
 
from AME_RULE_USAGES ARU,
      
AME_ACTIONS AA,
      
AME_ACTION_TYPES AAT,
      
AME_ACTION_USAGES AAU,
      
AME_ITEM_CLASSES AIC,
   
  
AME_RULES ARUL,
      
AME_CALLING_APPS ACA,
      
FND_APPLICATION_VL FA,
      
(
select RULE_ID, DESCRIPTION
         
from AME_RULES_TL
        
where LANGUAGE = userenv('LANG')) ARULTL
where /*:APPLICATION_SHORT_NAME is not null
     
and :TRANSACTION_TYPE_ID is not null
     
and */

/* FA.APPLICATION_SHORT_NAME like :APPLICATION_SHORT_NAME
and */

FA.APPLICATION_ID = ACA.FND_APPLICATION_ID
and ARUL.RULE_ID = ARULTL.RULE_ID(+)
/*      and ((:TRANSACTION_TYPE_ID = 'NULL'
         
and ACA.TRANSACTION_TYPE_ID is null)
      
or ACA.TRANSACTION_TYPE_ID like :TRANSACTION_TYPE_ID)
*/

and ACA.APPLICATION_ID = ARU.ITEM_ID
and ARU.RULE_ID = ARUL.RULE_ID
and AAU.RULE_ID = ARUL.RULE_ID
and AAU.ACTION_ID = AA.ACTION_ID
and AA.ACTION_TYPE_ID = AAT.ACTION_TYPE_ID
and AAU.ACTION_ID = (select ACTION_ID
                   
from AME_ACTION_USAGES AU1
                  
where AU1.RULE_ID = ARUL.RULE_ID
                    
and sysdate between AU1.START_DATE and
                        
nvl(AU1.END_DATE - (
1 / 86400), sysdate)
                    
and rownum < 2)
and
ARUL.ITEM_CLASS_ID = AIC.ITEM_CLASS_ID
/*      and (:RULE_
KEY is null
         
or (:RULE_
KEY is not null
         
and :RULE_
KEY = ARUL.RULE_KEY))
*/

and ARUL.RULE_TYPE in (1, 2, 5, 6, 7)
and sysdate between ARU.START_DATE and
nvl(ARU.END_DATE - (
1 / 86400), sysdate)
and sysdate between ARUL.START_DATE and
nvl(ARUL.END_DATE - (
1 / 86400), sysdate)
and sysdate between ACA.START_DATE and
nvl(ACA.END_DATE - (
1 / 86400), sysdate)
and sysdate between AAU.START_DATE and
nvl(AAU.END_DATE - (
1 / 86400), sysdate)
and sysdate between AA.START_DATE and nvl(AA.END_DATE -
(
1 / 86400), sysdate)
and sysdate between AAT.START_DATE and
nvl(AAT.END_DATE - (
1 / 86400), sysdate)
and sysdate between AIC.START_DATE and
nvl(AIC.END_DATE - (
1 / 86400), sysdate)
and AA.ACTION_ID in
(
select ACT.ACTION_ID
   
from AME_ACTIONS ACT, AME_ACTION_TYPES ACTY, AME_APPROVAL_GROUPS AAG
  
where to_char(AAG.APPROVAL_GROUP_ID) = ACT.PARAMETER
    
and ACT.ACTION_TYPE_ID = ACTY.ACTION_TYPE_ID
    
and ACTY.NAME in ('pre-chain-of-authority approvals',
                      
'post-chain-of-authority approvals',
                      
'approval-group chain of authority')
    
and AAG.IS_STATIC = 'N'
    
and sysdate between ACTY.START_DATE and
        
nvl(ACTY.END_DATE - (
1 / 86400), sysdate)
    
and sysdate between ACT.START_DATE and
        
nvl(ACT.END_DATE - (
1 / 86400), sysdate)
    
and sysdate between AAG.START_DATE and
        
nvl(AAG.END_DATE - (
1 / 86400), sysdate)
 
UNION
 
select ACT.ACTION_ID
   
from AME_ACTIONS ACT, AME_ACTION_TYPES ACTY
  
where ACT.ACTION_TYPE_ID = ACTY.ACTION_TYPE_ID
    
and ACTY.NAME not in ('pre-chain-of-authority approvals',
         
'post-chain-of-authority approvals',
         
'approval-group chain of authority')
    
and sysdate between ACT.START_DATE and
        
nvl(ACT.END_DATE - (
1 / 86400), sysdate)
    
and sysdate between ACTY.START_DATE and
        
nvl(ACTY.END_DATE - (
1 / 86400), sysdate))
order
by ARU.last_update_date desc

 

Once you know the RULE_KEY, then AME Rule can be downloaded by running the FNDLOAD command as shown below
FNDLOAD apps/appsPassword 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesrulk.lct XXTHR_FOCUSTHREADAME_RULE.ldt AME_RULES APPLICATION_SHORT_NAME='PER' TRANSACTION_TYPE_ID='SSHRMS' RULE_KEY='143353006:10184'

 

In order to upload the AME Rule in another instance, use the SQL as shown below
FNDLOAD apps/appsPassword 0 Y UPLOAD $AME_TOP/patch/115/import/amesrulk.lct XXTHR_FOCUSTHREADAME_RULE.ldt

 

To download AME Action Type Usages, you will use amesacus.lct
The list of parameters for downloading the AME Action Type Usages is the same as those for AME Rules.
For example, the FNDLOAD command for downloading the Action Type Usages in AME will be
FNDLOAD apps/appsPassword 0 Y DOWNLOAD $
AME_TOP/patch/115/import/amesacus.lct XXTHR_FOCUSTHREAD_AUSG.ldt AME_ACTION_USAGES APPLICATION_SHORT_NAME='PER' TRANSACTION_TYPE_ID='SSHRMS' RULE_KEY='143353006:10184'

Likewise, to upload the AME Action Type usage in another eBusiness Suite instance, use a command similar to as shown below
FNDLOAD apps/appsPassword 0 Y UPLOAD $
AME_TOP/patch/115/import/amesacus.lct XXTHR_FOCUSTHREAD_AUSG.ldt

 

In order to find the parameters for AME Action Type Usages, use SQL below
select
ARUL.RULE_KEY,
      
AAT.NAME,
      
AAC.PARAMETER,
      
AAC.PARAMETER_TWO,
      
AAU.LAST_UPDATE_DATE
 
from AME_CALLING_APPS   ACA,
      
AME_RULES          ARUL,
      
AME_RULE_USAGES    ARU,
      
AME_ACTION_TYPES   AAT,
      
AME_ACTIONS        AAC,
      
AME_ACTION_USAGES  AAU,
      
FND_APPLICATION_VL FA
where /*:APPLICATION_SHORT_NAME is not null
     
and :TRANSACTION_TYPE_ID is not null
     
and */
/*FA.APPLICATION_SHORT_NAME like :APPLICATION_SHORT_NAME
     
and */

FA.APPLICATION_ID = ACA.FND_APPLICATION_ID

/*      and ((:TRANSACTION_TYPE_ID = 'NULL'
           
and ACA.TRANSACTION_TYPE_ID is null)
         
or ACA.TRANSACTION_TYPE_ID like :TRANSACTION_TYPE_ID)
*/

and ACA.APPLICATION_ID = ARU.ITEM_ID
and ARUL.RULE_ID = ARU.RULE_ID
and AAC.ACTION_TYPE_ID = AAT.ACTION_TYPE_ID
and AAU.RULE_ID = ARUL.RULE_ID
and AAU.ACTION_ID = AAC.ACTION_ID
/*      and (:RULE_
KEY is null
          
or (:RULE_
KEY is not null
          
and :RULE_
KEY = ARUL.RULE_KEY))
*/

and ARUL.RULE_TYPE in (1, 2, 7)
and AAT.NAME not in ('approval-group chain of authority')
and sysdate between ACA.START_DATE and
nvl(ACA.END_DATE - (
1 / 86400), sysdate)
and sysdate between AAT.START_DATE and
nvl(AAT.END_DATE - (
1 / 86400), sysdate)
and sysdate between AAU.START_DATE and
nvl(AAU.END_DATE - (
1 / 86400), sysdate)
and sysdate between AAC.START_DATE and
nvl(
AAC.END_DATE - (1 / 86400), sysdate)
and sysdate between ARUL.START_DATE and
nvl(ARUL.END_DATE - (
1 / 86400), sysdate)
and sysdate between ARU.START_DATE and
nvl(ARU.END_DATE - (
1 / 86400), sysdate)
UNION

select
ARUL.RULE_KEY, AAT.NAME, AAG.NAME, null, AAU.LAST_UPDATE_DATE
 
from AME_CALLING_APPS    ACA,
      
AME_RULES           ARUL,
      
AME_RULE_USAGES     ARU,
      
AME_ACTION_TYPES    AAT,
      
AME_ACTIONS         AAC,
      
AME_ACTION_USAGES   AAU,
      
AME_APPROVAL_GROUPS AAG,
      
FND_APPLICATION_VL  FA
where /*:APPLICATION_SHORT_NAME is not null
       
and :TRANSACTION_TYPE_ID is not null
       
and */
/*FA.APPLICATION_SHORT_NAME like :APPLICATION_SHORT_NAME
       
and */

FA.APPLICATION_ID = ACA.FND_APPLICATION_ID

/*        and ((:TRANSACTION_TYPE_ID = 'NULL'
             
and ACA.TRANSACTION_TYPE_ID is null)
           
or ACA.TRANSACTION_TYPE_ID like :TRANSACTION_TYPE_ID)
*/

and ACA.APPLICATION_ID = ARU.ITEM_ID
and ARUL.RULE_ID = ARU.RULE_ID
and AAC.ACTION_TYPE_ID = AAT.ACTION_TYPE_ID
and AAU.RULE_ID = ARUL.RULE_ID
and AAU.ACTION_ID = AAC.ACTION_ID
/*        and (:RULE_
KEY is null
            
or (:RULE_
KEY is not null
           
and :RULE_
KEY = ARUL.RULE_KEY))
*/

and ARUL.RULE_TYPE in (1, 2, 5, 6)
and AAT.NAME in
(
'pre-chain-of-authority approvals', 'post-chain-of-authority approvals',
 
'approval-group chain of authority')
and AAG.IS_STATIC = 'N'
and AAC.PARAMETER = to_char(AAG.APPROVAL_GROUP_ID)
and sysdate between AAG.START_DATE and
nvl(AAG.END_DATE - (
1 / 86400), sysdate)
and sysdate between ACA.START_DATE and
nvl(ACA.END_DATE - (
1 / 86400), sysdate)
and sysdate between AAT.START_DATE and
nvl(AAT.END_DATE - (
1 / 86400), sysdate)
and sysdate between AAU.START_DATE and
nvl(AAU.END_DATE - (
1 / 86400), sysdate)
and sysdate between AAC.START_DATE and
nvl(
AAC.END_DATE - (1 / 86400), sysdate)
and sysdate between ARUL.START_DATE and
nvl(ARUL.END_DATE - (
1 / 86400), sysdate)
and sysdate between ARU.START_DATE and
nvl(ARU.END_DATE - (
1 / 86400), sysdate)
and sysdate between AAC.START_DATE and
nvl(
AAC.END_DATE - (1 / 86400), sysdate)
and sysdate between ARUL.START_DATE and
nvl(ARUL.END_DATE - (
1 / 86400), sysdate)
and sysdate between ARU.START_DATE and
nvl(ARU.END_DATE - (
1 / 86400), sysdate)
order by 5 desc

Comments (4)add
Is it possible to use fndload for ame transaction
written by Kamelia Ivanova , November 18, 2009
Hi, very interesting article. I just want to ask is it possible to use fndload for AME Transaction and how can I move it to other evirement? Thanks in advance.
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi- , November 18, 2009
Yes certainly, I will write up an article that shows how to dump the full AME Trx type setup and apply to next environment

report abuse
vote down
vote up
Votes: +0
...
written by rabindra mishra , November 26, 2009
Hi anil, i am new to oaf. i have a requirement when i pass the ponumber text,if it match the pon then open a new page.if it is not match then through an message. pl help me.....

thanks
rabindra
report abuse
vote down
vote up
Votes: +0
SIT Custtomization in Forms
written by Murugesh , December 05, 2009
Hi Anil,
I have created a Special Information Type say snispecial . In Custom Responsibility Say MurResp (Forms not OAF) I want only this SIT to be available separatley to
make entries(there are more than 10 sits I want this alone to be displayed) have have done it in OAF page by putting it in the Segment List but in the Forms I am not sure how to dot it . Is is that we have to create a Taks Flow Node? If so how to do it or is there any other way it can be achieved.

Please advise

Regards,
R.MURUGESH

report abuse
vote down
vote up
Votes: +0
Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security image
Write the displayed characters


busy
 

Related Items

Search apps2fusion