84:
85: -- Initialize message list if p_init_msg_list is set to TRUE.
86: if FND_API.to_Boolean( p_init_msg_list)
87: then
88: fND_MSG_PUB.initialize;
89: end if;
90: -- Initialize API return status to success
91: x_return_status := FND_API.G_RET_STS_SUCCESS;
92:
117: then
118: -- this table does not exist
119: log(p_base_table_name || ' does not exists!');
120: fnd_message.set_name('ASG','TABLE_NOT EXISTS');
121: fnd_msg_pub.Add;
122: raise FND_API.G_EXC_ERROR;
123: end if;
124: else
125: */
126: if (p_base_table_name is NULL)
127: then
128: log('p_base_table_name Should not be NULL!');
129: fnd_message.set_name('ASG','NO BASE TABLE NAME');
130: fnd_msg_pub.Add;
131: raise FND_API.G_EXC_ERROR;
132: end if;
133:
134:
144: then
145: -- the custom flag is not Y
146: log(p_pub_item_name || ' is not for the customization!');
147: fnd_message.set_name('ASG','PUB ITEM NOT CUSTOMABLE');
148: fnd_msg_pub.Add;
149: raise FND_API.G_EXC_ERROR;
150: end if;
151:
152: -- *****************
155: if p_primary_key_columns is NULL
156: then
157: log( 'p_primary_key_columns Should not be NULL!');
158: fnd_message.set_name('ASG','NULL PK COLUMNS');
159: fnd_msg_pub.Add;
160: raise FND_API.G_EXC_ERROR;
161: end if;
162:
163: -- ******************
177: if (l_pk_num <> find_num_pkcols(p_primary_key_columns))
178: then
179: log (' The Primary Keys number does not match with the pub item');
180: fnd_message.set_name('ASG','PK number _NOT matched');
181: fnd_msg_pub.Add;
182: raise FND_API.G_EXC_ERROR;
183: end if;
184:
185:
196: then
197: log (' The pub item base table cannot be changed while there is
198: record existing in the acc table!');
199: fnd_message.set_name('ASG','RECORDS EXISTING IN ACC TABLE');
200: fnd_msg_pub.Add;
201: raise FND_API.G_EXC_ERROR;
202: END IF;
203: END IF;
204:
327: EXCEPTION
328: WHEN FND_API.G_EXC_ERROR THEN
329: Rollback to customize_pub_item_PVT;
330: x_return_status := FND_API.G_RET_STS_ERROR;
331: FND_MSG_PUB.Count_And_Get
332: (
333: p_count => x_msg_count,
334: p_data => x_error_message
335: );
335: );
336: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
337: Rollback to customize_pub_item_PVT;
338: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
339: FND_MSG_PUB.Count_And_Get
340: (
341: p_count => x_msg_count,
342: p_data => x_error_message
343: );
343: );
344: WHEN OTHERS THEN
345: Rollback to customize_pub_item_PVT;
346: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
347: if FND_MSG_PUB.Check_Msg_Level( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
348: then
349: FND_MSG_PUB.Add_Exc_Msg
350: (
351: G_PKG_NAME,
345: Rollback to customize_pub_item_PVT;
346: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
347: if FND_MSG_PUB.Check_Msg_Level( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
348: then
349: FND_MSG_PUB.Add_Exc_Msg
350: (
351: G_PKG_NAME,
352: l_api_name,
353: sqlerrm
352: l_api_name,
353: sqlerrm
354: );
355: end if;
356: FND_MSG_PUB.Count_And_Get
357: (
358: p_count => x_msg_count,
359: p_data => x_error_message
360: );
372: RETURN FND_API.G_RET_STS_SUCCESS;
373: EXCEPTION
374: when OTHERS then
375: fnd_message.set_name('ASG','SQL COMMAND FAIL!');
376: fnd_msg_pub.Add;
377: log ( substr(sqlerrm, 1, 200));
378: Raise;
379: RETURN FND_API.G_RET_STS_ERROR;
380: end;
587:
588: -- Initialize message list if p_init_msg_list is set to TRUE.
589: if FND_API.to_Boolean( p_init_msg_list)
590: then
591: FND_MSG_PUB.initialize;
592: end if;
593:
594: -- Initialize API return status to success
595: x_return_status := FND_API.G_RET_STS_SUCCESS;
656:
657: -- Initialize message list if p_init_msg_list is set to TRUE.
658: if FND_API.to_Boolean( p_init_msg_list)
659: then
660: FND_MSG_PUB.initialize;
661: end if;
662: -- Initialize API return status to success
663: x_return_status := FND_API.G_RET_STS_SUCCESS;
664:
726:
727: -- Initialize message list if p_init_msg_list is set to TRUE.
728: if FND_API.to_Boolean( p_init_msg_list)
729: then
730: FND_MSG_PUB.initialize;
731: end if;
732:
733: -- Initialize API return status to success
734: x_return_status := FND_API.G_RET_STS_SUCCESS;
798:
799: -- Initialize message list if p_init_msg_list is set to TRUE.
800: if FND_API.to_Boolean( p_init_msg_list)
801: then
802: FND_MSG_PUB.initialize;
803: end if;
804:
805: -- Initialize API return status to success
806: x_return_status := FND_API.G_RET_STS_SUCCESS;
868:
869: -- Initialize message list if p_init_msg_list is set to TRUE.
870: if FND_API.to_Boolean( p_init_msg_list)
871: then
872: FND_MSG_PUB.initialize;
873: end if;
874:
875: -- Initialize API return status to success
876: x_return_status := FND_API.G_RET_STS_SUCCESS;