DBA Data[Home] [Help]

APPS.PO_PRICE_DIFFERENTIALS_PVT SQL Statements

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

Line: 39

    SELECT overtime_allowed_flag
    INTO   l_allow_price_diff_flag
    FROM   po_requisition_lines_all
    WHERE  requisition_line_id = p_req_line_id;
Line: 105

    SELECT count('# of Price Differentials with same Number')
    INTO   l_num_duplicates
    FROM   po_price_differentials
    WHERE  entity_type = p_entity_type
    AND    entity_id   = p_entity_id
    AND    price_differential_num = p_price_differential_num
    AND    ( ( p_row_id IS NULL ) OR ( ROWID <> p_row_id ) );
Line: 174

    SELECT count('# of Price Differentials with same Price Type')
    INTO   l_num_duplicates
    FROM   po_price_differentials
    WHERE  entity_type = p_entity_type
    AND    entity_id   = p_entity_id
    AND    price_type = p_price_type
    AND    ( ( p_row_id IS NULL ) OR ( ROWID <> p_row_id ) );
Line: 238

    INSERT INTO po_price_differentials
    (   price_differential_id
    ,   price_differential_num
    ,   entity_type
    ,   entity_id
    ,   price_type
    ,   multiplier
    ,   max_multiplier
    ,   min_multiplier
    ,   enabled_flag
    ,   last_update_date
    ,   last_updated_by
    ,   last_update_login
    ,   creation_date
    ,   created_by
	)
    SELECT PO_PRICE_DIFFERENTIALS_S.NEXTVAL
    ,      PD.price_differential_num
    ,      p_to_entity_type
    ,      p_to_entity_id
    ,      PD.price_type
    ,      PD.multiplier
    ,      PD.max_multiplier
    ,      PD.min_multiplier
    ,      PD.enabled_flag
    ,      SYSDATE
    ,      fnd_global.user_id
    ,      fnd_global.login_id
    ,      SYSDATE
    ,      fnd_global.user_id
   FROM	   po_price_differentials    PD
   WHERE   PD.entity_type = p_from_entity_type
   AND     PD.entity_id = p_from_entity_id
   AND     nvl(PD.enabled_flag,'Y') = 'Y';
Line: 314

    INSERT INTO po_price_differentials
    (    price_differential_id
    ,    price_differential_num
    ,    entity_type
    ,    entity_id
    ,    price_type
    ,    enabled_flag
    ,    min_multiplier
    ,    max_multiplier
    ,    multiplier
    ,    last_update_date
    ,    last_updated_by
    ,    last_update_login
    ,    creation_date
    ,    created_by
    )
    SELECT PO_PRICE_DIFFERENTIALS_S.nextval
    ,      PDI.price_differential_num
    ,      PDI.entity_type
    ,      p_entity_id
    ,      PDI.price_type
    ,      PDI.enabled_flag
    ,      PDI.min_multiplier
    ,      PDI.max_multiplier
    ,      PDI.multiplier
    ,      nvl(PDI.last_update_date, sysdate)
    ,      nvl(PDI.last_updated_by, FND_GLOBAL.user_id)
    ,      nvl(PDI.last_update_login, FND_GLOBAL.login_id)
    ,      nvl(PDI.creation_date, sysdate)
    ,      nvl(PDI.created_by, FND_GLOBAL.user_id)
    FROM   po_price_diff_interface    PDI
    WHERE  PDI.interface_line_id = p_interface_line_id
    AND    nvl(process_status,'ACCEPTED') = 'ACCEPTED';
Line: 398

    INSERT INTO po_price_differentials
    (   price_differential_id
    ,   price_differential_num
    ,   entity_type
    ,   entity_id
    ,   price_type
    ,   multiplier
    ,   max_multiplier
    ,   min_multiplier
    ,   enabled_flag
    ,   last_update_date
    ,   last_updated_by
    ,   last_update_login
    ,   creation_date
    ,   created_by
	)
    SELECT PO_PRICE_DIFFERENTIALS_S.NEXTVAL
    ,      PD.price_differential_num
    ,      p_to_entity_type
    ,      p_to_entity_id
    ,      PD.price_type
    ,      PD.min_multiplier        --> multiplier
    ,      NULL                     --> min_multiplier
    ,      NULL                     --> max_multiplier
    ,      PD.enabled_flag
    ,      SYSDATE
    ,      fnd_global.user_id
    ,      fnd_global.login_id
    ,      SYSDATE
    ,      fnd_global.user_id
   FROM	   po_price_differentials    PD
   WHERE   PD.entity_type = p_from_entity_type
   AND     PD.entity_id = p_from_entity_id
   AND     nvl(PD.enabled_flag,'Y') = 'Y';
Line: 466

PROCEDURE delete_price_differentials
(
    p_entity_type           IN      VARCHAR2
,   p_entity_id             IN      VARCHAR2
)
IS
BEGIN

    DELETE FROM po_price_differentials
    WHERE       entity_type = p_entity_type
    AND         entity_id = p_entity_id;
Line: 481

        PO_MESSAGE_S.sql_error('PO_PRICE_DIFFERENTIALS_PVT.delete_price_differentials','000',sqlcode);
Line: 484

END delete_price_differentials;
Line: 525

    SELECT nvl( max(price_differential_num), 0 )
    INTO   x_max
    FROM   po_price_differentials
    WHERE  entity_type = p_entity_type
    AND    entity_id = p_entity_id;
Line: 585

    SELECT min_multiplier
    ,      max_multiplier
    INTO   x_min_multiplier
    ,      x_max_multiplier
    FROM   po_price_differentials
    WHERE  entity_type = p_entity_type
    AND    entity_id = p_entity_id
    AND    price_type = p_price_type;
Line: 650

        SELECT POL.line_num
        ,      POLL.shipment_num
        ,      PJ.name
        ,      POJA.job_description
        INTO   x_line_num
        ,      x_price_break_num
        ,      x_job_name
        ,      x_job_description
        FROM   po_lines_all           POL
        ,      po_line_locations_all  POLL
        ,      per_jobs_vl            PJ
        ,      po_job_associations    POJA
        WHERE  p_entity_id = POLL.line_location_id
        AND    POLL.po_line_id = POL.po_line_id
        AND    POL.job_id = PJ.job_id
        AND    PJ.job_id = POJA.job_id;
Line: 669

        SELECT POL.line_num
        ,      NULL
        ,      PJ.name
        ,      POJA.job_description
        INTO   x_line_num
        ,      x_price_break_num
        ,      x_job_name
        ,      x_job_description
        FROM   po_lines_all         POL
        ,      per_jobs_vl          PJ
        ,      po_job_associations  POJA
        WHERE  p_entity_id = POL.po_line_id
        AND    POL.job_id = PJ.job_id
        AND    PJ.job_id = POJA.job_id;
Line: 729

    CURSOR l_price_differentials_csr IS SELECT 'Price Differential'
                                        FROM   po_price_differentials
                                        WHERE  entity_type = p_entity_type
                                        AND    entity_id = p_entity_id
                                        AND    enabled_flag = 'Y';
Line: 787

    CURSOR l_price_type_csr IS SELECT 'Price Type exists'
                               FROM   po_price_differentials
                               WHERE  entity_type = p_entity_type
                               AND    entity_id = p_entity_id
                               AND    price_type = p_price_type
                               AND    enabled_flag = 'Y';
