350: WHERE batch_id=l_batch_rec.batch_id;
351: -- IF batch_id exist
352: l_return_status :=FND_API.G_RET_STS_ERROR;
353: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
354: FND_MESSAGE.SET_NAME('FUN', 'FUN_DUPLICATE_BATCH_ID');
355: FND_MESSAGE.SET_TOKEN('BATCH_ID',l_batch_rec.batch_id);
356: l_msg := FND_Message.Get;
357: IF (insert_rejections(p_batch_id => l_batch_rec.batch_id,
358: p_reject_reason => l_msg) <> TRUE) THEN
351: -- IF batch_id exist
352: l_return_status :=FND_API.G_RET_STS_ERROR;
353: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
354: FND_MESSAGE.SET_NAME('FUN', 'FUN_DUPLICATE_BATCH_ID');
355: FND_MESSAGE.SET_TOKEN('BATCH_ID',l_batch_rec.batch_id);
356: l_msg := FND_Message.Get;
357: IF (insert_rejections(p_batch_id => l_batch_rec.batch_id,
358: p_reject_reason => l_msg) <> TRUE) THEN
359: Print('Val and Insert >>>>'||'insert_rejections of invalid batches failure');
352: l_return_status :=FND_API.G_RET_STS_ERROR;
353: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
354: FND_MESSAGE.SET_NAME('FUN', 'FUN_DUPLICATE_BATCH_ID');
355: FND_MESSAGE.SET_TOKEN('BATCH_ID',l_batch_rec.batch_id);
356: l_msg := FND_Message.Get;
357: IF (insert_rejections(p_batch_id => l_batch_rec.batch_id,
358: p_reject_reason => l_msg) <> TRUE) THEN
359: Print('Val and Insert >>>>'||'insert_rejections of invalid batches failure');
360: RAISE fnd_api.g_exc_unexpected_error;