356: -----------------------------------------------------
357: l_debug_info := 'Validate segments';
358: -----------------------------------------------------
359: IF (l_dependent_seg_num IS NULL) THEN
360: if ( fnd_flex_keyval.validate_segs(operation=>'CHECK_SEGMENTS',
361: appl_short_name=>'SQLGL',
362: key_flex_code=>'GL#',
363: structure_number=>p_chart_of_accounts_id,
364: concat_segments=>l_concatenated_segments,
371: p_cost_center_valid := FALSE;
372: return;
373: end if;
374: ELSE
375: if ( fnd_flex_keyval.validate_segs(operation=>'CHECK_COMBINATION',
376: appl_short_name=>'SQLGL',
377: key_flex_code=>'GL#',
378: structure_number=>p_chart_of_accounts_id,
379: concat_segments=>l_concatenated_segments,
1005: l_exp_line_acct_segs_array,
1006: l_flex_segment_delimiter);
1007:
1008: ------------------------------------------------------------------------
1009: l_debug_info := 'calling FND_FLEX_KEYVAL.validate_segs';
1010: ------------------------------------------------------------------------
1011: IF (FND_FLEX_KEYVAL.validate_segs('CREATE_COMBINATION',
1012: 'SQLGL',
1013: 'GL#',
1007:
1008: ------------------------------------------------------------------------
1009: l_debug_info := 'calling FND_FLEX_KEYVAL.validate_segs';
1010: ------------------------------------------------------------------------
1011: IF (FND_FLEX_KEYVAL.validate_segs('CREATE_COMBINATION',
1012: 'SQLGL',
1013: 'GL#',
1014: l_chart_of_accounts_id,
1015: l_concatenated_segments)) THEN
1013: 'GL#',
1014: l_chart_of_accounts_id,
1015: l_concatenated_segments)) THEN
1016:
1017: p_new_ccid := FND_FLEX_KEYVAL.combination_id;
1018:
1019: ELSE
1020:
1021: p_return_error_message := FND_FLEX_KEYVAL.error_message;
1017: p_new_ccid := FND_FLEX_KEYVAL.combination_id;
1018:
1019: ELSE
1020:
1021: p_return_error_message := FND_FLEX_KEYVAL.error_message;
1022: FND_MESSAGE.set_encoded(FND_FLEX_KEYVAL.encoded_error_message);
1023: fnd_msg_pub.add();
1024:
1025: END IF; /* FND_FLEX_KEYVAL.validate_segs */
1018:
1019: ELSE
1020:
1021: p_return_error_message := FND_FLEX_KEYVAL.error_message;
1022: FND_MESSAGE.set_encoded(FND_FLEX_KEYVAL.encoded_error_message);
1023: fnd_msg_pub.add();
1024:
1025: END IF; /* FND_FLEX_KEYVAL.validate_segs */
1026:
1021: p_return_error_message := FND_FLEX_KEYVAL.error_message;
1022: FND_MESSAGE.set_encoded(FND_FLEX_KEYVAL.encoded_error_message);
1023: fnd_msg_pub.add();
1024:
1025: END IF; /* FND_FLEX_KEYVAL.validate_segs */
1026:
1027: end if; /* p_build_mode in (C_DEFAULT_VALIDATE, C_BUILD_VALIDATE, C_VALIDATE) */
1028:
1029: -----------------------------------------------------
1386:
1387: -----------------------------------------------------
1388: l_debug_info := 'Validate segments';
1389: -----------------------------------------------------
1390: IF (FND_FLEX_KEYVAL.validate_segs('CREATE_COMBINATION',
1391: 'SQLGL',
1392: 'GL#',
1393: pa_rec.chart_of_accounts_id,
1394: lv_concat_segs)) THEN
1391: 'SQLGL',
1392: 'GL#',
1393: pa_rec.chart_of_accounts_id,
1394: lv_concat_segs)) THEN
1395: l_pa_ccid := FND_FLEX_KEYVAL.combination_id;
1396: ELSE
1397: p_return_error_message := FND_FLEX_KEYVAL.error_message;
1398: /* could not generate the projects CCID */
1399: p_new_ccid := to_number(null);
1393: pa_rec.chart_of_accounts_id,
1394: lv_concat_segs)) THEN
1395: l_pa_ccid := FND_FLEX_KEYVAL.combination_id;
1396: ELSE
1397: p_return_error_message := FND_FLEX_KEYVAL.error_message;
1398: /* could not generate the projects CCID */
1399: p_new_ccid := to_number(null);
1400: p_return_status := 'GENERATION_ERROR';
1401: return;
1398: /* could not generate the projects CCID */
1399: p_new_ccid := to_number(null);
1400: p_return_status := 'GENERATION_ERROR';
1401: return;
1402: END IF; /* FND_FLEX_KEYVAL.validate_segs */
1403:
1404: END IF; /* l_pa_ccid = -1 */
1405:
1406: IF (l_pa_ccid is null OR l_pa_ccid = -1) THEN