DBA Data[Home] [Help]

APPS.POS_EXCELASN_PVT dependencies on POS_EXASN_HEADERS

Line 904: l_previous_sn pos_exasn_headers.shipment_number%type;

900:
901:
902:
903: --L7: Check for existing ASN with same Shipment Number
904: l_previous_sn pos_exasn_headers.shipment_number%type;
905: l_new_sn varchar2(1);
906: cursor l_checkExistAsn_csr
907: is
908: select line_number, shipment_number

Line 914: pos_exasn_headers pht

910: (
911: select pht.line_number, pht.shipment_number
912: from pos_exasn_lines plnt,
913: rcv_headers_interface rhi,
914: pos_exasn_headers pht
915: where pht.header_id = plnt.header_id
916: and pht.shipment_number = rhi.shipment_num
917: and plnt.vendor_id = rhi.vendor_id
918: and nvl(plnt.vendor_site_id, -9999) = nvl(rhi.vendor_site_id, -9999)

Line 923: pos_exasn_headers pht

919: union
920: select plnt.line_number, pht.shipment_number
921: from pos_exasn_lines plnt,
922: rcv_shipment_headers rsh,
923: pos_exasn_headers pht
924: where pht.header_id = plnt.header_id
925: and pht.shipment_number = rsh.shipment_num
926: and plnt.vendor_id = rsh.vendor_id
927: and nvl(plnt.vendor_site_id, -9999) = nvl(rsh.vendor_site_id, -9999))

Line 937: l_exp_rec_date pos_exasn_headers.expected_receipt_date%type;

933: l_header_id number;
934:
935: --L8: Check for Expected Receipt Date Tolerance per PO Shipment
936: l_receipt_days_exception_code po_line_locations_all.receipt_days_exception_code%type;
937: l_exp_rec_date pos_exasn_headers.expected_receipt_date%type;
938:
939: l_days_early po_line_locations_all.DAYS_EARLY_RECEIPT_ALLOWED%type;
940: l_days_late po_line_locations_all.DAYS_LATE_RECEIPT_ALLOWED%type;
941: l_due_date date;

Line 1402: from pos_exasn_headers

1398: line_number
1399: into
1400: l_exp_rec_date,
1401: l_header_line_number
1402: from pos_exasn_headers
1403: where header_id = l_header_id;
1404:
1405: if(l_exp_rec_date > l_due_date+l_days_late OR l_exp_rec_date < l_due_date-l_days_early) then
1406: fnd_message.set_name('POS','POS_EXASN_ERDATE_TOL');

Line 1508: from pos_exasn_headers pht

1504: --H2: GROSS WEIGHT UOM
1505: cursor l_checkGrossWtUOM_csr
1506: is
1507: select pht.line_number, pht.gross_weight_uom
1508: from pos_exasn_headers pht
1509: where pht.gross_weight_uom is not null
1510: and not exists
1511: (select 1 from por_unit_of_measure_lov_v puomv
1512: where puomv.unit_of_measure = pht.gross_weight_uom);

Line 1519: from pos_exasn_headers pht

1515: --H3: NET WEIGHT UOM
1516: cursor l_checkNetWtUOM_csr
1517: is
1518: select pht.line_number, pht.net_weight_uom
1519: from pos_exasn_headers pht
1520: where pht.net_weight_uom is not null
1521: and not exists
1522: (select 1 from por_unit_of_measure_lov_v puomv
1523: where puomv.unit_of_measure = pht.net_weight_uom);

Line 1529: from pos_exasn_headers pht

1525: --H4: TAR WEIGHT UOM
1526: cursor l_checkTarWtUOM_csr
1527: is
1528: select pht.line_number, pht.tar_weight_uom
1529: from pos_exasn_headers pht
1530: where pht.tar_weight_uom is not null
1531: and not exists
1532: (select 1 from por_unit_of_measure_lov_v puomv
1533: where puomv.unit_of_measure = pht.tar_weight_uom);

Line 1539: from pos_exasn_headers pht

1535: --H5: FREIGHT TERMS
1536: cursor l_checkFreightTerms_csr
1537: is
1538: select pht.line_number, pht.freight_terms
1539: from pos_exasn_headers pht
1540: where pht.freight_terms is not null
1541: and not exists
1542: (select 1 from po_lookup_codes plc
1543: where plc.lookup_type = 'FREIGHT TERMS'and sysdate < nvl(plc.inactive_date, sysdate + 1)

Line 1550: from pos_exasn_headers pht

1546: --H7: SHIPMENT DATE has to be < SYSDATE
1547: cursor l_checkShipDate_csr
1548: is
1549: select pht.line_number, shipment_date
1550: from pos_exasn_headers pht
1551: where shipment_date > sysdate;
1552:
1553: --H8: INVOICE PAYMENT TERMS
1554: cursor l_checkInvPT_csr

Line 1557: from pos_exasn_headers pht

1553: --H8: INVOICE PAYMENT TERMS
1554: cursor l_checkInvPT_csr
1555: is
1556: select pht.line_number, pht.payment_terms
1557: from pos_exasn_headers pht
1558: where pht.payment_terms is not null
1559: and not exists
1560: (select 1 from ap_terms_val_v av
1561: where av.name = pht.payment_terms);

Line 1567: from pos_exasn_headers pht

1563: --H9: Bad if expected receipt Date is BEFORE Shipment Date
1564: cursor l_checkER_Ship_csr
1565: is
1566: select pht.line_number
1567: from pos_exasn_headers pht
1568: where expected_receipt_date < shipment_date;
1569:
1570:
1571:

Line 1590: update pos_exasn_headers

1586: end loop;
1587: close l_checkGrossWtUOM_csr;
1588:
1589: --Convert Gross Weight UOM to code
1590: update pos_exasn_headers
1591: set gross_weight_uom =
1592: (select puomv.uom_code
1593: from por_unit_of_measure_lov_v puomv
1594: where gross_weight_uom is not null

Line 1613: update pos_exasn_headers

1609: end loop;
1610: close l_checkNetWtUOM_csr;
1611:
1612: --Convert Net Weight UOM to code
1613: update pos_exasn_headers
1614: set net_weight_uom =
1615: (select puomv.uom_code
1616: from por_unit_of_measure_lov_v puomv
1617: where net_weight_uom is not null

Line 1636: update pos_exasn_headers

1632: end loop;
1633: close l_checkTarWtUOM_csr;
1634:
1635: --Convert Tar Weight UOM to code
1636: update pos_exasn_headers
1637: set tar_weight_uom =
1638: (select puomv.uom_code
1639: from por_unit_of_measure_lov_v puomv
1640: where tar_weight_uom is not null

Line 1765: from pos_exasn_headers pht

1761:
1762:
1763: update pos_exasn_lines plnt
1764: set lpn_group_id = (select pht.lpn_group_id
1765: from pos_exasn_headers pht
1766: where pht.header_id = plnt.header_id)
1767: where
1768: (
1769: plnt.lls_code in ('LAS','LOT')

Line 2926: from pos_exasn_headers pht,

2922: select HEADER_ID from
2923: (
2924: select
2925: count(1), pht.header_id HEADER_ID, pht.shipment_number SHIPMENT_NUMBER, plnt.vendor_id VENDOR_ID, plnt.ship_to_org_id SHIP_TO_ORG_ID, nvl(plnt.vendor_site_id, -9999) VENDOR_SITE_ID, plnt.currency_code
2926: from pos_exasn_headers pht,
2927: pos_exasn_lines plnt
2928: where pht.header_id = plnt.header_id
2929: group by pht.header_id, pht.shipment_number, plnt.vendor_id, plnt.ship_to_org_id, nvl(plnt.vendor_site_id, -9999), plnt.currency_code
2930: )

Line 2945: from pos_exasn_headers peh,

2941: l_asbn_bad varchar2(1);
2942: l_error_ln number;
2943: cursor l_checkNotPaySite_csr is
2944: select peh.line_number
2945: from pos_exasn_headers peh,
2946: po_vendor_sites_all pvsa
2947: where pvsa.vendor_site_id = peh.vendor_site_id
2948: AND getvendorpaysiteid(peh.vendor_id,nvl(peh.vendor_site_id, -9999),peh.currency_code) IS null;
2949: --Refer the bug7338353 for more details

Line 2952: l_fcc pos_exasn_headers.freight_carrier_code%type;

2948: AND getvendorpaysiteid(peh.vendor_id,nvl(peh.vendor_site_id, -9999),peh.currency_code) IS null;
2949: --Refer the bug7338353 for more details
2950:
2951: --H1: Freight Carrier Code
2952: l_fcc pos_exasn_headers.freight_carrier_code%type;
2953: cursor l_checkFreightCC_csr
2954: is
2955: select pht.line_number, pht.freight_carrier_code
2956: from pos_exasn_headers pht

Line 2956: from pos_exasn_headers pht

2952: l_fcc pos_exasn_headers.freight_carrier_code%type;
2953: cursor l_checkFreightCC_csr
2954: is
2955: select pht.line_number, pht.freight_carrier_code
2956: from pos_exasn_headers pht
2957: where pht.freight_carrier_code is not null
2958: and 0=
2959: (select count(*) from org_freight oft
2960: where nvl(oft.disable_date, sysdate) >= sysdate

Line 2966: l_ship_from_loc pos_exasn_headers.ship_from_location_code%type;

2962: and organization_id = pht.ship_to_org_id
2963: );
2964:
2965: --H10: Bad Ship From Location
2966: l_ship_from_loc pos_exasn_headers.ship_from_location_code%type;
2967: cursor l_shipFrom_Loc_csr is
2968: select pht.line_number,pht.ship_from_location_code
2969: from pos_exasn_headers pht
2970: where pht.ship_from_location_code is not null

Line 2969: from pos_exasn_headers pht

2965: --H10: Bad Ship From Location
2966: l_ship_from_loc pos_exasn_headers.ship_from_location_code%type;
2967: cursor l_shipFrom_Loc_csr is
2968: select pht.line_number,pht.ship_from_location_code
2969: from pos_exasn_headers pht
2970: where pht.ship_from_location_code is not null
2971: and not exists (
2972: select 1 from hz_party_sites ps,hz_party_site_uses psu,po_vendors pov
2973: where ps.party_site_id = psu.party_site_id

Line 2984: select max(header_id) into l_asn_header_id from pos_exasn_headers;

2980: begin
2981:
2982: l_asbn_bad := 'F';
2983:
2984: select max(header_id) into l_asn_header_id from pos_exasn_headers;
2985:
2986: select decode(count(1),0,'ASN','ASBN')
2987: into l_asn_asbn
2988: from pos_exasn_headers

Line 2988: from pos_exasn_headers

2984: select max(header_id) into l_asn_header_id from pos_exasn_headers;
2985:
2986: select decode(count(1),0,'ASN','ASBN')
2987: into l_asn_asbn
2988: from pos_exasn_headers
2989: where invoice_number is not null;
2990:
2991:
2992:

Line 3018: from pos_exasn_headers

3014: if(l_asn_asbn = 'ASBN') then
3015: l_asbn_bad := 'T';
3016: select line_number
3017: into l_error_ln
3018: from pos_exasn_headers
3019: where header_id = l_ex_header_id;
3020:
3021: fnd_message.set_name('POS','POS_EXASN_ASBN_XHDR');
3022: fnd_message.set_token('LINE_NUM',l_error_ln);

Line 3047: update pos_exasn_headers pht

3043: if(l_asbn_bad = 'T') then
3044: raise l_early_exit;
3045: end if;
3046:
3047: update pos_exasn_headers pht
3048: set (
3049: pht.vendor_id,
3050: pht.ship_to_org_id,
3051: pht.vendor_site_id,

Line 3124: update pos_exasn_headers pht

3120:
3121:
3122:
3123: -- Update Payment Term ID, if any
3124: update pos_exasn_headers pht
3125: set payment_term_id =
3126: (select atv.term_id
3127: from ap_terms_val_v atv
3128: where atv.name = pht.payment_terms)

Line 3137: from pos_exasn_headers pht

3133:
3134:
3135: update pos_exasn_lines plnt
3136: set (header_interface_id, group_id, expected_receipt_date) = (select pht.header_interface_id, pht.group_id, pht.expected_receipt_date
3137: from pos_exasn_headers pht
3138: where pht.header_id = plnt.header_id);
3139: exception when l_early_exit then
3140: null;
3141: end FixHeadersAndLines;

Line 3360: insert into pos_exasn_headers(

3356: BEGIN
3357: select rcv_interface_groups_s.nextval into l_lpn_group_id from dual;
3358: select rcv_headers_interface_s.nextval into l_header_interface_id from dual;
3359:
3360: insert into pos_exasn_headers(
3361: header_id,
3362: lpn_group_id,
3363: vendor_id,
3364: ship_to_org_id,

Line 3376: update pos_exasn_headers

3372: p_ex_ship_to_org_id,
3373: p_ex_vendor_site_id,
3374: l_header_interface_id);
3375:
3376: update pos_exasn_headers
3377: set (
3378: PAYMENT_TERM_ID,
3379: CURRENCY_CODE,
3380: RATE,

Line 3483: from pos_exasn_headers

3479: ATTRIBUTE12,
3480: ATTRIBUTE13,
3481: ATTRIBUTE14,
3482: ATTRIBUTE15
3483: from pos_exasn_headers
3484: where header_id = p_ex_header_id)
3485: where header_id = p_asn_header_id;
3486:
3487:

Line 3914: from pos_exasn_headers;

3910: net_weight_uom,
3911: net_weight,
3912: decode(invoice_number,null,null,getvendorpaysiteid(vendor_id,nvl(vendor_site_id,-9999),currency_code)),
3913: ship_from_location_code
3914: from pos_exasn_headers;
3915:
3916:
3917:
3918: end InsertIntoRHI;

Line 4188: from pos_Exasn_headers

4184:
4185: cursor l_checkDocAsn_csr
4186: is
4187: select SHIPMENT_NUMBER
4188: from pos_Exasn_headers
4189: group by SHIPMENT_NUMBER, nvl(VENDOR_ID,-9999), nvl(VENDOR_SITE_ID,-9999)
4190: having count(1) > 1;
4191:
4192:

Line 4196: from pos_exasn_headers;

4192:
4193: cursor l_buyerNotif_csr
4194: is
4195: select SHIPMENT_NUMBER, VENDOR_ID, VENDOR_SITE_ID
4196: from pos_exasn_headers;
4197:
4198: l_shipment_number pos_exasn_headers.shipment_number%type;
4199: l_vendor_id pos_exasn_headers.vendor_id%type;
4200: l_vendor_site_id pos_exasn_headers.vendor_site_id%type;

Line 4198: l_shipment_number pos_exasn_headers.shipment_number%type;

4194: is
4195: select SHIPMENT_NUMBER, VENDOR_ID, VENDOR_SITE_ID
4196: from pos_exasn_headers;
4197:
4198: l_shipment_number pos_exasn_headers.shipment_number%type;
4199: l_vendor_id pos_exasn_headers.vendor_id%type;
4200: l_vendor_site_id pos_exasn_headers.vendor_site_id%type;
4201: l_user_vendor_id_tbl vendor_id_tbl_type;
4202:

Line 4199: l_vendor_id pos_exasn_headers.vendor_id%type;

4195: select SHIPMENT_NUMBER, VENDOR_ID, VENDOR_SITE_ID
4196: from pos_exasn_headers;
4197:
4198: l_shipment_number pos_exasn_headers.shipment_number%type;
4199: l_vendor_id pos_exasn_headers.vendor_id%type;
4200: l_vendor_site_id pos_exasn_headers.vendor_site_id%type;
4201: l_user_vendor_id_tbl vendor_id_tbl_type;
4202:
4203: /* Inbound Logistics : Validate Ship From Location Code */

Line 4200: l_vendor_site_id pos_exasn_headers.vendor_site_id%type;

4196: from pos_exasn_headers;
4197:
4198: l_shipment_number pos_exasn_headers.shipment_number%type;
4199: l_vendor_id pos_exasn_headers.vendor_id%type;
4200: l_vendor_site_id pos_exasn_headers.vendor_site_id%type;
4201: l_user_vendor_id_tbl vendor_id_tbl_type;
4202:
4203: /* Inbound Logistics : Validate Ship From Location Code */
4204: Cursor l_shipFrom is

Line 4211: from pos_exasn_headers pht,

4207: plt.po_line_id,
4208: plt.po_line_location_id,
4209: pht.ship_from_location_code,
4210: ps.location_id as ship_from_location_id
4211: from pos_exasn_headers pht,
4212: pos_exasn_lines plt,
4213: hz_party_sites ps
4214: where pht.header_id = plt.header_id
4215: and pht.ship_from_location_code is not null

Line 4223: l_prev_header_id pos_exasn_headers.header_id%type := -1;

4219: l_lineIdTbl po_tbl_number := po_tbl_number();
4220: l_lineLocIdTbl po_tbl_number := po_tbl_number();
4221: l_count NUMBER := 0;
4222: l_return_status VARCHAR2(2000);
4223: l_prev_header_id pos_exasn_headers.header_id%type := -1;
4224: l_prev_ship_from VARCHAR2(30) := '';
4225: l_header_id pos_exasn_headers.header_id%type;
4226: l_line_id pos_exasn_lines.po_line_id%type;
4227: l_line_location_id pos_exasn_lines.po_line_location_id%type;

Line 4225: l_header_id pos_exasn_headers.header_id%type;

4221: l_count NUMBER := 0;
4222: l_return_status VARCHAR2(2000);
4223: l_prev_header_id pos_exasn_headers.header_id%type := -1;
4224: l_prev_ship_from VARCHAR2(30) := '';
4225: l_header_id pos_exasn_headers.header_id%type;
4226: l_line_id pos_exasn_lines.po_line_id%type;
4227: l_line_location_id pos_exasn_lines.po_line_location_id%type;
4228: l_ship_from_location_code pos_exasn_headers.ship_from_location_code%type;
4229: --l_ship_from_location_id hz_party_sites.location_id%type;

Line 4228: l_ship_from_location_code pos_exasn_headers.ship_from_location_code%type;

4224: l_prev_ship_from VARCHAR2(30) := '';
4225: l_header_id pos_exasn_headers.header_id%type;
4226: l_line_id pos_exasn_lines.po_line_id%type;
4227: l_line_location_id pos_exasn_lines.po_line_location_id%type;
4228: l_ship_from_location_code pos_exasn_headers.ship_from_location_code%type;
4229: --l_ship_from_location_id hz_party_sites.location_id%type;
4230: l_ship_from_location_id number;
4231: l_err_tbl po_tbl_varchar2000 ;
4232: