DBA Data[Home] [Help]

APPS.AHL_WARRANTY_ENTL_PVT SQL Statements

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

Line: 29

PROCEDURE Update_Warranty_Entitlement (
    p_module_type         IN              VARCHAR2  := NULL,
    p_user_role           IN              VARCHAR2,
    p_x_warranty_entl_rec IN  OUT NOCOPY  Warranty_Entl_Rec_Type
);
Line: 36

PROCEDURE Delete_Warranty_Entitlement (
    p_module_type         IN              VARCHAR2  := NULL,
    p_user_role           IN              VARCHAR2,
    p_x_warranty_entl_rec IN  OUT NOCOPY  Warranty_Entl_Rec_Type
);
Line: 141

            ELSIF (l_warranty_entl_tbl(i).operation_flag = G_OP_UPDATE) THEN
                -- Procedure call to update the record in the table
                Update_Warranty_Entitlement (
                    p_module_type         => p_module_type,
                    p_user_role           => p_user_role,
                    p_x_warranty_entl_rec => l_warranty_entl_tbl(i)
                );
Line: 148

            ELSIF (l_warranty_entl_tbl(i).operation_flag = G_OP_DELETE) THEN
                -- Procedure call to delete the record from the table
                Delete_Warranty_Entitlement (
                    p_module_type         => p_module_type,
                    p_user_role           => p_user_role,
                    p_x_warranty_entl_rec => l_warranty_entl_tbl(i)
                );
Line: 244

    SELECT 'X'
    FROM   AHL_VISIT_TASKS_B TSK,
           AHL_MR_HEADERS_B MRH
    WHERE  MRH.warranty_template_id IS NOT NULL
    AND    MRH.mr_header_id         = TSK.mr_id
    AND    TSK.visit_task_id        = c_task_id;
Line: 253

    SELECT 'X'
    FROM   AHL_VISIT_TASKS_B TSK,
           AHL_MR_ROUTES MRR,
           AHL_ROUTES_B ROUTE
    WHERE  ROUTE.warranty_template_id IS NOT NULL
    AND    ROUTE.route_id             = MRR.route_id
    AND    MRR.mr_route_id            = TSK.mr_route_id
    AND    TSK.visit_task_id          = c_task_id;
Line: 743

    SELECT VTK.instance_id
    FROM   AHL_VISIT_TASKS_B VTK, AHL_WARRANTY_ENTITLEMENTS ENT
    WHERE  VTK.visit_task_id           = ENT.visit_task_id
    AND    ENT.warranty_entitlement_id = c_entl_id;
Line: 749

    SELECT VTK.instance_id
    FROM   AHL_VISIT_TASKS_B VTK, AHL_WORKORDERS WO,
           AHL_OSP_ORDER_LINES OSP, AHL_WARRANTY_ENTITLEMENTS ENT
    WHERE  VTK.visit_task_id           = WO.visit_task_id
    AND    WO.workorder_id             = OSP.workorder_id
    AND    OSP.workorder_id            IS NOT NULL
    AND    OSP.osp_order_line_id       = ENT.osp_order_line_id
    AND    ENT.warranty_entitlement_id = c_entl_id
    UNION ALL
    SELECT CSI.instance_id
    FROM   AHL_OSP_ORDER_LINES OSP, CSI_ITEM_INSTANCES CSI,
           AHL_WARRANTY_ENTITLEMENTS ENT
    WHERE  CSI.last_vld_organization_id = OSP.inventory_org_id
    AND    CSI.inventory_item_id        = OSP.inventory_item_id
    AND    CSI.serial_number            = OSP.serial_number
    AND    OSP.workorder_id            IS NULL
    AND    OSP.osp_order_line_id       = ENT.osp_order_line_id
    AND    ENT.warranty_entitlement_id = c_entl_id;
Line: 834

    SELECT OSPO.osp_order_number
    FROM   AHL_OSP_ORDERS_B OSPO, AHL_OSP_ORDER_LINES OSPL
    WHERE  OSPO.osp_order_id      = OSPL.osp_order_id
    AND    OSPL.osp_order_line_id = c_osp_line_id;
