Monday, 7 January 2019

API to Update GL code Combinations in Oracle Apps r12

API to Update GL Code Combinations in Oracle Apps r12

Hi Friends , In this post , We will be discuss about is there any API which can update the existing GL code combinations in the system. I have gone through this Requirment and question many times and I have found it from Oracle metalink that at present there is not API to update the existing GL code combinations in oracle apps. Oracle have not provided any API for this function. But I will try to share the some alternative ways for that.
 
API to Update GL code Combinations in Oracle Apps r12
 
 
How to Update GL code Combinations in Oracle Apps r12
 
If you have mass update Requirment and manual option is a very long and time consuming activity then you can follow this below approach which can save you maximum time and this takes little manual efforts too.
 
Step1:- We all know about the Data Loader tool in Oracle apps, So we can use this tool to end dated those GL code combinations which we want to update or change.
 
Step2:- Once the Data Loader have end-Dated all these Existing GL code combinations then we can use the GL code combination API to create the New GL code combinations based on the end dated code combination with right values.
 
 
Step3:-  This is the below API to create the GL codec combination in Oracle apps r12.
 
DECLARE
   CURSOR c1
   IS
      SELECT *
        FROM XX_STAG_GL_CODECOMBINATION;
   v_chart_of_accounts_id    VARCHAR2 (200);
   v_n_code_combination_id   VARCHAR2 (200);
BEGIN
   FOR i in c1
   LOOP
      SELECT gsob.chart_of_accounts_id     
        INTO v_chart_of_accounts_id
        FROM gl_sets_of_books gsob
       WHERE gsob.set_of_books_id = fnd_profile.VALUE ('GL_SET_OF_BKS_ID');
      v_n_code_combination_id :=
         fnd_flex_ext.get_ccid ('SQLGL',
                                'GL#',
                                v_chart_of_accounts_id,
                                TO_CHAR (SYSDATE, 'YYYY/MM/DD HH24:MI:SS'),
                                i.CODE_COBIN
                               );
      IF v_n_code_combination_id <> 0
      THEN
         DBMS_OUTPUT.put_line ('Code Combination Id created' ||v_n_code_combination_id);
      ELSE
         DBMS_OUTPUT.put_line ('failure');
      END IF;
   END LOOP;
END;
 

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *