46: when no_data_found
47: then
48: x_return_status := FND_API.G_RET_STS_ERROR;
49: FND_MESSAGE.Set_Name('AMW','AMW_APPR_INVALID_ROLE');
50: FND_MSG_PUB.Add;
51:
52: return ;
53: end ;
54: */
63: IF x_role_name is null
64: then
65: x_return_status := FND_API.G_RET_STS_ERROR;
66: FND_MESSAGE.Set_Name('AMW','AMW_APPR_INVALID_ROLE');
67: FND_MSG_PUB.Add;
68: END IF;
69: END Get_User_Role;
70: -------------------------------------------------------------------------------
71: --
92: when no_data_found
93: then
94: x_return_status := FND_API.G_RET_STS_ERROR;
95: FND_MESSAGE.Set_Name('AMW','AMW_APPR_INVALID_ROLE');
96: FND_MSG_PUB.Add;
97: RAISE FND_API.G_EXC_ERROR;
98: end ;
99:
100:
151: l_appr_meaning VARCHAR2(240);
152: l_appr_obj_name VARCHAR2(240);
153: l_gen_err_sub VARCHAR2(240);
154: BEGIN
155: -- Retriveing Error Message from FND_MSG_PUB
156: -- Called by most of the procedures if it encounter error
157: WHILE l_cnt < p_msg_count
158: LOOP
159: FND_MSG_PUB.Get
155: -- Retriveing Error Message from FND_MSG_PUB
156: -- Called by most of the procedures if it encounter error
157: WHILE l_cnt < p_msg_count
158: LOOP
159: FND_MSG_PUB.Get
160: (p_msg_index => l_cnt + 1,
161: p_encoded => FND_API.G_FALSE,
162: p_data => l_msg_data,
163: p_msg_index_out => l_msg_index ) ;
273: SELECT 1 -- resource_id ,employee_id source_id,full_name resource_name change
274: FROM dual ;
275: -- WHERE user_id = x_resource_id ; need to change
276: BEGIN
277: --FND_MSG_PUB.initialize();
278: savepoint start_process ;
279: x_return_status := FND_API.g_ret_sts_success;
280:
281: AMW_Utility_PVT.debug_message('Start :Item Type : '||itemtype
401: WHEN FND_API.G_EXC_ERROR THEN
402: ROLLBACK TO start_process;
403: x_return_status := FND_API.G_RET_STS_ERROR;
404: -- Standard call to get message count and if count=1, get the message
405: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => x_msg_count,p_data => x_msg_data);
406:
407: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
408: ROLLBACK TO start_process;
409: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
407: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
408: ROLLBACK TO start_process;
409: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
410: -- Standard call to get message count and if count=1, get the message
411: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => x_msg_count,p_data => x_msg_data);
412:
413: WHEN OTHERS THEN
414: ROLLBACK TO start_process;
415: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
412:
413: WHEN OTHERS THEN
414: ROLLBACK TO start_process;
415: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
416: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
417: THEN
418: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME,l_api_name);
419: END IF;
420: -- Standard call to get message count and if count=1, get the message
414: ROLLBACK TO start_process;
415: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
416: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
417: THEN
418: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME,l_api_name);
419: END IF;
420: -- Standard call to get message count and if count=1, get the message
421: FND_MSG_PUB.Count_And_Get (p_encoded => FND_API.G_FALSE,p_count => x_msg_count,p_data => x_msg_data);
422:
417: THEN
418: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME,l_api_name);
419: END IF;
420: -- Standard call to get message count and if count=1, get the message
421: FND_MSG_PUB.Count_And_Get (p_encoded => FND_API.G_FALSE,p_count => x_msg_count,p_data => x_msg_data);
422:
423: END StartProcess;
424:
425: /*****************************************************************
452: l_return_stat varchar2(1);
453: dml_str VARCHAR2(2000);
454:
455: BEGIN
456: FND_MSG_PUB.initialize();
457: IF (funcmode = 'RUN') THEN
458: -- get the acitvity id
459: l_OBJECT_id := wf_engine.GetItemAttrNumber(
460: itemtype => itemtype,
509: wf_core.context('amw_gen_approval_pvt','Set_OBJECT_Details',
510: itemtype,itemkey,actid,funcmode,l_error_msg);
511: raise;
512: WHEN OTHERS THEN
513: FND_MSG_PUB.Count_And_Get (
514: p_encoded => FND_API.G_FALSE,
515: p_count => l_msg_count,
516: p_data => l_msg_data
517: );
584: l_nextApprover ame_util.approverRecord;
585:
586:
587: BEGIN
588: FND_MSG_PUB.initialize();
589: IF (funcmode = 'RUN')
590: THEN
591: -- Check if the AMW_DISABLE_WORKFLOW_APPROVAL profile option is set.
592: -- If it set to 'Y' skip the approval process and update the object
799: END IF;
800:
801: EXCEPTION
802: WHEN FND_API.G_EXC_ERROR THEN
803: FND_MSG_PUB.Count_And_Get (
804: p_encoded => FND_API.G_FALSE,
805: p_count => l_msg_count,
806: p_data => l_msg_data
807: );
818: itemtype, itemkey,to_char(actid),l_error_msg);
819: resultout := 'COMPLETE:ERROR';
820: --RAISE;
821: WHEN OTHERS THEN
822: FND_MSG_PUB.Count_And_Get (
823: p_encoded => FND_API.G_FALSE,
824: p_count => l_msg_count,
825: p_data => l_msg_data
826: );
867: l_version NUMBER;
868: l_approval_type VARCHAR2(30);
869:
870: BEGIN
871: FND_MSG_PUB.initialize();
872: IF (funcmode = 'RUN') THEN
873: l_approval_detail_id := wf_engine.GetItemAttrNumber(
874: itemtype => itemtype,
875: itemkey => itemkey,
950: return;
951: END IF;
952: EXCEPTION
953: WHEN FND_API.G_EXC_ERROR THEN
954: FND_MSG_PUB.Count_And_Get (
955: p_encoded => FND_API.G_FALSE,
956: p_count => l_msg_count,
957: p_data => l_msg_data
958: );
968: 'set_further_approvals',
969: itemtype, itemkey,to_char(actid),l_error_msg);
970: RAISE;
971: WHEN OTHERS THEN
972: FND_MSG_PUB.Count_And_Get (
973: p_encoded => FND_API.G_FALSE,
974: p_count => l_msg_count,
975: p_data => l_msg_data
976: );
1027: l_error_msg VARCHAR2(4000);
1028: l_version NUMBER;
1029: l_approval_type VARCHAR2(30);
1030: BEGIN
1031: FND_MSG_PUB.initialize();
1032: --
1033: -- RUN mode
1034: --
1035: IF (funcmode = 'RUN') THEN
1073: resultout => resultout);
1074:
1075: IF resultout = 'COMPLETE:ERROR' then
1076:
1077: FND_MSG_PUB.Count_And_Get (
1078: p_encoded => FND_API.G_FALSE,
1079: p_count => l_msg_count,
1080: p_data => l_msg_data
1081: );
1110: --
1111:
1112: EXCEPTION
1113: WHEN FND_API.G_EXC_ERROR THEN
1114: FND_MSG_PUB.Count_And_Get (
1115: p_encoded => FND_API.G_FALSE,
1116: p_count => l_msg_count,
1117: p_data => l_msg_data
1118: );
1129: itemtype, itemkey,to_char(actid),l_error_msg);
1130: resultout := 'COMPLETE:ERROR';
1131: --RAISE;
1132: WHEN OTHERS THEN
1133: FND_MSG_PUB.Count_And_Get (
1134: p_encoded => FND_API.G_FALSE,
1135: p_count => l_msg_count,
1136: p_data => l_msg_data
1137: );
1282: end if;
1283: /*
1284: EXCEPTION
1285: WHEN OTHERS THEN
1286: FND_MSG_PUB.Count_And_Get (
1287: p_encoded => FND_API.G_FALSE,
1288: p_count => l_msg_count,
1289: p_data => l_msg_data
1290: );
1356: end if;
1357: /*
1358: EXCEPTION
1359: WHEN OTHERS THEN
1360: FND_MSG_PUB.Count_And_Get (
1361: p_encoded => FND_API.G_FALSE,
1362: p_count => l_msg_count,
1363: p_data => l_msg_data
1364: );
1432:
1433: /*
1434: EXCEPTION
1435: WHEN OTHERS THEN
1436: FND_MSG_PUB.Count_And_Get (
1437: p_encoded => FND_API.G_FALSE,
1438: p_count => l_msg_count,
1439: p_data => l_msg_data
1440: );
1507:
1508: /*
1509: EXCEPTION
1510: WHEN OTHERS THEN
1511: FND_MSG_PUB.Count_And_Get (
1512: p_encoded => FND_API.G_FALSE,
1513: p_count => l_msg_count,
1514: p_data => l_msg_data
1515: );
1582:
1583: /*
1584: EXCEPTION
1585: WHEN OTHERS THEN
1586: FND_MSG_PUB.Count_And_Get (
1587: p_encoded => FND_API.G_FALSE,
1588: p_count => l_msg_count,
1589: p_data => l_msg_data
1590: );
1893: resultout => resultout);
1894:
1895: EXCEPTION
1896: WHEN FND_API.G_EXC_ERROR THEN
1897: FND_MSG_PUB.Count_And_Get (
1898: p_encoded => FND_API.G_FALSE,
1899: p_count => l_msg_count,
1900: p_data => l_msg_data
1901: );
1912: itemtype, itemkey,to_char(actid),l_error_msg);
1913: resultout := 'COMPLETE:ERROR';
1914: --RAISE;
1915: WHEN OTHERS THEN
1916: FND_MSG_PUB.Count_And_Get (
1917: p_encoded => FND_API.G_FALSE,
1918: p_count => l_msg_count,
1919: p_data => l_msg_data
1920: );
1957: l_approver NUMBER;
1958:
1959:
1960: BEGIN
1961: Fnd_Msg_Pub.initialize();
1962: --
1963: -- RUN mode
1964: --
1965: IF (funcmode = 'RUN') THEN