Deriving Oracle GL Account Code Combination ID’s (CCID’s) through APIs

May 9, 2012, Category: APIs, General Ledger, Script · 6 Comments


This API Finds combination_id for given set of key flexfield segment values. Segment values must be input in segments(1) – segments(n_segments) in the order displayed.

It also creates a new combination if it is valid and the flexfield allows dynamic inserts and the combination does not already exist. It commit the transaction soon after calling this function since if a combination is created it will prevent other users creating similar combinations on any flexfield until a commit is issued.

It performs all checks on values including security and cross-validation. Value security rules will be checked for the current user identified in the FND_GLOBAL package.

Generally pass in SYSDATE for validation date. If validation date is null, this function considers expired values valid and checks all cross-validation rules even if they are outdated.

This function returns TRUE if combination valid or FALSE and sets error message using FND_MESSAGE utility on error or if invalid. If this function returns FALSE, use GET_MESSAGE to get the text of the error message in the language of the database, or GET_ENCODED_MESSAGE to get the error message in a language-independent encoded format.

The Combination_id output may be NULL if combination is invalid.

Example: (Tested in R12.1.3)

2] FND_FLEX_EXT.get_ccid:

This API gets combination id for the specified key flexfield segments.It is identical to get_combination_id() except this function takes segment values in a string concatenated by the segment  delimiter for this flexfield, and returns a positive combination id if valid or 0 on error.


These key flexfields server validations API are a low level interface to key flexfields validation.  They are designed to allow access to all the flexfields functionality, and to allow the user to get only the information they need in return.  Because of their generality, these functions are more difficult to use than those in the FND_FLEX_EXT package.  Oracle strongly suggests using the functions in FND_FLEX_EXT package if at all possible.

This function finds combination from given segment values.  Segments are passed in as a concatenated string in increasing order of segment_number (display order).

Various Operations that can be performed are:

  • ‘FIND_COMBINATION’ – Combination must already exist.
  • ‘CREATE_COMBINATION’ – Combination is created if doesn’t exist.
  • ‘CREATE_COMB_NO_AT’ – same as create_combination but does not use an autonomous transaction.
  • ‘CHECK_COMBINATION’ – Checks if combination valid, doesn’t create.
  • ‘DEFAULT_COMBINATION’ – Returns minimal default combination.
  • ‘CHECK_SEGMENTS’ – Validates segments individually.

If validation date is NULL checks all cross-validation rules. It returns TRUE if combination valid or FALSE and sets error message on server if invalid. Use the default values if you do not want any special functionality.

Example: (Tested in R12.1.3)

Related Posts:

Related Posts

Query to Get All Active Employee Details!

This is a useful query that shows all the active employees and workers as of SYSDATE. It contains columns like Full Name, Last Name, First Name, Person Type, Employee Flag,…….

Procure to Pay (P2P) Query in Oracle Apps!

Procure to Pay (P2P) Lifecycle is one of the important Process in Oracle Applications. Procure to Pay means Procuring Raw Materials required to manufacture the final or finished Goods from a Supplier…….

API to Delete Values in Value Sets!

Here is a useful API to delete the values in a Value set in AOL.

Related Posts:API to Load Values into Value SetsAPI to Create a New Organization in…….

API to Create a New Organization in Oracle HRMS

HR_ORGANIZATION_API.CREATE_ORGANIZATION This API creates a new organization within the scope of an existing business group. In Parameters: p_validate: If true, then validation alone will be performed and the database will…….

FND APIFND_GLOBAL.APPS_INITIALIZE – Setting the Applications Context

FND_GLOBAL.APPS_INITIALIZE If applications context is not initialized through normal means, use the API FND_GLOBAL.APPS_INITIALIZE to set the applications context in standalone sessions. Typically, you would use this API in external custom…….