DBA Data[Home] [Help]

PACKAGE: APPS.FND_SEQNUM

Source


1 package FND_SEQNUM as
2 /* $Header: AFSQNUMS.pls 120.2 2005/11/03 08:11:23 fskinner ship $ */
3 
4 
5 /* FND_SEQNUM Constants for the return values from get_seq_info and get_seq_val
6 	this is a fairly close match to fdssop() 'C' function */
7 SEQSUCC	 CONSTANT number :=	 0; /* Everything completed successfully */
8 ORAFAIL	 CONSTANT number := -1; /* An oracle error occurred and we have raise the error with
9 								fnd.message and app_exception.raise_exception function */
10 NOASSIGN CONSTANT number := -2; /* No assignment exists for the set of parameters */
11 INACTIVE CONSTANT number := -3; /* The assigned sequence is inactive - so far this
12 								is not used here, if the trx_date is out of range for
13 								any assignment we return noassign - the 'C' code does */
14 BADPROF	 CONSTANT number := -4; /* The profile option is NOT set properly */
15 NOVALUE	 CONSTANT number := -5;	/* A sequence value was not passed for a manual seq */
16 NOTUNIQ	 CONSTANT number := -6;	/* The manual sequence value passed is not unique */
17 NOTUSED	 CONSTANT number := -7; /* Sequential Numbering is not used, continue */
18 ALWAYS	 CONSTANT number := -8; /* Sequential Numbering is always used and there is */
19 								/* no assignment for this set of parameters */
20 BADTYPE	 CONSTANT number := -9; /* Received an invalid DocSeq type */
21 DUPNAME	 CONSTANT number := -10;/* The sequence Name value passed is not unique */
22 BADFLAG	 CONSTANT number := -11;/* Received an invalid Message Flag */
23 BADDATE	 CONSTANT number := -12;/* Received an invalid start and end date combo for
24 								these parameters */
25 BADNAME	 CONSTANT number := -13;/* Received an invalid Doc_Seq Name */
26 BADCODE	 CONSTANT number := -14;/* Received an invalid Category Code */
27 BADSOB	 CONSTANT number := -15;/* Received an invalid Set of Books ID */
28 BADMTHD	 CONSTANT number := -16;/* Received an invalid Method Code */
29 BADAPPID CONSTANT number := -17;/* Received an invalid Method Code */
30 
31   function get_next_sequence (appid in number,
32 							   cat_code in varchar2,
33 							   sobid in number,
34 							   met_code in char,
35 							   trx_date in date,
36 							   dbseqnm in out nocopy varchar2,
37 							   dbseqid in out nocopy integer) return number;
38 
39   procedure get_seq_name (appid in number,
40 						  cat_code in varchar2,
41 						  sobid in number,
42 						  met_code in char,
43 						  trx_date in date,
44 						  dbseqnm out nocopy varchar2,
45 						  dbseqid out nocopy integer,
46 						  seqassid out nocopy integer);
47 
48   function get_next_auto_seq (dbseqnm in varchar2) return number;
49 
50   function get_next_auto_sequence (appid in number,
51 								   cat_code in varchar2,
52 								   sobid in number,
53 								   met_code in char,
54 								   trx_date in varchar2) return number;
55 
56   function get_next_auto_sequence (appid in number,
57 								   cat_code in varchar2,
58 								   sobid in number,
59 								   met_code in char,
60 								   trx_date in date) return number;
61 
62   procedure create_gapless_sequences;
63 
64   function create_gapless_sequence (seqid in number) return number;
65 
66   function get_next_user_sequence (fds_user_id in number,
67 								   seqassid in number,
68 								   seqid in number) return number;
69 /*
70  * Bug 1106208 - Modified create_db_seq() to accept two new parameters
71  * db_seq_name and init_value
72  */
73 procedure create_db_seq (
74 		db_seq_name	in	fnd_document_sequences.db_sequence_name%TYPE,
75 		init_value	in	fnd_document_sequences.initial_value%TYPE
76 		);
77 
78 /*
79  * This function replaces/performs the actions of the 'C' code function fdssop()
80  * Please see the comments above for usage information
81  */
82 function get_seq_info (
83 		app_id			in number,
84 		cat_code		in varchar2,
85 		sob_id			in number,
86 		met_code		in char,
87 		trx_date		in date,
88 		docseq_id		out nocopy number,
89 		docseq_type		out nocopy char,
90 		docseq_name		out nocopy varchar2,
91 		db_seq_name		out nocopy varchar2,
92 		seq_ass_id		out nocopy number,
93 		prd_tab_name	out nocopy varchar2,
94 		aud_tab_name	out nocopy varchar2,
95 		msg_flag		out nocopy char,
96 		suppress_error	in char default 'N',
97 		suppress_warn	in char default 'N'
98 		) return number;
99 
100 function create_audit_rec (
101 		aud_tab_name	in varchar2,
102 		docseq_id		in number,
103 		seq_val 		in number,
104 		seq_ass_id		in number,
105 		user_id			in number
106 		) return number;
107 
108 /*
109  * This function replaces/performs the actions of the user exit #FND SEQVAL
110  * Please see the comments above for usage information
111  */
112 function get_seq_val (
113 		app_id			in number,
114 		cat_code		in varchar2,
115 		sob_id			in number,
116 		met_code		in char,
117 		trx_date		in date,
118 		seq_val			in out nocopy number,
119 		docseq_id		out nocopy number,
120 		suppress_error	in char default 'N',
121 		suppress_warn	in char default 'N'
122 		) return number;
123 
124 /*
125  * This function is for special internal Applications use to create new Document
126  * Sequences in batch form by the Product teams for upgrades or coversions
127  */
128 function define_doc_seq (
129 		app_id			in number,
130 		docseq_name		in fnd_document_sequences.name%TYPE,
131 		docseq_type		in fnd_document_sequences.type%TYPE,
132 		msg_flag		in fnd_document_sequences.message_flag%TYPE,
133 		init_value		in fnd_document_sequences.initial_value%TYPE,
134 		p_startDate		in date,
135 		p_endDate		in date default NULL
136 		) return number;
137 
138 /*
139  * This function is for special internal Applications use to create new Doc_Seq
140  * Assignments in batch form by the Product teams for upgrades or coversions
141  */
142 function assign_doc_seq (
143 		app_id			in number,
144 		docseq_name		in fnd_document_sequences.name%TYPE,
145 		cat_code		in fnd_doc_sequence_assignments.category_code%TYPE,
146 		sob_id			in fnd_doc_sequence_assignments.set_of_books_id%TYPE,
147 		met_code		in fnd_doc_sequence_assignments.method_code%TYPE,
148 		p_startDate		in date,
149 		p_endDate		in date default NULL
150 		) return number;
151 
152 end FND_SEQNUM;