Line: 893

    INSERT INTO po_price_diff_interface
    (
        price_diff_interface_id
    ,   price_differential_num
    ,   interface_header_id
    ,   interface_line_id
    ,   entity_type
    ,   price_type
    ,   min_multiplier
    ,   max_multiplier
    ,   multiplier
    ,   enabled_flag
    ,   process_status
    ,   last_update_date
    ,   last_updated_by
    ,   last_update_login
    ,   creation_date
    ,   created_by
    )
    SELECT PO_PRICE_DIFF_INTERFACE_S.nextval
    ,      PD.price_differential_num
    ,      p_interface_header_id
    ,      p_interface_line_id
    ,      p_entity_type
    ,      PD.price_type
    ,      NULL
    ,      NULL
    ,      decode ( PD.entity_type
                  , 'REQ LINE'     , PD.multiplier
                  , 'PO LINE'      , PD.multiplier
                  , 'PRICE BREAK'  , PD.min_multiplier
                  , 'BLANKET LINE' , PD.min_multiplier
                  )
    ,      PD.enabled_flag
    ,      'ACCEPTED'
    ,      sysdate
    ,      l_user_id
    ,      l_user_id
    ,      sysdate
    ,      l_user_id
    FROM   po_price_differentials    PD
    WHERE  PD.entity_type = l_source_entity_type
    AND    PD.entity_id = l_source_entity_id
    AND    nvl(PD.enabled_flag,'N') = 'Y';
Line: 1005

   SELECT *
   FROM PO_PRICE_DIFF_INTERFACE
   WHERE interface_line_id = p_interface_line_id;
Line: 1123

         SELECT COUNT(*)
         INTO   l_count
         FROM   PO_PRICE_DIFF_LOOKUPS_V
         WHERE  price_differential_type = l_price_diff_record.price_type;
Line: 1163

         SELECT COUNT(*)
         INTO   l_count
         FROM   PO_PRICE_DIFFERENTIALS
         WHERE  entity_type = p_entity_type
                AND entity_id = p_entity_id
                AND price_type = l_price_diff_record.price_type;
Line: 1202

           SELECT COUNT(*)
           INTO   l_count
           FROM   PO_PRICE_DIFF_INTERFACE
           WHERE  interface_line_id = p_interface_line_id
                  AND price_type = l_price_diff_record.price_type;
Line: 1468

         UPDATE PO_PRICE_DIFF_INTERFACE
         SET process_status = 'REJECTED'
         WHERE price_diff_interface_id = l_price_diff_record.price_diff_interface_id;
Line: 1475

         UPDATE PO_PRICE_DIFF_INTERFACE
         SET process_status = 'ACCEPTED',
             price_differential_num = l_price_diff_num,
             entity_type = NVL(entity_type, p_entity_type)
         WHERE price_diff_interface_id = l_price_diff_record.price_diff_interface_id;
Line: 1543

    SELECT unit_price
    INTO   l_line_price
    FROM   po_lines_all
    WHERE  po_line_id = p_entity_id;
Line: 1549

      SELECT multiplier
      INTO   l_multiplier
      FROM   po_price_differentials
      WHERE  entity_type = p_entity_type
      AND    entity_id = p_entity_id
      AND    price_type = p_price_type;
Line: 1614

    SELECT poh.global_agreement_flag,
           poh.type_lookup_code,
           pol.order_type_lookup_code,
           pol.purchase_basis
    INTO l_ga_flag,
         l_doc_subtype,
         l_value_basis,
         l_purchase_basis
    FROM PO_LINES_ALL pol,
         PO_HEADERS_ALL poh
    WHERE poh.po_header_id = pol.po_header_id
    AND po_line_id = p_doc_level_id;
Line: 1630

    SELECT poh.global_agreement_flag,
           poh.type_lookup_code,
           pol.order_type_lookup_code,
           pol.purchase_basis
    INTO l_ga_flag,
         l_doc_subtype,
         l_value_basis,
         l_purchase_basis
    FROM PO_HEADERS_ALL poh,
         PO_LINES_ALL pol,
         PO_LINE_LOCATIONS_ALL poll
    WHERE poh.po_header_id = pol.po_header_id
    AND pol.po_line_id = poll.po_line_id
    AND poll.line_location_id = p_doc_level_id;