DBA Data[Home] [Help]

APPS.INV_RULE_GEN_PVT SQL Statements

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

Line: 41

  Select 1
  From mtl_inv_picking_rules
  Where inv_rule_id = p_inv_rule_id;
Line: 72

        inv_rule_gen_pvt.Restrictions_insert
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 78

        inv_rule_gen_pvt.consistency_insert
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 84

        inv_rule_gen_pvt.sorting_criteria_insert
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 91

        inv_rule_gen_pvt.restrictions_update
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 97

        inv_rule_gen_pvt.consistency_update
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 104

         inv_rule_gen_pvt.sorting_criteria_update
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 145

        select mtl_inv_picking_rules_s.nextval into l_inv_Rule_id from dual;
Line: 146

        debug('insert rule: rule_id '||l_inv_rule_id);
Line: 147

        debug('insert rule: fnd_global.user_id '||fnd_global.user_id);
Line: 148

        Insert into mtl_inv_picking_rules
           (
               INV_RULE_ID
             , SHELF_DAYS
             , SINGLE_LOT
             , PARTIAL_ALLOWED_FLAG
             , CUST_SPEC_MATCH_FLAG
             , LOT_SORT
             , LOT_SORT_RANK
             , REVISION_SORT
             , REVISION_SORT_RANK
             , SUBINVENTORY_SORT
             , SUBINVENTORY_SORT_RANK
             , LOCATOR_SORT
             , LOCATOR_SORT_RANK
             , WMS_RULE_ID
             , WMS_STRATEGY_ID
             , APPLY_TO_SOURCE
             , CREATION_DATE
             , CREATED_BY
             , LAST_UPDATE_DATE
             , LAST_UPDATED_BY
             , LAST_UPDATE_LOGIN
             , PROGRAM_APPLICATION_ID
             , PROGRAM_ID
             , REQUEST_ID
           )
           values
           (
               l_inv_rule_id
             , p_mtl_picking_rule_rec.shelf_days
             , p_mtl_picking_rule_rec.single_lot
             , p_mtl_picking_rule_rec.partial_allowed_flag
             , p_mtl_picking_rule_rec.cust_spec_match_flag
             , p_mtl_picking_rule_rec.lot_sort
             , p_mtl_picking_rule_rec.lot_sort_rank
             , p_mtl_picking_rule_rec.revision_sort
             , p_mtl_picking_rule_rec.revision_sort_rank
             , p_mtl_picking_rule_rec.subinventory_sort
             , p_mtl_picking_rule_rec.subinventory_sort_rank
             , p_mtl_picking_rule_rec.locator_sort
             , p_mtl_picking_rule_rec.locator_sort_rank
             , p_mtl_picking_rule_rec.wms_rule_id
             , p_mtl_picking_rule_rec.wms_strategy_id
             , p_mtl_picking_rule_rec.apply_to_source
             , sysdate
             , fnd_global.user_id
             , sysdate
             , fnd_global.user_id
             , fnd_global.login_id
             , null
             , null
             , null
           );
Line: 203

           debug('insert, inv_rule_id '||l_inv_rule_id);
Line: 204

     else -- update
        update mtl_inv_picking_rules
        set
            SHELF_DAYS                 = p_mtl_picking_rule_rec.shelf_days
          , SINGLE_LOT                 = p_mtl_picking_rule_rec.single_lot
          , PARTIAL_ALLOWED_FLAG       = p_mtl_picking_rule_rec.partial_allowed_flag
          , CUST_SPEC_MATCH_FLAG       = p_mtl_picking_rule_rec.cust_spec_match_flag
          , LOT_SORT                   = p_mtl_picking_rule_rec.lot_sort
          , LOT_SORT_RANK              = p_mtl_picking_rule_rec.lot_sort_rank
          , REVISION_SORT              = p_mtl_picking_rule_rec.revision_sort
          , REVISION_SORT_RANK         = p_mtl_picking_rule_rec.revision_sort_rank
          , SUBINVENTORY_SORT          = p_mtl_picking_rule_rec.subinventory_sort
          , SUBINVENTORY_SORT_RANK     = p_mtl_picking_rule_rec.subinventory_sort_rank
          , LOCATOR_SORT               = p_mtl_picking_rule_rec.locator_sort
          , LOCATOR_SORT_RANK          = p_mtl_picking_rule_rec.locator_sort_rank
          , WMS_RULE_ID                = p_mtl_picking_rule_rec.wms_rule_id
          , WMS_STRATEGY_ID            = NULL /* p_mtl_picking_rule_rec.wms_strategy_id */
          , APPLY_TO_SOURCE            = p_mtl_picking_rule_rec.apply_to_source
          , LAST_UPDATE_DATE           = sysdate
          , LAST_UPDATED_BY            = fnd_global.user_id
          , LAST_UPDATE_LOGIN          = fnd_global.login_id
        where inv_rule_id = l_inv_rule_id;
Line: 269

        select wms_rules_s.nextval into l_wms_rule_Id from dual;
Line: 270

        debug('insert wms rule ');
Line: 271

        wms_RULES_PKG.Insert_Row
        (
            X_Rowid                => l_Row_Id,
            X_Rule_Id              => l_wms_rule_Id,
            X_Organization_Id      => l_Organization_Id,
            X_Type_Code            => 2,
            X_Name                 => l_picking_rule_rec.Name,
            X_Description          => l_picking_rule_rec.Description,
            X_Qty_Function_Parameter_Id => 10009,
            X_Enabled_Flag         => l_picking_rule_rec.Enabled_Flag,
            X_min_pick_tasks_flag  => 'N',
            X_User_Defined_Flag    => 'Y',
            X_Creation_Date        => sysdate,
            X_Created_By           => fnd_global.user_id,
            X_Last_Update_Date     => sysdate,
            X_Last_Updated_By      => fnd_global.user_id,
            X_Last_Update_Login    => fnd_global.login_id,
            X_Type_header_id       => null,
            X_Rule_Weight          => null,
            X_Attribute1           => null,
            X_Attribute2           => null,
            X_Attribute3           => null,
            X_Attribute4           => null,
            X_Attribute5           => null,
            X_Attribute6           => null,
            X_Attribute7           => null,
            X_Attribute8           => null,
            X_Attribute9           => null,
            X_Attribute10          => null,
            X_Attribute11          => null,
            X_Attribute12          => null,
            X_Attribute13          => null,
            X_Attribute14          => null,
            X_Attribute15          => null,
            X_Attribute_Category   => null,
            X_Allocation_mode_id   => l_Allocation_mode_id,
            X_wms_enabled_flag     => 'N'
        );
Line: 310

        /* update the rec */
        l_picking_rule_rec.wms_rule_id := l_wms_rule_id;
Line: 312

        debug('insert wms_rule_id '||l_wms_rule_id);
Line: 313

     else -- update
        debug('update wms rule ');
Line: 315

        debug('update wms rule, enabled_flag '||l_picking_rule_rec.enabled_flag);
Line: 316

        wms_RULES_PKG.Update_Row
        (
            X_Rule_Id              => l_picking_rule_rec.wms_Rule_Id,
            X_Organization_Id      => l_Organization_Id,
            X_Type_Code            => 2,
            X_Name                 => l_picking_rule_rec.Name,
            X_Description          => l_picking_rule_rec.Description,
            X_Qty_Function_Parameter_Id => 10009,
            X_Enabled_Flag         => l_picking_rule_rec.Enabled_Flag,
            X_User_Defined_Flag    => 'Y',
            X_min_pick_tasks_flag  => 'N',
            X_Last_Updated_By      => fnd_global.user_id,
            X_Last_Update_Date     => sysdate,
            X_Last_Update_Login    => fnd_global.user_id,
            X_Type_header_id       => null,
            X_Rule_Weight          => null,
            X_Attribute1           => null,
            X_Attribute2           => null,
            X_Attribute3           => null,
            X_Attribute4           => null,
            X_Attribute5           => null,
            X_Attribute6           => null,
            X_Attribute7           => null,
            X_Attribute8           => null,
            X_Attribute9           => null,
            X_Attribute10          => null,
            X_Attribute11          => null,
            X_Attribute12          => null,
            X_Attribute13          => null,
            X_Attribute14          => null,
            X_Attribute15          => null,
            X_Attribute_Category   => null,
            X_Allocation_mode_id   => l_Allocation_mode_id
        );
