136: return;
137: END IF;
138:
139:
140: if (nvl(p_user_id,fnd_global.user_id) is not null) then
141:
142: select employee_id
143: into l_person_id
144: from fnd_user
141:
142: select employee_id
143: into l_person_id
144: from fnd_user
145: where user_id = nvl(p_user_id,fnd_global.user_id);
146:
147: end if;
148:
149: if((p_wip_entity_id is not null) and (p_organization_id is not null)) then
351: l_currency,
352: l_project_id,
353: l_task_id,
354: l_project_acc_context,
355: nvl(p_user_id,fnd_global.user_id),
356: sysdate,
357: nvl(p_user_id,fnd_global.user_id),
358: sysdate,
359: l_ou_id,
353: l_task_id,
354: l_project_acc_context,
355: nvl(p_user_id,fnd_global.user_id),
356: sysdate,
357: nvl(p_user_id,fnd_global.user_id),
358: sysdate,
359: l_ou_id,
360: substrb(l_wip_entity_name, 1, 25) ,
361: l_asset_number||':'||l_DESCRIPTIVE_TEXT||':'||l_ASSET_CRITICALITY||':'||l_priority_meaning
366: END IF;
367:
368: l_str_application_id := fnd_profile.value('RESP_APPL_ID');
369:
370: -- This call to fnd_global.apps_initialize is needed because this is
371: -- part of the WO API which can also be used as a standalone API
372: -- and there needs to be a call to APPS_INITIALIZE before
373: -- concurrent programs are called
374:
371: -- part of the WO API which can also be used as a standalone API
372: -- and there needs to be a call to APPS_INITIALIZE before
373: -- concurrent programs are called
374:
375: if (nvl(p_user_id,fnd_global.user_id) is not null and p_responsibility_id is not null and l_str_application_id is not null) then
376: FND_GLOBAL.APPS_INITIALIZE(nvl(p_user_id,fnd_global.user_id), p_responsibility_id, to_number(l_str_application_id),0);
377: end if;
378:
379: /* Changes for MOAC */
372: -- and there needs to be a call to APPS_INITIALIZE before
373: -- concurrent programs are called
374:
375: if (nvl(p_user_id,fnd_global.user_id) is not null and p_responsibility_id is not null and l_str_application_id is not null) then
376: FND_GLOBAL.APPS_INITIALIZE(nvl(p_user_id,fnd_global.user_id), p_responsibility_id, to_number(l_str_application_id),0);
377: end if;
378:
379: /* Changes for MOAC */
380: fnd_request.set_org_id (l_ou_id);