1 package psp_efforts_pkg AUTHID CURRENT_USER AS
2 -- $Header: PSPEREFS.pls 115.8 2002/11/18 12:30:46 lveerubh ship $
3 /***********************************************************************************
4 ** NAME: psp_efforts_pkg
5 ** CONTENTS: Package Spec And Body for psp_efforts_pkg
6 ** PURPOSE: This Package contains two procedures .
7 ** 1. PROCEDURE crt
8 ** This procedure takes in as input the various input criteria
9 ** entered by the user during Effort Report Creation. The input
10 ** criteria are then matched with the actual disbursements of labor
11 ** charges from the Distribution Lines and the actual efforts based
12 ** on a person , against all his assignments, for a period range, is
13 ** summarized and added to Effort Report Tables. The procedure
14 ** also does lot of bookkeeping like updating Distribution Lines,
15 ** retrieving GL and POETA values from appropriate tables, checking
16 ** active element types and so on. This procedure also populates an
17 ** Error Table for Effort Report Already processed. This procedure
18 ** is run by Concurrent Manager.
19 **
20 ** 2. PROCEDURE INIT_WORKFLOW
21 ** This procedure is to initiate workflow process. This procedure fetches
22 ** all Report Ids for a given template id and Initiates workflow process
23 ** for each report id
24 **
25 ** NOTES: Workflow : Added by Venkat.
26 ** AUTHOR: Abhijit Prasad
27 **
28 ************************************************************************************
29 ***********************************************************************************/
30 /* Variables starting with a_ are input parameter arguments to main FUNCTIONs/PROCEDUREs
31 ** Function OR variables starting with p_ are PRIVATE Functions OR variables
32 ** Function OR variables starting with g_ are GLOBAL Functions OR variables
33 ** Function OR variables starting with t_ are LOCAL Functions OR variables
34 */
35 ---
36 CURSOR g_ssdseo IS
37 SELECT schedule_line_id, --- N(9)
38 ---summary_line_id, --- N(10)
39 default_org_account_id, --- N(9)
40 suspense_org_account_id, --- N(9)
41 element_account_id, --- N(9)
42 org_schedule_id --- N(9)
43 FROM psp_distribution_lines;
44 g_ssdseo_row g_ssdseo%ROWTYPE;
45 ---
46 CURSOR g_gl_poeta IS
47 SELECT gl_code_combination_id,
48 project_id,
49 expenditure_organization_id,
50 expenditure_type,
51 task_id,
52 award_id
53 FROM psp_organization_accounts;
54 g_poeta_row g_gl_poeta%ROWTYPE;
55 ---
56 g_template_row PSP_EFFORT_REPORT_TEMPLATES%ROWTYPE;
57 g_details_row PSP_EFFORT_REPORT_DETAILS%ROWTYPE;
58 g_element_flag VARCHAR2(1) := 'N';
59 g_dist_flag VARCHAR2(1) := 'N';
60 ---
61 PROCEDURE crt(errbuf OUT NOCOPY VARCHAR2,
62 retcode OUT NOCOPY NUMBER,
63 a_template_id IN NUMBER,
64 p_business_group_id IN varchar2,
65 p_set_of_books_id IN varchar2);
66 ---
67 FUNCTION INIT_WORKFLOW(a_template_id IN NUMBER) RETURN NUMBER;
68 ---
69 PROCEDURE log_errors(template_id1 IN NUMBER,person_id1 IN NUMBER,errmsg VARCHAR2,
70 effort_report_id1 IN NUMBER, version_num1 IN NUMBER);
71
72 ---
73 FUNCTION get_gl_description(a_code_combination_id IN NUMBER) RETURN VARCHAR2;
74 -- PRAGMA RESTRICT_REFERENCES(get_gl_description,WNDS);
75 ---
76
77 END;