16936: SELECT rules.rule_id
16937: , rules.type_hdr_id /* Added this Column */
16938: , mmtt.organization_id
16939: , mmtt.wms_task_type
16940: FROM wms_rules_b rules, bom_standard_operations bso , mtl_material_transactions_temp mmtt
16941: WHERE rules.type_code = 3
16942: AND rules.enabled_flag = 'Y'
16943: AND rules.type_hdr_id = bso.standard_operation_id
16944: AND bso.wms_task_type = NVL(mmtt.wms_task_type, bso.wms_task_type)
16948: ORDER BY rules.rule_weight DESC, rules.creation_date;
16949:
16950: /*CURSOR c_rules_new IS
16951: SELECT rules.rule_id , rules.type_hdr_id
16952: FROM wms_rules_b rules, bom_standard_operations bso
16953: WHERE rules.type_code = 3
16954: AND rules.enabled_flag = 'Y'
16955: AND rules.type_hdr_id = bso.standard_operation_id
16956: AND bso.wms_task_type = NVL(p_wms_task_type, bso.wms_task_type)