DBA Data[Home] [Help]

APPS.PO_XML_DELIVERY SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 69

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
Line: 101

      select por.revision_num,poh.vendor_id,poh.vendor_site_id,
             poh.po_header_id
      into   l_revision_num,l_vendor_id ,l_vendor_site_id,l_doc_id
      from   po_headers_all poh,po_releases_all por
      where  poh.po_header_id=por.po_header_id
      and    por.po_release_id  = l_doc_rel_id;
Line: 108

        select revision_num,vendor_id,vendor_site_id
        into l_revision_num,l_vendor_id ,l_vendor_site_id
        from po_headers_all
        where po_header_id= l_doc_id;
Line: 139

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 192

   select segment1, org_id, vendor_id, vendor_site_id, comments, type_lookup_code,creation_date
   into l_po_number, l_org_id, l_party_id, l_party_site_id, l_po_desc, l_po_subtype,l_doc_creation_date
   from po_headers_all
   where po_header_id = l_po_header_id;
Line: 201

  select poh.segment1 || ':' || to_char(por.release_num), poh.org_id,
         poh.vendor_id, poh.vendor_site_id, poh.comments,poh.creation_date
  into   l_po_number, l_org_id, l_party_id, l_party_site_id, l_po_desc,
         l_doc_creation_date
  from   po_headers_all poh,po_releases_all por
  where  poh.po_header_id=por.po_header_id
  and    por.po_release_id  = l_doc_rel_id;
Line: 217

      select segment1, org_id, vendor_id, vendor_site_id, comments,creation_date
      into l_po_number, l_org_id, l_party_id, l_party_site_id,l_po_desc,
           l_doc_creation_date
      from po_headers_all
   where po_header_id = l_po_header_id;
Line: 348

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
Line: 433

      select por.revision_num,poh.vendor_id,poh.vendor_site_id,
             poh.po_header_id, por.cancel_flag
      into   l_revision_num,l_vendor_id ,l_vendor_site_id,l_doc_id, l_cancel_flag --B4407795,reading cancel flag
      from   po_headers_all poh,po_releases_all por
      where  poh.po_header_id=por.po_header_id
      and    por.po_release_id  = l_doc_rel_id;
Line: 442

        select revision_num,vendor_id,vendor_site_id,cancel_flag
        into l_revision_num,l_vendor_id ,l_vendor_site_id, l_cancel_flag --B4407795,reading cancel flag
        from po_headers_all
        where po_header_id= l_doc_id;
Line: 460

    select PO_WF_ITEMKEY_S.nextval
      into l_wf_item_seq
      from dual;
Line: 574

                /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 616

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
Line: 711

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
Line: 718

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
Line: 762

            select por.xml_flag,poh.agent_id into l_xml_flag, l_agent_id
            from   po_headers_all poh,po_releases_all por
            where  poh.po_header_id=por.po_header_id
            and    por.po_release_id  = l_doc_rel_id;
Line: 769

        select poh.xml_flag, poh.agent_id into l_xml_flag, l_agent_id
        from po_headers_all poh
        where po_header_id= l_doc_id;
Line: 780

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
Line: 799

                        update po_headers_all
                        set xml_send_date = sysdate
                        where
                                po_header_id = p_header_id and
                                org_id = p_org_id;
Line: 805

                        update po_headers_archive_all
                        set xml_send_date = sysdate
                        where
                                po_header_id = p_header_id and
                                org_id = p_org_id and
                                revision_num = 0;
Line: 813

                        update po_headers_all
                        set xml_change_send_date = sysdate
                        where
                                po_header_id = p_header_id and
                                org_id = p_org_id;
Line: 819

                        update po_headers_archive_all
                        set xml_change_send_date = sysdate
                        where
                                po_header_id = p_header_id and
                                org_id = p_org_id and
                                latest_external_flag = 'Y';
Line: 828

                        update po_releases_all
                        set xml_send_date = sysdate
                        where
                                po_header_id  = p_header_id and
                                po_release_id = p_release_id and
                                org_id        = p_org_id;
