66: FOR c_lrec IN c_get_linedef LOOP
67:
68: SELECT pn_var_line_defaults_s.nextval
69: INTO l_lineDefid
70: FROM DUAL;
71:
72: l_bkhdNum := 0;
73: l_lineNum := l_lineNum + 1;
74:
112: FOR c_hdrec IN c_get_bkhddef (c_lrec.line_default_id) LOOP
113:
114: SELECT pn_var_bkhd_defaults_s.nextval
115: INTO l_bkhdDefId
116: FROM DUAL;
117:
118: l_bkdtNum := 0;
119: l_bkhdNum := l_bkhdNum + 1;
120:
167: FOR c_dtrec IN c_get_bkdtdef (c_hdrec.bkhd_default_id) LOOP
168:
169: SELECT pn_var_bkdt_defaults_s.nextval
170: INTO l_bkdtDefId
171: FROM DUAL;
172:
173: l_bkdtNum := l_bkdtNum+1;
174:
175:
274: FOR c_crec IN c_get_consdef LOOP
275:
276: SELECT pn_var_constr_defaults_s.nextval
277: INTO l_consDefId
278: FROM DUAL;
279:
280: l_consNum := l_consNum+1;
281:
282:
578:
579: CURSOR line_exists_cur ( ip_period_id NUMBER,ip_item_category_code VARCHAR2,ip_sales_type_code VARCHAR2)
580: IS
581: SELECT 'x' line_exists
582: FROM dual
583: WHERE exists ( select line_item_id
584: from pn_var_lines_all
585: where period_id = ip_period_id
586: and item_category_code = ip_item_category_code
590: Hence we require two more cursors which fetch the lines incase any one of them is null*/
591: CURSOR line_exists_sales_cur ( ip_period_id NUMBER,ip_sales_type_code VARCHAR2)
592: IS
593: SELECT 'x' line_exists
594: FROM dual
595: WHERE exists ( select line_item_id
596: from pn_var_lines_all
597: where period_id = ip_period_id
598: and sales_type_code = ip_sales_type_code
600:
601: CURSOR line_exists_item_cur ( ip_period_id NUMBER,ip_item_category_code VARCHAR2)
602: IS
603: SELECT 'x' line_exists
604: FROM dual
605: WHERE exists ( select line_item_id
606: from pn_var_lines_all
607: where period_id = ip_period_id
608: and item_category_code = ip_item_category_code
2119:
2120: CURSOR find_if_bkdt_exists_cur (p_bkhd_def_id NUMBER)
2121: IS
2122: SELECT 'x' bkdt_exists
2123: FROM DUAL
2124: WHERE EXISTS (SELECT null
2125: from pn_var_bkdt_defaults_all
2126: where bkhd_default_id = p_bkhd_def_id);
2127: