DBA Data[Home] [Help]

APPS.MSC_GET_GANTT_DATA dependencies on MSC_FORM_QUERY

Line 251: msc_form_query mfq

247: from msc_resource_requirements mrr,
248: msc_supplies ms,
249: msc_items msi,
250: mfg_lookups mfg,
251: msc_form_query mfq
252: where mrr.organization_id =v_org_id
253: and mrr.sr_instance_id = v_instance_id
254: and mrr.department_id = v_dept_id
255: and mrr.resource_id = v_res_id

Line 2331: msc_form_query mfq

2327: v_dept_code,
2328: v_org, v_instance, v_dept, v_res
2329: FROM msc_department_resources mdr,
2330: msc_trading_partners mtp,
2331: msc_form_query mfq
2332: WHERE mdr.plan_id = p_plan_id
2333: AND mdr.organization_id = mfq.number2
2334: AND mdr.sr_instance_id = mfq.number1
2335: AND mdr.department_id = mfq.number3

Line 3009: from msc_form_query

3005: where_stat varchar2(32000);
3006:
3007: CURSOR dept IS
3008: select distinct number1, number2, number3, number4
3009: from msc_form_query
3010: where query_id =g_find_query_id;
3011:
3012: CURSOR supply IS
3013: select distinct number1, number5

Line 3014: from msc_form_query

3010: where query_id =g_find_query_id;
3011:
3012: CURSOR supply IS
3013: select distinct number1, number5
3014: from msc_form_query
3015: where query_id =g_find_query_id;
3016:
3017: v_one_record varchar2(200);
3018: v_len number;

Line 3114: delete msc_form_query

3110: sql_statement := where_stat;
3111: end if;
3112:
3113: if g_find_query_id is not null then
3114: delete msc_form_query
3115: where query_id = g_find_query_id;
3116: else
3117: select msc_form_query_s.nextval
3118: into g_find_query_id

Line 3117: select msc_form_query_s.nextval

3113: if g_find_query_id is not null then
3114: delete msc_form_query
3115: where query_id = g_find_query_id;
3116: else
3117: select msc_form_query_s.nextval
3118: into g_find_query_id
3119: from dual;
3120: end if;
3121: OPEN resource_cursor FOR sql_statement

Line 3129: insert into msc_form_query