Line: 835

                        update po_releases_archive_all
                        set xml_send_date = sysdate
                        where
                                po_header_id  = p_header_id and
                                  po_release_id = p_release_id and
                                org_id        = p_org_id and
                                revision_num  = 0;
Line: 844

                        update po_releases_all
                        set xml_change_send_date = sysdate
                        where
                                po_header_id  = p_header_id and
                                po_release_id = p_release_id and
                                org_id        = p_org_id;
Line: 851

                        update po_releases_archive_all
                        set xml_change_send_date = sysdate
                        where
                                po_header_id = p_header_id and
                                po_release_id = p_release_id and
                                org_id = p_org_id and
                                latest_external_flag = 'Y';
Line: 877

        select count(1) into l_count_distinct from (
                select distinct(deliver_to_person_id)
                from po_distributions_archive_all pda
                where pda.po_header_id = p_header_id
                and pda.po_line_id = p_line_id
                and pda.revision_num = p_revision_num);
Line: 885

                select distinct(deliver_to_person_id) into l_agent_id
                from po_distributions_archive_all pda
                where pda.po_header_id = p_header_id
                and pda.po_line_id = p_line_id
                and pda.revision_num = p_revision_num;
Line: 892

                        select full_name into p_requestor from PER_ALL_PEOPLE_F where
                        person_id = l_agent_id and
                        effective_end_date >= sysdate;
Line: 899

        select count(1) into l_count_distinct from (
                select distinct(deliver_to_person_id) from po_distributions_archive_all pda
                where pda.po_header_id = p_header_id
                and pda.po_line_id = p_line_id
                and pda.revision_num = p_revision_num
                and pda.po_release_id = p_release_num);
Line: 907

                select distinct(deliver_to_person_id) into l_agent_id from po_distributions_archive_all pda
                where pda.po_header_id = p_header_id
                and pda.po_line_id = p_line_id
                and pda.revision_num = p_revision_num
                and pda.po_release_id = p_release_num;
Line: 914

                        select full_name into p_requestor from PER_ALL_PEOPLE_F where
                        person_id = l_agent_id and
                        effective_end_date >= sysdate;
Line: 935

                select xml_change_send_date, xml_send_date into
                l_poco_date, l_pro_date
                from po_headers_all
                where po_header_id = p_header_id;
Line: 947

                select xml_change_send_date, xml_send_date into
                l_poco_date, l_pro_date
                from po_releases_all
                where po_header_id = p_header_id
                and po_release_id = p_release_id;
Line: 980

        select type_lookup_code into doc_type
        from po_headers_all
        where po_header_id= p_header_id;
Line: 986

            select max(revision_num) into l_one
            from po_lines_archive_all
            where po_header_id = p_header_id
            and po_line_id = p_line_id ;
Line: 993

            select max(revision_num) into l_one
            from po_lines_archive_all
            where po_header_id = p_header_id
            and po_line_id = p_line_id
            and revision_num <= p_revision_num;
Line: 1002

                select max(revision_num) into l_line_revision
                from po_lines_archive_all
                where po_header_id = p_header_id
                and po_line_id = p_line_id
                and revision_num <= p_revision_num;
Line: 1008

                select max(revision_num) into l_max_location_revision
                from po_line_locations_archive_all
                where po_header_id = p_header_id
                and po_line_id = p_line_id
                and revision_num <= p_revision_num;
Line: 1014

                select max(revision_num) into l_max_distribution_revision
                from po_distributions_archive_all
                where po_header_id = p_header_id
                and po_line_id = p_line_id
                and revision_num <= p_revision_num;
Line: 1052

        select type_lookup_code into doc_type
        from po_headers_all
        where po_header_id= p_header_id;
Line: 1057

        select max(revision_num) into l_one
        from po_line_locations_archive_all
        where po_header_id = p_header_id
        and po_line_id = p_line_id
        and line_location_id = p_location_id;
Line: 1064

        select max(revision_num) into l_one
        from po_line_locations_archive_all
        where po_header_id = p_header_id
        and po_line_id = p_line_id
        and line_location_id = p_location_id
        and revision_num <= p_revision_num;
