DBA Data[Home] [Help]

APPS.OZF_ACCT_GENERATOR dependencies on FND_API

Line 74: p_utilization_id IN NUMBER DEFAULT FND_API.G_MISS_NUM,

70: FUNCTION gl_post_account(
71: p_api_version_number IN NUMBER,
72: p_account_type IN VARCHAR2,
73: p_budget_id IN NUMBER,
74: p_utilization_id IN NUMBER DEFAULT FND_API.G_MISS_NUM,
75: x_msg_count OUT NOCOPY NUMBER,
76: x_msg_data OUT NOCOPY VARCHAR2,
77: x_return_status OUT NOCOPY VARCHAR2)
78: RETURN NUMBER

Line 156: IF NOT FND_API.Compatible_API_Call

152:
153: IF G_DEBUG_HIGH_ON THEN
154: OZF_UTILITY_PVT.debug_message('Private Api: ' || l_api_name || ' START');
155: END IF;
156: IF NOT FND_API.Compatible_API_Call
157: (l_api_version_number
158: ,p_api_version_number
159: ,l_api_name
160: ,G_PKG_NAME

Line 163: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

159: ,l_api_name
160: ,G_PKG_NAME
161: )
162: THEN
163: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
164: END IF;
165:
166: -- get account from the fund
167: IF p_budget_id is not null OR

Line 168: p_budget_id <> FND_API.G_MISS_NUM

164: END IF;
165:
166: -- get account from the fund
167: IF p_budget_id is not null OR
168: p_budget_id <> FND_API.G_MISS_NUM
169: THEN
170: --7491702
171: IF G_DEBUG_HIGH_ON THEN
172: OZF_UTILITY_PVT.debug_message('p_utilization_id: ' || p_utilization_id);

Line 245: x_return_status := FND_API.g_ret_sts_error;

241: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
242: FND_MESSAGE.set_name('OZF', 'OZF_GL_NO_ACC_LIAB_ACCT');
243: FND_MSG_PUB.add;
244: END IF;
245: x_return_status := FND_API.g_ret_sts_error;
246: ELSE
247: l_post_account := l_fund_accrual_liability;
248: END IF;
249: ELSIF p_account_type = 'EXPENSE ACCOUNT' THEN

Line 255: x_return_status := FND_API.g_ret_sts_error;

251: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
252: FND_MESSAGE.set_name('OZF', 'OZF_GL_NO_EXP_ACCT');
253: FND_MSG_PUB.add;
254: END IF;
255: x_return_status := FND_API.g_ret_sts_error;
256: ELSE
257: l_post_account := l_fund_expense_account;
258: END IF;
259: ELSIF p_account_type = 'VEN_CLEARING' THEN

Line 265: x_return_status := FND_API.g_ret_sts_error;

261: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
262: FND_MESSAGE.set_name('OZF', 'OZF_GL_NO_VEN_CLEAR_ACCT');
263: FND_MSG_PUB.add;
264: END IF;
265: x_return_status := FND_API.g_ret_sts_error;
266: ELSE
267: l_post_account := l_ven_clearing;
268: END IF;
269: ELSIF p_account_type = 'REC_CLEARING' THEN

Line 275: x_return_status := FND_API.g_ret_sts_error;

271: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
272: FND_MESSAGE.set_name('OZF', 'OZF_GL_NO_REC_CLEAR_ACCT');
273: FND_MSG_PUB.add;
274: END IF;
275: x_return_status := FND_API.g_ret_sts_error;
276: ELSE
277: l_post_account := l_rec_clearing;
278: END IF;
279: ELSE

Line 308: x_return_status := FND_API.g_ret_sts_error;

304: END IF;
305: FND_MSG_PUB.Count_And_Get
306: (p_count => x_msg_count,
307: p_data => x_msg_data);
308: x_return_status := FND_API.g_ret_sts_error;
309: RETURN l_post_account;
310: WHEN FND_API.G_EXC_ERROR THEN
311: l_post_account := 0;
312: -- Standard call to get message count and if count=1, get the message

Line 310: WHEN FND_API.G_EXC_ERROR THEN

306: (p_count => x_msg_count,
307: p_data => x_msg_data);
308: x_return_status := FND_API.g_ret_sts_error;
309: RETURN l_post_account;
310: WHEN FND_API.G_EXC_ERROR THEN
311: l_post_account := 0;
312: -- Standard call to get message count and if count=1, get the message
313: FND_MSG_PUB.Count_And_Get (
314: p_encoded => FND_API.G_FALSE,

Line 314: p_encoded => FND_API.G_FALSE,

310: WHEN FND_API.G_EXC_ERROR THEN
311: l_post_account := 0;
312: -- Standard call to get message count and if count=1, get the message
313: FND_MSG_PUB.Count_And_Get (
314: p_encoded => FND_API.G_FALSE,
315: p_count => x_msg_count,
316: p_data => x_msg_data);
317: x_return_status := FND_API.g_ret_sts_error;
318: RETURN l_post_account;

Line 317: x_return_status := FND_API.g_ret_sts_error;

313: FND_MSG_PUB.Count_And_Get (
314: p_encoded => FND_API.G_FALSE,
315: p_count => x_msg_count,
316: p_data => x_msg_data);
317: x_return_status := FND_API.g_ret_sts_error;
318: RETURN l_post_account;
319: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
320: l_post_account := 0;
321: -- Standard call to get message count and if count=1, get the message

Line 319: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

315: p_count => x_msg_count,
316: p_data => x_msg_data);
317: x_return_status := FND_API.g_ret_sts_error;
318: RETURN l_post_account;
319: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
320: l_post_account := 0;
321: -- Standard call to get message count and if count=1, get the message
322: FND_MSG_PUB.Count_And_Get (
323: p_encoded => FND_API.G_FALSE,

Line 323: p_encoded => FND_API.G_FALSE,

319: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
320: l_post_account := 0;
321: -- Standard call to get message count and if count=1, get the message
322: FND_MSG_PUB.Count_And_Get (
323: p_encoded => FND_API.G_FALSE,
324: p_count => x_msg_count,
325: p_data => x_msg_data);
326: x_return_status := FND_API.g_ret_sts_unexp_error;
327: RETURN l_post_account;

Line 326: x_return_status := FND_API.g_ret_sts_unexp_error;

322: FND_MSG_PUB.Count_And_Get (
323: p_encoded => FND_API.G_FALSE,
324: p_count => x_msg_count,
325: p_data => x_msg_data);
326: x_return_status := FND_API.g_ret_sts_unexp_error;
327: RETURN l_post_account;
328: WHEN OTHERS THEN
329: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
330: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);

Line 335: p_encoded => FND_API.G_FALSE,

331: END IF;
332: l_post_account := 0;
333: -- Standard call to get message count and if count=1, get the message
334: FND_MSG_PUB.Count_And_Get (
335: p_encoded => FND_API.G_FALSE,
336: p_count => x_msg_count,
337: p_data => x_msg_data);
338: RETURN l_post_account;
339: END gl_post_account;

Line 349: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

