DBA Data[Home] [Help]

APPS.PO_CHORD_WF5 SQL Statements

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

Line: 18

   	PO_WF_DEBUG_PKG.insert_debug(ITEMTYPE, ITEMKEY,
   		'*** In Procedure: chord_release ***' );
Line: 34

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'*** Finish: chord_release ***' );
Line: 58

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'*** In Procedure check_release_change ***');
Line: 71

               SELECT DISTINCT 'Y'
               INTO   x_release_control.agent_id
               FROM   PO_RELEASES_all POR,
                      PO_RELEASES_ARCHIVE_all PORA
               WHERE  POR.po_release_id = x_po_release_id
               AND    POR.po_release_id = PORA.po_release_id
               AND    PORA.latest_external_flag (+) = 'Y'
               AND    (
                   (PORA.po_release_id IS NULL)
                OR (POR.agent_id <> PORA.agent_id)
                OR (POR.agent_id IS NULL
			AND  PORA.agent_id IS NOT NULL)
                OR (POR.agent_id IS NOT NULL
			AND PORA.agent_id IS NULL)
		);
Line: 93

               SELECT DISTINCT 'Y'
               INTO   x_release_control.acceptance_required_flag
               FROM   PO_RELEASES_all POR,
                      PO_RELEASES_ARCHIVE_all PORA
               WHERE  POR.po_release_id = x_po_release_id
               AND    POR.po_release_id = PORA.po_release_id
               AND    PORA.latest_external_flag (+) = 'Y'
               AND    (
                   (PORA.po_release_id IS NULL)
                OR (POR.acceptance_required_flag <> PORA.acceptance_required_flag)
                OR (POR.acceptance_required_flag IS NULL
			AND  PORA.acceptance_required_flag IS NOT NULL)
                OR (POR.acceptance_required_flag IS NOT NULL
			AND PORA.acceptance_required_flag IS NULL)
		);
Line: 115

               SELECT DISTINCT 'Y'
               INTO   x_release_control.acceptance_due_date
               FROM   PO_RELEASES_all POR,
                      PO_RELEASES_ARCHIVE_all PORA
               WHERE  POR.po_release_id = x_po_release_id
               AND    POR.po_release_id = PORA.po_release_id
               AND    PORA.latest_external_flag (+) = 'Y'
               AND    (
                   (PORA.po_release_id IS NULL)
                OR (POR.acceptance_due_date <> PORA.acceptance_due_date)
                OR (POR.acceptance_due_date IS NULL
			AND  PORA.acceptance_due_date IS NOT NULL)
                OR (POR.acceptance_due_date IS NOT NULL
			AND PORA.acceptance_due_date IS NULL)
		);
Line: 137

               SELECT DISTINCT 'Y'
               INTO   x_release_control.release_num
               FROM   PO_RELEASES_all POR,
                      PO_RELEASES_ARCHIVE_all PORA
               WHERE  POR.po_release_id = x_po_release_id
               AND    POR.po_release_id = PORA.po_release_id
               AND    PORA.latest_external_flag (+) = 'Y'
               AND    (
                   (PORA.po_release_id IS NULL)
                OR (POR.release_num <> PORA.release_num)
                OR (POR.release_num IS NULL
			AND  PORA.release_num IS NOT NULL)
                OR (POR.release_num IS NOT NULL
			AND PORA.release_num IS NULL)
		);
Line: 159

               SELECT DISTINCT 'Y'
               INTO   x_release_control.release_date
               FROM   PO_RELEASES_all POR,
                      PO_RELEASES_ARCHIVE_all PORA
               WHERE  POR.po_release_id = x_po_release_id
               AND    POR.po_release_id = PORA.po_release_id
               AND    PORA.latest_external_flag (+) = 'Y'
               AND    (
                   (PORA.po_release_id IS NULL)
                OR (POR.release_date <> PORA.release_date)
                OR (POR.release_date IS NULL
			AND  PORA.release_date IS NOT NULL)
                OR (POR.release_date IS NOT NULL
			AND PORA.release_date IS NULL)
		);
Line: 184

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'*** Finish check_release_change ***');
Line: 209

  SELECT po_header_id
  into 	 x_po_header_id
  FROM 	 po_releases_all  PR
  WHERE  PR.po_release_id = x_po_release_id;
