1 PACKAGE BODY IGS_CO_VAL_CORD AS
2 /* $Header: IGSCO07B.pls 115.4 2002/11/28 23:04:25 nsidana ship $ */
3 -- Validate that detail format type can only be changed when 'UNDEFINED'
4 FUNCTION corp_val_cord_fmtype(
5 p_format_type IN VARCHAR2 ,
6 p_message_name OUT NOCOPY varchar2)
7 RETURN BOOLEAN AS
8 BEGIN
9 DECLARE
10
11 BEGIN
12 -- This module validates the format type is initially
13 -- 'UNDEFINED' if it is being changed
14 p_message_name := null;
15 IF (p_format_type <> 'UNDEFINED') THEN
16 p_message_name := 'IGS_CO_FMTTYPE_CHG_UNDEFINED';
17 RETURN FALSE;
18 END IF;
19 RETURN TRUE;
20
21 END;
22 END corp_val_cord_fmtype;
23 --
24 -- Validate that ext ref is specified when format type is 'REFERENCE'
25 FUNCTION corp_val_cord_extref(
26 p_format_type IN VARCHAR2 ,
27 p_extref IN VARCHAR2 ,
28 p_message_name OUT NOCOPY varchar2)
29 RETURN BOOLEAN AS
30 BEGIN
31 DECLARE
32
33 BEGIN
34 -- This module validates the external reference is specified
35 -- if detail format type is 'REFERENCE'
36 p_message_name := Null;
37 IF (p_format_type = 'REFERENCE' AND p_extref IS NULL) THEN
38 p_message_name := 'IGS_CO_EXTREF_FMTTYP_REF';
39 RETURN FALSE;
40 ELSE
41 IF (p_format_type <> 'REFERENCE' AND p_extref IS NOT NULL) THEN
42 p_message_name := 'IGS_CO_EXTREF_DTLFMT_REF';
43 RETURN FALSE;
44 END IF;
45 END IF;
46 RETURN TRUE;
47
48 END;
49 END corp_val_cord_extref;
50 END IGS_CO_VAL_CORD;