15: BEGIN
16:
17: -- ARGUMENT1 --> From Date
18: -- ARGUMENT2 --> To Date
19: fnd_file.put_line(fnd_file.log, 'qa_eres_shipping.wrapper entered');
20:
21: edr_profile := FND_PROFILE.VALUE('EDR_ERES_ENABLED');
22: fnd_file.put_line (fnd_file.log, 'ERES Profile is set to:'||edr_profile);
23:
18: -- ARGUMENT2 --> To Date
19: fnd_file.put_line(fnd_file.log, 'qa_eres_shipping.wrapper entered');
20:
21: edr_profile := FND_PROFILE.VALUE('EDR_ERES_ENABLED');
22: fnd_file.put_line (fnd_file.log, 'ERES Profile is set to:'||edr_profile);
23:
24: IF (edr_profile is not null AND edr_profile = 'Y' and
25: ARGUMENT1 IS NOT NULL AND ARGUMENT2 IS NOT NULL) THEN
26:
26:
27: from_pickup_dt := fnd_date.canonical_to_date(argument1);
28: to_pickup_dt := fnd_date.canonical_to_date(argument2);
29:
30: fnd_file.put_line (fnd_file.log, 'dates fetched');
31:
32: --BUG 3352407 - Date validation needed
33: IF (from_pickup_dt >= to_pickup_dt) THEN
34: fnd_file.put_line (fnd_file.log, 'ERROR: From date must be less than To date');
30: fnd_file.put_line (fnd_file.log, 'dates fetched');
31:
32: --BUG 3352407 - Date validation needed
33: IF (from_pickup_dt >= to_pickup_dt) THEN
34: fnd_file.put_line (fnd_file.log, 'ERROR: From date must be less than To date');
35: RETCODE := 2; -- return code for error
36: ERRBUF := 'ERROR: From date must be less than To date';
37: RETURN;
38: END IF;
37: RETURN;
38: END IF;
39:
40: IF ( to_pickup_dt - from_pickup_dt > 5) THEN
41: fnd_file.put_line (fnd_file.log, 'ERROR: Date Range should be within 5 days');
42: RETCODE := 2; -- return code for error
43: ERRBUF := 'ERROR: Date Range should be within 5 days';
44: RETURN;
45: END IF;
57: else
58: RETCODE := 0;
59: ERRBUF := '';
60: end if;
61: fnd_file.put_line(fnd_file.log, 'qa_eres_shipping.wrapper exiting');
62: END wrapper;
63:
64: -----------------------------------------------------------------------------
65:
181: p_child_erecords => l_child_erecords,
182: x_event => l_event);
183: commit; -- this commit is needed becos of EDR bug. Remove later.
184:
185: fnd_file.put_line(fnd_file.log, 'Delivery id:'||p_delivery_id || '('
186: ||p_delivery_name|| ')'
187: || ' eRec status: ' || l_event.event_status
188: || ' eRec ID:' || l_event.erecord_id);
189:
194: fnd_msg_pub.get ( p_data => f_msg_data,
195: p_encoded => 'F',
196: p_msg_index_out => o_msg_index);
197:
198: fnd_file.put_line (fnd_file.log, 'MSG'|| m ||' :'|| f_msg_data);
199: END LOOP;
200: end if; --END BUG 3763874
201:
202: o_erecord_id := l_event.erecord_id;