Line: 230

            SELECT nvl(round( round(sum((nvl(POD.quantity_ordered, 0) -
                                         nvl(POD.quantity_cancelled, 0)) *
                   nvl(POLL.price_override, 0) * nvl(POD.rate,1) /
                   nvl(X_min_unit,1))) * nvl(X_min_unit,1)  /
		   nvl(X_base_min_unit,1))
                   * nvl(X_base_min_unit,1) , 0)
            INTO   x_release_total
            FROM   PO_DISTRIBUTIONS_ALL POD, PO_LINE_LOCATIONS_ALL POLL
	    WHERE  POLL.po_release_id = x_po_release_id
            AND    POLL.shipment_type in ('SCHEDULED','BLANKET')
            AND    POLL.line_location_id = POD.line_location_id;
Line: 253

            SELECT nvl(round( round(sum((nvl(PODA.quantity_ordered, 0) -
                                         nvl(PODA.quantity_cancelled, 0)) *
                   nvl(POLLA.price_override, 0) * nvl(PODA.rate,1) /
                   nvl(X_min_unit,1))) * nvl(X_min_unit,1)  /
		   nvl(X_base_min_unit,1))
                   * nvl(X_base_min_unit,1) , 0)
            INTO   x_release_total_archive
	    FROM   PO_LINE_LOCATIONS_ARCHIVE_ALL POLLA,
     		   PO_DISTRIBUTIONS_ARCHIVE_ALL PODA
            WHERE  PODA.po_header_id = (SELECT po_header_id
                                        FROM po_releases
                                        WHERE po_release_id = x_po_release_id)
            AND    POLLA.po_header_id = PODA.po_header_id
            AND    POLLA.po_release_id = x_po_release_id
            AND    POLLA.latest_external_flag (+) = 'Y'
            AND    PODA.latest_external_flag (+) = 'Y'
            AND    POLLA.shipment_type in ('SCHEDULED','BLANKET')
            AND    POLLA.line_location_id = PODA.line_location_id;
Line: 280

            SELECT sum(
		   (nvl(POD.quantity_ordered, 0) -
                    nvl(POD.quantity_cancelled, 0)) *
                   nvl(POLL.price_override, 0))
            INTO   x_release_total
            FROM   PO_DISTRIBUTIONS_ALL POD, PO_LINE_LOCATIONS_ALL POLL
            WHERE  POLL.po_release_id = x_po_release_id
            AND    POLL.shipment_type in ('SCHEDULED','BLANKET')
            AND    POLL.line_location_id = POD.line_location_id;
Line: 296

            SELECT sum(
		   (nvl(PODA.quantity_ordered, 0) -
                    nvl(PODA.quantity_cancelled, 0)) *
                   nvl(POLLA.price_override, 0))
            INTO   x_release_total_archive
	    FROM   PO_LINE_LOCATIONS_ARCHIVE_ALL POLLA,
     		   PO_DISTRIBUTIONS_ARCHIVE_ALL PODA
            WHERE  PODA.po_header_id = (SELECT po_header_id
                                        FROM po_releases
                                        WHERE po_release_id = x_po_release_id)
            AND    POLLA.po_header_id = PODA.po_header_id
            AND    POLLA.po_release_id = x_po_release_id
            AND    POLLA.latest_external_flag (+) = 'Y'
            AND    PODA.latest_external_flag (+) = 'Y'
            AND    POLLA.shipment_type in ('SCHEDULED','BLANKET')
            AND    POLLA.line_location_id = PODA.line_location_id;
Line: 341

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY, '*** In procedure set_wf_release_control ***');
Line: 377

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'*** Finish set_wf_release_control ***');
Line: 395

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'*** In procedure get_wf_release_control ***');
Line: 434

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'*** FINISH: get_wf_release_control ***');
Line: 452

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'*** In procedure: debug_release_control ***');
Line: 457

    PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,
   	'agent_id       		: ' ||x_release_control.agent_id);
Line: 459

    PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,
   	'acceptance_required_flag 	: ' ||x_release_control.acceptance_required_flag);
Line: 461

    PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,
   	'acceptance_due_date      	: ' ||x_release_control.acceptance_due_date);
Line: 463

    PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,
   	'release_num       		: ' ||x_release_control.release_num);
Line: 465

    PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,
   	'release_date      		: ' ||x_release_control.release_date);
Line: 470

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'*** Finished: debug_release_control ***');
Line: 486

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'*** In procedure get_wf_release_parameters ***');
Line: 496

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'po_release_id = '|| to_char(x_release_parameters.po_release_id));
Line: 501

   	PO_WF_DEBUG_PKG.INSERT_DEBUG(ITEMTYPE, ITEMKEY,
   		'*** FINISH: get_wf_release_parameters ***');