DBA Data[Home] [Help]

APPS.PO_HEADERS_SV4 SQL Statements

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

Line: 22

    SELECT	type_lookup_code
    INTO	l_type_lookup_code
    FROM	po_headers_all
    WHERE	po_header_id = p_po_header_id;
Line: 57

   SELECT  type_name, document_subtype
     INTO  X_def_doc_type_name, X_def_type_lookup_code
     FROM  po_document_types
    WHERE  document_type_code = X_doc_type_code and
           document_subtype   = X_doc_subtype;
Line: 90

           select polc.displayed_field
           into   X_lookup_code_dsp
           from   po_lookup_codes polc
           where  polc.lookup_type = X_lookup_type
           and    polc.lookup_code = X_lookup_code;
Line: 130

    SELECT    type_lookup_code,
              quote_type_lookup_code,
              org_id
    INTO      l_type_lookup_code,
              l_quote_type_lookup_code,
              l_org_id
    FROM      po_headers_all
    WHERE     po_header_id = p_po_header_id;
Line: 164

    SELECT    type_name
    INTO      x_type_name
    FROM      po_document_types_all
    WHERE     document_type_code = l_document_type_code
    AND       document_subtype = l_document_subtype
    AND       org_id = l_org_id;
Line: 197

    SELECT    segment1
    INTO      x_segment1
    FROM      po_headers_all
    WHERE     po_header_id = p_po_header_id;
Line: 228

    SELECT    quote_vendor_quote_number
    INTO      x_vendor_quote_num
    FROM      po_headers_all
    WHERE     po_header_id = p_po_header_id;
Line: 260

       select  1
       into  X_contract_count
       from  sys.dual
       where exists
             (SELECT 'Vendor has contract'
       		from  po_headers ph
       		where ph.vendor_id = X_vendor_id
       		and  ph.type_lookup_code = 'CONTRACT'
       		and  nvl(ph.cancel_flag,'N') = 'N'
       		and  sysdate between nvl(ph.start_date, sysdate - 1)
       		and  nvl(ph.end_date, sysdate + 1));
Line: 305

        SELECT  nvl(can_preparer_approve_flag,'N')
	 INTO   X_can_preparer_approve_flag
	 FROM   po_document_types
	 WHERE  document_type_code = X_document_type
	 AND    document_subtype = X_document_subtype;
Line: 344

    CURSOR l_cumulative_csr  IS   SELECT  price_break_lookup_code
                                  FROM    po_lines_all
                                  WHERE   po_header_id = p_po_header_id;
Line: 383

        SELECT  from_header_id, from_line_id
        FROM    po_lines_all
        WHERE   po_header_id = p_po_header_id;
Line: 441

    SELECT 'Y'
    INTO   l_is_valid
    FROM   po_headers_all POH
    WHERE  POH.po_header_id = p_po_header_id
    AND    POH.type_lookup_code = 'CONTRACT'
    AND    NVL(POH.cancel_flag, 'N') = 'N'
    AND    NVL(POH.closed_code, 'OPEN') = 'OPEN'
	AND (( NVL(FND_PROFILE.VALUE('ALLOW_REFERENCING_CPA_UNDER_AMENDMENT'),'N') =  'Y' --
 	       and poh.approved_date is not null )
 	    OR POH.authorization_status = 'APPROVED' )
    AND    NVL(POH.frozen_flag, 'N') = 'N'
    AND    TRUNC(SYSDATE) BETWEEN NVL(TRUNC(POH.start_date), SYSDATE - 1)
                          AND     NVL(TRUNC(POH.end_date), SYSDATE + 1);