Friday, May 12, 2017

Configuration Values - APIs

-- Global and localized configuration settings provide the appropriate defaults for business groups
-- Business Rules are held in pqp_configuration_values table
-- HRMS > Other Definitions > Configuration Values
-- Here I am updating a configuration value
declare
--
ln_con_val_id  number; 
ln_bg          number;
ln_ovn         number;
lc_cat         varchar2(200);
lc_info        varchar2(200);
--
begin
--
   select pcv.PCV_INFORMATION_CATEGORY
         ,pcv.PCV_INFORMATION2
         ,pcv.business_group_id
         ,pcv.configuration_value_id
         ,pcv.object_version_number
     into lc_cat
         ,lc_info
         ,ln_bg
         ,ln_con_val_id
         ,ln_ovn     
     from pqp_configuration_types   pct
         ,pqp_configuration_modules pcm
         ,pqp_configuration_values  pcv
    where 1=1
      and pct.module_id = pcm.module_id
      and pcm.module_name = 'Assignment Budget Value Maintenance'
      and pct.description = 'Maintenance Configuration'
      and pcv.pcv_information_category = pct.configuration_type
      ;
   
    dbms_output.put_line('Before:   lc_cat: '||lc_cat||'  lc_info: '||lc_info||' in_ovn: '|| ln_ovn);
   --
   pqp_pcv_api.update_configuration_value(p_validate        => false
                                         ,p_effective_date                 => sysdate
                                         ,p_business_group_id              => ln_bg
                                         ,p_configuration_value_id         => ln_con_val_id
                                         ,p_pcv_information_category       => lc_cat
                                         ,p_pcv_information2               => 'Y'
                                         ,p_object_version_number          => ln_ovn);
                                        
   
    dbms_output.put_line('Configuration Value Updated');    
   
    commit;                             
--
exception
   when others then
      dbms_output.put_line('Error : '||sqlerrm);
      rollback;
end; 
--

Ref: My Experience/Oracle Metalink/User Guides/Different other blogs available/Colleagues
  

No comments:

Post a Comment