[Home] [Help]
PACKAGE BODY: APPS.PV_PROGRAM_CONTRACT_REPORT_PVT
Source
1 PACKAGE BODY PV_PROGRAM_CONTRACT_REPORT_PVT as
2 /* $Header: pvxtpcrb.pls 115.1 2002/12/25 01:01:26 ktsao ship $*/
3 -- ===============================================================
4 -- Start of Comments
5 -- Package name
6 -- PV_PROGRAM_CONTRACT_REPORT_PVT
7 -- Purpose
8 --
9 -- History
10 -- 02-AUG-2002 Karen.Tsao Created
11 --
12 -- NOTE
13 --
14 -- Copyright (c) 2002 Oracle Corporation Redwood Shores, California, USA
15 -- All rights reserved.
16 --
17 -- End of Comments
18 -- ===============================================================
19
20 --
21 -- PROCEDURE/Function
22 -- private function data_required_msg
23 -- called from prerun validation
24 --
25 -- PURPOSE
26 --
27 -- returns translated message OKC_DATA_REQUIRED
28 -- Data required for some operation
29 -- DATA_NAME data required for OPERATION
30 --
31 -- translatable token DATA_NAME
32 -- OKC_SECTIONS Sections
33 -- OKC_RULE_GROUPS Rule Groups
34 -- translatable token OPERATION
35 -- OKC_PRINT_CONTRACT Contract Printing
36 --
37 function data_required_msg(p_data_name varchar2) return varchar2 is
38 begin
39 fnd_message.clear;
40 FND_MESSAGE.SET_NAME(application => 'PV',
41 name => 'PV_DATA_REQUIRED');
42 FND_MESSAGE.SET_TOKEN(token => 'DATA_NAME',
43 value => p_data_name,
44 translate => TRUE);
45 FND_MESSAGE.SET_TOKEN(token => 'OPERATION',
46 value => 'PV_VIEW_CONTRACT',
47 translate => TRUE);
48 return fnd_message.get;
49 end;
50
51 --
52 -- PROCEDURE/Function
53 -- prerun
54 --
55 -- PURPOSE
56 --
57 -- sample procedure, its name could be used
58 -- to set profile option OKC_WEB_PRERUN
59 -- performs sample validation tasks:
60 -- checks if lines and sections are present in the contract
61 --
62 -- what is import - signature
63 --
64 procedure prerun(
65 -- standard parameters
66 p_api_version in NUMBER default 1,
67 p_init_msg_list in VARCHAR2 default OKC_API.G_TRUE,
68 x_return_status out nocopy VARCHAR2,
69 x_msg_count out nocopy NUMBER,
70 x_msg_data out nocopy VARCHAR2,
71 -- input parameters
72 p_chr_id in NUMBER,
73 p_major_version in NUMBER default NULL,
74 p_scn_id in NUMBER default NULL
75 ) is
76 l_dummy varchar2(1);
77 --
78 -- sections required
79 --
80 cursor sections_csr(p_chr number) is
81 select '!'
82 from okc_sections_v
83 where CHR_ID = p_chr
84 ;
85
86 begin
87 l_dummy := '?';
88 open sections_csr(p_chr_id);
89 fetch sections_csr into l_dummy;
90 close sections_csr;
91 if (l_dummy = '?') then
92 x_return_status := 'E';
93 x_msg_count := 1;
94 x_msg_data := data_required_msg('Sections');
95 return;
96 end if;
97 x_return_status := 'S';
98 end;
99
100
101 END PV_PROGRAM_CONTRACT_REPORT_PVT;