Line: 353

     l_picking_rule_rec.last_updated_by := fnd_global.user_id;
Line: 354

     l_picking_rule_rec.last_update_login := fnd_global.login_id;
Line: 356

     l_picking_rule_rec.last_update_date := sysdate;
Line: 380

  PROCEDURE Restrictions_insert
  (p_mtl_picking_rule_rec    IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status          OUT NOCOPY VARCHAR2
  , x_msg_data               OUT NOCOPY VARCHAR2
  , x_msg_count              OUT NOCOPY NUMBER)
   IS

  l_api_name                    CONSTANT VARCHAR2 (30) := 'Restrictions_insert';
Line: 421

        debug('Procedure restrictions_insert i loop '||i);
Line: 557

              l_logical_operator_code       := 1;  -- 'AND' grade is inserted already
Line: 578

              l_logical_operator_code       := 2;  -- 'AND' grade is inserted already
Line: 600

              l_logical_operator_code       := 2;  -- 'AND' grade is inserted already
Line: 652

              debug('call wms restriction insert '||l_go_ahead);
Line: 653

              wms_RESTRICTIONS_PKG.Insert_Row(
               X_Rowid                => l_Row_Id,
               X_Rule_Id              => l_picking_rule_rec.WMS_Rule_Id,
               X_Sequence_Number      => l_Sequence_Number,
               X_Last_Updated_By      => fnd_global.user_id,
               X_Last_Update_Date     => sysdate,
               X_Created_By           => fnd_global.user_id,
               X_Creation_Date        => sysdate,
               X_Last_Update_Login    => fnd_global.login_id,
               X_Parameter_Id         => l_Parameter_Id,
               X_Operator_Code        => l_Operator_Code,
               X_Operand_Type_Code    => l_Operand_Type_Code,
               X_Operand_Constant_Number=> l_Operand_Constant_Number,
               X_Operand_Constant_Character=> l_Operand_Constant_Character,
               X_Operand_Constant_Date=> l_Operand_Constant_Date,
               X_Operand_Parameter_Id => l_Operand_Parameter_Id,
               X_Operand_Expression   => l_Operand_Expression,
               X_Operand_Flex_Value_Set_Id=> l_Operand_Flex_Value_Set_Id,
               X_Logical_Operator_Code=> l_Logical_Operator_Code,
               X_Bracket_Open         => l_Bracket_Open,
               X_Bracket_Close        => l_Bracket_Close,
               X_Attribute_Category   => null,
               X_Attribute1           => null,
               X_Attribute2           => null,
               X_Attribute3           => null,
               X_Attribute4           => null,
               X_Attribute5           => null,
               X_Attribute6           => null,
               X_Attribute7           => null,
               X_Attribute8           => null,
               X_Attribute9           => null,
               X_Attribute10          => null,
               X_Attribute11          => null,
               X_Attribute12          => null,
               X_Attribute13          => null,
               X_Attribute14          => null,
               X_Attribute15          => null
               );
Line: 711

  END restrictions_insert;
Line: 713

  /*Restrictions update for the form will consist two parts,
   * 1) delete the current rows for the rule_id
   * 2) insert the new rows for the current p_mtl_picking_rule_rec
   */
  PROCEDURE Restrictions_update
  (p_mtl_picking_rule_rec    IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status          OUT NOCOPY VARCHAR2
  , x_msg_data               OUT NOCOPY VARCHAR2
  , x_msg_count              OUT NOCOPY NUMBER)
   IS
  l_api_name                    CONSTANT VARCHAR2 (30) := 'Restrictions_Update';
Line: 726

        inv_rule_gen_pvt.Restrictions_delete
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 732

        inv_rule_gen_pvt.Restrictions_insert
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 756

  END restrictions_update;
