DBA Data[Home] [Help]

APPS.AMS_ITEM_OWNER_PVT SQL Statements

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

Line: 109

   SELECT item_owner_id
   FROM ams_item_attributes
   WHERE inventory_item_id = l_inv_id
   AND   is_master_item='Y';
Line: 404

       AMS_ITEM_OWNERS_PKG.Insert_Row(
          px_ITEM_OWNER_ID  => l_ITEM_OWNER_ID,
          px_OBJECT_VERSION_NUMBER  => l_object_version_number,
          p_INVENTORY_ITEM_ID       => P_ITEM_REC_Out.INVENTORY_ITEM_ID,
          p_ORGANIZATION_ID         => p_ITEM_REC_Out.ORGANIZATION_ID,
          p_ITEM_NUMBER             => p_item_rec_out.ITEM_NUMBER,
          p_OWNER_ID                => p_ITEM_OWNER_rec.OWNER_ID,
          p_STATUS_CODE             => 'DRAFT' , -- p_ITEM_OWNER_rec.STATUS_CODE,
          p_EFFECTIVE_DATE          => SYSDATE, -- p_ITEM_OWNER_rec.EFFECTIVE_DATE,
          p_IS_MASTER_ITEM          => p_ITEM_OWNER_rec.IS_MASTER_ITEM,
          p_ITEM_SETUP_TYPE         => 'S', -- p_ITEM_OWNER_rec.ITEM_SETUP_TYPE,
          p_CUSTOM_SETUP_ID         =>  p_ITEM_OWNER_rec.CUSTOM_SETUP_ID); --'1200'
Line: 477

PROCEDURE Update_item_owner(
    P_Api_Version_Number         IN   NUMBER,
    P_Init_Msg_List              IN   VARCHAR2     := FND_API.G_FALSE,
    P_Commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN  NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    X_Return_Status              OUT NOCOPY  VARCHAR2,
    X_Msg_Count                  OUT NOCOPY  NUMBER,
    X_Msg_Data                   OUT NOCOPY  VARCHAR2,

    P_ITEM_OWNER_Rec     IN    ITEM_OWNER_Rec_Type,
    X_Object_Version_Number      OUT NOCOPY  NUMBER,

    P_ITEM_REC_In        IN      ITEM_rec_type := G_MISS_ITEM_REC,/*INV_Item_GRP.Item_rec_type := INV_Item_GRP.g_miss_Item_rec,*/
    P_ITEM_REC_Out       OUT NOCOPY     ITEM_rec_type ,/*INV_Item_GRP.Item_rec_type,*/
    x_item_return_status OUT NOCOPY     VARCHAR2,
    x_Error_tbl          OUT NOCOPY     Error_tbl_type/*INV_Item_GRP.Error_tbl_type*/

    )

 IS

Cursor C_Get_item_owner(l_ITEM_OWNER_ID Number) IS
    Select rowid,
           ITEM_OWNER_ID,
           OBJECT_VERSION_NUMBER,
           INVENTORY_ITEM_ID,
           ORGANIZATION_ID,
           ITEM_NUMBER,
           OWNER_ID,
           STATUS_CODE,
           EFFECTIVE_DATE,
                 IS_MASTER_ITEM,
                 ITEM_SETUP_TYPE
    From  AMS_ITEM_ATTRIBUTES
    WHERE ITEM_OWNER_ID = l_ITEM_OWNER_ID;  -- item owner id is the PK for am item attributes table
Line: 516

    SELECT count(*)
          FROM ams_item_attributes
         WHERE inventory_item_id = l_inv_id
           AND organization_id   = l_org_id;
Line: 526

l_api_name                CONSTANT VARCHAR2(30) := 'Update_item_owner';
Line: 540

l_can_update_inv_item    VARCHAR2(1);
Line: 546

      SAVEPOINT UPDATE_ITEM_OWNER_PVT;
Line: 579

      AMS_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
Line: 596

            it can only be updated if AMS_ALLOW_INVENTORY_UPDATE profile is Y
      ***/
      l_can_update_inv_item := FND_PROFILE.value('AMS_ALLOW_INVENTORY_UPDATE');
Line: 600

      if (l_can_update_inv_item = 'N') AND (IS_OMO_ITEM = 'N') then
        IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
           THEN
               FND_MESSAGE.Set_Name('AMS', 'AMS_CANNOT_UPDATE_INV_ITEM');
Line: 631

               FND_MESSAGE.Set_Name('AMS', 'API_MISSING_UPDATE_TARGET');