Line: 894

    SELECT osp_line_number
    FROM   AHL_OSP_ORDER_LINES
    WHERE  osp_order_line_id = c_osp_line_id;
Line: 953

    SELECT FOS.meaning
    FROM   AHL_OSP_ORDER_LINES OSPL, FND_LOOKUP_VALUES_VL FOS
    WHERE  FOS.lookup_code        = OSPL.status_code
    AND    FOS.lookup_type        = 'AHL_OSP_LINE_STATUS_TYPE'
    AND    OSPL.osp_order_line_id = c_osp_line_id;
Line: 1123

    SELECT AHL_WARRANTY_ENTITLEMENTS_S.NEXTVAL INTO p_x_warranty_entl_rec.warranty_entitlement_id FROM DUAL;
Line: 1129

    p_x_warranty_entl_rec.last_updated_by       := FND_GLOBAL.USER_ID;
Line: 1130

    p_x_warranty_entl_rec.last_update_date      := SYSDATE;
Line: 1131

    p_x_warranty_entl_rec.last_update_login     := FND_GLOBAL.LOGIN_ID;
Line: 1141

        FND_LOG.string(l_log_statement, l_full_name, 'Before Insert_Row');
Line: 1144

    AHL_WARRANTY_ENTITLEMENTS_PKG.Insert_Row(
        x_row_id                   =>  l_dummy_char,
        x_warranty_entitlement_id  =>  p_x_warranty_entl_rec.warranty_entitlement_id,
        x_object_version_number    =>  p_x_warranty_entl_rec.object_version_number,
        x_warranty_contract_id     =>  p_x_warranty_entl_rec.warranty_contract_id,
        x_old_warranty_contract_id =>  l_contract_id,
        x_entitlement_status_code  =>  p_x_warranty_entl_rec.entitlement_status_code,
        x_warranty_claim_id        =>  p_x_warranty_entl_rec.warranty_claim_id,
        x_po_header_id             =>  p_x_warranty_entl_rec.po_header_id,
        x_sr_incident_id           =>  p_x_warranty_entl_rec.sr_incident_id,
        x_visit_task_id            =>  p_x_warranty_entl_rec.visit_task_id,
        x_workorder_id             =>  p_x_warranty_entl_rec.workorder_id,
        x_osp_order_line_id        =>  p_x_warranty_entl_rec.osp_order_line_id,
        x_warranty_labour_capture  =>  p_x_warranty_entl_rec.warranty_labour_capture,
        x_warranty_mtl_capture     =>  p_x_warranty_entl_rec.warranty_mtl_capture ,
        x_order_claim_amount       =>  p_x_warranty_entl_rec.order_claim_amount,
        x_attribute_category       =>  p_x_warranty_entl_rec.attribute_category,
        x_attribute1               =>  p_x_warranty_entl_rec.attribute1,
        x_attribute2               =>  p_x_warranty_entl_rec.attribute2,
        x_attribute3               =>  p_x_warranty_entl_rec.attribute3,
        x_attribute4               =>  p_x_warranty_entl_rec.attribute4,
        x_attribute5               =>  p_x_warranty_entl_rec.attribute5,
        x_attribute6               =>  p_x_warranty_entl_rec.attribute6,
        x_attribute7               =>  p_x_warranty_entl_rec.attribute7,
        x_attribute8               =>  p_x_warranty_entl_rec.attribute8,
        x_attribute9               =>  p_x_warranty_entl_rec.attribute9,
        x_attribute10              =>  p_x_warranty_entl_rec.attribute10,
        x_attribute11              =>  p_x_warranty_entl_rec.attribute11,
        x_attribute12              =>  p_x_warranty_entl_rec.attribute12,
        x_attribute13              =>  p_x_warranty_entl_rec.attribute13,
        x_attribute14              =>  p_x_warranty_entl_rec.attribute14,
        x_attribute15              =>  p_x_warranty_entl_rec.attribute15,
        x_creation_date            =>  p_x_warranty_entl_rec.creation_date ,
        x_created_by               =>  p_x_warranty_entl_rec.created_by,
        x_last_update_date         =>  p_x_warranty_entl_rec.last_update_date,
        x_last_updated_by          =>  p_x_warranty_entl_rec.last_updated_by,
        x_last_update_login        =>  p_x_warranty_entl_rec.last_update_login
    );
