178: select distinct selection_component,selection_value,supply_plan_name
179: from msd_dp_doc_dim_selections
180: where demand_plan_id=p_demand_plan_id
181: and dimension_code='MEAS'
182: and document_id=(select document_id from msd_dp_seeded_documents where document_name='MSD_SD_EOL_LWF' and demand_plan_id=p_demand_plan_id);
183:
184: cursor c3 is
185: select parameter_id,input_demand_plan_id, input_scenario_id
186: from msd_dp_parameters
204: select selection_script
205: from msd_dp_seeded_doc_dimensions
206: where demand_plan_id=p_demand_plan_id
207: and dimension_code='MEAS'
208: and document_id=(select document_id from msd_dp_seeded_documents where document_name='MSD_SD_EOL_LWF' and demand_plan_id=p_demand_plan_id);
209:
210: l_archived_count number;
211:
212: l_list varchar2(4000);
579: ,NULL
580: ,NULL
581: ,SYSDATE
582: FROM
583: msd_dp_seeded_documents mdsd,
584: msd_dp_seeded_documents mdsd1,
585: msd_dp_doc_dim_selections mdds
586: WHERE
587: mdsd.document_name='MSD_SD_EOL_LWF'
580: ,NULL
581: ,SYSDATE
582: FROM
583: msd_dp_seeded_documents mdsd,
584: msd_dp_seeded_documents mdsd1,
585: msd_dp_doc_dim_selections mdds
586: WHERE
587: mdsd.document_name='MSD_SD_EOL_LWF'
588: and mdsd.demand_plan_id= (select template_id from msd_demand_plans where demand_plan_id=p_demand_plan_id)
607: if l_pos = 0 then
608: update msd_dp_seeded_doc_dimensions
609: set selection_script=selection_script||'V.'||c2_rec.selection_component||c5_rec.parameter_id||fnd_global.local_chr(10)
610: where demand_plan_id=p_demand_plan_id
611: and document_id=(select document_id from msd_dp_seeded_documents where document_name='MSD_SD_EOL_LWF' and demand_plan_id=p_demand_plan_id)
612: and dimension_code='MEAS';
613: end if;
614:
615: end loop;