Line: 758

  PROCEDURE Restrictions_delete
  (p_mtl_picking_rule_rec    IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status          OUT NOCOPY VARCHAR2
  , x_msg_data               OUT NOCOPY VARCHAR2
  , x_msg_count              OUT NOCOPY NUMBER)
   IS
  l_api_name                    CONSTANT VARCHAR2 (30) := 'Restrictions_Delete';
Line: 767

     Delete wms_restrictions where rule_id = p_mtl_picking_rule_rec.wms_rule_id;
Line: 786

  END restrictions_delete;
Line: 788

  PROCEDURE consistency_insert
  (p_mtl_picking_rule_rec    IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status          OUT NOCOPY VARCHAR2
  , x_msg_data               OUT NOCOPY VARCHAR2
  , x_msg_count              OUT NOCOPY NUMBER
  )
   IS
   l_api_name                    CONSTANT VARCHAR2 (30) := 'consistency_insert';
Line: 806

        select wms_rule_consistencies_s.nextval into l_consistency_Id from dual;
Line: 808

        WMS_RULE_CONSISTENCIES_PKG.INSERT_ROW(
          X_ROWID              => l_ROW_ID,
          X_CONSISTENCY_ID     => l_CONSISTENCY_ID,
          X_RULE_ID            => l_picking_rule_rec.WMS_RULE_ID,
          X_CREATION_DATE      => sysdate,
          X_CREATED_BY         => fnd_global.user_id,
          X_LAST_UPDATE_DATE   => sysdate,
          X_LAST_UPDATED_BY    => fnd_global.user_id,
          X_LAST_UPDATE_LOGIN  => fnd_global.login_id,
          X_PARAMETER_ID       => l_parameter_id,
          X_ATTRIBUTE_CATEGORY => '',
          X_ATTRIBUTE1         => '',
          X_ATTRIBUTE2         => '',
          X_ATTRIBUTE3         => '',
          X_ATTRIBUTE4         => '',
          X_ATTRIBUTE5         => '',
          X_ATTRIBUTE6         => '',
          X_ATTRIBUTE7         => '',
          X_ATTRIBUTE8         => '',
          X_ATTRIBUTE9         => '',
          X_ATTRIBUTE10        => '',
          X_ATTRIBUTE11        => '',
          X_ATTRIBUTE12        => '',
          X_ATTRIBUTE13        => '',
          X_ATTRIBUTE14        => '',
          X_ATTRIBUTE15        => ''
         );
Line: 855

  END consistency_insert;
Line: 857

  PROCEDURE Consistency_update
  (p_mtl_picking_rule_rec    IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status          OUT NOCOPY VARCHAR2
  , x_msg_data               OUT NOCOPY VARCHAR2
  , x_msg_count              OUT NOCOPY NUMBER
  )
   IS
  l_api_name                    CONSTANT VARCHAR2 (30) := 'Consistency_Update';
Line: 867

        inv_rule_gen_pvt.consistency_delete
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 873

        inv_rule_gen_pvt.consistency_insert
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 897

  END consistency_update;
Line: 899

  PROCEDURE Consistency_delete
  (p_mtl_picking_rule_rec    IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status          OUT NOCOPY VARCHAR2
  , x_msg_data               OUT NOCOPY VARCHAR2
  , x_msg_count              OUT NOCOPY NUMBER
  )
   IS
  l_api_name                    CONSTANT VARCHAR2 (30) := 'Consistency_Delete';
Line: 909

     Delete wms_rule_consistencies where rule_id = p_mtl_picking_Rule_rec.wms_rule_id;
Line: 928

  END consistency_delete;
Line: 930

  PROCEDURE Sorting_criteria_insert
  (p_mtl_picking_rule_rec    IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status          OUT NOCOPY VARCHAR2
  , x_msg_data               OUT NOCOPY VARCHAR2
  , x_msg_count              OUT NOCOPY NUMBER)
   IS
  l_api_name                CONSTANT VARCHAR2 (30) := 'Sorting_criteria_insert';
