1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Useful R12 Scripts-1

Discussion in 'Oracle Apps Technical' started by Ramji, Jan 30, 2012.

  1. Ramji

    Ramji Forum Guru

    Messages:
    525
    Likes Received:
    177
    Trophy Points:
    1,505
    Location:
    Nomad
    SECURITY RULES APPLIED TO COA ASSOCIATED WITH A LEDGER

    Code (SQL):
    SELECT frt.responsibility_name,
           frt.responsibility_id,
           ifs.id_flex_num Chart_of_accounts_id,
           ifs.segment_name,
           ifs.segment_num,
           fvr.flex_value_rule_name,
           DECODE(fvrl.include_exclude_indicator,
                   'E', 'Exclude',
                   'I', 'Include',
                   'Error') Inc_exc,
           fvrl.flex_value_low,
           fvrl.flex_value_high
      FROM fnd_flex_value_rule_usages fvru,
           fnd_flex_value_rules fvr,
           fnd_flex_value_rule_lines fvrl,
           fnd_responsibility_tl frt,
           fnd_id_flex_segments ifs,
           gl_ledgers led
     WHERE fvru.responsibility_id = frt.responsibility_id
       AND fvru.flex_value_rule_id = fvr.flex_value_rule_id
       AND fvrl.flex_value_rule_id = fvr.flex_value_rule_id
       AND ifs.flex_value_set_id = fvr.flex_value_set_id
       AND ifs.id_flex_num = led.chart_of_accounts_id
       AND led.Ledger_id = &LedgerID
       AND ifs.id_flex_code = 'GL#'
     ORDER BY ifs.segment_num,
           fvr.flex_value_rule_name,
           fvrl.include_exclude_indicator DESC,
           frt.responsibility_name ;
     
    Sadik likes this.