Tuesday, September 04, 2012

Oracle Application Form Personalization Extraction SQL Script

---  Form Personalization data extraction - --------------
----------------------------------------------------------
Select FPT.APPLICATION_NAME
     , FF.FORM_NAME SOURCE_FORM_NAME, FFT.USER_FORM_NAME, FFT.DESCRIPTION FORM_DESCRIPTION
     , FFF.FUNCTION_NAME, FFFT.USER_FUNCTION_NAME, FFFT.DESCRIPTION FUNCTION_DESCRIPTION
     , FFCR.SEQUENCE PERSONALIZE_RULE_SEQUENCE, FFCR.DESCRIPTION PERSONALIZE_RULE_DESCRIPTION
     , DECODE(FFCR.RULE_TYPE,'F','Form','A','Function') PERSONALIZE_RULE_LEVEL
     , FFCR.ENABLED PERSONALIZE_RULE_ENABLED
     , FFCR.TRIGGER_EVENT  PERSONALIZE_RULE_EVENT, FFCR.TRIGGER_OBJECT
     , FFCR.CONDITION PERSONALIZE_RULE_CONDITION
     , DECODE(FFCS.LEVEL_ID,10,'Industry',20,'Site',30,'Responsibility',40,'User')  CONTEXT_LEVEL
     , DECODE(FFCS.LEVEL_ID,10,'',20,'',30,FRT.RESPONSIBILITY_NAME,40,FU.USER_NAME) CONTEXT_LEVEL_VALUE
      , FFCA.SEQUENCE  ACTION_SEQUENCE
      , DECODE(FFCA.ACTION_TYPE,'P','Property','M','Message','B','Builtin','S','Menu','') ACTION_TYPE
      , FFCA.SUMMARY  ACTION_DESCRIPTION  
      , FFCA.ENABLED  ACTION_ENABLED
      , DECODE(FFCA.LANGUAGE,'*','All','US','American English','AR','Arabic') ACTION_LANGUAGE
      , DECODE(FFCA.ACTION_TYPE,'P',FFCA.OBJECT_TYPE,Null)      ACTION_OBJECT_TYPE
      , DECODE(FFCA.ACTION_TYPE,'P',FFCA.TARGET_OBJECT,Null)    ACTION_TARGET_OBJECT     
      , DECODE(FFCA.ACTION_TYPE,'P',FFCPL.PROPERTY_NAME, Null)  ACTION_PROPERTY_NAME
      , DECODE(FFCA.ACTION_TYPE,'P',DECODE(FFCA.ARGUMENT_TYPE,'B'
      , DECODE(FFCA.PROPERTY_VALUE,5,'False',4,'True')
      , FFCA.PROPERTY_VALUE),Null) ACTION_PROPERTY_VALUE
      , DECODE(FFCA.ACTION_TYPE,'M'
      , DECODE(FFCA.MESSAGE_TYPE,'S','Show','E','Error','W','Warning','H','Hint','D','Debug'),Null) ACTION_MESSAGE_TYPE
      , DECODE(FFCA.ACTION_TYPE,'M',FFCA.MESSAGE_TEXT,Null) ACTION_MESSAGE_TEXT
      , DECODE(FFCA.ACTION_TYPE,'B',FFCA.BUILTIN_TYPE,Null)        ACTION_BUILTIN_TYPE
      , DECODE(FFCA.ACTION_TYPE,'B',FFCA.BUILTIN_ARGUMENTS,Null)   ACTION_BUILTIN_ARGUMENTS
      , DECODE(FFCA.ACTION_TYPE,'B',FFCA.MENU_ARGUMENT_LONG,Null)  ACTION_BUILTIN_PARAMETERS
      , DECODE(FFCA.ACTION_TYPE,'B',FFCA.MENU_ARGUMENT_SHORT,Null) ACTION_BUILTIN_CODE
      ,DECODE(FFCA.ACTION_TYPE,'S',FFCA.MENU_ENTRY,Null)           ACTION_MENU_ENTRY
      ,DECODE(FFCA.ACTION_TYPE,'S',FFCA.MENU_LABEL,Null)           ACTION_MENU_LABEL
      ,DECODE(FFCA.ACTION_TYPE,'S',FFCA.MENU_SEPERATOR,Null)       ACTION_MENU_SEPERATOR
      ,DECODE(FFCA.ACTION_TYPE,'S',FFCA.MENU_ENABLED_IN,Null)      ACTION_MENU_BLOCKS_ENABLED
      ,DECODE(FFCA.ACTION_TYPE,'S',FFCA.MENU_ARGUMENT_SHORT,Null)  ACTION_MENU_ICON_NAME
       
From  FND_APPLICATION FP, FND_APPLICATION_TL FPT
    , FND_FORM FF, FND_FORM_TL FFT
    , FND_FORM_FUNCTIONS FFF, FND_FORM_FUNCTIONS_TL  FFFT
    , FND_FORM_CUSTOM_RULES FFCR , FND_FORM_CUSTOM_SCOPES FFCS, FND_RESPONSIBILITY_TL FRT, FND_USER FU
    , FND_FORM_CUSTOM_ACTIONS FFCA , FND_FORM_CUSTOM_PROP_LIST FFCPL

Where  ----------------APPLICATION
        FP.APPLICATION_ID  = FPT.APPLICATION_ID
    And FPT.LANGUAGE       = 'US'
    ------------------------ FORM
    And FPT.APPLICATION_ID = FF.APPLICATION_ID
    And FF.FORM_ID         = FFT.FORM_ID
    And FFT.LANGUAGE       = 'US'
    ------------------------ FUNCTION
    And FF.FORM_ID         = FFF.FORM_ID
    And FFF.FUNCTION_ID    = FFFT.FUNCTION_ID
    And FFFT.LANGUAGE      = 'US'  
    ------------------------ Custom Rule
    And FF.Form_Name       = FFCR.Form_Name
    And FFCR.FUNCTION_NAME = FFF.FUNCTION_NAME
    ------------------------ Custom Scope
    And FFCR.ID            = FFCS.RULE_ID
    And FFCS.LEVEL_VALUE   = FRT.RESPONSIBILITY_ID(+)
    And FRT.LANGUAGE(+)    = 'US'
    And FFCS.LEVEL_VALUE   = FU.USER_ID(+)
    ------------------------ Custom Actions
    And FFCR.ID            =  FFCA.RULE_ID
    And DECODE(FFCA.ACTION_TYPE,'P',FFCA.PROPERTY_NAME,79) = FFCPL.PROPERTY_ID
    And DECODE(FFCA.ACTION_TYPE,'P',FFCA.OBJECT_TYPE,'ITEM')   = FFCPL.FIELD_TYPE
   
 Order By FFT.APPLICATION_ID, FF.FORM_NAME,FFCR.FUNCTION_NAME
        , FFCR.SEQUENCE, FFCS.LEVEL_ID, FFCS.LEVEL_VALUE, FFCA.SEQUENCE    
-------------------------------------------------------------------------------------------------------------------

Sample Output from Backend (Toad)

1 comment:






Please provide your valuable feedback ............