Monday, 7 January 2019

gl_code_combinations api : API to create gl code combination in Oracle Apps r12

gl_code_combinations api : API to create gl code combination in Oracle Apps r12

In Oracle Apps , We create the GL code combinations for our Accounting Key Flex Fields segment values. we cannot use any combination of the KFF segment values in Oracle transactions until unless we have not create the GL code combination for these KFF segment values. In gl code combination  , Oracle create the Unique ID (CCID) for each combination for the KFF segment values and when ever we use that combination for the KFF segment values then Oracle puts that CCID for accounting related stuff. CCID is also known as 'Code combination ID'. Here in this Post , I will share the sample code to create the gl code combination in Oracle Apps r12.
 
API to create gl code combination in Oracle Apps r12
 

Example of API to create gl code 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;

1 comments:

Unknown said...

what is the api for 11i?

Post a Comment

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

Name

Email *

Message *