709: --| Validates item_abccode |
710: --| |
711: --| DESCRIPTION |
712: --| This function validates that the item ABC code exists |
713: --| on ic_rank_mst |
714: --| |
715: --| PARAMETERS |
716: --| p_item_abccode IN VARCHAR2(4) - Item ABC Code |
717: --| |
729: )
730: RETURN BOOLEAN
731: IS
732: l_item_abccode ic_item_mst.item_abccode%TYPE;
733: CURSOR ic_rank_mst_c1 IS
734: SELECT
735: abc_code
736: FROM
737: ic_rank_mst
733: CURSOR ic_rank_mst_c1 IS
734: SELECT
735: abc_code
736: FROM
737: ic_rank_mst
738: WHERE
739: ic_rank_mst.abc_code = p_item_abccode
740: AND ic_rank_mst.delete_mark = 0;
741:
735: abc_code
736: FROM
737: ic_rank_mst
738: WHERE
739: ic_rank_mst.abc_code = p_item_abccode
740: AND ic_rank_mst.delete_mark = 0;
741:
742: BEGIN
743:
736: FROM
737: ic_rank_mst
738: WHERE
739: ic_rank_mst.abc_code = p_item_abccode
740: AND ic_rank_mst.delete_mark = 0;
741:
742: BEGIN
743:
744: IF (p_item_abccode = ' ' OR p_item_abccode IS NULL)
744: IF (p_item_abccode = ' ' OR p_item_abccode IS NULL)
745: THEN
746: RETURN TRUE;
747: ELSE
748: OPEN ic_rank_mst_c1;
749: FETCH ic_rank_mst_c1 INTO l_item_abccode;
750: IF (ic_rank_mst_c1%NOTFOUND)
751: THEN
752: CLOSE ic_rank_mst_c1;
745: THEN
746: RETURN TRUE;
747: ELSE
748: OPEN ic_rank_mst_c1;
749: FETCH ic_rank_mst_c1 INTO l_item_abccode;
750: IF (ic_rank_mst_c1%NOTFOUND)
751: THEN
752: CLOSE ic_rank_mst_c1;
753: RETURN FALSE;
746: RETURN TRUE;
747: ELSE
748: OPEN ic_rank_mst_c1;
749: FETCH ic_rank_mst_c1 INTO l_item_abccode;
750: IF (ic_rank_mst_c1%NOTFOUND)
751: THEN
752: CLOSE ic_rank_mst_c1;
753: RETURN FALSE;
754: ELSE
748: OPEN ic_rank_mst_c1;
749: FETCH ic_rank_mst_c1 INTO l_item_abccode;
750: IF (ic_rank_mst_c1%NOTFOUND)
751: THEN
752: CLOSE ic_rank_mst_c1;
753: RETURN FALSE;
754: ELSE
755: CLOSE ic_rank_mst_c1;
756: RETURN TRUE;
751: THEN
752: CLOSE ic_rank_mst_c1;
753: RETURN FALSE;
754: ELSE
755: CLOSE ic_rank_mst_c1;
756: RETURN TRUE;
757: END IF;
758: END IF;
759: