Sunteți pe pagina 1din 2

Account Combination Creation API

There are 2 flexfield APIs which you can use to either validation the existing given code_combination_id (ccid) or to validate and create a new code combination (Account). 1. fnd_flex_keyval.VALIDATE_SEGS() - To validate and if required can create Account code combination. FUNCTION validate_segs(operation IN VARCHAR2, appl_short_name IN VARCHAR2, key_flex_code IN VARCHAR2, structure_number IN NUMBER, concat_segments IN VARCHAR2, values_or_ids IN VARCHAR2 DEFAULT 'V', validation_date IN DATE DEFAULT SYSDATE, displayable IN VARCHAR2 DEFAULT 'ALL', data_set IN NUMBER DEFAULT NULL, vrule IN VARCHAR2 DEFAULT NULL, where_clause IN VARCHAR2 DEFAULT NULL, get_columns IN VARCHAR2 DEFAULT NULL, allow_nulls IN BOOLEAN DEFAULT FALSE, allow_orphans IN BOOLEAN DEFAULT FALSE, resp_appl_id IN NUMBER DEFAULT NULL, resp_id IN NUMBER DEFAULT NULL, user_id IN NUMBER DEFAULT NULL, select_comb_from_view IN VARCHAR2 DEFAULT NULL, no_combmsg IN VARCHAR2 DEFAULT NULL, where_clause_msg IN VARCHAR2 DEFAULT NULL) RETURN BOOLEAN; For example: fnd_flex_keyval.validate_segs( operation => 'CREATE_COMBINATION', appl_short_name => 'SQLGL', key_flex_code => 'GL#', structure_number => x_coa_id, --- Pass your chart of accounts id concat_segments => x_acc_comb, --- Pass your account combination string you want to create -'1001.1051.0101.811469.0000.0000000.0000.00000' validation_date => x_eff_date) --- effective date by which you want the combination to be validated

Here Operation can be : '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 the above function returns FALSE then use fnd_flex_keyval.error_message() to get the exact FND FLEXFIELD error message to work on. Another very important function - fnd_flex_keyval.combination_id() returns the ccid of the newly created code combination by the above API.

Second API - fnd_flex_keyval.validate_ccid I will discuss tomorrow.

Re: Account Combination Creation API


by kkchopra on Mon Mar 02, 2009 5:15 pm FUNCTION validate_ccid(appl_short_name IN VARCHAR2, key_flex_code IN VARCHAR2, structure_number IN NUMBER, combination_id IN NUMBER, displayable IN VARCHAR2 DEFAULT 'ALL', data_set IN NUMBER DEFAULT NULL, vrule IN VARCHAR2 DEFAULT NULL, security IN VARCHAR2 DEFAULT 'IGNORE', get_columns IN VARCHAR2 DEFAULT NULL, resp_appl_id IN NUMBER DEFAULT NULL, resp_id IN NUMBER DEFAULT NULL, user_id IN NUMBER DEFAULT NULL, select_comb_from_view IN VARCHAR2 DEFAULT NULL) RETURN BOOLEAN; Looks up flexfield combination by its combination id. Returns TRUE if combination found. For example: fnd_flex_keyval.validate_ccid( appl_short_name => 'SQLGL', key_flex_code => 'GL#', structure_number => x_coa_id, combination_id => x_ccid, security => 'ENFORCE') Possible values for security parameter are : IGNORE - ignores value security altogether. CHECK - checks security, but violation is not an error. ENFORCE - Stop validating and return error ifs security violated

S-ar putea să vă placă și