Line: 946

     debug('sort insert, lot_sort_rank '||p_mtl_picking_rule_rec.lot_sort_rank);
Line: 947

     debug('sort insert, revision_sort_rank '||p_mtl_picking_rule_rec.revision_sort_rank);
Line: 948

     debug('sort insert, sub_sort_rank '||p_mtl_picking_rule_rec.subinventory_sort_rank);
Line: 949

     debug('sort insert, locator_sort_rank '||p_mtl_picking_rule_rec.locator_sort_rank);
Line: 951

        l_go_ahead := 0;              -- NO insert
Line: 1036

           debug('sort insert, '|| i);
Line: 1037

           debug('sort insert, sequence '||l_sequence);
Line: 1038

           debug('sort insert, wms_rule_id '||p_mtl_picking_rule_rec.wms_rule_id);
Line: 1039

           wms_SORT_CRITERIA_PKG.Insert_Row
           (
              X_Rowid                => l_Row_Id,
              X_Rule_Id              => p_mtl_picking_rule_rec.WMS_Rule_Id,
              X_Sequence_Number      => l_Sequence,
              X_Parameter_Id         => l_Parameter_Id,
              X_Order_Code           => l_Order_Code,
              X_Created_By           => fnd_global.user_id,
              X_Creation_Date        => sysdate,
              X_Last_Updated_By      => fnd_global.user_id,
              X_Last_Update_Date     => sysdate,
              X_Last_Update_Login    => fnd_global.login_id,
              X_Attribute1           => null,
              X_Attribute2           => null,
              X_Attribute3           => null,
              X_Attribute4           => null,
              X_Attribute5           => null,
              X_Attribute6           => null,
              X_Attribute7           => null,
              X_Attribute8           => null,
              X_Attribute9           => null,
              X_Attribute10          => null,
              X_Attribute11          => null,
              X_Attribute12          => null,
              X_Attribute13          => null,
              X_Attribute14          => null,
              X_Attribute15          => null,
              X_Attribute_Category   => null
           );
Line: 1088

  END sorting_criteria_insert;
Line: 1090

  /* Update consist two parts
   * 1) Delete the current row for the rule_id
   * 2) Insert new rows for the current setup
   */

  PROCEDURE sorting_criteria_update
  (p_mtl_picking_rule_rec    IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status          OUT NOCOPY VARCHAR2
  , x_msg_data               OUT NOCOPY VARCHAR2
  , x_msg_count              OUT NOCOPY NUMBER)
   IS
  l_api_name                CONSTANT VARCHAR2 (30) := 'Sorting_criteria_Update';
Line: 1104

        inv_rule_gen_pvt.sorting_criteria_delete
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 1110

        inv_rule_gen_pvt.sorting_criteria_insert
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 1134

  END sorting_criteria_update;
Line: 1136

  PROCEDURE Sorting_criteria_delete
  (p_mtl_picking_rule_rec    IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status          OUT NOCOPY VARCHAR2
  , x_msg_data               OUT NOCOPY VARCHAR2
  , x_msg_count              OUT NOCOPY NUMBER)
   IS
  l_api_name                CONSTANT VARCHAR2 (30) := 'Sorting_criteria_Delete';
Line: 1145

     debug('delete sorting criteria');
Line: 1146

     Delete wms_sort_criteria where rule_id = p_mtl_picking_Rule_rec.wms_rule_id;
Line: 1165

  END sorting_criteria_delete;
Line: 1167

  PROCEDURE Strategy_insert
  (p_mtl_picking_rule_rec       IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status             OUT NOCOPY VARCHAR2
  , x_msg_data                  OUT NOCOPY VARCHAR2
  , x_msg_count                 OUT NOCOPY NUMBER
  )
  IS
  l_api_name                CONSTANT VARCHAR2 (30) := 'Strategy_insert';
Line: 1181

     debug('Procedure Strategy_insert');
Line: 1186

     select WMS_strategies_s.nextval into l_strategy_id from sys.dual;
