37:
38: TYPE config_hdr_tbl_type IS TABLE OF cz_config_hdrs%ROWTYPE INDEX BY PLS_INTEGER;
39: TYPE config_item_tbl_type IS TABLE OF cz_config_items%ROWTYPE INDEX BY PLS_INTEGER;
40: TYPE config_input_tbl_type IS TABLE OF cz_config_inputs%ROWTYPE INDEX BY PLS_INTEGER;
41: TYPE config_attr_tbl_type IS TABLE OF cz_config_attributes%ROWTYPE INDEX BY PLS_INTEGER;
42: TYPE config_extattr_tbl_type IS TABLE OF cz_config_ext_attributes%ROWTYPE INDEX BY PLS_INTEGER;
43:
44: --------------------------------------------------------------------------------
45: FUNCTION get_next_hdr_id RETURN NUMBER
736: IS
737: l_config_attr_tbl config_attr_tbl_type;
738:
739: CURSOR attr_cursor IS SELECT *
740: FROM cz_config_attributes
741: WHERE config_hdr_id = p_old_config_hdr_id
742: AND config_rev_nbr = p_old_config_rev_nbr
743: AND deleted_flag = '0';
744:
743: AND deleted_flag = '0';
744:
745: BEGIN
746: IF p_item_id_map.COUNT = 0 THEN
747: INSERT INTO CZ_CONFIG_ATTRIBUTES
748: (CONFIG_HDR_ID,
749: CONFIG_REV_NBR,
750: CONFIG_ITEM_ID,
751: ATTRIBUTE_CATEGORY,
815: ATTRIBUTE28,
816: ATTRIBUTE29,
817: ATTRIBUTE30,
818: LAST_UPDATE_LOGIN
819: FROM CZ_CONFIG_ATTRIBUTES
820: WHERE CONFIG_HDR_ID=p_old_config_hdr_id AND CONFIG_REV_NBR=p_old_config_rev_nbr
821: AND deleted_flag = '0';
822:
823: ELSE
836: l_config_attr_tbl(i).config_rev_nbr := p_new_config_rev_nbr;
837: END LOOP;
838:
839: FORALL i IN l_config_attr_tbl.FIRST .. l_config_attr_tbl.LAST
840: INSERT INTO CZ_CONFIG_ATTRIBUTES VALUES l_config_attr_tbl(i);
841: END LOOP;
842:
843: CLOSE attr_cursor;
844: END IF;