Line: 652

              FND_MESSAGE.Set_Token('COLUMN', 'Last_Update_Date', FALSE);
Line: 676

          FND_MESSAGE.Set_Name('AMS', 'AMS_CANNOT_UPDATE_PRODUCT');
Line: 828

      INV_Item_GRP.update_Item
               (    p_commit           =>  P_Commit
                  , p_validation_level =>  p_validation_level
                  , p_Item_rec         =>  l_inv_item_rec_in        /*P_ITEM_REC_In*/
                  , x_Item_rec         =>  l_inv_item_rec_out       /*P_ITEM_REC_Out*/
                  , x_return_status    =>  l_item_return_status
                  , x_Error_tbl        =>  l_Error_tbl    /*x_Error_tbl*/
               );
Line: 910

      AMS_ITEM_OWNERS_PKG.Update_Row(
          p_ITEM_OWNER_ID  => p_ITEM_OWNER_rec.ITEM_OWNER_ID,
          p_OBJECT_VERSION_NUMBER  => p_ITEM_OWNER_rec.OBJECT_VERSION_NUMBER,
          p_INVENTORY_ITEM_ID  => p_ITEM_OWNER_rec.INVENTORY_ITEM_ID,
          p_ORGANIZATION_ID  => p_ITEM_OWNER_rec.ORGANIZATION_ID,
          p_ITEM_NUMBER  => p_ITEM_OWNER_rec.ITEM_NUMBER,
          p_OWNER_ID  => p_ITEM_OWNER_rec.OWNER_ID,
          p_STATUS_CODE  => p_ITEM_OWNER_rec.STATUS_CODE,
          p_EFFECTIVE_DATE  => SYSDATE , -- p_ITEM_OWNER_rec.EFFECTIVE_DATE,
          p_IS_MASTER_ITEM          => p_ITEM_OWNER_rec.IS_MASTER_ITEM,
          p_ITEM_SETUP_TYPE         => p_ITEM_OWNER_rec.ITEM_SETUP_TYPE
                                );
Line: 975

End Update_item_owner;
Line: 978

PROCEDURE Delete_item_owner(
    P_Api_Version_Number         IN   NUMBER,
    P_Init_Msg_List              IN   VARCHAR2     := FND_API.G_FALSE,
    P_Commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,
    X_Return_Status              OUT NOCOPY  VARCHAR2,
    X_Msg_Count                  OUT NOCOPY  NUMBER,
    X_Msg_Data                   OUT NOCOPY  VARCHAR2,
    P_ITEM_OWNER_ID  IN  NUMBER,
    P_Object_Version_Number      IN   NUMBER
    )

 IS
l_api_name                CONSTANT VARCHAR2(30) := 'Delete_item_owner';
Line: 997

      SAVEPOINT DELETE_ITEM_OWNER_PVT;
Line: 1030

      AMS_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
Line: 1034

      AMS_ITEM_OWNERS_PKG.Delete_Row(
          p_ITEM_OWNER_ID  => p_ITEM_OWNER_ID);
Line: 1060

    ROLLBACK TO DELETE_ITEM_OWNER_PVT;
Line: 1069

    ROLLBACK TO DELETE_ITEM_OWNER_PVT;
Line: 1078

    ROLLBACK TO DELETE_ITEM_OWNER_PVT;
Line: 1090

End Delete_item_owner;
Line: 1102

    SELECT *
    FROM ams_item_ATTRIBUTES
   WHERE ITEM_OWNER_ID = p_ITEM_OWNER_Rec.ITEM_OWNER_ID;
Line: 1221

