DBA Data[Home] [Help]

APPS.EDW_VBH_SETUP dependencies on EDW_SET_OF_BOOKS

Line 23: PROCEDURE INSERT_INTO_EDW_SET_OF_BOOKS(

19: p_status:=false;
20: p_errMsg:=sqlcode||':'||sqlerrm;
21: end lookup_db_link;
22:
23: PROCEDURE INSERT_INTO_EDW_SET_OF_BOOKS(
24: p_status out nocopy boolean,
25: p_errMsg out nocopy varchar2) AS
26: l_instance_code edw_source_instances.instance_code%TYPE;
27: l_instance_link edw_source_instances.WAREHOUSE_TO_INSTANCE_LINK%TYPE;

Line 41: delete from edw_set_of_books;

37: order by instance_code;
38: begin
39: l_stmt:='alter session set global_names = FALSE';
40: execute immediate l_stmt;
41: delete from edw_set_of_books;
42: delete from edw_cons_set_of_books;
43: delete from edw_equi_set_of_books;
44: delete from edw_vbh_roots;
45: delete from edw_segment_classes;

Line 52: l_insert_stmt:= 'insert into edw_set_of_books(EDW_SET_OF_BOOKS_ID,

48: fetch l_source_instances_cur into l_instance_code,l_instance_link;
49: exit when l_source_instances_cur%NOTFOUND;
50:
51: l_cursor_id:=DBMS_SQL.OPEN_CURSOR;
52: l_insert_stmt:= 'insert into edw_set_of_books(EDW_SET_OF_BOOKS_ID,
53: instance,
54: SET_OF_BOOKS_ID,
55: SET_OF_BOOKS_NAME ,
56: CHART_OF_ACCOUNTS_ID,

Line 64: select EDW_SET_OF_BOOKS_S.nextval,'''||l_instance_code||''',set_of_books_id,

60: LAST_UPDATE_DATE,
61: LAST_UPDATED_BY ,
62: LAST_UPDATE_LOGIN
63: )
64: select EDW_SET_OF_BOOKS_S.nextval,'''||l_instance_code||''',set_of_books_id,
65: name,CHART_OF_ACCOUNTS_ID,description,
66: sysdate,
67: fnd_global.user_id,
68: sysdate,

Line 85: end insert_into_edw_set_of_books;

81: when others then
82: p_status :=false;
83: p_errMsg:=sqlcode||':'||sqlerrm;
84:
85: end insert_into_edw_set_of_books;
86:
87: procedure insert_source(p_status out nocopy boolean,p_errMsg out nocopy varchar2) is
88: l_instance_link edw_source_instances.WAREHOUSE_TO_INSTANCE_LINK%TYPE;
89: l_instance_code edw_source_instances.instance_code%TYPE;

