DBA Data[Home] [Help]

APPS.PO_DOC_NUMBERING_PKG dependencies on PO_LOOKUP_CODES

Line 517: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'

513:
514: CURSOR RANGES IS
515: SELECT lookup_code
516: FROM (
517: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'
518: and enabled_flag = 'Y'
519: and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code);
520:
521: l_ranges_array Dbms_Sql.varchar2_table;

Line 544: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_AGENCY_IDENTIFIER'

540: BEGIN
541: SELECT lookup_code
542: INTO x_agency_identifier
543: FROM (
544: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_AGENCY_IDENTIFIER'
545: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
546: WHERE ROWNUM=1;
547: EXCEPTION
548: WHEN No_Data_Found THEN

Line 586: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

582: x_max_value := SubStr(l_ranges_array(i),6);
583:
584: -- Bug 16468041 Rewriting the below query due to performance issue.
585:
586: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
587: ' ( select min(to_number(lookup_code)) from ( '||
588: ' SELECT lookup_code FROM po_lookup_codes '||
589: ' WHERE to_number(lookup_code) BETWEEN '||
590: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 588: ' SELECT lookup_code FROM po_lookup_codes '||

584: -- Bug 16468041 Rewriting the below query due to performance issue.
585:
586: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
587: ' ( select min(to_number(lookup_code)) from ( '||
588: ' SELECT lookup_code FROM po_lookup_codes '||
589: ' WHERE to_number(lookup_code) BETWEEN '||
590: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
591: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
592: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 590: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

586: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
587: ' ( select min(to_number(lookup_code)) from ( '||
588: ' SELECT lookup_code FROM po_lookup_codes '||
589: ' WHERE to_number(lookup_code) BETWEEN '||
590: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
591: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
592: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
593: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
594: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 592: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

588: ' SELECT lookup_code FROM po_lookup_codes '||
589: ' WHERE to_number(lookup_code) BETWEEN '||
590: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
591: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
592: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
593: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
594: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
595: ' minus '||
596: ' SELECT distinct plc.lookup_code FROM '||

Line 597: ' PO_REQ_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||

593: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
594: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
595: ' minus '||
596: ' SELECT distinct plc.lookup_code FROM '||
597: ' PO_REQ_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||
598: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
599: ' and prheb.C_EXT_ATTR9 = plc.displayed_field ' ||
600: ' and prheb.C_EXT_ATTR1 = '''||x_prefix ||''''||
601: ' and prheb.C_EXT_ATTR2 = '''||x_fiscal_year ||''''||

Line 864: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

860: l_where_cls := SubStr(l_where_cls,1, Length(l_where_cls)-1);
861:
862: -- Bug 16468041 Rewriting the below query due to performance issue.
863:
864: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
865: ' ( select min(to_number(lookup_code)) from ( '||
866: ' SELECT lookup_code FROM po_lookup_codes '||
867: ' WHERE to_number(lookup_code) BETWEEN '||
868: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 866: ' SELECT lookup_code FROM po_lookup_codes '||

862: -- Bug 16468041 Rewriting the below query due to performance issue.
863:
864: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
865: ' ( select min(to_number(lookup_code)) from ( '||
866: ' SELECT lookup_code FROM po_lookup_codes '||
867: ' WHERE to_number(lookup_code) BETWEEN '||
868: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
869: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
870: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 868: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

864: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
865: ' ( select min(to_number(lookup_code)) from ( '||
866: ' SELECT lookup_code FROM po_lookup_codes '||
867: ' WHERE to_number(lookup_code) BETWEEN '||
868: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
869: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
870: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
871: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
872: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 870: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

866: ' SELECT lookup_code FROM po_lookup_codes '||
867: ' WHERE to_number(lookup_code) BETWEEN '||
868: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
869: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
870: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
871: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
872: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
873: ' minus '||
874: ' SELECT distinct plc.lookup_code FROM '||

Line 875: ' PO_REQ_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||

871: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
872: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
873: ' minus '||
874: ' SELECT distinct plc.lookup_code FROM '||
875: ' PO_REQ_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||
876: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
877: ' and prheb.C_EXT_ATTR9 = plc.displayed_field ' ||
878: ' and prheb.C_EXT_ATTR1 = '''||x_prefix ||''''||
879: ' and prheb.C_EXT_ATTR2 = '''||x_fiscal_year ||''''||

Line 1045: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_AGENCY_IDENTIFIER'

1041: BEGIN
1042: SELECT lookup_code
1043: INTO x_agency_identifier
1044: FROM (
1045: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_AGENCY_IDENTIFIER'
1046: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
1047: WHERE ROWNUM=1;
1048: EXCEPTION
1049: WHEN No_Data_Found THEN

Line 1064: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'

1060: BEGIN
1061: SELECT lookup_code
1062: INTO x_allowed_range
1063: FROM (
1064: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'
1065: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
1066: WHERE ROWNUM=1;
1067: EXCEPTION
1068: WHEN No_Data_Found THEN

Line 1092: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

1088:
1089: l_where_cls := SubStr(l_where_cls,1, Length(l_where_cls)-1);
1090:
1091: -- Bug 16468041 Rewriting the below query due to performance issue.
1092: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1093: ' ( select min(to_number(lookup_code)) from ( '||
1094: ' SELECT lookup_code FROM po_lookup_codes '||
1095: ' WHERE to_number(lookup_code) BETWEEN '||
1096: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 1094: ' SELECT lookup_code FROM po_lookup_codes '||

1090:
1091: -- Bug 16468041 Rewriting the below query due to performance issue.
1092: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1093: ' ( select min(to_number(lookup_code)) from ( '||
1094: ' SELECT lookup_code FROM po_lookup_codes '||
1095: ' WHERE to_number(lookup_code) BETWEEN '||
1096: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1097: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1098: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 1096: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

1092: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1093: ' ( select min(to_number(lookup_code)) from ( '||
1094: ' SELECT lookup_code FROM po_lookup_codes '||
1095: ' WHERE to_number(lookup_code) BETWEEN '||
1096: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1097: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1098: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1099: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1100: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 1098: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

1094: ' SELECT lookup_code FROM po_lookup_codes '||
1095: ' WHERE to_number(lookup_code) BETWEEN '||
1096: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1097: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1098: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1099: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1100: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
1101: ' minus '||
1102: ' SELECT distinct plc.lookup_code FROM '||

Line 1103: ' PON_AUCTION_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||

1099: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1100: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
1101: ' minus '||
1102: ' SELECT distinct plc.lookup_code FROM '||
1103: ' PON_AUCTION_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||
1104: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
1105: ' and prheb.C_EXT_ATTR9 = plc.displayed_field ' ||
1106: ' and prheb.C_EXT_ATTR1 = '''||x_prefix ||''''||
1107: ' and prheb.C_EXT_ATTR2 = '||x_fiscal_year ||

Line 1346: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

1342:
1343: l_where_cls := SubStr(l_where_cls,1, Length(l_where_cls)-1);
1344:
1345: -- Bug 16468041 Rewriting the below query due to performance issue.
1346: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1347: ' ( select min(to_number(lookup_code)) from ( '||
1348: ' SELECT lookup_code FROM po_lookup_codes '||
1349: ' WHERE to_number(lookup_code) BETWEEN '||
1350: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 1348: ' SELECT lookup_code FROM po_lookup_codes '||

1344:
1345: -- Bug 16468041 Rewriting the below query due to performance issue.
1346: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1347: ' ( select min(to_number(lookup_code)) from ( '||
1348: ' SELECT lookup_code FROM po_lookup_codes '||
1349: ' WHERE to_number(lookup_code) BETWEEN '||
1350: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1351: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1352: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 1350: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

1346: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1347: ' ( select min(to_number(lookup_code)) from ( '||
1348: ' SELECT lookup_code FROM po_lookup_codes '||
1349: ' WHERE to_number(lookup_code) BETWEEN '||
1350: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1351: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1352: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1353: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1354: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 1352: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

1348: ' SELECT lookup_code FROM po_lookup_codes '||
1349: ' WHERE to_number(lookup_code) BETWEEN '||
1350: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1351: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1352: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1353: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1354: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
1355: ' minus '||
1356: ' SELECT distinct plc.lookup_code FROM '||

Line 1357: ' PON_AUCTION_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||

1353: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1354: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
1355: ' minus '||
1356: ' SELECT distinct plc.lookup_code FROM '||
1357: ' PON_AUCTION_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||
1358: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
1359: ' and prheb.C_EXT_ATTR9 = plc.displayed_field ' ||
1360: ' and prheb.C_EXT_ATTR1 = '''||x_prefix ||''''||
1361: ' and prheb.C_EXT_ATTR2 = '||x_fiscal_year ||

Line 1514: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_AGENCY_IDENTIFIER'

1510: BEGIN
1511: SELECT lookup_code
1512: INTO x_agency_identifier
1513: FROM (
1514: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_AGENCY_IDENTIFIER'
1515: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
1516: WHERE ROWNUM=1;
1517:
1518: EXCEPTION

Line 1533: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'

1529: BEGIN
1530: SELECT lookup_code
1531: INTO x_allowed_range
1532: FROM (
1533: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'
1534: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
1535: WHERE ROWNUM=1;
1536: EXCEPTION
1537: WHEN No_Data_Found THEN

Line 1561: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

1557:
1558: l_where_cls := SubStr(l_where_cls,1, Length(l_where_cls)-1);
1559:
1560: -- Bug 16468041 Rewriting the below query due to performance issue.
1561: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1562: ' ( select min(to_number(lookup_code)) from ( '||
1563: ' SELECT lookup_code FROM po_lookup_codes '||
1564: ' WHERE to_number(lookup_code) BETWEEN '||
1565: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 1563: ' SELECT lookup_code FROM po_lookup_codes '||

1559:
1560: -- Bug 16468041 Rewriting the below query due to performance issue.
1561: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1562: ' ( select min(to_number(lookup_code)) from ( '||
1563: ' SELECT lookup_code FROM po_lookup_codes '||
1564: ' WHERE to_number(lookup_code) BETWEEN '||
1565: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1566: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1567: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 1565: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

1561: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1562: ' ( select min(to_number(lookup_code)) from ( '||
1563: ' SELECT lookup_code FROM po_lookup_codes '||
1564: ' WHERE to_number(lookup_code) BETWEEN '||
1565: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1566: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1567: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1568: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1569: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 1567: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

1563: ' SELECT lookup_code FROM po_lookup_codes '||
1564: ' WHERE to_number(lookup_code) BETWEEN '||
1565: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1566: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1567: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1568: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1569: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
1570: ' minus '||
1571: ' SELECT distinct plc.lookup_code FROM '||

Line 1572: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||

1568: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1569: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
1570: ' minus '||
1571: ' SELECT distinct plc.lookup_code FROM '||
1572: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||
1573: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
1574: ' and prheb.C_EXT_ATTR9 = plc.displayed_field ' ||
1575: ' and prheb.C_EXT_ATTR1 = '''||x_prefix ||''''||
1576: ' and prheb.C_EXT_ATTR2 = '||x_fiscal_year ||

Line 1814: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

1810:
1811: l_where_cls := SubStr(l_where_cls,1, Length(l_where_cls)-1);
1812:
1813: -- Bug 16468041 Rewriting the below query due to performance issue.
1814: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1815: ' ( select min(to_number(lookup_code)) from ( '||
1816: ' SELECT lookup_code FROM po_lookup_codes '||
1817: ' WHERE to_number(lookup_code) BETWEEN '||
1818: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 1816: ' SELECT lookup_code FROM po_lookup_codes '||

1812:
1813: -- Bug 16468041 Rewriting the below query due to performance issue.
1814: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1815: ' ( select min(to_number(lookup_code)) from ( '||
1816: ' SELECT lookup_code FROM po_lookup_codes '||
1817: ' WHERE to_number(lookup_code) BETWEEN '||
1818: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1819: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1820: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 1818: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

1814: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
1815: ' ( select min(to_number(lookup_code)) from ( '||
1816: ' SELECT lookup_code FROM po_lookup_codes '||
1817: ' WHERE to_number(lookup_code) BETWEEN '||
1818: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1819: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1820: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1821: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1822: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 1820: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

1816: ' SELECT lookup_code FROM po_lookup_codes '||
1817: ' WHERE to_number(lookup_code) BETWEEN '||
1818: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1819: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1820: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
1821: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1822: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
1823: ' minus '||
1824: ' SELECT distinct plc.lookup_code FROM '||

Line 1825: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||

1821: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
1822: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
1823: ' minus '||
1824: ' SELECT distinct plc.lookup_code FROM '||
1825: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||
1826: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
1827: ' and prheb.C_EXT_ATTR9 = plc.displayed_field ' ||
1828: ' and prheb.C_EXT_ATTR1 = '''||x_prefix ||''''||
1829: ' and prheb.C_EXT_ATTR2 = '||x_fiscal_year ||

Line 2233: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'

2229:
2230: CURSOR RANGES IS
2231: SELECT lookup_code
2232: FROM (
2233: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'
2234: and enabled_flag = 'Y'
2235: and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code);
2236:
2237: l_ranges_array Dbms_Sql.varchar2_table;

Line 2281: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_INSTRUMENT_TYPE'

2277: BEGIN
2278: SELECT lookup_code
2279: INTO x_instrument_type
2280: FROM (
2281: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_INSTRUMENT_TYPE'
2282: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
2283: WHERE ROWNUM=1;
2284: EXCEPTION
2285: WHEN No_Data_Found THEN

Line 2302: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'

2298: BEGIN
2299: SELECT lookup_code
2300: INTO x_allowed_range
2301: FROM (
2302: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'
2303: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
2304: WHERE ROWNUM=1;
2305: EXCEPTION
2306: WHEN No_Data_Found THEN

Line 2346: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

2342: x_max_value := SubStr(x_allowed_range,6);
2343:
2344:
2345: -- Bug 16468041 Rewriting the below query due to performance issue.
2346: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2347: ' ( select min(to_number(lookup_code)) from ( '||
2348: ' SELECT lookup_code FROM po_lookup_codes '||
2349: ' WHERE to_number(lookup_code) BETWEEN '||
2350: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 2348: ' SELECT lookup_code FROM po_lookup_codes '||

2344:
2345: -- Bug 16468041 Rewriting the below query due to performance issue.
2346: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2347: ' ( select min(to_number(lookup_code)) from ( '||
2348: ' SELECT lookup_code FROM po_lookup_codes '||
2349: ' WHERE to_number(lookup_code) BETWEEN '||
2350: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2351: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2352: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 2350: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

2346: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2347: ' ( select min(to_number(lookup_code)) from ( '||
2348: ' SELECT lookup_code FROM po_lookup_codes '||
2349: ' WHERE to_number(lookup_code) BETWEEN '||
2350: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2351: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2352: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2353: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2354: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 2352: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

2348: ' SELECT lookup_code FROM po_lookup_codes '||
2349: ' WHERE to_number(lookup_code) BETWEEN '||
2350: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2351: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2352: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2353: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2354: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
2355: ' minus '||
2356: ' SELECT distinct plc.lookup_code FROM '||

Line 2357: ' PON_AUCTION_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||

2353: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2354: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
2355: ' minus '||
2356: ' SELECT distinct plc.lookup_code FROM '||
2357: ' PON_AUCTION_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||
2358: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
2359: ' and prheb.C_EXT_ATTR7 = plc.displayed_field ' ||
2360: ' and prheb.C_EXT_ATTR1 = '''||x_dodaac ||''''||
2361: ' and prheb.C_EXT_ATTR2 = '''||x_fiscal_year ||''''||

Line 2431: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

2427: x_min_value := SubStr(l_ranges_array(i),1,4);
2428: x_max_value := SubStr(l_ranges_array(i),6);
2429:
2430: -- Bug 16468041 Rewriting the below query due to performance issue.
2431: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2432: ' ( select min(to_number(lookup_code)) from ( '||
2433: ' SELECT lookup_code FROM po_lookup_codes '||
2434: ' WHERE to_number(lookup_code) BETWEEN '||
2435: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 2433: ' SELECT lookup_code FROM po_lookup_codes '||

2429:
2430: -- Bug 16468041 Rewriting the below query due to performance issue.
2431: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2432: ' ( select min(to_number(lookup_code)) from ( '||
2433: ' SELECT lookup_code FROM po_lookup_codes '||
2434: ' WHERE to_number(lookup_code) BETWEEN '||
2435: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2436: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2437: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 2435: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

2431: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2432: ' ( select min(to_number(lookup_code)) from ( '||
2433: ' SELECT lookup_code FROM po_lookup_codes '||
2434: ' WHERE to_number(lookup_code) BETWEEN '||
2435: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2436: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2437: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2438: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2439: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 2437: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

2433: ' SELECT lookup_code FROM po_lookup_codes '||
2434: ' WHERE to_number(lookup_code) BETWEEN '||
2435: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2436: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2437: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2438: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2439: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
2440: ' minus '||
2441: ' SELECT distinct plc.lookup_code FROM '||

Line 2442: ' PON_AUCTION_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||

2438: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2439: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
2440: ' minus '||
2441: ' SELECT distinct plc.lookup_code FROM '||
2442: ' PON_AUCTION_HEADERS_EXT_B prheb, po_lookup_codes plc ' ||
2443: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
2444: ' and prheb.C_EXT_ATTR7 = plc.displayed_field ' ||
2445: ' and prheb.C_EXT_ATTR1 = '''||x_dodaac ||''''||
2446: ' and prheb.C_EXT_ATTR2 = '''||x_fiscal_year ||''''||

Line 2777: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'

2773:
2774: CURSOR RANGES IS
2775: SELECT lookup_code
2776: FROM (
2777: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'
2778: and enabled_flag = 'Y'
2779: and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code);
2780:
2781: l_ranges_array Dbms_Sql.varchar2_table;

Line 2837: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_INSTRUMENT_TYPE'

2833: BEGIN
2834: SELECT lookup_code
2835: INTO x_instrument_type
2836: FROM (
2837: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_INSTRUMENT_TYPE'
2838: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
2839: WHERE ROWNUM=1;
2840: EXCEPTION
2841: WHEN No_Data_Found THEN

Line 2858: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'

2854: BEGIN
2855: SELECT lookup_code
2856: INTO x_allowed_range
2857: FROM (
2858: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'
2859: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
2860: WHERE ROWNUM=1;
2861: EXCEPTION
2862: WHEN No_Data_Found THEN

Line 2900: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

2896: x_min_value := SubStr(x_allowed_range,1,4);
2897: x_max_value := SubStr(x_allowed_range,6);
2898:
2899: -- Bug 16468041 Rewriting the below query due to performance issue.
2900: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2901: ' ( select min(to_number(lookup_code)) from ( '||
2902: ' SELECT lookup_code FROM po_lookup_codes '||
2903: ' WHERE to_number(lookup_code) BETWEEN '||
2904: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 2902: ' SELECT lookup_code FROM po_lookup_codes '||

2898:
2899: -- Bug 16468041 Rewriting the below query due to performance issue.
2900: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2901: ' ( select min(to_number(lookup_code)) from ( '||
2902: ' SELECT lookup_code FROM po_lookup_codes '||
2903: ' WHERE to_number(lookup_code) BETWEEN '||
2904: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2905: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2906: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 2904: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

2900: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2901: ' ( select min(to_number(lookup_code)) from ( '||
2902: ' SELECT lookup_code FROM po_lookup_codes '||
2903: ' WHERE to_number(lookup_code) BETWEEN '||
2904: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2905: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2906: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2907: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2908: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 2906: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

2902: ' SELECT lookup_code FROM po_lookup_codes '||
2903: ' WHERE to_number(lookup_code) BETWEEN '||
2904: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2905: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2906: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2907: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2908: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
2909: ' minus '||
2910: ' SELECT distinct plc.lookup_code FROM '||

Line 2911: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||

2907: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2908: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
2909: ' minus '||
2910: ' SELECT distinct plc.lookup_code FROM '||
2911: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||
2912: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
2913: ' and ( prheb.C_EXT_ATTR7 = plc.displayed_field OR SubStr(prheb.C_EXT_ATTR40,-4) = plc.displayed_field)' ||
2914: ' and prheb.C_EXT_ATTR1 = '''||x_dodaac ||''''||
2915: ' and prheb.C_EXT_ATTR2 = '''||x_fiscal_year ||''''||

Line 2991: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

2987: x_min_value := SubStr(l_ranges_array(i),1,4);
2988: x_max_value := SubStr(l_ranges_array(i),6);
2989:
2990: -- Bug 16468041 Rewriting the below query due to performance issue.
2991: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2992: ' ( select min(to_number(lookup_code)) from ( '||
2993: ' SELECT lookup_code FROM po_lookup_codes '||
2994: ' WHERE to_number(lookup_code) BETWEEN '||
2995: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 2993: ' SELECT lookup_code FROM po_lookup_codes '||

2989:
2990: -- Bug 16468041 Rewriting the below query due to performance issue.
2991: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2992: ' ( select min(to_number(lookup_code)) from ( '||
2993: ' SELECT lookup_code FROM po_lookup_codes '||
2994: ' WHERE to_number(lookup_code) BETWEEN '||
2995: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2996: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2997: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 2995: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

2991: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
2992: ' ( select min(to_number(lookup_code)) from ( '||
2993: ' SELECT lookup_code FROM po_lookup_codes '||
2994: ' WHERE to_number(lookup_code) BETWEEN '||
2995: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2996: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2997: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2998: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2999: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 2997: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

2993: ' SELECT lookup_code FROM po_lookup_codes '||
2994: ' WHERE to_number(lookup_code) BETWEEN '||
2995: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2996: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2997: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
2998: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2999: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
3000: ' minus '||
3001: ' SELECT distinct plc.lookup_code FROM '||

Line 3002: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||

2998: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
2999: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
3000: ' minus '||
3001: ' SELECT distinct plc.lookup_code FROM '||
3002: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||
3003: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
3004: ' and ( prheb.C_EXT_ATTR7 = plc.displayed_field OR SubStr(prheb.C_EXT_ATTR40,-4) = plc.displayed_field)' ||
3005: ' and prheb.C_EXT_ATTR1 = '''||x_dodaac ||''''||
3006: ' and prheb.C_EXT_ATTR2 = '''||x_fiscal_year ||''''||

Line 3364: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'

3360:
3361: CURSOR RANGES IS
3362: SELECT lookup_code
3363: FROM (
3364: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'
3365: and enabled_flag = 'Y'
3366: and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code);
3367:
3368: l_ranges_array Dbms_Sql.varchar2_table;

Line 3392: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'

3388: BEGIN
3389: SELECT lookup_code
3390: INTO x_allowed_range
3391: FROM (
3392: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_ALLOWED_RANGE'
3393: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
3394: WHERE ROWNUM=1;
3395: EXCEPTION
3396: WHEN No_Data_Found THEN

Line 3431: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

3427: x_min_value := SubStr(x_allowed_range,1,4);
3428: x_max_value := SubStr(x_allowed_range,6);
3429:
3430: -- Bug 16468041 Rewriting the below query due to performance issue.
3431: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
3432: ' ( select min(to_number(lookup_code)) from ( '||
3433: ' SELECT lookup_code FROM po_lookup_codes '||
3434: ' WHERE to_number(lookup_code) BETWEEN '||
3435: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 3433: ' SELECT lookup_code FROM po_lookup_codes '||

3429:
3430: -- Bug 16468041 Rewriting the below query due to performance issue.
3431: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
3432: ' ( select min(to_number(lookup_code)) from ( '||
3433: ' SELECT lookup_code FROM po_lookup_codes '||
3434: ' WHERE to_number(lookup_code) BETWEEN '||
3435: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
3436: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3437: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 3435: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

3431: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
3432: ' ( select min(to_number(lookup_code)) from ( '||
3433: ' SELECT lookup_code FROM po_lookup_codes '||
3434: ' WHERE to_number(lookup_code) BETWEEN '||
3435: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
3436: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3437: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
3438: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3439: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 3437: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

3433: ' SELECT lookup_code FROM po_lookup_codes '||
3434: ' WHERE to_number(lookup_code) BETWEEN '||
3435: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
3436: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3437: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
3438: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3439: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
3440: ' minus '||
3441: ' SELECT distinct plc.lookup_code FROM '||

Line 3442: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||

3438: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3439: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
3440: ' minus '||
3441: ' SELECT distinct plc.lookup_code FROM '||
3442: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||
3443: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
3444: ' and prheb.C_EXT_ATTR7 = plc.displayed_field ' ||
3445: ' and prheb.C_EXT_ATTR1 = '''||x_source_doc_number ||''''||
3446: ' and prheb.attr_group_id in ('|| l_where_cls ||')))' ||

Line 3511: /*l_query :=' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

3507: x_min_value := SubStr(l_ranges_array(i),1,4);
3508: x_max_value := SubStr(l_ranges_array(i),6);
3509:
3510: -- Bug 16468041 Rewriting the below query due to performance issue.
3511: /*l_query :=' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
3512: ' ( select min(to_number(lookup_code)) from ( '||
3513: ' SELECT lookup_code FROM po_lookup_codes '||
3514: ' WHERE to_number(lookup_code) BETWEEN '||
3515: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 3513: ' SELECT lookup_code FROM po_lookup_codes '||

3509:
3510: -- Bug 16468041 Rewriting the below query due to performance issue.
3511: /*l_query :=' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
3512: ' ( select min(to_number(lookup_code)) from ( '||
3513: ' SELECT lookup_code FROM po_lookup_codes '||
3514: ' WHERE to_number(lookup_code) BETWEEN '||
3515: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
3516: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3517: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

Line 3515: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

3511: /*l_query :=' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
3512: ' ( select min(to_number(lookup_code)) from ( '||
3513: ' SELECT lookup_code FROM po_lookup_codes '||
3514: ' WHERE to_number(lookup_code) BETWEEN '||
3515: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
3516: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3517: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
3518: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3519: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||

Line 3517: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||

3513: ' SELECT lookup_code FROM po_lookup_codes '||
3514: ' WHERE to_number(lookup_code) BETWEEN '||
3515: ' (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
3516: x_min_value||'''and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3517: ' and (SELECT to_number(lookup_code) FROM po_lookup_codes WHERE displayed_field='''||
3518: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3519: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
3520: ' minus '||
3521: ' SELECT distinct plc.lookup_code FROM '||

Line 3522: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||

3518: x_max_value||''' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'')' ||
3519: ' and lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'' '||
3520: ' minus '||
3521: ' SELECT distinct plc.lookup_code FROM '||
3522: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||
3523: ' WHERE plc.lookup_type=''PO_CLM_SERIAL_NUM_CONSTANTS'''||
3524: ' and prheb.C_EXT_ATTR7 = plc.displayed_field ' ||
3525: ' and prheb.C_EXT_ATTR1 = '''||x_source_doc_number ||''''||
3526: ' and prheb.attr_group_id in ('|| l_where_cls ||')))' ||

Line 4325: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_MODIFICATION_TYPE'

4321: BEGIN
4322: SELECT lookup_code
4323: INTO x_modif_type
4324: FROM (
4325: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_MODIFICATION_TYPE'
4326: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
4327: WHERE ROWNUM=1;
4328: EXCEPTION
4329: WHEN No_Data_Found THEN

Line 4367: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||

4363: l_where_cls := SubStr(l_where_cls,1, Length(l_where_cls)-1);
4364:
4365:
4366: -- Bug 16468041 Rewriting the below query due to performance issue.
4367: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
4368: ' ( select min(to_number(lookup_code)) from ( '||
4369: ' SELECT lookup_code FROM po_lookup_codes '||
4370: ' WHERE lookup_type='''||l_lookup_const||''' '||
4371: ' minus '||

Line 4369: ' SELECT lookup_code FROM po_lookup_codes '||

4365:
4366: -- Bug 16468041 Rewriting the below query due to performance issue.
4367: /*l_query := ' select displayed_field from po_lookup_codes where to_number(lookup_code) in'||
4368: ' ( select min(to_number(lookup_code)) from ( '||
4369: ' SELECT lookup_code FROM po_lookup_codes '||
4370: ' WHERE lookup_type='''||l_lookup_const||''' '||
4371: ' minus '||
4372: ' SELECT distinct plc.lookup_code FROM '||
4373: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||

Line 4373: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||

4369: ' SELECT lookup_code FROM po_lookup_codes '||
4370: ' WHERE lookup_type='''||l_lookup_const||''' '||
4371: ' minus '||
4372: ' SELECT distinct plc.lookup_code FROM '||
4373: ' PO_HEADERS_ALL_EXT_B prheb, po_lookup_codes plc ' ||
4374: ' WHERE plc.lookup_type='''||l_lookup_const||''''||
4375: ' and prheb.C_EXT_ATTR7 = plc.displayed_field ' ||
4376: ' and prheb.C_EXT_ATTR1 = '''||x_base_doc_number ||''''||
4377: ' and prheb.C_EXT_ATTR2 = '''||x_control_char ||''''||

Line 4669: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_MODIFICATION_TYPE'

4665: BEGIN
4666: SELECT lookup_code
4667: INTO x_modif_type
4668: FROM (
4669: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_MODIFICATION_TYPE'
4670: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
4671: WHERE ROWNUM=1;
4672: EXCEPTION
4673: WHEN No_Data_Found THEN

Line 4688: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_MODIFICATION_CODE'

4684: BEGIN
4685: SELECT lookup_code
4686: INTO x_modif_code
4687: FROM (
4688: SELECT * FROM po_lookup_codes where lookup_type = 'PO_CLM_MODIFICATION_CODE'
4689: and enabled_flag = 'Y' and trunc(nvl(inactive_date, sysdate)) >= trunc(sysdate) order by lookup_code)
4690: WHERE ROWNUM=1;
4691: EXCEPTION
4692: WHEN No_Data_Found THEN