/*    -- if the contract Item type code is Warranty, inv api automatically updates
      -- vendor_warrantty_flag,service_item_flag to 'Y'
      -- if warranty is Y, then service has to be Y
      IF   (( P_ITEM_REC_In.VENDOR_WARRANTY_FLAG  = 'Y')
      AND   ( P_ITEM_REC_In.SERVICE_ITEM_FLAG  = 'N'))
      THEN
           IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
           THEN
               FND_MESSAGE.Set_Name('AMS', 'AMS_WARRANTY_SRV_ERR');
Line: 1369

SELECT status_control_code
FROM mtl_item_attributes
WHERE attribute_name = 'MTL_SYSTEM_ITEMS.'||p_attribute_name;
Line: 1402

SELECT attribute_code,default_flag,parent_select_all
FROM ams_prod_template_attr
WHERE template_id = p_template_id ;
Line: 1414

SELECT id
FROM oks_coverage_templts_v
WHERE item_type = l_item_type;
Line: 1421

SELECT cleb.id id
  FROM okc_k_lines_b cleb ,
       okc_k_lines_tl clet
 WHERE cleb.chr_id < 0
   AND cleb.lse_id IN (2,15,65,66)
   AND clet.id = cleb.id
   AND clet.language = userenv('LANG')
   AND cleb.lse_id = decode(l_item_type,'SERVICE',2,'WARRANTY',15,'USAGE',66)
UNION
SELECT cleb.id id
  FROM oks_subscr_header_v cleb
 WHERE cleb.dnz_chr_id = -1
   AND 'SUBSCRIPTION' = l_item_type;
Line: 1441

SELECT uom_code
FROM mtl_all_primary_uoms_vv
WHERE inventory_item_id = 0
AND UOM_CLASS = Fnd_profile.value('TIME_UOM_CLASS');
Line: 1448

SELECT DISTINCT UOMT.uom_code
FROM MTL_UOM_CONVERSIONS CONV , MTL_UNITS_OF_MEASURE_TL UOMT
WHERE NVL(CONV.DISABLE_DATE, SYSDATE+1) > SYSDATE
AND CONV.UOM_CODE = UOMT.UOM_CODE
AND UOMT.LANGUAGE = USERENV('LANG')
AND NVL(UOMT.DISABLE_DATE, SYSDATE+1) > SYSDATE
AND CONV.inventory_item_id = 0
AND UOMT.UOM_CLASS = Fnd_profile.value('TIME_UOM_CLASS');
Line: 1484

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.inventory_item_flag := 'Y';
Line: 1490

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.stock_enabled_flag := 'Y';
Line: 1496

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.mtl_transactions_enabled_flag := 'Y';
Line: 1502

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.revision_qty_control_code := 2;
Line: 1508

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.bom_enabled_flag := 'Y';
Line: 1514

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.pick_components_flag := 'Y';
Line: 1520

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.costing_enabled_flag := 'Y';
Line: 1526

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.collateral_flag := 'Y';
Line: 1532

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.electronic_flag := 'Y';
Line: 1538

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.downloadable_flag := 'Y';
Line: 1544

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.indivisible_flag := 'Y';
Line: 1550

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.unit_weight := 'Y';
Line: 1556

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.weight_uom_code := 'Y';
Line: 1562

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.customer_order_flag := 'Y';
Line: 1568

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.customer_order_enabled_flag := 'Y';
Line: 1574

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.internal_order_flag := 'Y';
Line: 1580

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.internal_order_enabled_flag := 'Y';
Line: 1586

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.shippable_item_flag := 'Y';
Line: 1592

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.returnable_flag := 'Y';
Line: 1598

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.comms_activation_reqd_flag := 'Y';
Line: 1604

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.replenish_to_order_flag := 'Y';
Line: 1610

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.invoiceable_item_flag := 'Y';
Line: 1616

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.invoice_enabled_flag := 'Y';
Line: 1622

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            --l_inv_item_rec_in.service_item_flag := 'Y';
Line: 1640

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.defect_tracking_on_flag := 'Y';
Line: 1646

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.serviceable_product_flag := 'Y';
Line: 1652

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.comms_nl_trackable_flag := 'Y';
Line: 1659

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            --l_inv_item_rec_in.vendor_warranty_flag := 'Y';
Line: 1678

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.subscription_depend_flag := 'Y';
Line: 1685

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.orderable_on_web_flag := 'Y';
Line: 1691

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.back_orderable_flag := 'Y';
Line: 1697

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.web_status := 'PUBLISHED'; --thats the default value for web status
Line: 1703

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.material_billable_flag := 'Y'; -- dropdown
Line: 1709

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.contract_item_type_code := 'Y'; -- dropdown
Line: 1715

         OR l_get_product_attr.parent_select_all = 'Y')
         THEN
            l_inv_item_rec_in.service_duration_period_code := 'Y';  --dropdown
Line: 1721

         OR l_get_product_attr.parent_select_all = 'Y')   -- input field
         THEN
            l_inv_item_rec_in.service_duration := 'Y';
Line: 1727

         OR l_get_product_attr.parent_select_all = 'Y')   -- input field
         THEN
            l_inv_item_rec_in.so_transactions_flag := 'Y';
Line: 1750

SELECT tr.template_id
FROM   ams_templ_responsibility tr
      , ams_prod_templates_b tb
WHERE responsibility_id = p_resp_id
AND   tr.template_id  = tb.template_id
AND   tb.product_service_flag = p_flag;