Line: 1184

        FND_LOG.string(l_log_statement, l_full_name, 'After Insert_Row');
Line: 1219

PROCEDURE Update_Warranty_Entitlement (
    p_module_type         IN              VARCHAR2  := NULL,
    p_user_role           IN              VARCHAR2,
    p_x_warranty_entl_rec IN  OUT NOCOPY  Warranty_Entl_Rec_Type
) IS

CURSOR warranty_entl_csr(c_warranty_entl_id NUMBER) IS
    SELECT *
    FROM   AHL_WARRANTY_ENTITLEMENTS
    WHERE  warranty_entitlement_id = c_warranty_entl_id;
Line: 1231

l_api_name  CONSTANT VARCHAR2(30)  := 'Update_Warranty_Entitlement';
Line: 1251

            FND_LOG.string(l_log_statement, l_full_name, 'invalid entitlement id for update');
Line: 1421

            FND_LOG.string(l_log_statement, l_full_name, 'Validate_Warranty_Entitlement for update had errors');
Line: 1429

    p_x_warranty_entl_rec.last_updated_by       := FND_GLOBAL.USER_ID;
Line: 1430

    p_x_warranty_entl_rec.last_update_date      := SYSDATE;
Line: 1431

    p_x_warranty_entl_rec.last_update_login     := FND_GLOBAL.LOGIN_ID;
Line: 1441

        FND_LOG.string(l_log_statement, l_full_name, 'Before Update_Row');
Line: 1444

    AHL_WARRANTY_ENTITLEMENTS_PKG.Update_Row(
        x_warranty_entitlement_id  =>  p_x_warranty_entl_rec.warranty_entitlement_id,
        x_object_version_number    =>  p_x_warranty_entl_rec.object_version_number,
        x_warranty_contract_id     =>  p_x_warranty_entl_rec.warranty_contract_id,
        x_old_warranty_contract_id =>  l_contract_id,
        x_entitlement_status_code  =>  p_x_warranty_entl_rec.entitlement_status_code,
        x_warranty_claim_id        =>  p_x_warranty_entl_rec.warranty_claim_id,
        x_po_header_id             =>  p_x_warranty_entl_rec.po_header_id,
        x_sr_incident_id           =>  p_x_warranty_entl_rec.sr_incident_id,
        x_visit_task_id            =>  p_x_warranty_entl_rec.visit_task_id,
        x_workorder_id             =>  p_x_warranty_entl_rec.workorder_id,
        x_osp_order_line_id        =>  p_x_warranty_entl_rec.osp_order_line_id,
        x_warranty_labour_capture  =>  p_x_warranty_entl_rec.warranty_labour_capture,
        x_warranty_mtl_capture     =>  p_x_warranty_entl_rec.warranty_mtl_capture ,
        x_order_claim_amount       =>  p_x_warranty_entl_rec.order_claim_amount,
        x_attribute_category       =>  p_x_warranty_entl_rec.attribute_category,
        x_attribute1               =>  p_x_warranty_entl_rec.attribute1,
        x_attribute2               =>  p_x_warranty_entl_rec.attribute2,
        x_attribute3               =>  p_x_warranty_entl_rec.attribute3,
        x_attribute4               =>  p_x_warranty_entl_rec.attribute4,
        x_attribute5               =>  p_x_warranty_entl_rec.attribute5,
        x_attribute6               =>  p_x_warranty_entl_rec.attribute6,
        x_attribute7               =>  p_x_warranty_entl_rec.attribute7,
        x_attribute8               =>  p_x_warranty_entl_rec.attribute8,
        x_attribute9               =>  p_x_warranty_entl_rec.attribute9,
        x_attribute10              =>  p_x_warranty_entl_rec.attribute10,
        x_attribute11              =>  p_x_warranty_entl_rec.attribute11,
        x_attribute12              =>  p_x_warranty_entl_rec.attribute12,
        x_attribute13              =>  p_x_warranty_entl_rec.attribute13,
        x_attribute14              =>  p_x_warranty_entl_rec.attribute14,
        x_attribute15              =>  p_x_warranty_entl_rec.attribute15,
        x_last_update_date         =>  p_x_warranty_entl_rec.last_update_date,
        x_last_updated_by          =>  p_x_warranty_entl_rec.last_updated_by,
        x_last_update_login        =>  p_x_warranty_entl_rec.last_update_login
    );