Line 113: (EDW_SET_OF_BOOKS_ID,

109: l_delete_stmt:='delete from EDW_LOCAL_SET_OF_BOOKS@'||l_instance_link;
110: execute immediate l_delete_stmt;
111:
112: l_insert_stmt:= 'insert into EDW_LOCAL_SET_OF_BOOKS@'||l_instance_link||'
113: (EDW_SET_OF_BOOKS_ID,
114: instance,
115: SET_OF_BOOKS_ID,
116: SET_OF_BOOKS_NAME ,
117: CHART_OF_ACCOUNTS_ID,

Line 125: select EDW_SET_OF_BOOKS_ID,

121: LAST_UPDATE_DATE,
122: LAST_UPDATED_BY ,
123: LAST_UPDATE_LOGIN
124: )
125: select EDW_SET_OF_BOOKS_ID,
126: instance,
127: SET_OF_BOOKS_ID,
128: SET_OF_BOOKS_NAME ,
129: CHART_OF_ACCOUNTS_ID,

Line 136: from edw_set_of_books

132: CREATED_BY,
133: LAST_UPDATE_DATE,
134: LAST_UPDATED_BY ,
135: LAST_UPDATE_LOGIN
136: from edw_set_of_books
137: WHERE instance = ''' || l_instance_code || '''';
138:
139: execute immediate l_insert_stmt;
140: end loop;

Line 184: (child_EDW_SET_OF_BOOKS_ID,

180: DBMS_SQL.close_cursor(l_delete_cursor_id);
181:
182: l_insert_cursor_id:=DBMS_SQL.OPEN_CURSOR;
183: l_insert_stmt:= 'insert into EDW_LOCAL_CONS_SET_OF_BOOKS@'||l_instance_link||'
184: (child_EDW_SET_OF_BOOKS_ID,
185: parent_edw_SET_OF_BOOKS_ID,
186: consolidation_id,
187: consolidation_NAME,
188: CREATION_DATE,

Line 185: parent_edw_SET_OF_BOOKS_ID,

181:
182: l_insert_cursor_id:=DBMS_SQL.OPEN_CURSOR;
183: l_insert_stmt:= 'insert into EDW_LOCAL_CONS_SET_OF_BOOKS@'||l_instance_link||'
184: (child_EDW_SET_OF_BOOKS_ID,
185: parent_edw_SET_OF_BOOKS_ID,
186: consolidation_id,
187: consolidation_NAME,
188: CREATION_DATE,
189: CREATED_BY,

Line 194: select child_EDW_SET_OF_BOOKS_ID,

190: LAST_UPDATE_DATE,
191: LAST_UPDATED_BY ,
192: LAST_UPDATE_LOGIN
193: )
194: select child_EDW_SET_OF_BOOKS_ID,
195: parent_edw_SET_OF_BOOKS_ID,
196: consolidation_id,
197: consolidation_NAME,
198: CREATION_DATE,

Line 195: parent_edw_SET_OF_BOOKS_ID,

191: LAST_UPDATED_BY ,
192: LAST_UPDATE_LOGIN
193: )
194: select child_EDW_SET_OF_BOOKS_ID,
195: parent_edw_SET_OF_BOOKS_ID,
196: consolidation_id,
197: consolidation_NAME,
198: CREATION_DATE,
199: CREATED_BY,

Line 252: (EDW_SET_OF_BOOKS_ID,

248: DBMS_SQL.close_cursor(l_delete_cursor_id);
249:
250: l_insert_cursor_id:=DBMS_SQL.OPEN_CURSOR;
251: l_insert_stmt:= 'insert into EDW_LOCAL_EQUI_SET_OF_BOOKS@'||l_instance_link||'
252: (EDW_SET_OF_BOOKS_ID,
253: equi_SET_OF_BOOKS_ID,
254: CREATION_DATE,
255: CREATED_BY,
256: LAST_UPDATE_DATE,

Line 260: select EDW_SET_OF_BOOKS_ID,

256: LAST_UPDATE_DATE,
257: LAST_UPDATED_BY ,
258: LAST_UPDATE_LOGIN
259: )
260: select EDW_SET_OF_BOOKS_ID,
261: equi_SET_OF_BOOKS_ID,
262: CREATION_DATE,
263: CREATED_BY,
264: LAST_UPDATE_DATE,

Line 559: select edw_set_of_books_id,segment_name,

555: l_root_value4 varchar2(240);
556: l_instance varchar2(30);
557:
558: cursor l_cur_edw_vbh_roots is
559: select edw_set_of_books_id,segment_name,
560: root_value1,root_value2,root_value3,root_value4
561: from edw_vbh_roots;
562: begin
563: open l_cur_edw_vbh_roots;

Line 569: from edw_set_of_books

565: fetch l_cur_edw_vbh_roots into l_edw_sob_id,l_segment_name,
566: l_root_value1,l_root_value2,l_root_value3,l_root_value4;
567: exit when l_cur_edw_vbh_roots%NOTFOUND;
568: select instance into l_instance
569: from edw_set_of_books
570: where edw_set_of_books_id= l_edw_sob_id;
571: p_problem_sob_id2:=l_edw_sob_id;
572: p_segment_name := l_segment_name;
573:

Line 570: where edw_set_of_books_id= l_edw_sob_id;

566: l_root_value1,l_root_value2,l_root_value3,l_root_value4;
567: exit when l_cur_edw_vbh_roots%NOTFOUND;
568: select instance into l_instance
569: from edw_set_of_books
570: where edw_set_of_books_id= l_edw_sob_id;
571: p_problem_sob_id2:=l_edw_sob_id;
572: p_segment_name := l_segment_name;
573:
574: if l_root_value1 IS NOT NULL THEN

Line 648: select parent_edw_set_of_books_id, child_edw_set_of_books_id,

644: l_dummy number;
645: begin
646: edw_vbh_setup.LOOKUP_DB_LINK(p_instance,l_status,l_err_msg,l_db_link);
647: open l_cur_edw_cons for
648: select parent_edw_set_of_books_id, child_edw_set_of_books_id,
649: consolidation_id
650: from edw_cons_set_of_books
651: where child_edw_set_of_books_id
652: in (select edw_set_of_books_id from edw_vbh_roots where segment_name=p_segment_name)

Line 651: where child_edw_set_of_books_id

647: open l_cur_edw_cons for
648: select parent_edw_set_of_books_id, child_edw_set_of_books_id,
649: consolidation_id
650: from edw_cons_set_of_books
651: where child_edw_set_of_books_id
652: in (select edw_set_of_books_id from edw_vbh_roots where segment_name=p_segment_name)
653: and parent_edw_set_of_books_id=p_edw_sob_id;
654:
655: loop

Line 652: in (select edw_set_of_books_id from edw_vbh_roots where segment_name=p_segment_name)

648: select parent_edw_set_of_books_id, child_edw_set_of_books_id,
649: consolidation_id
650: from edw_cons_set_of_books
651: where child_edw_set_of_books_id
652: in (select edw_set_of_books_id from edw_vbh_roots where segment_name=p_segment_name)
653: and parent_edw_set_of_books_id=p_edw_sob_id;
654:
655: loop
656: fetch l_cur_edw_cons into l_parent_edw_sob_id,l_child_edw_sob_id,l_consolidation_id;

Line 653: and parent_edw_set_of_books_id=p_edw_sob_id;

649: consolidation_id
650: from edw_cons_set_of_books
651: where child_edw_set_of_books_id
652: in (select edw_set_of_books_id from edw_vbh_roots where segment_name=p_segment_name)
653: and parent_edw_set_of_books_id=p_edw_sob_id;
654:
655: loop
656: fetch l_cur_edw_cons into l_parent_edw_sob_id,l_child_edw_sob_id,l_consolidation_id;
657: exit when l_cur_edw_cons%NOTFOUND;

Line 661: from edw_flex_seg_mappings_v from_f,edw_set_of_books from_b

657: exit when l_cur_edw_cons%NOTFOUND;
658:
659: select from_f.value_set_id
660: into l_from_value_set_id
661: from edw_flex_seg_mappings_v from_f,edw_set_of_books from_b
662: where from_b.edw_set_of_books_id=l_child_edw_sob_id
663: and from_b.chart_of_accounts_id=from_f.structure_num
664: and from_f.instance_code=p_instance
665: and from_f.segment_name=p_segment_name;

Line 662: where from_b.edw_set_of_books_id=l_child_edw_sob_id

658:
659: select from_f.value_set_id
660: into l_from_value_set_id
661: from edw_flex_seg_mappings_v from_f,edw_set_of_books from_b
662: where from_b.edw_set_of_books_id=l_child_edw_sob_id
663: and from_b.chart_of_accounts_id=from_f.structure_num
664: and from_f.instance_code=p_instance
665: and from_f.segment_name=p_segment_name;
666:

Line 669: from edw_flex_seg_mappings_v to_f,edw_set_of_books to_b

665: and from_f.segment_name=p_segment_name;
666:
667: select to_f.value_set_id
668: into l_to_value_set_id
669: from edw_flex_seg_mappings_v to_f,edw_set_of_books to_b
670: where to_b.edw_set_of_books_id=l_parent_edw_sob_id
671: and to_b.chart_of_accounts_id=to_f.structure_num
672: and to_f.instance_code=p_instance
673: and to_f.segment_name=p_segment_name;

Line 670: where to_b.edw_set_of_books_id=l_parent_edw_sob_id

666:
667: select to_f.value_set_id
668: into l_to_value_set_id
669: from edw_flex_seg_mappings_v to_f,edw_set_of_books to_b
670: where to_b.edw_set_of_books_id=l_parent_edw_sob_id
671: and to_b.chart_of_accounts_id=to_f.structure_num
672: and to_f.instance_code=p_instance
673: and to_f.segment_name=p_segment_name;
674:

Line 692: l_select_stmt:='select count(*) from edw_vbh_roots where edw_set_of_books_id=:b_problem_sob_id and root_value'||p_hierarchy_no||' is not null and segment_name =:b_segment_name';

688: dbms_sql.close_cursor(l_cursor_id);
689:
690: if l_result<>0 then
691: l_cursor_id:=dbms_sql.open_cursor;
692: l_select_stmt:='select count(*) from edw_vbh_roots where edw_set_of_books_id=:b_problem_sob_id and root_value'||p_hierarchy_no||' is not null and segment_name =:b_segment_name';
693:
694: dbms_sql.parse(l_cursor_id, l_select_stmt,dbms_sql.v7);
695: dbms_sql.bind_variable(l_cursor_id,':b_problem_sob_id',l_child_edw_sob_id);
696: dbms_sql.bind_variable(l_cursor_id,':b_segment_name',p_segment_name);

Line 714: select parent_edw_set_of_books_id,child_edw_set_of_books_id,consolidation_id

710: end loop;
711: close l_cur_edw_cons;
712:
713: open l_cur_edw_cons for
714: select parent_edw_set_of_books_id,child_edw_set_of_books_id,consolidation_id
715: from edw_cons_set_of_books
716: where parent_edw_set_of_books_id in (select edw_set_of_books_id from edw_vbh_roots where segment_name=p_segment_name)
717: and child_edw_set_of_books_id =p_edw_sob_id;
718: loop

Line 716: where parent_edw_set_of_books_id in (select edw_set_of_books_id from edw_vbh_roots where segment_name=p_segment_name)

712:
713: open l_cur_edw_cons for
714: select parent_edw_set_of_books_id,child_edw_set_of_books_id,consolidation_id
715: from edw_cons_set_of_books
716: where parent_edw_set_of_books_id in (select edw_set_of_books_id from edw_vbh_roots where segment_name=p_segment_name)
717: and child_edw_set_of_books_id =p_edw_sob_id;
718: loop
719: fetch l_cur_edw_cons into l_parent_edw_sob_id,l_child_edw_sob_id,l_consolidation_id;
720: exit when l_cur_edw_cons%NOTFOUND;

Line 717: and child_edw_set_of_books_id =p_edw_sob_id;

713: open l_cur_edw_cons for
714: select parent_edw_set_of_books_id,child_edw_set_of_books_id,consolidation_id
715: from edw_cons_set_of_books
716: where parent_edw_set_of_books_id in (select edw_set_of_books_id from edw_vbh_roots where segment_name=p_segment_name)
717: and child_edw_set_of_books_id =p_edw_sob_id;
718: loop
719: fetch l_cur_edw_cons into l_parent_edw_sob_id,l_child_edw_sob_id,l_consolidation_id;
720: exit when l_cur_edw_cons%NOTFOUND;
721: select from_f.value_set_id

Line 723: from edw_flex_seg_mappings_v from_f,edw_set_of_books from_b

719: fetch l_cur_edw_cons into l_parent_edw_sob_id,l_child_edw_sob_id,l_consolidation_id;
720: exit when l_cur_edw_cons%NOTFOUND;
721: select from_f.value_set_id
722: into l_from_value_set_id
723: from edw_flex_seg_mappings_v from_f,edw_set_of_books from_b
724: where from_b.edw_set_of_books_id=l_child_edw_sob_id
725: and from_b.chart_of_accounts_id=from_f.structure_num
726: and from_f.instance_code=p_instance
727: and from_f.segment_name=p_segment_name;

Line 724: where from_b.edw_set_of_books_id=l_child_edw_sob_id

720: exit when l_cur_edw_cons%NOTFOUND;
721: select from_f.value_set_id
722: into l_from_value_set_id
723: from edw_flex_seg_mappings_v from_f,edw_set_of_books from_b
724: where from_b.edw_set_of_books_id=l_child_edw_sob_id
725: and from_b.chart_of_accounts_id=from_f.structure_num
726: and from_f.instance_code=p_instance
727: and from_f.segment_name=p_segment_name;
728:

Line 731: from edw_flex_seg_mappings_v to_f,edw_set_of_books to_b

727: and from_f.segment_name=p_segment_name;
728:
729: select to_f.value_set_id
730: into l_to_value_set_id
731: from edw_flex_seg_mappings_v to_f,edw_set_of_books to_b
732: where to_b.edw_set_of_books_id=l_parent_edw_sob_id
733: and to_b.chart_of_accounts_id=to_f.structure_num
734: and to_f.instance_code=p_instance
735: and to_f.segment_name=p_segment_name;

Line 732: where to_b.edw_set_of_books_id=l_parent_edw_sob_id

728:
729: select to_f.value_set_id
730: into l_to_value_set_id
731: from edw_flex_seg_mappings_v to_f,edw_set_of_books to_b
732: where to_b.edw_set_of_books_id=l_parent_edw_sob_id
733: and to_b.chart_of_accounts_id=to_f.structure_num
734: and to_f.instance_code=p_instance
735: and to_f.segment_name=p_segment_name;
736:

Line 754: l_select_stmt:='select count(*) from edw_vbh_roots where edw_set_of_books_id=:b_problem_sob_id and root_value'||p_hierarchy_no||' is not null and segment_name=:b_segment_name';

750: dbms_sql.close_cursor(l_cursor_id);
751: if l_result<>0 then
752:
753: l_cursor_id:=dbms_sql.open_cursor;
754: l_select_stmt:='select count(*) from edw_vbh_roots where edw_set_of_books_id=:b_problem_sob_id and root_value'||p_hierarchy_no||' is not null and segment_name=:b_segment_name';
755:
756: dbms_sql.parse(l_cursor_id, l_select_stmt,dbms_sql.v7);
757: dbms_sql.bind_variable(l_cursor_id,':b_problem_sob_id',l_parent_edw_sob_id);
758: dbms_sql.bind_variable(l_cursor_id,':b_segment_name',p_segment_name);

Line 793: l_stmt := 'select SET_OF_BOOKS_ID from edw_set_of_books where SET_OF_BOOKS_ID = '|| p_set_of_books_id;

789: cv curType;
790: set_of_book_id_dup number;
791: l_stmt varchar2(1000);
792: BEGIN
793: l_stmt := 'select SET_OF_BOOKS_ID from edw_set_of_books where SET_OF_BOOKS_ID = '|| p_set_of_books_id;
794: open cv for l_stmt;
795: loop
796: fetch cv into set_of_book_id_dup ;
797: EXIT WHEN cv%NOTFOUND;

Line 816: p_edw_set_of_books_id NUMBER,

812:
813: procedure insert_set_of_books(
814: p_status out nocopy BOOLEAN,
815: p_errMsg out nocopy VARCHAR2,
816: p_edw_set_of_books_id NUMBER,
817: p_instance VARCHAR2,
818: p_set_of_books_id NUMBER,
819: p_set_of_books_name VARCHAR2,
820: p_chart_of_accounts_id NUMBER,

Line 832: l_insert_stmt:= 'insert into edw_set_of_books(EDW_SET_OF_BOOKS_ID,instance,

828: l_insert_stmt varchar2(20000);
829:
830:
831: begin
832: l_insert_stmt:= 'insert into edw_set_of_books(EDW_SET_OF_BOOKS_ID,instance,
833: SET_OF_BOOKS_ID,
834: SET_OF_BOOKS_NAME ,
835: CHART_OF_ACCOUNTS_ID,
836: description,

Line 842: )values('||p_edw_set_of_books_id ||','''|| p_instance||''','

838: CREATED_BY,
839: LAST_UPDATE_DATE,
840: LAST_UPDATED_BY ,
841: LAST_UPDATE_LOGIN
842: )values('||p_edw_set_of_books_id ||','''|| p_instance||''','
843: ||p_set_of_books_id||','''||p_set_of_books_name||''','
844: ||p_chart_of_accounts_id||','''
845: ||p_description||''' ,'''
846: ||p_creation_date||''','