114:
115: -- Create_Interaction History
116: Create_Interaction (
117: p_api_version => l_api_version,
118: p_init_msg_list => FND_API.G_FALSE,
119: x_return_status => l_return_status,
120: x_msg_data => l_msg_data,
121: x_msg_count => l_msg_count,
122: p_approval_rec => l_approval_rec );
120: x_msg_data => l_msg_data,
121: x_msg_count => l_msg_count,
122: p_approval_rec => l_approval_rec );
123:
124: IF l_return_status = FND_API.g_ret_sts_error THEN
125: RAISE FND_API.g_exc_error;
126: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
127: RAISE FND_API.g_exc_unexpected_error;
128: END IF;
121: x_msg_count => l_msg_count,
122: p_approval_rec => l_approval_rec );
123:
124: IF l_return_status = FND_API.g_ret_sts_error THEN
125: RAISE FND_API.g_exc_error;
126: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
127: RAISE FND_API.g_exc_unexpected_error;
128: END IF;
129:
122: p_approval_rec => l_approval_rec );
123:
124: IF l_return_status = FND_API.g_ret_sts_error THEN
125: RAISE FND_API.g_exc_error;
126: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
127: RAISE FND_API.g_exc_unexpected_error;
128: END IF;
129:
130: -- Call api to send notification
123:
124: IF l_return_status = FND_API.g_ret_sts_error THEN
125: RAISE FND_API.g_exc_error;
126: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
127: RAISE FND_API.g_exc_unexpected_error;
128: END IF;
129:
130: -- Call api to send notification
131: OZF_APPROVAL_PVT.Send_Notification(
129:
130: -- Call api to send notification
131: OZF_APPROVAL_PVT.Send_Notification(
132: p_api_version => l_api_version,
133: p_init_msg_list => FND_API.G_FALSE,
134: --p_validation_level => p_validation_level,
135: x_return_status => l_return_status,
136: x_msg_data => l_msg_data,
137: x_msg_count => l_msg_count,
141: p_user_callback_api => l_user_callback_api,
142: p_approval_rec => l_approval_rec
143: );
144:
145: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
146: RETURN 'ERROR';
147: END IF;
148:
149: END IF;
923: -- NOTES
924: ---------------------------------------------------------------------
925: PROCEDURE Create_Interaction (
926: p_api_version IN NUMBER
927: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
928: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
929: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
930:
931: ,x_return_status OUT NOCOPY VARCHAR2
924: ---------------------------------------------------------------------
925: PROCEDURE Create_Interaction (
926: p_api_version IN NUMBER
927: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
928: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
929: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
930:
931: ,x_return_status OUT NOCOPY VARCHAR2
932: ,x_msg_data OUT NOCOPY VARCHAR2
925: PROCEDURE Create_Interaction (
926: p_api_version IN NUMBER
927: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
928: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
929: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
930:
931: ,x_return_status OUT NOCOPY VARCHAR2
932: ,x_msg_data OUT NOCOPY VARCHAR2
933: ,x_msg_count OUT NOCOPY NUMBER
967: BEGIN
968: -- Standard begin of API savepoint
969: SAVEPOINT Create_Interaction_PVT;
970: -- Standard call to check for call compatibility.
971: IF NOT FND_API.Compatible_API_Call (
972: l_api_version,
973: p_api_version,
974: l_api_name,
975: G_PKG_NAME)
973: p_api_version,
974: l_api_name,
975: G_PKG_NAME)
976: THEN
977: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
978: END IF;
979: -- Debug Message
980: IF G_DEBUG THEN
981: ozf_utility_pvt.debug_message( l_api_name||': Start');
980: IF G_DEBUG THEN
981: ozf_utility_pvt.debug_message( l_api_name||': Start');
982: END IF;
983: --Initialize message list if p_init_msg_list is TRUE.
984: IF FND_API.To_Boolean (p_init_msg_list) THEN
985: FND_MSG_PUB.initialize;
986: END IF;
987: -- Initialize API return status to sucess
988: x_return_status := FND_API.G_RET_STS_SUCCESS;
984: IF FND_API.To_Boolean (p_init_msg_list) THEN
985: FND_MSG_PUB.initialize;
986: END IF;
987: -- Initialize API return status to sucess
988: x_return_status := FND_API.G_RET_STS_SUCCESS;
989:
990: -- Get Partner details
991: OPEN csr_partner (p_approval_rec.object_id);
992: FETCH csr_partner INTO l_partner_id,
1141: x_msg_count => x_msg_count,
1142: x_msg_data => x_msg_data
1143: );
1144: ozf_utility_pvt.debug_message( 'after creating interaction ' || l_return_status);
1145: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1146: RAISE FND_API.G_EXC_ERROR;
1147: END IF;
1148:
1149: END IF;
1142: x_msg_data => x_msg_data
1143: );
1144: ozf_utility_pvt.debug_message( 'after creating interaction ' || l_return_status);
1145: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1146: RAISE FND_API.G_EXC_ERROR;
1147: END IF;
1148:
1149: END IF;
1150:
1149: END IF;
1150:
1151:
1152: --Standard check of commit
1153: IF FND_API.To_Boolean ( p_commit ) THEN
1154: COMMIT WORK;
1155: END IF;
1156: -- Debug Message
1157: IF G_DEBUG THEN
1158: ozf_utility_pvt.debug_message( l_api_name||': End');
1159: END IF;
1160: --Standard call to get message count and if count=1, get the message
1161: FND_MSG_PUB.Count_And_Get (
1162: p_encoded => FND_API.G_FALSE,
1163: p_count => x_msg_count,
1164: p_data => x_msg_data
1165: );
1166: EXCEPTION
1163: p_count => x_msg_count,
1164: p_data => x_msg_data
1165: );
1166: EXCEPTION
1167: WHEN FND_API.G_EXC_ERROR THEN
1168: ROLLBACK TO Create_Interaction_PVT;
1169: x_return_status := FND_API.G_RET_STS_ERROR;
1170: -- Standard call to get message count and if count=1, get the message
1171: FND_MSG_PUB.Count_And_Get (
1165: );
1166: EXCEPTION
1167: WHEN FND_API.G_EXC_ERROR THEN
1168: ROLLBACK TO Create_Interaction_PVT;
1169: x_return_status := FND_API.G_RET_STS_ERROR;
1170: -- Standard call to get message count and if count=1, get the message
1171: FND_MSG_PUB.Count_And_Get (
1172: p_encoded => FND_API.G_FALSE,
1173: p_count => x_msg_count,
1168: ROLLBACK TO Create_Interaction_PVT;
1169: x_return_status := FND_API.G_RET_STS_ERROR;
1170: -- Standard call to get message count and if count=1, get the message
1171: FND_MSG_PUB.Count_And_Get (
1172: p_encoded => FND_API.G_FALSE,
1173: p_count => x_msg_count,
1174: p_data => x_msg_data
1175: );
1176: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1172: p_encoded => FND_API.G_FALSE,
1173: p_count => x_msg_count,
1174: p_data => x_msg_data
1175: );
1176: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1177: ROLLBACK TO Create_Interaction_PVT;
1178: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1179: -- Standard call to get message count and if count=1, get the message
1180: FND_MSG_PUB.Count_And_Get (
1174: p_data => x_msg_data
1175: );
1176: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1177: ROLLBACK TO Create_Interaction_PVT;
1178: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1179: -- Standard call to get message count and if count=1, get the message
1180: FND_MSG_PUB.Count_And_Get (
1181: p_encoded => FND_API.G_FALSE,
1182: p_count => x_msg_count,
1177: ROLLBACK TO Create_Interaction_PVT;
1178: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1179: -- Standard call to get message count and if count=1, get the message
1180: FND_MSG_PUB.Count_And_Get (
1181: p_encoded => FND_API.G_FALSE,
1182: p_count => x_msg_count,
1183: p_data => x_msg_data
1184: );
1185: WHEN OTHERS THEN
1183: p_data => x_msg_data
1184: );
1185: WHEN OTHERS THEN
1186: ROLLBACK TO Create_Interaction_PVT;
1187: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1188: IF OZF_UNEXP_ERROR_ON
1189: THEN
1190: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1191: END IF;
1190: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1191: END IF;
1192: -- Standard call to get message count and if count=1, get the message
1193: FND_MSG_PUB.Count_And_Get (
1194: p_encoded => FND_API.G_FALSE,
1195: p_count => x_msg_count,
1196: p_data => x_msg_data
1197: );
1198: --
1268: END IF;
1269:
1270: OZF_APPROVAL_PVT.Send_SD_Notification(
1271: p_api_version => l_api_version,
1272: p_init_msg_list => FND_API.G_FALSE,
1273: x_return_status => l_return_status,
1274: x_msg_data => l_msg_data,
1275: x_msg_count => l_msg_count,
1276: p_object_id => l_object_id,
1278:
1279: IF G_DEBUG THEN
1280: ozf_utility_pvt.debug_message( 'Return Status: '||l_return_status);
1281: END IF;
1282: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1283: RETURN 'ERROR';
1284: END IF;
1285:
1286: END IF;