[Home] [Help]
PACKAGE BODY: APPS.INV_RCV_DIAG_LCM_03
Source
1 PACKAGE BODY INV_RCV_DIAG_LCM_03 AS
2 /* $Header: INVRCV3B.pls 120.1 2009/03/26 21:18:58 vthevark noship $ */
3
4 PROCEDURE init is
5 BEGIN
6 -- test writer
7 null;
8 END init;
9
10 PROCEDURE cleanup IS
11 BEGIN
12 -- test writer could insert special cleanup code here
13 NULL;
14 END cleanup;
15
16 PROCEDURE runtest(inputs IN JTF_DIAG_INPUTTBL,
17 report OUT NOCOPY JTF_DIAG_REPORT,
18 reportClob OUT NOCOPY CLOB) IS
19
20 reportStr LONG;
21 counter NUMBER;
22 dummy_v2t JTF_DIAGNOSTIC_COREAPI.v2t;
23 c_userid VARCHAR2(50);
24 statusStr VARCHAR2(50);
25 errStr VARCHAR2(4000);
26 fixInfo VARCHAR2(4000);
27 isFatal VARCHAR2(50);
28 dummy_num NUMBER;
29 sqltxt VARCHAR2 (9999);
30 row_limit NUMBER;
31
32
33 BEGIN
34
35 JTF_DIAGNOSTIC_ADAPTUTIL.setUpVars;
36 JTF_DIAGNOSTIC_ADAPTUTIL.addStringToReport('@html');
37 JTF_DIAGNOSTIC_COREAPI.insert_style_sheet;
38
39 -- Printing RCV_SHIPMENT_HEADERS Data
40 JTF_DIAGNOSTIC_COREAPI.insert_html('<a name="RCV_SHIPMENT_HEADERS"></a>');
41 JTF_DIAGNOSTIC_COREAPI.insert_html('<b>RCV_SHIPMENT_HEADERS</b><a href="#INDEX OF QUERIES">[Top]</a>');
42 sqltxt := ' SELECT rsh.*' ||
43 ' FROM rcv_shipment_headers rsh' ||
44 ' WHERE rsh.shipment_header_id in ' ||
45 ' ( SELECT distinct rt.shipment_header_id ' ||
46 ' FROM rcv_transactions rt,' ||
47 ' po_line_locations_all pll' ||
48 ' WHERE rt.po_line_location_id is not null ' ||
49 ' AND rt.po_line_location_id = pll.line_location_id' ||
50 ' AND pll.lcm_flag = ''Y'' ' ||
51 ' AND unit_landed_cost is null)';
52 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,'');
53 JTF_DIAGNOSTIC_COREAPI.BRPrint;
54
55 -- Printing RCV_SHIPMENT_LINES Data
56 JTF_DIAGNOSTIC_COREAPI.insert_html('<a name="RCV_SHIPMENT_LINES"></a>');
57 JTF_DIAGNOSTIC_COREAPI.insert_html('<b>RCV_SHIPMENT_LINES</b><a href="#INDEX OF QUERIES">[Top]</a>');
58 sqltxt := ' SELECT rsl.*' ||
59 ' FROM rcv_shipment_lines rsl' ||
60 ' WHERE rsl.shipment_line_id in ' ||
61 ' ( SELECT distinct rt.shipment_line_id ' ||
62 ' FROM rcv_transactions rt,' ||
63 ' po_line_locations_all pll' ||
64 ' WHERE rt.po_line_location_id is not null ' ||
65 ' AND rt.po_line_location_id = pll.line_location_id' ||
66 ' AND pll.lcm_flag = ''Y'' ' ||
67 ' AND unit_landed_cost is null)';
68 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,'');
69 JTF_DIAGNOSTIC_COREAPI.BRPrint;
70
71 -- Printing RCV_TRANSACTIONS Data
72 JTF_DIAGNOSTIC_COREAPI.insert_html('<a name="RCV_TRANSACTIONS"></a>');
73 JTF_DIAGNOSTIC_COREAPI.insert_html('<b>RCV_TRANSACTIONS</b><a href="#INDEX OF QUERIES">[Top]</a>');
74 sqltxt := ' SELECT rt.* ' ||
75 ' FROM rcv_transactions rt,' ||
76 ' po_line_locations_all pll' ||
77 ' WHERE rt.po_line_location_id is not null ' ||
78 ' AND rt.po_line_location_id = pll.line_location_id' ||
79 ' AND pll.lcm_flag = ''Y'' ' ||
80 ' AND unit_landed_cost is null' ||
81 ' ORDER BY rt.shipment_header_id, rt.shipment_header_id, rt.transaction_id' ;
82
83 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,'');
84 JTF_DIAGNOSTIC_COREAPI.BRPrint;
85
86 -- Printing PO_LINE_LOCATIONS_ALL Data
87 JTF_DIAGNOSTIC_COREAPI.insert_html('<a name="PO_LINE_LOCATIONS_ALL"></a>');
88 JTF_DIAGNOSTIC_COREAPI.insert_html('<b>PO_LINE_LOCATIONS_ALL</b><a href="#INDEX OF QUERIES">[Top]</a>');
89 sqltxt := ' SELECT pll.* ' ||
90 ' FROM rcv_transactions rt,' ||
91 ' po_line_locations_all pll' ||
92 ' WHERE rt.po_line_location_id is not null ' ||
93 ' AND rt.po_line_location_id = pll.line_location_id' ||
94 ' AND pll.lcm_flag = ''Y'' ' ||
95 ' AND unit_landed_cost is null' ||
96 ' ORDER BY rt.shipment_header_id, rt.shipment_header_id, rt.transaction_id' ;
97
98 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,'');
99 JTF_DIAGNOSTIC_COREAPI.BRPrint;
100
101 -- Printing MTL_PARAMETERS Data
102 JTF_DIAGNOSTIC_COREAPI.insert_html('<a name="MTL_PARAMETERS"></a>');
103 JTF_DIAGNOSTIC_COREAPI.insert_html('<b>MTL_PARAMETERS</b><a href="#INDEX OF QUERIES">[Top]</a>');
104 sqltxt := ' SELECT mp.* ' ||
105 ' FROM mtl_parameters mp' ||
106 ' WHERE mp.organization_id in' ||
107 ' ( SELECT distinct rt.organization_id' ||
108 ' FROM rcv_transactions rt,' ||
109 ' po_line_locations_all pll' ||
110 ' WHERE rt.po_line_location_id is not null ' ||
111 ' AND rt.po_line_location_id = pll.line_location_id' ||
112 ' AND pll.lcm_flag = ''Y'' ' ||
113 ' AND rt.unit_landed_cost is null)';
114
115 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,'');
116 JTF_DIAGNOSTIC_COREAPI.BRPrint;
117
118 -- Printing RCV_PARAMETERS Data
119 JTF_DIAGNOSTIC_COREAPI.insert_html('<a name="RCV_PARAMETERS"></a>');
120 JTF_DIAGNOSTIC_COREAPI.insert_html('<b>RCV_PARAMETERS</b><a href="#INDEX OF QUERIES">[Top]</a>');
121 sqltxt := ' SELECT rp.* ' ||
122 ' FROM rcv_parameters rp' ||
123 ' WHERE rp.organization_id in' ||
124 ' ( SELECT distinct rt.organization_id' ||
125 ' FROM rcv_transactions rt,' ||
126 ' po_line_locations_all pll' ||
127 ' WHERE rt.po_line_location_id is not null ' ||
128 ' AND rt.po_line_location_id = pll.line_location_id' ||
129 ' AND pll.lcm_flag = ''Y'' ' ||
130 ' AND rt.unit_landed_cost is null)';
131
132 dummy_num:= JTF_DIAGNOSTIC_COREAPI.display_sql(sqltxt,'');
133 JTF_DIAGNOSTIC_COREAPI.BRPrint;
134
135 -- Test Completed successfully.
136 statusStr := 'SUCCESS';
137 isFatal := 'FALSE';
138 report := JTF_DIAGNOSTIC_ADAPTUTIL.constructReport(statusStr,errStr,fixInfo,isFatal);
139 reportClob := JTF_DIAGNOSTIC_ADAPTUTIL.getReportClob;
140
141 EXCEPTION
142 when others then
143 JTF_DIAGNOSTIC_COREAPI.errorprint('Error: '||sqlerrm);
144 JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint('This is the exception handler');
145 statusStr := 'FAILURE';
146 errStr := sqlerrm ||' occurred in script Exception handled';
147 fixInfo := 'Unexpected Exception in INVDP08B.pls';
148 isFatal := 'FALSE';
149 report := JTF_DIAGNOSTIC_ADAPTUTIL.constructReport(statusStr,errStr,fixInfo,isFatal);
150 reportClob := JTF_DIAGNOSTIC_ADAPTUTIL.getReportClob;
151 END runTest;
152
153
154 PROCEDURE getComponentName(name OUT NOCOPY VARCHAR2) IS
155 BEGIN
156 name := 'RT for lcm lines with null landed cost';
157 END getComponentName;
158
159 PROCEDURE getTestDesc(descStr OUT NOCOPY VARCHAR2) IS
160 BEGIN
161 descStr := 'RT for lcm lines with null landed cost';
162 END getTestDesc;
163
164 PROCEDURE getTestName(name OUT NOCOPY VARCHAR2) IS
165 BEGIN
166 name := 'Transactions with null landed cost in LCM enabled organizations';
167 END getTestName;
168
169 PROCEDURE getDependencies (package_names OUT NOCOPY JTF_DIAG_DEPENDTBL) IS
170 tempDependencies JTF_DIAG_DEPENDTBL;
171
172 BEGIN
173 package_names := JTF_DIAGNOSTIC_ADAPTUTIL.initDependencyTable;
174 END getDependencies;
175
176 PROCEDURE isDependencyPipelined (str OUT NOCOPY VARCHAR2) IS
177 BEGIN
178 str := 'FALSE';
179 END isDependencyPipelined;
180
181 PROCEDURE getOutputValues(outputValues OUT NOCOPY JTF_DIAG_OUTPUTTBL) IS
182 tempOutput JTF_DIAG_OUTPUTTBL;
183 BEGIN
184 tempOutput := JTF_DIAGNOSTIC_ADAPTUTIL.initOutputTable;
185 outputValues := tempOutput;
186 EXCEPTION
187 when others then
188 outputValues := JTF_DIAGNOSTIC_ADAPTUTIL.initOutputTable;
189 END getOutputValues;
190
191 PROCEDURE getDefaultTestParams(defaultInputValues OUT NOCOPY JTF_DIAG_INPUTTBL) IS
192 tempInput JTF_DIAG_INPUTTBL;
193 BEGIN
194 tempInput := JTF_DIAGNOSTIC_ADAPTUTIL.initinputtable;
195 defaultInputValues := tempInput;
196 EXCEPTION
197 when others then
198 defaultInputValues := JTF_DIAGNOSTIC_ADAPTUTIL.initinputtable;
199 END getDefaultTestParams;
200
201 Function getTestMode return INTEGER IS
202 BEGIN
203 return JTF_DIAGNOSTIC_ADAPTUTIL.ADVANCED_MODE;
204 END getTestMode;
205
206 END INV_RCV_DIAG_LCM_03;