3125: FETCH resource_cursor INTO l_instance, l_org, l_dept, l_res,
3126: l_supply, l_transaction;
3127: EXIT WHEN resource_cursor%NOTFOUND;
3128:
3129: insert into msc_form_query
3130: (QUERY_ID,
3131: LAST_UPDATE_DATE,
3132: LAST_UPDATED_BY,
3133: CREATION_DATE,

Line 3394: from msc_form_query

3390: p_request varchar2(32000);
3391:
3392: cursor supply_rec is
3393: select number2, number1
3394: from msc_form_query
3395: where query_id = g_supply_query_id;
3396:
3397: cursor res_rec is
3398: select distinct number1, number2,number3, number4

Line 3399: from msc_form_query

3395: where query_id = g_supply_query_id;
3396:
3397: cursor res_rec is
3398: select distinct number1, number2,number3, number4
3399: from msc_form_query
3400: where query_id = g_res_query_id;
3401:
3402: l_dept number;
3403: l_res number;

Line 3750: from msc_form_query

3746: OP_NODE,
3747: 0,
3748: 0,
3749: 0
3750: from msc_form_query
3751: where query_id = p_op_seq_query_id
3752: and number1 = p_supply_id
3753: order by number2;
3754:

Line 3810: msc_form_query mfq

3806: msc_full_pegging mfp2,
3807: msc_supplies ms,
3808: msc_system_items msi,
3809: msc_trading_partners mtp,
3810: msc_form_query mfq
3811: where mfp1.plan_id = p_plan_id
3812: and mfp1.transaction_id = p_supply_id
3813: and mfp1.sr_instance_id = p_instance_id
3814: and mfp1.end_pegging_id = mfq.number1

Line 3830: from msc_form_query mfq

3826: and mtp.sr_tp_id=ms.organization_id
3827: and mtp.sr_instance_id = ms.sr_instance_id
3828: and ms.transaction_id not in (
3829: select mfq.number3
3830: from msc_form_query mfq
3831: where mfq.query_id = p_query_id
3832: and mfq.number1 = p_supply_id
3833: and mfq.number2 is not null -- op_seq_num is not null
3834: );

Line 3864: from msc_form_query mfq,

3860: mfq.number13,
3861: mtp.organization_code||':'||mi.item_name,
3862: mfq.number14,
3863: mfq.number15
3864: from msc_form_query mfq,
3865: msc_items mi,
3866: msc_trading_partners mtp
3867: where mfq.query_id = p_query_id
3868: and mfq.number1 = p_supply_id

Line 3990: select msc_form_query_s.nextval

3986: -- find the end_pegging_id
3987:
3988: if g_end_demand_id is not null then
3989:
3990: select msc_form_query_s.nextval
3991: into p_end_peg_query_id
3992: from dual;
3993:
3994: insert into msc_form_query

Line 3994: insert into msc_form_query

3990: select msc_form_query_s.nextval
3991: into p_end_peg_query_id
3992: from dual;
3993:
3994: insert into msc_form_query
3995: (QUERY_ID,
3996: LAST_UPDATE_DATE,
3997: LAST_UPDATED_BY,
3998: CREATION_DATE,

Line 4045: -- populate op seq num from msc_resource_requirements to msc_form_query

4041: peg_data.res_firm_flag(current_index); -- end supply tran id
4042: else
4043: p_end_supply_id := null;
4044: end if;
4045: -- populate op seq num from msc_resource_requirements to msc_form_query
4046:
4047: if p_op_seq_query_id is null then
4048: select msc_form_query_s.nextval
4049: into p_op_seq_query_id

Line 4048: select msc_form_query_s.nextval

4044: end if;
4045: -- populate op seq num from msc_resource_requirements to msc_form_query
4046:
4047: if p_op_seq_query_id is null then
4048: select msc_form_query_s.nextval
4049: into p_op_seq_query_id
4050: from dual;
4051: end if;
4052: if p_critical <> -1 then

Line 4053: insert into msc_form_query

4049: into p_op_seq_query_id
4050: from dual;
4051: end if;
4052: if p_critical <> -1 then
4053: insert into msc_form_query
4054: (QUERY_ID,
4055: LAST_UPDATE_DATE,
4056: LAST_UPDATED_BY,
4057: CREATION_DATE,

Line 4090: insert into msc_form_query

4086: and mcp.demand_id = g_end_demand_id
4087: and nvl(mcp.path_number,1) =
4088: decode(p_critical,0,0,nvl(mcp.path_number,1));
4089: else -- not critical only
4090: insert into msc_form_query
4091: (QUERY_ID,
4092: LAST_UPDATE_DATE,
4093: LAST_UPDATED_BY,
4094: CREATION_DATE,

Line 4159: -- populate the children to msc_form_query

4155:
4156: END LOOP;
4157: CLOSE ops_seq_cur;
4158:
4159: -- populate the children to msc_form_query
4160:
4161: if p_query_id is null then
4162: select msc_form_query_s.nextval
4163: into p_query_id

Line 4162: select msc_form_query_s.nextval

4158:
4159: -- populate the children to msc_form_query
4160:
4161: if p_query_id is null then
4162: select msc_form_query_s.nextval
4163: into p_query_id
4164: from dual;
4165: end if;
4166:

Line 4170: select msc_form_query_s.nextval

4166:
4167: -- get the end_pegging_id
4168: if g_end_demand_id is null then
4169:
4170: select msc_form_query_s.nextval
4171: into p_end_peg_query_id
4172: from dual;
4173:
4174: insert into msc_form_query

Line 4174: insert into msc_form_query

4170: select msc_form_query_s.nextval
4171: into p_end_peg_query_id
4172: from dual;
4173:
4174: insert into msc_form_query
4175: (QUERY_ID,
4176: LAST_UPDATE_DATE,
4177: LAST_UPDATED_BY,
4178: CREATION_DATE,

Line 4199: insert into msc_form_query

4195: -- only get the children which are in the same pegging tree
4196:
4197: if (p_critical <> -1) then
4198:
4199: insert into msc_form_query
4200: (QUERY_ID,
4201: LAST_UPDATE_DATE,
4202: LAST_UPDATED_BY,
4203: CREATION_DATE,

Line 4282: msc_form_query mfq

4278: msc_supplies ms,
4279: msc_demands md,
4280: msc_system_items msi,
4281: msc_critical_paths mcp,
4282: msc_form_query mfq
4283: where mfp1.plan_id = p_plan_id
4284: and mfp1.transaction_id = p_supply_id
4285: and mfp1.end_pegging_id = mfq.number1
4286: and mfq.query_id = p_end_peg_query_id

Line 4310: insert into msc_form_query

4306: decode(p_critical,0,0,nvl(mcp.path_number,1))
4307: ;
4308:
4309: else -- not critical_only
4310: insert into msc_form_query
4311: (QUERY_ID,
4312: LAST_UPDATE_DATE,
4313: LAST_UPDATED_BY,
4314: CREATION_DATE,

Line 4401: msc_form_query mfq

4397: msc_full_pegging mfp2,
4398: msc_system_items msi,
4399: msc_supplies ms,
4400: msc_demands md,
4401: msc_form_query mfq
4402: where mfp1.plan_id = p_plan_id
4403: and mfp1.transaction_id = p_supply_id
4404: and mfp1.end_pegging_id = mfq.number1
4405: and mfq.query_id = p_end_peg_query_id

Line 4428: from msc_form_query mfq

4424:
4425: begin
4426: select distinct mfq.number2, mfq.number2
4427: bulk collect into v_op, v_new_op
4428: from msc_form_query mfq
4429: where mfq.query_id = p_query_id
4430: and mfq.number1 = p_supply_id
4431: and mfq.number2 not in (
4432: select mfq_mrr.number2

Line 4433: from msc_form_query mfq_mrr

4429: where mfq.query_id = p_query_id
4430: and mfq.number1 = p_supply_id
4431: and mfq.number2 not in (
4432: select mfq_mrr.number2
4433: from msc_form_query mfq_mrr
4434: where mfq_mrr.query_id = p_op_seq_query_id
4435: and mfq_mrr.number1 = p_supply_id);
4436: for a in 1 .. v_op.count loop
4437: -- find the closest next op

Line 4440: from msc_form_query

4436: for a in 1 .. v_op.count loop
4437: -- find the closest next op
4438: select min(number2)
4439: into v_dummy
4440: from msc_form_query
4441: where query_id = p_op_seq_query_id
4442: and number1 = p_supply_id
4443: and number2 > v_op(a);
4444: if v_dummy is null then

Line 4448: from msc_form_query

4444: if v_dummy is null then
4445: -- if not found, find the closest prev op
4446: select max(number2)
4447: into v_dummy
4448: from msc_form_query
4449: where query_id = p_op_seq_query_id
4450: and number1 = p_supply_id
4451: and number2 < v_op(a);
4452: end if;

Line 4457: update msc_form_query

4453: v_new_op(a) := v_dummy;
4454: end loop;
4455:
4456: forall a in 1.. v_op.count
4457: update msc_form_query
4458: set number2= v_new_op(a)
4459: where query_id = p_query_id
4460: and number1 = p_supply_id
4461: and number2 = v_op(a);

Line 4536: insert into msc_form_query

4532:
4533: if v_supplier_id <> -1 and
4534: g_supplier_query_id is not null then
4535: -- for supplier list
4536: insert into msc_form_query
4537: (QUERY_ID,
4538: LAST_UPDATE_DATE,
4539: LAST_UPDATED_BY,
4540: CREATION_DATE,

Line 4630: insert into msc_form_query

4626:
4627: if v_supplier_id <> -1 and
4628: g_supplier_query_id is not null then
4629: -- for supplier list
4630: insert into msc_form_query
4631: (QUERY_ID,
4632: LAST_UPDATE_DATE,
4633: LAST_UPDATED_BY,
4634: CREATION_DATE,

Line 4720: insert into msc_form_query

4716: i := i+1;
4717: child_index := child_index +1;
4718:
4719: -- for resource centric view
4720: insert into msc_form_query
4721: (QUERY_ID,
4722: LAST_UPDATE_DATE,
4723: LAST_UPDATED_BY,
4724: CREATION_DATE,

Line 4819: msc_form_query mfq,

4815: ms.organization_id,
4816: ms.source_organization_id)
4817: from msc_full_pegging mfp1,
4818: msc_full_pegging mfp2,
4819: msc_form_query mfq,
4820: msc_supplies ms,
4821: msc_system_items msi,
4822: msc_trading_partners mtp
4823: where mfp1.pegging_id = mfp2.end_pegging_id

Line 4867: msc_form_query mfq,

4863: msi.planning_make_buy_code,
4864: ms.organization_id,
4865: ms.source_organization_id)
4866: from msc_full_pegging mfp2,
4867: msc_form_query mfq,
4868: msc_supplies ms,
4869: msc_system_items msi,
4870: msc_trading_partners mtp
4871: where mfp2.plan_id = p_plan_id

Line 5033: delete msc_form_query

5029: end if;
5030:
5031: if p_fetch_type is null then
5032: if g_supply_query_id is not null then
5033: delete msc_form_query
5034: where query_id = g_supply_query_id;
5035: else
5036: select msc_form_query_s.nextval
5037: into g_supply_query_id

Line 5036: select msc_form_query_s.nextval

5032: if g_supply_query_id is not null then
5033: delete msc_form_query
5034: where query_id = g_supply_query_id;
5035: else
5036: select msc_form_query_s.nextval
5037: into g_supply_query_id
5038: from dual;
5039: end if;
5040:

Line 5042: delete msc_form_query

5038: from dual;
5039: end if;
5040:
5041: if g_res_query_id is not null then
5042: delete msc_form_query
5043: where query_id = g_res_query_id;
5044: else
5045: select msc_form_query_s.nextval
5046: into g_res_query_id

Line 5045: select msc_form_query_s.nextval

5041: if g_res_query_id is not null then
5042: delete msc_form_query
5043: where query_id = g_res_query_id;
5044: else
5045: select msc_form_query_s.nextval
5046: into g_res_query_id
5047: from dual;
5048: end if;
5049:

Line 5060: insert into msc_form_query

5056: instr(p_supply_list,')',1,i)-instr(p_supply_list,'(',1,i)-1);
5057: v_instance_id := to_number(substr(one_record,1,instr(one_record,',')-1));
5058: v_transaction_id := to_number(substr(one_record,instr(one_record,',')+1));
5059:
5060: insert into msc_form_query
5061: (QUERY_ID,
5062: LAST_UPDATE_DATE,
5063: LAST_UPDATED_BY,
5064: CREATION_DATE,

Line 5828: delete msc_form_query

5824: g_end_demand_id := p_demand_id;
5825:
5826: -- for order centric view
5827: if g_supply_query_id is not null then
5828: delete msc_form_query
5829: where query_id = g_supply_query_id;
5830: else
5831: select msc_form_query_s.nextval
5832: into g_supply_query_id

Line 5831: select msc_form_query_s.nextval

5827: if g_supply_query_id is not null then
5828: delete msc_form_query
5829: where query_id = g_supply_query_id;
5830: else
5831: select msc_form_query_s.nextval
5832: into g_supply_query_id
5833: from dual;
5834: end if;
5835: -- for resource centric view

Line 5837: delete msc_form_query

5833: from dual;
5834: end if;
5835: -- for resource centric view
5836: if g_res_query_id is not null then
5837: delete msc_form_query
5838: where query_id = g_res_query_id;
5839: else
5840: select msc_form_query_s.nextval
5841: into g_res_query_id

Line 5840: select msc_form_query_s.nextval

5836: if g_res_query_id is not null then
5837: delete msc_form_query
5838: where query_id = g_res_query_id;
5839: else
5840: select msc_form_query_s.nextval
5841: into g_res_query_id
5842: from dual;
5843: end if;
5844: -- for supplier list

Line 5846: delete msc_form_query

5842: from dual;
5843: end if;
5844: -- for supplier list
5845: if g_supplier_query_id is not null then
5846: delete msc_form_query
5847: where query_id = g_supplier_query_id;
5848: else
5849: select msc_form_query_s.nextval
5850: into g_supplier_query_id

Line 5849: select msc_form_query_s.nextval

5845: if g_supplier_query_id is not null then
5846: delete msc_form_query
5847: where query_id = g_supplier_query_id;
5848: else
5849: select msc_form_query_s.nextval
5850: into g_supplier_query_id
5851: from dual;
5852: end if;
5853:

Line 5914: insert into msc_form_query

5910: i := i+1;
5911:
5912: -- for order centric view
5913:
5914: insert into msc_form_query
5915: (QUERY_ID,
5916: LAST_UPDATE_DATE,
5917: LAST_UPDATED_BY,
5918: CREATION_DATE,

Line 5935: insert into msc_form_query

5931: curr_inst_id(a));
5932:
5933: if curr_supplier_id(a) <> -1 then
5934: -- for supplier list
5935: insert into msc_form_query
5936: (QUERY_ID,
5937: LAST_UPDATE_DATE,
5938: LAST_UPDATED_BY,
5939: CREATION_DATE,

Line 5995: msc_form_query mfq

5991: bulk collect into
5992: v_org_code, v_supplier_name,
5993: v_org, v_instance, v_item, v_supplier
5994: FROM msc_trading_partners mtp,
5995: msc_form_query mfq
5996: where mfq.query_id = g_supplier_query_id
5997: AND mtp.partner_type = 1
5998: AND mtp.partner_id = mfq.number1
5999: ORDER BY 1,2 ;