DBA Data[Home] [Help]

PACKAGE BODY: APPS.PO_POXFPDSCOM_XMLP_PKG

Source


1 package body PO_POXFPDSCOM_XMLP_PKG AS
2 /* $Header: POXFPDSCOM_XMLB.pls 120.3 2011/02/10 07:39:33 nbingi noship $ */
3 
4 FUNCTION AfterPForm RETURN Boolean IS
5   doc_date_where_a VARCHAR2(500);
6   doc_date_where_c VARCHAR2(500);
7   l_temp varchar2(500);
8 Begin
9    if (po_clm_clo_util.getclmstatus = 'Y') then
10 
11     if (p_rep_status = 'NOT_REPORTED') then
12       rep_status_where := ' pcc1.where_car_status <> ''APPROVED'' ';
13     elsif (p_rep_status = 'REPORTED') then
14       rep_status_where := ' pcc1.where_car_status = ''APPROVED'' ';
15     else
16       rep_status_where := ' 1 = 1';
17     end if;
18 
19     t_date_to := p_date_to + 1;
20 
21     IF (p_date_from IS NULL AND t_date_to IS NULL) then
22         doc_date_where := '1=1';
23     ELSE
24       iF (p_date_from IS NOT NULL AND t_date_to IS NULL) then
25           doc_date_where_a := 'pcc1.APPROVED_DATE >= :p_date_from';
26       ELSiF (p_date_from IS NULL AND t_date_to IS NOT NULL) then
27           doc_date_where_a := 'pcc1.APPROVED_DATE <= :t_date_to';
28       ELSiF (p_date_from IS NOT NULL AND t_date_to IS NOT NULL) then
29           doc_date_where_a := 'pcc1.APPROVED_DATE BETWEEN :p_date_from AND :t_date_to';
30       END IF;
31       doc_date_where := '((pcc1.APPROVED_DATE IS NOT NULL AND ' || doc_date_where_a || ' ))';
32     END IF;
33   else
34     doc_date_where := '1=2';
35     rep_status_where := '1=2';
36   end if;
37 
38 RETURN (TRUE);
39 END AfterPForm;
40 
41 FUNCTION getRepStatus return VARCHAR2 IS
42   rep_status_desc VARCHAR2(200) := '';
43 Begin
44   if p_rep_status is not null then
45       select PLC.DESCRIPTION
46       into rep_status_desc
47       FROM PO_LOOKUP_CODES PLC
48       WHERE PLC.LOOKUP_TYPE = 'PO_CLM_CAR_REPORTING_STATUS'
49             AND PLC.LOOKUP_CODE = p_rep_status;
50   end if;
51 
52   RETURN (rep_status_desc);
53 
54   exception
55    when others then
56     RETURN (p_rep_status);
57 END getRepStatus;
58 
59 END PO_POXFPDSCOM_XMLP_PKG;
60