Line: 1075

                select max(revision_num) into l_max_loc_revision
                from po_line_locations_archive_all
                where po_header_id = p_header_id
                and po_line_id = p_line_id
                and line_location_id = p_location_id
                and revision_num <= p_revision_num;
Line: 1082

                select max(revision_num) into l_max_dist_revision
                from po_distributions_archive_all
                where po_header_id = p_header_id
                and po_line_id = p_line_id
                and line_location_id = p_location_id
                and revision_num <= p_revision_num;
Line: 1115

  select aca.card_number, aca.cardmember_name,aca.card_expiration_date,
acpa.card_brand_lookup_code
  into p_card_num, p_card_name, p_card_exp_date, p_card_brand
  from ap_cards_all aca, ap_card_programs_all acpa, po_headers_all pha
  where pha.po_header_id = p_header_id
  and pha.pcard_id = aca.card_id
  and aca.card_program_id = acpa.card_program_id;
Line: 1123

  select aca.card_number, aca.cardmember_name,aca.card_expiration_date,
acpa.card_brand_lookup_code
  into p_card_num, p_card_name, p_card_exp_date, p_card_brand
  from ap_cards_all aca, ap_card_programs_all acpa, po_releases_all pra
  where pra.po_header_id = p_header_id
  and pra.po_release_id = p_release_id
  and pra.pcard_id = aca.card_id
  and aca.card_program_id = acpa.card_program_id;
Line: 1134

  select count(1)
  into is_supplier_pcard
  from ap_card_suppliers_all acsa, po_headers_all pha
  where acsa.card_id = pha.pcard_id
        and po_header_id = p_header_id;
Line: 1140

  select count(1)
  into is_supplier_pcard
  from ap_card_suppliers_all acsa, po_releases_all pra
  where acsa.card_id = pra.pcard_id
        and pra.po_header_id = p_header_id
          and pra.po_release_id = p_release_id;
Line: 1149

    select pva.vendor_name into p_card_name
    from po_vendors pva, po_headers_all pha
    where pha.po_header_id = p_header_id and
          pva.vendor_id = pha.vendor_id;
Line: 1212

select count(*) into cnt
from OE_DROP_SHIP_SOURCES
where po_header_id = p_header_id and
      line_location_id = p_line_location_id;
Line: 1219

select null, HZA.ADDRESS1, HZA.ADDRESS2,
       HZA.ADDRESS3, HZA.CITY, HZA.COUNTRY,
       HZA.POSTAL_CODE, HZA.STATE,
       null, --HZA.TELEPHONE_NUMBER_1,
       null, --HZA.TELEPHONE_NUMBER_2,
       null  -- HZA.TELEPHONE_NUMBER_3
into
       p_ECE_TP_LOCATION_CODE, p_ADDRESS_LINE_1, p_ADDRESS_LINE_2,
       p_ADDRESS_LINE_3, p_TOWN_OR_CITY,  p_COUNTRY,
       p_POSTAL_CODE, p_STATE, p_TELEPHONE_NUMBER_1,
       p_TELEPHONE_NUMBER_2, p_TELEPHONE_NUMBER_3
from   HZ_LOCATIONS HZA
where  HZA.LOCATION_ID = p_ship_to_location_id;
Line: 1236

select HLA.ECE_TP_LOCATION_CODE, HLA.ADDRESS_LINE_1, HLA.ADDRESS_LINE_2,
       HLA.ADDRESS_LINE_3, HLA.TOWN_OR_CITY, HLA.COUNTRY,
       HLA.POSTAL_CODE, HLA.REGION_2, HLA.TELEPHONE_NUMBER_1,
       HLA.TELEPHONE_NUMBER_2, HLA.TELEPHONE_NUMBER_3
into
       p_ECE_TP_LOCATION_CODE, p_ADDRESS_LINE_1, p_ADDRESS_LINE_2,
       p_ADDRESS_LINE_3, p_TOWN_OR_CITY,  p_COUNTRY,
       p_POSTAL_CODE, p_STATE, p_TELEPHONE_NUMBER_1,
       p_TELEPHONE_NUMBER_2, p_TELEPHONE_NUMBER_3