345: | 'Sales Expense Account' |
346: +===========================================================================*/
347: PROCEDURE Start_Process (
348: p_api_version_number IN NUMBER,
349: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
350: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
351:
352: x_return_status OUT NOCOPY VARCHAR2,
353: x_msg_count OUT NOCOPY NUMBER,

Line 350: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

346: +===========================================================================*/
347: PROCEDURE Start_Process (
348: p_api_version_number IN NUMBER,
349: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
350: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
351:
352: x_return_status OUT NOCOPY VARCHAR2,
353: x_msg_count OUT NOCOPY NUMBER,
354: x_msg_data OUT NOCOPY VARCHAR2,

Line 484: IF NOT FND_API.Compatible_API_Call

480: BEGIN
481: IF G_DEBUG_HIGH_ON THEN
482: OZF_UTILITY_PVT.debug_message('Private Api: ' || l_full_name || ' START');
483: END IF;
484: IF NOT FND_API.Compatible_API_Call
485: (l_api_version_number
486: ,p_api_version_number
487: ,l_api_name
488: ,G_PKG_NAME

Line 491: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

487: ,l_api_name
488: ,G_PKG_NAME
489: )
490: THEN
491: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
492: END IF;
493: --Initialize message list if p_init_msg_list is TRUE.
494: IF FND_API.To_Boolean (p_init_msg_list) THEN
495: FND_MSG_PUB.initialize;

Line 494: IF FND_API.To_Boolean (p_init_msg_list) THEN

490: THEN
491: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
492: END IF;
493: --Initialize message list if p_init_msg_list is TRUE.
494: IF FND_API.To_Boolean (p_init_msg_list) THEN
495: FND_MSG_PUB.initialize;
496: END IF;
497: -- Initialize API return status to sucess
498: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 498: x_return_status := FND_API.G_RET_STS_SUCCESS;

494: IF FND_API.To_Boolean (p_init_msg_list) THEN
495: FND_MSG_PUB.initialize;
496: END IF;
497: -- Initialize API return status to sucess
498: x_return_status := FND_API.G_RET_STS_SUCCESS;
499:
500: IF G_DEBUG_HIGH_ON THEN
501: OZF_UTILITY_PVT.debug_message('Retreiving Chart Of Accounts Id');
502: END IF;

Line 504: IF p_budget_id <> FND_API.G_MISS_NUM OR

500: IF G_DEBUG_HIGH_ON THEN
501: OZF_UTILITY_PVT.debug_message('Retreiving Chart Of Accounts Id');
502: END IF;
503: /* get org id */
504: IF p_budget_id <> FND_API.G_MISS_NUM OR
505: p_budget_id IS NOT NULL
506: THEN
507: OPEN budget_org_csr(p_budget_id);
508: FETCH budget_org_csr INTO l_org_id;

Line 530: RAISE FND_API.G_EXC_ERROR;

526: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
527: FND_MESSAGE.SET_NAME('OZF','OZF_GL_CHART_OF_ACCT_MISSING');
528: FND_MESSAGE.SET_TOKEN('BUDGET',p_budget_id);
529: END IF;
530: RAISE FND_API.G_EXC_ERROR;
531: END IF;
532:
533: IF G_DEBUG_HIGH_ON THEN
534: OZF_UTILITY_PVT.debug_message('B4 calling gl_post_account ');

Line 553: IF x_return_status = FND_API.g_ret_sts_error THEN

549: OZF_UTILITY_PVT.debug_message('After gl_post_account ');
550: OZF_UTILITY_PVT.debug_message('l_account_id '|| l_account_id);
551: END IF;
552:
553: IF x_return_status = FND_API.g_ret_sts_error THEN
554: RAISE FND_API.G_EXC_ERROR;
555: ELSIF x_return_status = FND_API.g_ret_sts_unexp_error THEN
556: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
557: END IF;

Line 554: RAISE FND_API.G_EXC_ERROR;

550: OZF_UTILITY_PVT.debug_message('l_account_id '|| l_account_id);
551: END IF;
552:
553: IF x_return_status = FND_API.g_ret_sts_error THEN
554: RAISE FND_API.G_EXC_ERROR;
555: ELSIF x_return_status = FND_API.g_ret_sts_unexp_error THEN
556: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
557: END IF;
558:

Line 555: ELSIF x_return_status = FND_API.g_ret_sts_unexp_error THEN

551: END IF;
552:
553: IF x_return_status = FND_API.g_ret_sts_error THEN
554: RAISE FND_API.G_EXC_ERROR;
555: ELSIF x_return_status = FND_API.g_ret_sts_unexp_error THEN
556: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
557: END IF;
558:
559: -- call account generator workflow to get the cost of sale account

Line 556: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

552:
553: IF x_return_status = FND_API.g_ret_sts_error THEN
554: RAISE FND_API.G_EXC_ERROR;
555: ELSIF x_return_status = FND_API.g_ret_sts_unexp_error THEN
556: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
557: END IF;
558:
559: -- call account generator workflow to get the cost of sale account
560: -- get order header/line details from price adjustment

Line 561: IF p_price_adj_id <> FND_API.G_MISS_NUM OR

557: END IF;
558:
559: -- call account generator workflow to get the cost of sale account
560: -- get order header/line details from price adjustment
561: IF p_price_adj_id <> FND_API.G_MISS_NUM OR
562: p_price_adj_id IS NOT NULL
563: THEN
564:
565: --kdass 16-Aug-07 bug 6345327 - for third party utilizations, do not pass line_id and header_id

Line 592: IF l_line_id <> FND_API.G_MISS_NUM OR

588: END IF;
589: END IF;
590:
591: -- line id is found -- Accruals at Order Line level
592: IF l_line_id <> FND_API.G_MISS_NUM OR
593: l_line_id IS NOT NULL
594: THEN
595: IF G_DEBUG_HIGH_ON THEN
596: OZF_UTILITY_PVT.debug_message('Checking Order Category');

Line 630: RAISE FND_API.G_EXC_ERROR;

626: FND_MESSAGE.SET_NAME('OZF','OZF_GL_HEADER_DETAIL_MISSING');
627: FND_MESSAGE.SET_TOKEN('LINE_ID',l_line_id);
628: FND_MSG_PUB.ADD;
629: END IF;
630: RAISE FND_API.G_EXC_ERROR;
631: END IF;
632:
633: IF l_ship_from_org_id IS NULL THEN
634: -- 19-JUL-2004 yizhang: bill only orders do not have ship from org

Line 641: RAISE FND_API.G_EXC_ERROR;

637: FND_MESSAGE.SET_NAME('OZF','OZF_WAREHOUSE_MISSING');
638: FND_MESSAGE.SET_TOKEN('LINE_ID',l_line_id);
639: FND_MSG_PUB.ADD;
640: END IF;
641: RAISE FND_API.G_EXC_ERROR;
642: */
643: l_ship_from_org_id := l_org_id;
644: END IF;
645:

Line 663: ELSIF l_header_id <> FND_API.G_MISS_NUM OR

659: FETCH chart_of_acct_csr INTO l_chart_of_accounts_id;
660: CLOSE chart_of_acct_csr;
661:
662: -- line is null and header is found -- Accruals at Order header level
663: ELSIF l_header_id <> FND_API.G_MISS_NUM OR
664: l_header_id IS NOT NULL
665: THEN
666: IF G_DEBUG_HIGH_ON THEN
667: OZF_UTILITY_PVT.debug_message('Retreiving Header');

Line 708: ELSIF p_item_id <> FND_API.G_MISS_NUM OR

704: FETCH chart_of_acct_csr INTO l_chart_of_accounts_id;
705: CLOSE chart_of_acct_csr;
706:
707: -- line id and header is null and item id passed -- Lumpsums
708: ELSIF p_item_id <> FND_API.G_MISS_NUM OR
709: p_item_id is not null
710: THEN
711: IF p_item_type = 'PRODUCT' THEN
712: -- set the inventory item id

Line 890: x_return_status := FND_API.G_RET_STS_SUCCESS;

886: IF l_result THEN
887: IF G_DEBUG_HIGH_ON THEN
888: OZF_UTILITY_PVT.debug_message('Success OZFACCTG WF'||'-'||x_return_ccid);
889: END IF;
890: x_return_status := FND_API.G_RET_STS_SUCCESS;
891:
892: ELSE
893:
894: /*kdass: bug 8669319 - When Account Generator Workflow errors out, then the profile

Line 906: x_return_status := FND_API.G_RET_STS_SUCCESS;

902: IF G_DEBUG_HIGH_ON THEN
903: OZF_UTILITY_PVT.debug_message('Returning Default on Error'||'-'||l_account_id);
904: END IF;
905: x_return_ccid := l_account_id;
906: x_return_status := FND_API.G_RET_STS_SUCCESS;
907:
908: ELSE
909:
910: IF G_DEBUG_HIGH_ON THEN

Line 917: x_return_status := FND_API.G_RET_STS_ERROR;

913: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
914: FND_MESSAGE.SET_NAME('OZF','OZF_GL_ACC_GEN_FAILED');
915: FND_MSG_PUB.ADD;
916: END IF;
917: x_return_status := FND_API.G_RET_STS_ERROR;
918:
919: END IF; --IF l_default_gl_account = 'Y' THEN
920:
921: END IF; --IF l_result THEN

Line 928: x_return_status := FND_API.G_RET_STS_SUCCESS;

924: OZF_UTILITY_PVT.debug_message('Final Account Returned'||'-'||x_return_ccid);
925: END IF;
926: --Incase of Success also it was returning the default CCID
927: --x_return_ccid := l_account_id;
928: x_return_status := FND_API.G_RET_STS_SUCCESS;
929: --END IF;
930: IF G_DEBUG_HIGH_ON THEN
931: OZF_UTILITY_PVT.debug_message('Private Api: ' || l_api_name || ' END');
932: END IF;

Line 935: p_encoded => FND_API.G_FALSE,

931: OZF_UTILITY_PVT.debug_message('Private Api: ' || l_api_name || ' END');
932: END IF;
933: --Standard call to get message count and if count=1, get the message
934: FND_MSG_PUB.Count_And_Get (
935: p_encoded => FND_API.G_FALSE,
936: p_count => x_msg_count,
937: p_data => x_msg_data
938: );
939: EXCEPTION

Line 941: x_return_status := FND_API.G_RET_STS_ERROR;

937: p_data => x_msg_data
938: );
939: EXCEPTION
940: WHEN NO_DATA_FOUND THEN
941: x_return_status := FND_API.G_RET_STS_ERROR;
942: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
943: FND_MESSAGE.SET_NAME('OZF','OZF_COGS_NOT_FOUND');
944: FND_MESSAGE.SET_TOKEN('LINE_ID',l_line_id);
945: FND_MSG_PUB.ADD;

Line 948: p_encoded => FND_API.G_FALSE,

944: FND_MESSAGE.SET_TOKEN('LINE_ID',l_line_id);
945: FND_MSG_PUB.ADD;
946: END IF;
947: FND_MSG_PUB.Count_And_Get (
948: p_encoded => FND_API.G_FALSE,
949: p_count => x_msg_count,
950: p_data => x_msg_data
951: );
952: WHEN FND_API.G_EXC_ERROR THEN

Line 952: WHEN FND_API.G_EXC_ERROR THEN

948: p_encoded => FND_API.G_FALSE,
949: p_count => x_msg_count,
950: p_data => x_msg_data
951: );
952: WHEN FND_API.G_EXC_ERROR THEN
953: x_return_status := FND_API.G_RET_STS_ERROR;
954: -- Standard call to get message count and if count=1, get the message
955: FND_MSG_PUB.Count_And_Get (
956: p_encoded => FND_API.G_FALSE,

Line 953: x_return_status := FND_API.G_RET_STS_ERROR;

949: p_count => x_msg_count,
950: p_data => x_msg_data
951: );
952: WHEN FND_API.G_EXC_ERROR THEN
953: x_return_status := FND_API.G_RET_STS_ERROR;
954: -- Standard call to get message count and if count=1, get the message
955: FND_MSG_PUB.Count_And_Get (
956: p_encoded => FND_API.G_FALSE,
957: p_count => x_msg_count,

Line 956: p_encoded => FND_API.G_FALSE,

952: WHEN FND_API.G_EXC_ERROR THEN
953: x_return_status := FND_API.G_RET_STS_ERROR;
954: -- Standard call to get message count and if count=1, get the message
955: FND_MSG_PUB.Count_And_Get (
956: p_encoded => FND_API.G_FALSE,
957: p_count => x_msg_count,
958: p_data => x_msg_data
959: );
960: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 960: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

956: p_encoded => FND_API.G_FALSE,
957: p_count => x_msg_count,
958: p_data => x_msg_data
959: );
960: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
961: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
962: -- Standard call to get message count and if count=1, get the message
963: FND_MSG_PUB.Count_And_Get (
964: p_encoded => FND_API.G_FALSE,

Line 961: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

957: p_count => x_msg_count,
958: p_data => x_msg_data
959: );
960: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
961: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
962: -- Standard call to get message count and if count=1, get the message
963: FND_MSG_PUB.Count_And_Get (
964: p_encoded => FND_API.G_FALSE,
965: p_count => x_msg_count,

Line 964: p_encoded => FND_API.G_FALSE,

960: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
961: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
962: -- Standard call to get message count and if count=1, get the message
963: FND_MSG_PUB.Count_And_Get (
964: p_encoded => FND_API.G_FALSE,
965: p_count => x_msg_count,
966: p_data => x_msg_data
967: );
968: WHEN OTHERS THEN

Line 969: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

965: p_count => x_msg_count,
966: p_data => x_msg_data
967: );
968: WHEN OTHERS THEN
969: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
970: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
971: THEN
972: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
973: END IF;

Line 976: p_encoded => FND_API.G_FALSE,

972: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
973: END IF;
974: -- Standard call to get message count and if count=1, get the message
975: FND_MSG_PUB.Count_And_Get (
976: p_encoded => FND_API.G_FALSE,
977: p_count => x_msg_count,
978: p_data => x_msg_data
979: );
980: END Start_Process; /* START_PROCESS */