1439: l_stmt_num := 30;
1440:
1441: select decode(asset_inventory,1,0,1)
1442: into l_exp1
1443: from mtl_secondary_inventories msi
1444: , mtl_material_transactions mmt
1445: where msi.secondary_inventory_name = mmt.subinventory_code
1446: and msi.organization_id = i_org_id
1447: and mmt.transaction_id = i_txn_id
1519: end if;
1520:
1521: select decode(asset_inventory,1,0,1)
1522: into l_exp2
1523: from mtl_secondary_inventories msi
1524: , mtl_material_transactions mmt
1525: where msi.secondary_inventory_name = mmt.transfer_subinventory
1526: and msi.organization_id = i_org_id
1527: and mmt.transaction_id = i_txn_id
4225: l_transfer_txn_id,
4226: l_item_id,
4227: l_transfer_cost_grp_id
4228: FROM mtl_material_transactions mmt,
4229: mtl_secondary_inventories msi
4230: WHERE mmt.transaction_id = i_txn_id
4231: AND mmt.subinventory_code = msi.secondary_inventory_name
4232: AND mmt.organization_id = msi.organization_id;
4233:
4234: l_stmt_num := 55;
4235: SELECT nvl(msi.asset_inventory,-9)
4236: INTO l_to_inv
4237: FROM mtl_material_transactions mmt,
4238: mtl_secondary_inventories msi
4239: WHERE mmt.transaction_id = i_txn_id
4240: AND nvl(mmt.transfer_subinventory,mmt.subinventory_code) = msi.secondary_inventory_name
4241: AND mmt.organization_id = msi.organization_id;
4242:
4727:
4728: l_stmt_num := 30;
4729: select decode(l_std_exp,1,1,decode(asset_inventory,1,0,1))
4730: into l_std_exp
4731: from mtl_secondary_inventories msi
4732: ,mtl_material_transactions mmt
4733: where mmt.transaction_id = i_txn_id
4734: and mmt.organization_id = l_std_org
4735: and msi.organization_id = l_std_org
5528:
5529: l_stmt_num := 190;
5530: select decode(l_txfr_std_exp,1,1,decode(asset_inventory,1,0,1))
5531: into l_txfr_std_exp
5532: from mtl_secondary_inventories msi
5533: ,mtl_material_transactions mmt
5534: where mmt.transaction_id = l_txfr_txn_id
5535: and mmt.organization_id = l_std_org
5536: and msi.organization_id = l_std_org
6894: else
6895: l_stmt_num := 25;
6896: SELECT decode(l_exp_item,1,1,decode(ASSET_INVENTORY,1,0,1))
6897: INTO l_exp_flag
6898: FROM MTL_SECONDARY_INVENTORIES
6899: WHERE SECONDARY_INVENTORY_NAME = c_mmt_txn_rec.subinventory_code
6900: AND ORGANIZATION_ID = c_mmt_txn_rec.organization_id;
6901: end if;
6902:
8151: )
8152: IS
8153: SELECT
8154: DECODE(asset_inventory,1,0,1)
8155: FROM mtl_secondary_inventories
8156: WHERE secondary_inventory_name = c_subinventory_code
8157: AND organization_id = c_organization_id;
8158:
8159:
8269: else
8270: l_stmt_num := 14;
8271: SELECT decode(ASSET_INVENTORY, 1, 'N', 'Y')
8272: INTO l_exp_flag
8273: FROM MTL_SECONDARY_INVENTORIES
8274: WHERE SECONDARY_INVENTORY_NAME = l_subinventory_code
8275: AND ORGANIZATION_ID = l_parent_org_id;
8276: end if;
8277: