Oracle Cloud offers a broad portfolio of software as a service applications, platform as a service, and social capabilities, all on a subscription basis. Oracle Cloud delivers instant value and productivity for end users, administrators, and developers alike through functionally rich, integrated, secure, enterprise cloud services.
 Get a Free Magzine ...Profit:The Executive's Guide to Oracle Applications

Subscribe to the OracleAppsHub to receive notifications when there are new posts:

 get RSS feed
 Oracle Fusion Applications (OFA) is a portfolio of next generation suite of software applications from Oracle Corporation. It is distributed across various product families; including financial management, human capital management, customer relationship management, supply chain management, procurement, governance, and project portfolio management
 Get a Free Magzine ...Profit:The Executive's Guide to Oracle Applications

Generation of GL code combinations by Sql

Posted on April 28th, 2011 by Sanjit Anand |Print This Post Print This Post |Email This Post Email This Post

Have you tried OracleappsHub in ipad/iphone/smart Phone? Don't wait. try it today

Here is workaround for automatic/mass CCID generation or insertion of new CCID’s in GL_CODE_COMBINATIONS Table, when new values in Accounting Flexfield Segment are created, EXCEPT “Dynamic Insert” option activated .

you can use the api (function) -> fnd_flex_ext.get_ccid to create the ccid.

If the combination already exists, it returns the existing ccid else creates a new one and returns the id. Explicit commit command needs to be executed after calling this function.

Use below function which returns the CCID if it is exist and create the CCID if it doesn't exist in the application


  2. <pre>fnd_flex_ext.get_ccid(application_short_name => 'SQLGL',
  3. key_flex_code =>'GL#',
  4. structure_number =>l_coa_id,
  5. validation_date =>to_char(SYSDATE,apps.fnd_flex_ext.date_format),
  6. concatenated_segments =>l_account);

Make sure you have intialize the manadtory parameter if you are running the code in SQL Plus/TOAD

  2. FND_GLOBAL.APPS_INITIALIZE(l_user_id, l_resp_id, l_appl_id);
  3. END;

Moreover Flex Structure you can find by this query

  4. fifs.application_column_name,
  5. fifs.segment_name,
  6. fifs.segment_num,
  7. ffs.flex_value_set_name
  8. FROM fnd_id_flex_structures_vl fifst,
  9. fnd_id_flex_segments fifs,
  10. fnd_flex_value_sets ffs
  11. WHERE fifst.id_flex_structure_code = 'ACCOUNTING_FLEXFIELD'
  12. AND fifst.application_id = 101
  13. AND fifst.id_flex_code = 'GL#'
  14. AND fifs.application_id = fifst.application_id
  15. AND fifs.id_flex_code = fifst.id_flex_code
  16. AND fifs.id_flex_num = fifst.id_flex_num
  17. AND ffs.flex_value_set_id = fifs.flex_value_set_id;

Related Posts

Posted in Technical | No Comments »Email This Post Email This Post | Print This Post Print This Post

Have you tried OracleappsHub in ipad/iphone/smart Phone? Don't wait. try it today
Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.