DBA Data[Home] [Help]

PACKAGE: APPS.PQH_DE_CHILD_SEQ_PKG

Source


1 PACKAGE PQH_DE_CHILD_SEQ_PKG AUTHID CURRENT_USER as
2 /* $Header: pqhdeseq.pkh 115.4 2002/12/12 23:13:45 sgoyal noship $ */
3 
4 /*---------------------------------------------------------------------------------------------+
5                             Procedure REGENERATE_SEQ_NUM
6  ----------------------------------------------------------------------------------------------+
7  Description:
8   This is intended to run as a concurrent program that generates  Sequence Numbers
9   for children of Employees in German Public Sector. The processing is as follows
10    1. Find all employess in the bussiness group who want the sequence number of their children
11       to be automatically generated.
12    2. For each such employee find out all the children(contacts) in order of date of birth
13    3. Assigns sequence number 1 to first child, 2 to second child and so on. However a child
14       is eligable for a sequence number if and only if the child satisfies certain rules on
15       age,qualification,disability and military/civilian service.
16    4.Update the child contact to insert the new sequence number.
17 
18  In Parameters:
19    1. Business Group ID
20    2. Effective Date
21 
22  Post Success:
23       Updates the child contact record to insert the new sequence number.
24 
25 
26 -------------------------------------------------------------------------------------------------*/
27 PROCEDURE regenerate_seq_num(errbuf OUT NOCOPY VARCHAR2, retcode OUT NOCOPY NUMBER, pBusiness_grp_id IN NUMBER, pEffective_date IN VARCHAR2);
28 
29 /*---------------------------------------------------------------------------------------------+
30                             Function DEFAULT_SEQ_NUM
31  ----------------------------------------------------------------------------------------------+
32  Description:
33   This is intended to return a default Sequence Number whenever a new Child contact is
34   being added to an Employee in German Public Sector.The processing is as follows:
35    1. Checks if the Parent is Employee of the Business Group.
36    2. If the Parent is Employee go to next step else return -1.
37    3. Find maximum of Sequence Numbers given to the Children of the Employee.
38    4. Return Maximum Sequence Number +1.
39 
40  In Parameters:
41    1. Parent_id
42    2. bg_id
43    3. session_date
44  Post Success:
45       Returns -1 if Parent is not an Employee or returns some non negative number.
46 
47 
48 
49 
50 -------------------------------------------------------------------------------------------------*/
51 FUNCTION default_seq_num (parent_id IN NUMBER, bg_id IN NUMBER, session_date IN date) RETURN NUMBER ;
52 PRAGMA RESTRICT_REFERENCES (default_seq_num, WNDS, WNPS , RNPS);
53 
54 END PQH_DE_CHILD_SEQ_PKG;