951: RETURN BOOLEAN IS
952:
953: nsegs NUMBER;
954: new_REI_ccid NUMBER;
955: segments fnd_flex_ext.segmentArray;
956:
957: account_error EXCEPTION;
958:
959: BEGIN
961: ------------------------------------------------------------
962: -- Get the segments values for the template account and --
963: -- the number of enabled segments. --
964: ------------------------------------------------------------
965: IF fnd_flex_ext.get_segments ('SQLGL'
966: , 'GL#'
967: , chart_of_accounts_id
968: , p_default_REI_ccid
969: , nsegs
978: -- Get the new ccid. If the account exists then returns --
979: -- the id, otherwise if dynamic insertion is allowed --
980: -- then creates a new account. --
981: ------------------------------------------------------------
982: IF NOT fnd_flex_ext.get_combination_id ('SQLGL'
983: , 'GL#'
984: , chart_of_accounts_id
985: , sysdate
986: , nsegs