from   HR_LOCATIONS_ALL HLA
where  HLA.LOCATION_ID = p_ship_to_location_id;
Line: 1280

	select	count(*) into cnt
	from 		OE_DROP_SHIP_SOURCES
	where 	po_header_id = p_header_id and
      		line_location_id = p_line_location_id;
Line: 1287

		select null, HZA.ADDRESS1, HZA.ADDRESS2,
			HZA.ADDRESS3, HZA.CITY, HZA.COUNTRY,
			HZA.POSTAL_CODE, HZA.STATE,
			null, --HZA.TELEPHONE_NUMBER_1,
			null, --HZA.TELEPHONE_NUMBER_2,
			null  -- HZA.TELEPHONE_NUMBER_3
		into
			p_ECE_TP_LOCATION_CODE, p_ADDRESS_LINE_1, p_ADDRESS_LINE_2,
			p_ADDRESS_LINE_3, p_TOWN_OR_CITY,  p_COUNTRY,
			p_POSTAL_CODE, p_STATE, p_TELEPHONE_NUMBER_1,
			p_TELEPHONE_NUMBER_2, p_TELEPHONE_NUMBER_3
		from	HZ_LOCATIONS HZA
		where	HZA.LOCATION_ID = p_ship_to_location_id;
Line: 1303

		select	HLA.ECE_TP_LOCATION_CODE, HLA.ADDRESS_LINE_1, HLA.ADDRESS_LINE_2,
				HLA.ADDRESS_LINE_3, HLA.TOWN_OR_CITY, HLA.COUNTRY,
				HLA.POSTAL_CODE, HLA.REGION_2, HLA.TELEPHONE_NUMBER_1,
				HLA.TELEPHONE_NUMBER_2, HLA.TELEPHONE_NUMBER_3
		into
				p_ECE_TP_LOCATION_CODE, p_ADDRESS_LINE_1, p_ADDRESS_LINE_2,
				p_ADDRESS_LINE_3, p_TOWN_OR_CITY,  p_COUNTRY,
				p_POSTAL_CODE, p_STATE, p_TELEPHONE_NUMBER_1,
				p_TELEPHONE_NUMBER_2, p_TELEPHONE_NUMBER_3
		from   HR_LOCATIONS_ALL HLA
		where  HLA.LOCATION_ID = p_ship_to_location_id;
Line: 1355

    select PO_WF_ITEMKEY_S.nextval
      into l_wf_item_seq
      from dual;
Line: 1375

    PO_REQAPPROVAL_INIT1.update_print_count(l_doc_id,l_document_type);
Line: 1416

       select PHA.SEGMENT1, PRAA.REVISION_NUM,
              PRAA.RELEASE_NUM
       into   l_ponum, l_revision_num,  l_release_num
       from   PO_RELEASES_ARCHIVE_ALL praa, po_headers_all pha
       where  PHA.PO_HEADER_ID = PRAA.PO_HEADER_ID and
              praa.po_release_id  = l_release_id and
              praa.revision_num = l_revision_num;
Line: 1429

        select segment1 into l_ponum
        from po_headers_archive_all poh
        where po_header_id= l_document_id and
              revision_num = l_revision_num;
Line: 1472

 select nvl(pvsa.language, 'AMERICAN')  into lang_name
   from po_vendor_sites_all pvsa
   where vendor_id = p_vendor_id and
   vendor_site_id = p_vendor_site_id;
Line: 1524

     select etd.username, etd.source_tp_location_code
     into x_to_domain, x_to_identity
     from ecx_tp_details etd, ecx_tp_headers eth, ecx_ext_processes eep
     where eth.party_id = p_tp_id and eth.party_site_id = p_tp_site_id
         and etd.tp_header_id = eth.tp_header_id and
         eep.ext_type = 'ORDER' and eep.ext_subtype = 'REQUEST' and
         eep.ext_process_id = etd.ext_process_id;
Line: 1588

     select distinct(request_origin) into src
     from po_change_requests
     where change_request_group_id = l_change_request_group_id
     and msg_cont_num is not null;
Line: 1629

	SELECT *
	INTO   hrloc_rec
	FROM   hr_locations_all
	WHERE  location_id = p_location_id;
