18: ,p_classification_code IN NUMBER
19: ,p_reason_code IN NUMBER
20: ,p_project_id IN NUMBER
21: ,p_last_modified_by_id IN NUMBER
22: := NVL(PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id ), fnd_global.user_id) -- 26-Jun-2009 cklee Modified for the Bug# 8633676
23: ,p_object_type IN VARCHAR2 := NULL
24: ,p_object_id IN NUMBER := NULL
25: ,p_ci_number IN VARCHAR2 := NULL
26: ,p_date_required IN DATE := NULL
399: ,p_reason_code IN NUMBER
400: ,p_record_version_number IN NUMBER
401: ,p_project_id IN NUMBER
402: ,p_last_modified_by_id IN NUMBER
403: := NVL(PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id ), fnd_global.user_id) -- 26-Jun-2009 cklee Modified for the Bug# 8633676
404: ,p_object_type IN VARCHAR2 := NULL
405: ,p_object_id IN NUMBER := NULL
406: ,p_ci_number IN VARCHAR2 := NULL
407: ,p_date_required IN DATE := NULL
609: return;
610: end if;
611: else
612: -- ci number may not be NULL in non CI_DRAFT status
613: l_ci_system_status := PA_CONTROL_ITEMS_UTILS.getSystemStatus(l_status_code);
614: if l_ci_system_status is NULL then
615: PA_UTILS.Add_Message( p_app_short_name => 'PA'
616: ,p_msg_name => 'PA_CI_NO_STATUS');
617: x_return_status := FND_API.G_RET_STS_ERROR;
1086:
1087: ---- check that impacts of source ci_id_from should be less than or equalto the
1088: ---- impacts of the destination ci_type_id. (i.e. new ci)
1089: if (x_return_status = 'S' and p_include = 'Y') then
1090: if (pa_control_items_utils.IsImpactOkToInclude(p_ci_type_id, null, p_ci_id_from) <> 'Y') then
1091: PA_UTILS.Add_Message( p_app_short_name => 'PA'
1092: ,p_msg_name => 'PA_CI_NO_IMP_INCLUDE');
1093: x_return_status := FND_API.G_RET_STS_ERROR;
1094: end if;
1167:
1168: ,p_ci_type_id => p_ci_type_id
1169: ,p_summary => copy_from_row.summary
1170:
1171: -- ,p_status_code => pa_control_items_utils.get_initial_ci_status(p_ci_type_id)
1172:
1173: -- set the initial status to Draft. When numbers are assigned manually, there is no way
1174: -- to enter the number when an item is copied. The Number (ci_number) is a required field
1175: -- when a control item is is any status other than "Draft".
1182: ,p_classification_code => l_class_code
1183: ,p_reason_code => l_reason
1184: ,p_project_id => p_project_id
1185: -- start: 26-Jun-2009 cklee Modified for the Bug# 8633676
1186: -- ,p_last_modified_by_id => PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id )
1187: ,p_last_modified_by_id => NVL(PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id ), fnd_global.user_id)
1188: -- end: 26-Jun-2009 cklee Modified for the Bug# 8633676
1189: ,p_object_type => copy_from_row.object_type
1190: ,p_object_id => copy_from_row.object_id
1183: ,p_reason_code => l_reason
1184: ,p_project_id => p_project_id
1185: -- start: 26-Jun-2009 cklee Modified for the Bug# 8633676
1186: -- ,p_last_modified_by_id => PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id )
1187: ,p_last_modified_by_id => NVL(PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id ), fnd_global.user_id)
1188: -- end: 26-Jun-2009 cklee Modified for the Bug# 8633676
1189: ,p_object_type => copy_from_row.object_type
1190: ,p_object_id => copy_from_row.object_id
1191: ,p_ci_number => p_ci_number
1475: INTO l_record_version_number
1476: FROM PA_CONTROL_ITEMS
1477: WHERE ci_id = p_to_ci_id;
1478:
1479: PA_CONTROL_ITEMS_UTILS.ChangeCIStatus (
1480: p_init_msg_list => FND_API.G_TRUE
1481: ,p_validate_only => FND_API.G_FALSE
1482: ,p_ci_id => p_to_ci_id
1483: ,p_status => 'CI_CLOSED'
1603: ,p_record_version_number
1604: ,cp.project_id
1605: -- start: 26-Jun-2009 cklee Modified for the Bug# 8633676
1606: -- ,cp.last_modified_by_id
1607: ,NVL(PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id ), fnd_global.user_id)
1608: -- end: 26-Jun-2009 cklee Modified for the Bug# 8633676
1609: ,cp.object_type
1610: ,cp.object_id
1611: ,cp.ci_number
1782: l_closed_date := cp.date_closed;
1783: l_ci_number_char := cp.ci_number;
1784: l_project_id := cp.project_id;
1785:
1786: l_new_system_status_code := PA_CONTROL_ITEMS_UTILS.getSystemStatus(p_status_code);
1787: l_curr_system_status_code := PA_CONTROL_ITEMS_UTILS.getCISystemStatus(p_ci_id);
1788:
1789: --Bug 4618856 Changes start here
1790:
1783: l_ci_number_char := cp.ci_number;
1784: l_project_id := cp.project_id;
1785:
1786: l_new_system_status_code := PA_CONTROL_ITEMS_UTILS.getSystemStatus(p_status_code);
1787: l_curr_system_status_code := PA_CONTROL_ITEMS_UTILS.getCISystemStatus(p_ci_id);
1788:
1789: --Bug 4618856 Changes start here
1790:
1791: if l_new_system_status_code is not NULL and l_new_system_status_code = 'CI_WORKING' then
1859: -- x_return_status := 'E';
1860: -- PA_DEBUG.Reset_Err_Stack;
1861: -- return;
1862: -- END IF;
1863: l_closed_by := PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id );
1864: l_closed_date := sysdate;
1865: end if;
1866: end if;
1867:
1878: ,cp.reason_code_id
1879: ,p_record_version_number
1880: ,cp.project_id
1881: -- start: 26-Jun-2009 cklee Modified for the Bug# 8633676
1882: -- ,PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id ) --cp.last_modified_by_id
1883: ,NVL(PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id ), fnd_global.user_id)
1884: -- end: 26-Jun-2009 cklee Modified for the Bug# 8633676
1885: ,cp.object_type
1886: ,cp.object_id
1879: ,p_record_version_number
1880: ,cp.project_id
1881: -- start: 26-Jun-2009 cklee Modified for the Bug# 8633676
1882: -- ,PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id ) --cp.last_modified_by_id
1883: ,NVL(PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id ), fnd_global.user_id)
1884: -- end: 26-Jun-2009 cklee Modified for the Bug# 8633676
1885: ,cp.object_type
1886: ,cp.object_id
1887: ,l_ci_number_char --cp.ci_number
2123:
2124: x_return_status := FND_API.G_RET_STS_SUCCESS;
2125:
2126: FOR cur in items_c LOOP
2127: PA_CONTROL_ITEMS_UTILS.ChangeCIStatus (
2128: p_init_msg_list => FND_API.G_TRUE
2129: ,p_validate_only => FND_API.G_FALSE
2130: ,p_ci_id => cur.included_ci_id
2131: ,p_status => 'CI_APPROVED'
2738: ,p_classification_code => cp.classification_code_id
2739: ,p_reason_code => cp.reason_code_id
2740: ,p_record_version_number=> cp.record_version_number
2741: ,p_project_id => cp.project_id
2742: ,p_last_modified_by_id => NVL(PA_CONTROL_ITEMS_UTILS.GetPartyId(fnd_global.user_id ), fnd_global.user_id ) --cp.last_modified_by_id
2743: ,p_object_type => cp.object_type
2744: ,p_object_id => cp.object_id
2745: ,p_ci_number => cp.ci_number
2746: ,p_date_required => cp.date_required