Line: 1481

        FND_LOG.string(l_log_statement, l_full_name, 'After Update_Row');
Line: 1512

END Update_Warranty_Entitlement;
Line: 1516

PROCEDURE Delete_Warranty_Entitlement (
    p_module_type         IN              VARCHAR2  := NULL,
    p_user_role           IN              VARCHAR2,
    p_x_warranty_entl_rec IN  OUT NOCOPY  Warranty_Entl_Rec_Type
) IS

--
l_api_name   CONSTANT VARCHAR2(30)  := 'Delete_Warranty_Entitlement';
Line: 1544

        FND_LOG.string(l_log_statement, l_full_name, 'Before Delete_Row');
Line: 1548

    AHL_WARRANTY_ENTITLEMENTS_PKG.Delete_Row(
        x_warranty_entitlement_id  =>  p_x_warranty_entl_rec.warranty_entitlement_id
    );
Line: 1553

        FND_LOG.string(l_log_statement, l_full_name, 'After Delete_Row');
Line: 1559

END Delete_Warranty_Entitlement;
Line: 1571

    SELECT *
    FROM   AHL_WARRANTY_ENTITLEMENTS
    WHERE  warranty_entitlement_id = c_warranty_entl_id;
Line: 1576

    SELECT 'X'
    FROM   AHL_WARRANTY_CONTRACTS_B
    WHERE  warranty_contract_id = c_contract_id
    AND    contract_status_code = 'ACTIVE';
Line: 1707

        FND_LOG.string(l_log_statement, l_full_name, 'Before approval update');
Line: 1711

    UPDATE AHL_WARRANTY_ENTITLEMENTS SET
        warranty_contract_id     = l_contract_id,
        old_warranty_contract_id = l_contract_id,
        entitlement_status_code  = l_entl_status
    WHERE  warranty_entitlement_id = p_x_warranty_entl_rec.warranty_entitlement_id;
Line: 1718

        FND_LOG.string(l_log_statement, l_full_name, 'After approval update');
Line: 1734

    SELECT 'X'
    FROM   AHL_WARRANTY_CONTRACTS_B
    WHERE  warranty_contract_id = c_contract_id
    AND    contract_status_code = 'ACTIVE';
Line: 1740

    SELECT 'X'
    FROM   FND_LOOKUPS
    WHERE  lookup_code                       = NVL(c_entl_sts_code, 'X')
    AND    lookup_type                       = 'AHL_WARRANTY_ENTLMNT_STATUS'
    AND    NVL(end_date_active, SYSDATE + 1) > SYSDATE;
Line: 1747

    SELECT 'X'
    FROM   AHL_WARRANTY_CLAIMS_B
    WHERE  warranty_claim_id = c_claim_id
    AND    claim_status_code <> 'CANCELLED';
Line: 1753

    SELECT 'X'
    FROM   CS_INCIDENTS_ALL_B
    WHERE  incident_id        = c_incident_id
    AND    incident_status_id <> 2; -- Closed status
Line: 1759

    SELECT 'X'
    FROM   AHL_VISIT_TASKS_B
    WHERE  visit_task_id = c_task_id
    AND    status_code   NOT IN ('CANCELLED', 'DELETED');
Line: 1765

    SELECT 'X'
    FROM   AHL_WORKORDERS
    WHERE  workorder_id = c_wo_id;
Line: 1770

    SELECT 'X'
    FROM   AHL_OSP_ORDER_LINES
    WHERE  osp_order_line_id = c_line_id;