136: v_oo_id IN NUMBER,
137: v_cart_id IN NUMBER,
138: v_account_id IN NUMBER default NULL,
139: v_n_segments IN NUMBER default NULL,
140: v_segments IN fnd_flex_ext.SegmentArray,
141: v_account_num IN VARCHAR2 default NULL,
142: v_allocation_type IN VARCHAR2 default NULL,
143: v_allocation_value IN NUMBER default NULL) is
144:
202: v_cursor_id INTEGER;
203:
204: v_distribution_id NUMBER;
205:
206: v_segment_bind fnd_flex_ext.SegmentArray;
207:
208: begin
209:
210: if icx_sec.validatesession then
369: v_distribution_id IN NUMBER,
370: v_line_number IN NUMBER,
371: v_account_id IN NUMBER default NULL,
372: v_n_segments IN NUMBER default NULL,
373: v_segments IN fnd_flex_ext.SegmentArray,
374: v_account_num IN VARCHAR2 default NULL,
375: v_allocation_type IN VARCHAR2 default NULL,
376: v_allocation_value IN NUMBER default NULL) is
377:
423: /* New vars added to take care of Bind Vars ***/
424:
425: v_cursor_id INTEGER;
426:
427: v_segment_bind fnd_flex_ext.SegmentArray;
428:
429: begin
430:
431: if icx_sec.validatesession then
568: v_structure IN NUMBER,
569: v_cart_line_id IN NUMBER,
570: v_cart_line_number IN NUMBER default NULL,
571: v_n_segments OUT NUMBER,
572: v_segments OUT fnd_flex_ext.SegmentArray,
573: v_account_id OUT NUMBER) is
574: v_delimiter varchar2(10);
575: l_n_segments NUMBER := NULL;
576: l_segments fnd_flex_ext.SegmentArray;
572: v_segments OUT fnd_flex_ext.SegmentArray,
573: v_account_id OUT NUMBER) is
574: v_delimiter varchar2(10);
575: l_n_segments NUMBER := NULL;
576: l_segments fnd_flex_ext.SegmentArray;
577: l_account_id NUMBER := NULL;
578: l_ret_cd BOOLEAN;
579: v_error_message varchar2(1000);
580:
580:
581: begin
582:
583: -- get con-seg delimiter
584: v_delimiter := fnd_flex_ext.get_delimiter('SQLGL','GL#',v_structure);
585: l_account_id := fnd_flex_ext.get_ccid('SQLGL',
586: 'GL#',
587: v_structure,
588: to_char(sysdate, 'YYYY/MM/DD HH24:MI:SS'),
581: begin
582:
583: -- get con-seg delimiter
584: v_delimiter := fnd_flex_ext.get_delimiter('SQLGL','GL#',v_structure);
585: l_account_id := fnd_flex_ext.get_ccid('SQLGL',
586: 'GL#',
587: v_structure,
588: to_char(sysdate, 'YYYY/MM/DD HH24:MI:SS'),
589: v_account_num);
590:
591: if l_account_id is not NULL then
592:
593: v_account_id := l_account_id;
594: l_ret_cd := fnd_flex_ext.get_segments('SQLGL',
595: 'GL#',
596: v_structure,
597: l_account_id,
598: v_n_segments,
626:
627: /* get account id,con-catenated segments based on segments */
628: PROCEDURE get_acct_by_segs(v_cart_id IN NUMBER,
629: v_line_number IN NUMBER,
630: v_segments IN fnd_flex_ext.SegmentArray,
631: v_structure IN NUMBER,
632: v_cart_line_id IN NUMBER,
633: v_cart_line_number IN NUMBER default NULL,
634: v_n_segments OUT NUMBER,
644:
645: begin
646:
647: -- get con-seg delimiter
648: v_delimiter := fnd_flex_ext.get_delimiter('SQLGL','GL#',v_structure);
649: l_n_segments := v_segments.COUNT;
650: v_n_segments := l_n_segments;
651:
652: l_account_num := fnd_flex_ext.concatenate_segments(l_n_segments,
648: v_delimiter := fnd_flex_ext.get_delimiter('SQLGL','GL#',v_structure);
649: l_n_segments := v_segments.COUNT;
650: v_n_segments := l_n_segments;
651:
652: l_account_num := fnd_flex_ext.concatenate_segments(l_n_segments,
653: v_segments,
654: v_delimiter);
655: v_account_num := l_account_num;
656:
655: v_account_num := l_account_num;
656:
657: if l_account_num is not NULL then
658:
659: l_account_id := fnd_flex_ext.get_ccid('SQLGL',
660: 'GL#',
661: v_structure,
662: to_char(sysdate, 'YYYY/MM/DD HH24:MI:SS'),
663: l_account_num);
689: v_structure IN NUMBER,
690: v_cart_line_id IN NUMBER,
691: v_cart_line_number IN NUMBER default NULL,
692: v_n_segments OUT NUMBER,
693: v_segments OUT fnd_flex_ext.SegmentArray,
694: v_account_num OUT VARCHAR2) is
695:
696: v_delimiter varchar2(10);
697: l_n_segments NUMBER := NULL;
694: v_account_num OUT VARCHAR2) is
695:
696: v_delimiter varchar2(10);
697: l_n_segments NUMBER := NULL;
698: l_segments fnd_flex_ext.SegmentArray;
699: l_ret_cd BOOLEAN;
700: v_error_message varchar2(1000);
701:
702: begin
700: v_error_message varchar2(1000);
701:
702: begin
703: -- get con-seg delimiter
704: v_delimiter := fnd_flex_ext.get_delimiter('SQLGL','GL#',v_structure);
705:
706: -- get segments and put into the plsql table
707: l_ret_cd := fnd_flex_ext.get_segments('SQLGL',
708: 'GL#',
703: -- get con-seg delimiter
704: v_delimiter := fnd_flex_ext.get_delimiter('SQLGL','GL#',v_structure);
705:
706: -- get segments and put into the plsql table
707: l_ret_cd := fnd_flex_ext.get_segments('SQLGL',
708: 'GL#',
709: v_structure,
710: v_account_id,
711: l_n_segments,
728:
729: v_n_segments := l_n_segments;
730: v_segments := l_segments;
731:
732: v_account_num := fnd_flex_ext.concatenate_segments(n_segments => l_n_segments,
733: segments => l_segments,
734: delimiter => v_delimiter);
735:
736: end if;
769: v_expense_account number;
770: v_exist number;
771: v_return_code varchar2(200);
772: v_n_segments number;
773: v_segments fnd_flex_ext.SegmentArray;
774: v_account_id number := NULL;
775: l_line_number number := NULL;
776:
777: cursor get_line_number(cartid number,cartline_id number,oo_id number) is
824: l_line_number := v_line_number;
825: end if;
826:
827: /* get the account id */
828: v_account_id := fnd_flex_ext.get_ccid('SQLGL',
829: 'GL#',
830: v_structure,
831: to_char(sysdate, 'YYYY/MM/DD HH24:MI:SS'),
832: v_account_num);
881: * if distiribution id is not passed.*/
882: PROCEDURE update_account(v_cart_id IN NUMBER,
883: v_cart_line_id IN NUMBER,
884: v_oo_id IN NUMBER,
885: v_segments IN fnd_flex_ext.SegmentArray,
886: v_distribution_id IN NUMBER default NULL,
887: v_line_number IN NUMBER default NULL,
888: v_allocation_type IN VARCHAR2 default NULL,
889: v_allocation_value IN NUMBER default NULL,
1011: v_line_number number;
1012: v_exist number;
1013: v_return_code varchar2(200);
1014: v_n_segments number;
1015: v_segments fnd_flex_ext.SegmentArray;
1016:
1017: CURSOR line_default_account is
1018: SELECT default_code_combination_id employee_default_account_id
1019: from hr_employees_current_v
1156: PROCEDURE get_default_segs (v_cart_id IN NUMBER,
1157: v_cart_line_id IN NUMBER,
1158: v_emp_id IN NUMBER,
1159: v_oo_id IN NUMBER,
1160: v_segments OUT fnd_flex_ext.SegmentArray) IS
1161:
1162: v_error_message varchar(1000);
1163: v_structure number;
1164: v_expense_account number;
1241: close item_expense_account;
1242: end if;
1243:
1244: if v_account_id is not NULL then
1245: l_ret_cd := fnd_flex_ext.get_segments('SQLGL',
1246: 'GL#',
1247: v_structure,
1248: v_account_id,
1249: v_n_segments,
1251: end if;
1252:
1253: elsif v_account_num is not NULL then
1254:
1255: v_delimiter := fnd_flex_ext.get_delimiter('SQLGL','GL#',v_structure);
1256: v_account_id := fnd_flex_ext.get_ccid('SQLGL',
1257: 'GL#',
1258: v_structure,
1259: to_char(sysdate, 'YYYY/MM/DD HH24:MI:SS'),
1252:
1253: elsif v_account_num is not NULL then
1254:
1255: v_delimiter := fnd_flex_ext.get_delimiter('SQLGL','GL#',v_structure);
1256: v_account_id := fnd_flex_ext.get_ccid('SQLGL',
1257: 'GL#',
1258: v_structure,
1259: to_char(sysdate, 'YYYY/MM/DD HH24:MI:SS'),
1260: v_account_num);
1259: to_char(sysdate, 'YYYY/MM/DD HH24:MI:SS'),
1260: v_account_num);
1261: if v_account_id is not NULL then
1262:
1263: l_ret_cd := fnd_flex_ext.get_segments('SQLGL',
1264: 'GL#',
1265: v_structure,
1266: v_account_id,
1267: v_n_segments,
1300: v_oo_id IN NUMBER,
1301: v_distribution_id IN NUMBER,
1302: v_line_number IN NUMBER) is
1303:
1304: v_segments fnd_flex_ext.SegmentArray;
1305: v_n_segments number;
1306: v_structure number;
1307: v_cart_line_number number;
1308: v_error_message varchar2(2000);
1350: fetch get_account_id into v_account_id;
1351: close get_account_id;
1352:
1353: if v_account_id is not NULL then
1354: l_ret_cd := fnd_flex_ext.get_segments('SQLGL',
1355: 'GL#',
1356: v_structure,
1357: v_account_id,
1358: v_n_segments,