Line: 1702

      /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
Line: 1735

      /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress
               || ':' || l_user_id || ':' || l_resp_id || ':' || l_appl_id);
Line: 1746

      /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress
               || ':' || l_cur_user_id || ':' || l_cur_resp_id
	       || ':' || l_cur_appl_id);
Line: 1768

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1800

select ship_to_location_id, org_id
into l_location_id, x_partner_id
from po_headers_all
where po_header_id = p_po_header_id;
Line: 1808

       select distinct
	  -- hrl.description,
	   hrl.address_line_1,
	     hrl.address_line_2,
	   hrl.address_line_3,
	   hrl.town_or_city,
	   hrl.postal_code,
	   --ftv.territory_short_name,
	   hrl.country,
	   nvl(decode(hrl.region_1,
		null, hrl.region_2,
		decode(flv1.meaning,null, decode(flv2.meaning,null,flv3.meaning,flv2.lookup_code),flv1.lookup_code))
	    ,hrl.region_2),
	    hrl.TELEPHONE_NUMBER_1,
	    hrl.TELEPHONE_NUMBER_2,
	    hrl.TELEPHONE_NUMBER_3,
	    hrl.ECE_TP_LOCATION_CODE
	into
	  -- l_ship_to_desc,
	   x_address_line_1,
	   x_address_line_2,
	   x_address_line_3,
	   x_city,
	   x_postalcode,
	   x_country,
	   x_stateprovn,
	   x_telephone_1,
	   x_telephone_2,
	   x_telephone_3,
	   x_partner_id_x
     FROM  hr_locations_all hrl,
	   --fnd_territories_vl ftv,
	   fnd_lookup_values_vl flv1,
	   fnd_lookup_values_vl flv2,
	   fnd_lookup_values_vl flv3
	 where
    hrl.region_1 = flv1.lookup_code (+) and hrl.country || '_PROVINCE' = flv1.lookup_type (+)
    and hrl.region_2 = flv2.lookup_code (+) and hrl.country || '_STATE' = flv2.lookup_type (+)
    and hrl.region_1 = flv3.lookup_code (+) and hrl.country || '_COUNTY' = flv3.lookup_type (+)
    --and hrl.country = ftv.territory_code(+)
    and HRL.location_id = l_location_id;
Line: 1857

	     select distinct
	   --   hrl.description,
		hzl.address1,
		hzl.address2,
		hzl.address3,
		hzl.city,
		hzl.postal_code,
		hzl.country,
		hzl.state
	     into
	    --  l_ship_to_desc,
		x_address_line_1,
		x_address_line_2,
		x_address_line_3,
		x_city,
		x_postalcode,
		x_country,
		x_stateprovn
	      FROM  hz_locations hzl
	      where  HzL.location_id = l_location_id;
Line: 1914

	   SELECT REQUESTOR
	   FROM   PO_CXML_DELIVERTO_ARCH_V
	   WHERE  PO_HEADER_ID = headerid
	   AND    ((PO_RELEASE_ID is null AND releaseid is null)
		   OR PO_RELEASE_ID = releaseid
		  );
Line: 1973

	select count(*)
	into l_num_enterprises
	from hz_parties hp, hz_code_assignments hca
	where  hca.owner_table_id = hp.party_id
	and hca.owner_table_name = 'HZ_PARTIES'
	and hca.class_category = 'POS_PARTICIPANT_TYPE'
	and hca.class_code = 'ENTERPRISE'
	and hca.status= 'A'
	and hp.status= 'A'
	and ( hca.end_date_active > sysdate or hca.end_date_active is null );
Line: 1985

		select hp.party_name
		into x_shipto_name
		from hz_parties hp, hz_code_assignments hca
		where  hca.owner_table_id = hp.party_id
		and hca.owner_table_name = 'HZ_PARTIES'
		and hca.class_category = 'POS_PARTICIPANT_TYPE'
		and hca.class_code = 'ENTERPRISE'
		and hca.status= 'A'
		and hp.status= 'A'
		and ( hca.end_date_active > sysdate or hca.end_date_active is null );