Line: 1190

     WMS_STRATEGIES_PKG.Insert_Row
     (
          X_Rowid                => l_ROWID
        , X_Strategy_Id          => l_Strategy_Id
        , X_Organization_Id      => -1
        , X_Type_Code            => 2
        , X_Name                 => l_strategy_name
        , X_Description          => l_strategy_name
        , X_Enabled_Flag         => 'Y'
        , X_User_Defined_Flag    => 'Y'
        , X_Created_By           => fnd_global.user_id
        , X_Creation_Date        => SYSDATE
        , X_Last_Updated_By      => fnd_global.user_id
        , X_Last_Update_Date     => SYSDATE
        , X_Last_Update_Login    => fnd_global.login_id
        , X_Attribute1           => null
        , X_Attribute2           => null
        , X_Attribute3           => null
        , X_Attribute4           => null
        , X_Attribute5           => null
        , X_Attribute6           => null
        , X_Attribute7           => null
        , X_Attribute8           => null
        , X_Attribute9           => null
        , X_Attribute10          => null
        , X_Attribute11          => null
        , X_Attribute12          => null
        , X_Attribute13          => null
        , X_Attribute14          => null
        , X_Attribute15          => null
        , X_Attribute_Category   => null
     );
Line: 1223

     /* insert strategy_members */
     debug('calling insert strategy members ');
Line: 1225

     WMS_STRATEGY_MEMBERS_PKG.Insert_Row(
          X_Rowid                => l_RowId
        , X_Strategy_Id          => l_Strategy_Id
        , X_Sequence_Number      => 10
        , X_Rule_Id              => p_mtl_picking_rule_rec.wms_Rule_Id
        , X_Partial_Success_Allowed_Flag=> p_mtl_picking_rule_rec.Partial_Allowed_Flag
        , X_Effective_From       => null
        , X_Effective_To         => null
        , X_Created_By           => fnd_global.user_id
        , X_Creation_Date        => sysdate
        , X_Last_Updated_By      => fnd_global.user_id
        , X_Last_Update_Date     => sysdate
        , X_Last_Update_Login    => fnd_global.login_id
        , X_Attribute1           => null
        , X_Attribute2           => null
        , X_Attribute3           => null
        , X_Attribute4           => null
        , X_Attribute5           => null
        , X_Attribute6           => null
        , X_Attribute7           => null
        , X_Attribute8           => null
        , X_Attribute9           => null
        , X_Attribute10          => null
        , X_Attribute11          => null
        , X_Attribute12          => null
        , X_Attribute13          => null
        , X_Attribute14          => null
        , X_Attribute15          => null
        , X_Attribute_Category   => null
        , X_Date_Type_Code       => 11              -- always
        , X_Date_Type_Lookup_Type => null
        , X_Date_Type_From        => null
        , X_Date_Type_To          => null
         );
Line: 1277

  End strategy_insert;
Line: 1279

  /* Only enabled flag can be updated. */
  /* disable the strategy when rule is disabled */
  PROCEDURE Strategy_update
  (p_mtl_picking_rule_rec       IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status             OUT NOCOPY VARCHAR2
  , x_msg_data                  OUT NOCOPY VARCHAR2
  , x_msg_count                 OUT NOCOPY NUMBER
  )
   IS
  l_api_name                CONSTANT VARCHAR2 (30) := 'Strategy_Update';
Line: 1292

        WMS_STRATEGIES_PKG.Update_Row(
            X_Strategy_Id          => p_mtl_picking_rule_rec.wms_Strategy_Id,
            X_Organization_Id      => -1,
            X_Type_Code            => 2,
            X_Name                 => p_mtl_picking_rule_rec.name,
            X_Description          => p_mtl_picking_rule_rec.name,
            X_Enabled_Flag         => p_mtl_picking_rule_rec.enabled_flag,
            X_User_Defined_Flag    => 'Y',
            X_Last_Updated_By      => fnd_global.user_id,
            X_Last_Update_Date     => sysdate,
            X_Last_Update_Login    => fnd_global.user_id,
            X_Attribute1           => null,
            X_Attribute2           => null,
            X_Attribute3           => null,
            X_Attribute4           => null,
            X_Attribute5           => null,
            X_Attribute6           => null,
            X_Attribute7           => null,
            X_Attribute8           => null,
            X_Attribute9           => null,
            X_Attribute10          => null,
            X_Attribute11          => null,
            X_Attribute12          => null,
            X_Attribute13          => null,
            X_Attribute14          => null,
            X_Attribute15          => null,
            X_Attribute_Category   => null
            );
Line: 1341

  /*  when rule is deleted, strategy is also deleted */
  PROCEDURE Strategy_delete
  (p_mtl_picking_rule_rec       IN OUT NOCOPY INV_RULE_GEN_PVT.picking_rule_rec
  , x_return_status             OUT NOCOPY VARCHAR2
  , x_msg_data                  OUT NOCOPY VARCHAR2
  , x_msg_count                 OUT NOCOPY NUMBER
  )
   IS
  l_api_name                CONSTANT VARCHAR2 (30) := 'Strategy_Delete';
Line: 1379

  l_api_name               CONSTANT VARCHAR2 (30) := 'Strategy_Delete';
Line: 1428

                 inv_rule_gen_pvt.Strategy_insert
                 (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
                 , x_return_status      => x_return_status
                 , x_msg_data           => x_msg_data
                 , x_msg_count          => x_msg_count
                 );
Line: 1435

                 inv_rule_gen_pvt.Strategy_Update
                 (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
                 , x_return_status      => x_return_status
                 , x_msg_data           => x_msg_data
                 , x_msg_count          => x_msg_count
                 );
Line: 1443

              debug('after strategy_insert '||p_mtl_picking_rule_rec.wms_strategy_id);
Line: 1444

              update wms_rules_b
              set enabled_flag = 'Y'
              where rule_id=p_mtl_picking_rule_rec.wms_rule_id;
Line: 1453

           inv_rule_gen_pvt.Strategy_Update
           (p_mtl_picking_rule_rec=> p_mtl_picking_rule_rec
           , x_return_status      => x_return_status
           , x_msg_data           => x_msg_data
           , x_msg_count          => x_msg_count
           );
Line: 1460

           debug('after strategy_update '||p_mtl_picking_rule_rec.wms_strategy_id);
Line: 1461

           update wms_rules_b
           set enabled_flag = 'N'
           where rule_id=p_mtl_picking_rule_rec.wms_rule_id;
Line: 1495

    SELECT 'X'
    FROM   wms_strategy_members MPSM, wms_strategies_b S
    WHERE  MPSM.rule_id = p_rule_id
    AND    S.Strategy_Id = MPSM.Strategy_Id
    AND    S.Enabled_Flag = 'Y'
    AND    NVL(MPSM.Effective_From,TO_DATE('01011900','DDMMYYYY')) <= TRUNC(sysdate)
    AND    NVL(MPSM.Effective_To,TO_DATE('31124000','DDMMYYYY')) >= TRUNC(sysdate)
    AND    rownum < 2;
Line: 1505

   SELECT 'X'
     FROM  wms_selection_criteria_txn WSCT
    WHERE  WSCT.return_type_code  = 'S'
      AND  WSCT.return_type_id = p_strategy_id
      AND  WSCT.enabled_flag = 1
      AND  NVL(WSCT.Effective_From,TO_DATE('01011900','DDMMYYYY')) <= TRUNC(sysdate)
      AND  NVL(WSCT.Effective_To,TO_DATE('31124000','DDMMYYYY')) >= TRUNC(sysdate)
      AND  rownum           < 2;
Line: 1517

   SELECT 'X'
     FROM  wms_selection_criteria_txn WSCT
    WHERE  WSCT.return_type_code  = 'R'
      AND  WSCT.return_type_id = p_rule_id
      AND  WSCT.enabled_flag = 1
      AND  NVL(WSCT.Effective_From,TO_DATE('01011900','DDMMYYYY')) <= TRUNC(sysdate)
      AND  NVL(WSCT.Effective_To,TO_DATE('31124000','DDMMYYYY')) >= TRUNC(sysdate)
      AND  rownum           < 2;