DBA Data[Home] [Help]

APPS.OKC_TIME_UTIL_PVT dependencies on OKC_API

Line 36: x_return_status := OKC_API.G_RET_STS_SUCCESS;

32: l_row_not_found BOOLEAN := TRUE;
33: time_code_unit_rec time_code_unit_csr%ROWTYPE;
34: item_not_found_error EXCEPTION;
35: BEGIN
36: x_return_status := OKC_API.G_RET_STS_SUCCESS;
37: OPEN time_code_unit_csr(p_timeunit);
38: FETCH time_code_unit_csr into time_code_unit_rec;
39: l_row_not_found := time_code_unit_csr%NOTFOUND;
40: CLOSE time_code_unit_csr;

Line 42: OKC_API.set_message(G_APP_NAME, G_INVALID_VALUE,G_COL_NAME_TOKEN,'uom_code');

38: FETCH time_code_unit_csr into time_code_unit_rec;
39: l_row_not_found := time_code_unit_csr%NOTFOUND;
40: CLOSE time_code_unit_csr;
41: IF (l_row_not_found) THEN
42: OKC_API.set_message(G_APP_NAME, G_INVALID_VALUE,G_COL_NAME_TOKEN,'uom_code');
43: RAISE item_not_found_error;
44: ELSE
45: x_timeunit := time_code_unit_rec.tce_code;
46: x_quantity := time_code_unit_rec.quantity;

Line 50: x_return_status := OKC_API.G_RET_STS_ERROR;

46: x_quantity := time_code_unit_rec.quantity;
47: END IF;
48: EXCEPTION
49: WHEN item_not_found_error THEN
50: x_return_status := OKC_API.G_RET_STS_ERROR;
51: WHEN OTHERS THEN
52: OKC_API.SET_MESSAGE(p_app_name => g_app_name,
53: p_msg_name => g_unexpected_error,
54: p_token1 => g_sqlcode_token,

Line 52: OKC_API.SET_MESSAGE(p_app_name => g_app_name,

48: EXCEPTION
49: WHEN item_not_found_error THEN
50: x_return_status := OKC_API.G_RET_STS_ERROR;
51: WHEN OTHERS THEN
52: OKC_API.SET_MESSAGE(p_app_name => g_app_name,
53: p_msg_name => g_unexpected_error,
54: p_token1 => g_sqlcode_token,
55: p_token1_value => sqlcode,
56: p_token2 => g_col_name_token,

Line 61: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

57: p_token2_value => 'uom_code',
58: p_token3 => g_sqlerrm_token,
59: p_token3_value => sqlerrm);
60: -- notify caller of an UNEXPECTED error
61: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
62: end get_seeded_timeunit;
63:
64: PROCEDURE get_uom_code (
65: p_timeunit in varchar2,

Line 107: x_return_status := OKC_API.G_RET_STS_SUCCESS;

103: l_row_not_found BOOLEAN := TRUE;
104: time_code_unit_rec time_code_unit_csr%ROWTYPE;
105: item_not_found_error EXCEPTION;
106: BEGIN
107: x_return_status := OKC_API.G_RET_STS_SUCCESS;
108: OPEN time_code_unit_csr(p_timeunit, p_duration);
109: FETCH time_code_unit_csr into time_code_unit_rec;
110: l_row_not_found := time_code_unit_csr%NOTFOUND;
111: CLOSE time_code_unit_csr;

Line 113: OKC_API.set_message(G_APP_NAME, G_INVALID_VALUE,G_COL_NAME_TOKEN,'uom_code');

109: FETCH time_code_unit_csr into time_code_unit_rec;
110: l_row_not_found := time_code_unit_csr%NOTFOUND;
111: CLOSE time_code_unit_csr;
112: IF (l_row_not_found) THEN
113: OKC_API.set_message(G_APP_NAME, G_INVALID_VALUE,G_COL_NAME_TOKEN,'uom_code');
114: RAISE item_not_found_error;
115: ELSE
116: x_timeunit := time_code_unit_rec.uom_code;
117: if time_code_unit_rec.quantity > 1 Then

Line 125: x_return_status := OKC_API.G_RET_STS_ERROR;

121: end if;
122: END IF;
123: EXCEPTION
124: WHEN item_not_found_error THEN
125: x_return_status := OKC_API.G_RET_STS_ERROR;
126: WHEN OTHERS THEN
127: OKC_API.SET_MESSAGE(p_app_name => g_app_name,
128: p_msg_name => g_unexpected_error,
129: p_token1 => g_sqlcode_token,

Line 127: OKC_API.SET_MESSAGE(p_app_name => g_app_name,

123: EXCEPTION
124: WHEN item_not_found_error THEN
125: x_return_status := OKC_API.G_RET_STS_ERROR;
126: WHEN OTHERS THEN
127: OKC_API.SET_MESSAGE(p_app_name => g_app_name,
128: p_msg_name => g_unexpected_error,
129: p_token1 => g_sqlcode_token,
130: p_token1_value => sqlcode,
131: p_token2 => g_col_name_token,

Line 136: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

132: p_token2_value => 'uom_code',
133: p_token3 => g_sqlerrm_token,
134: p_token3_value => sqlerrm);
135: -- notify caller of an UNEXPECTED error
136: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
137: end get_uom_code;
138:
139: PROCEDURE get_duration(
140: p_start_date in date,

Line 151: x_return_status := OKC_API.G_RET_STS_SUCCESS;

147: l_timeunit varchar2(10);
148: l_offset number := 0;
149: p_duration number := 0;
150: begin
151: x_return_status := OKC_API.G_RET_STS_SUCCESS;
152: --Bug 3272514 Set the x_return_status to error if the end date is null
153: if p_end_date is NULL Then
154: x_duration := NULL;
155: x_timeunit := NULL;

Line 156: x_return_status := OKC_API.G_RET_STS_ERROR;

152: --Bug 3272514 Set the x_return_status to error if the end date is null
153: if p_end_date is NULL Then
154: x_duration := NULL;
155: x_timeunit := NULL;
156: x_return_status := OKC_API.G_RET_STS_ERROR;
157: return;
158: end if;
159: if p_start_date > p_end_date then
160: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,

Line 160: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,

156: x_return_status := OKC_API.G_RET_STS_ERROR;
157: return;
158: end if;
159: if p_start_date > p_end_date then
160: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,
161: p_msg_name => G_DATE_ERROR,
162: p_token1 => G_COL_NAME_TOKEN,
163: p_token1_value => 'START_DATE');
164: x_return_status := OKC_API.G_RET_STS_ERROR;

Line 164: x_return_status := OKC_API.G_RET_STS_ERROR;

160: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,
161: p_msg_name => G_DATE_ERROR,
162: p_token1 => G_COL_NAME_TOKEN,
163: p_token1_value => 'START_DATE');
164: x_return_status := OKC_API.G_RET_STS_ERROR;
165: return;
166: end if;
167: /*
168: if to_char(p_start_date,'DDMM') = '2902' and

Line 175: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then

171: l_timeunit := 'YEAR';
172: p_duration := to_number(to_char(p_end_date,'YYYY')) -
173: to_number(to_char(p_start_date,'YYYY'));
174: get_uom_code(l_timeunit,p_duration,x_return_status,x_timeunit,x_duration);
175: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then
176: x_duration := NULL;
177: end if;
178: return;
179: end if;

Line 195: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then

191: l_timeunit := 'SECOND';
192: p_duration := l_offset;
193: end if;
194: get_uom_code(l_timeunit,p_duration,x_return_status,x_timeunit,x_duration);
195: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then
196: x_duration := NULL;
197: end if;
198: return;
199: end if;

Line 240: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then

236: end if;
237: l_counter := l_counter+1;
238: end loop;
239: get_uom_code(l_timeunit,p_duration,x_return_status,x_timeunit,x_duration);
240: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then
241: x_duration := NULL;
242: end if;
243: END get_duration;
244:

Line 258: x_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;

254: l_end_date date;
255: l_year number;
256: l_timeunit varchar2(10);
257: l_duration number;
258: x_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
259: begin
260: if p_timeunit is NULL and
261: p_duration is NULL Then
262: return (NULL);

Line 265: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then

261: p_duration is NULL Then
262: return (NULL);
263: end if;
264: get_seeded_timeunit(p_timeunit,x_return_status,l_duration, l_timeunit);
265: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then
266: return (NULL);
267: end if;
268: l_duration := p_duration * l_duration;
269: if l_timeunit = 'YEAR' Then

Line 355: OKC_API.SET_MESSAGE(p_app_name => g_app_name,

351: end if;
352: EXCEPTION --BUG:3595566 Exception block added to catch
353: when OTHERS then -- unhandled exceptions.
354: if SQLCODE=-1841 then
355: OKC_API.SET_MESSAGE(p_app_name => g_app_name,
356: p_msg_name => G_DATE_ERROR,
357: p_token1 => sqlcode,
358: p_token1_value => sqlerrm);
359: else

Line 360: OKC_API.SET_MESSAGE(p_app_name => g_app_name,

356: p_msg_name => G_DATE_ERROR,
357: p_token1 => sqlcode,
358: p_token1_value => sqlerrm);
359: else
360: OKC_API.SET_MESSAGE(p_app_name => g_app_name,
361: p_msg_name => g_unexpected_error,
362: p_token1 => sqlcode,
363: p_token1_value => sqlerrm);
364: end if;

Line 661: OKC_API.set_message(G_APP_NAME, G_INVALID_VALUE,G_COL_NAME_TOKEN,'uom_code');

657: FETCH time_code_unit_csr into time_code_unit_rec;
658: l_row_not_found := time_code_unit_csr%NOTFOUND;
659: CLOSE time_code_unit_csr;
660: IF (l_row_not_found) THEN
661: OKC_API.set_message(G_APP_NAME, G_INVALID_VALUE,G_COL_NAME_TOKEN,'uom_code');
662: RAISE item_not_found_error;
663: ELSE
664: x_timeunit := time_code_unit_rec.uom_code;
665: return x_timeunit;

Line 671: OKC_API.SET_MESSAGE(p_app_name => g_app_name,

667: EXCEPTION
668: WHEN item_not_found_error THEN
669: NULL;
670: WHEN OTHERS THEN
671: OKC_API.SET_MESSAGE(p_app_name => g_app_name,
672: p_msg_name => g_unexpected_error,
673: p_token1 => g_sqlcode_token,
674: p_token1_value => sqlcode,
675: p_token2 => g_col_name_token,

Line 695: x_return_status := OKC_API.G_RET_STS_SUCCESS;

691: l_timeunit varchar2(10);
692: l_offset number := 0;
693: p_duration number := 0;
694: begin
695: x_return_status := OKC_API.G_RET_STS_SUCCESS;
696: if p_end_date is NULL Then
697: x_month_duration := NULL;
698: x_day_duration := NULL;
699: return;

Line 702: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,

698: x_day_duration := NULL;
699: return;
700: end if;
701: if p_start_date > p_end_date then
702: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,
703: p_msg_name => G_DATE_ERROR,
704: p_token1 => G_COL_NAME_TOKEN,
705: p_token1_value => 'START_DATE');
706: x_return_status := OKC_API.G_RET_STS_ERROR;

Line 706: x_return_status := OKC_API.G_RET_STS_ERROR;

702: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,
703: p_msg_name => G_DATE_ERROR,
704: p_token1 => G_COL_NAME_TOKEN,
705: p_token1_value => 'START_DATE');
706: x_return_status := OKC_API.G_RET_STS_ERROR;
707: return;
708: end if;
709: if (p_end_date - p_start_date) < 1 then
710: x_day_duration := 0;

Line 758: x_return_status := OKC_API.G_RET_STS_SUCCESS;

754: l_timeunit varchar2(10);
755: l_offset number := 0;
756: p_duration number := 0;
757: begin
758: x_return_status := OKC_API.G_RET_STS_SUCCESS;
759: --Bug 3272514 Set the x_return_status to error if the end date is null
760: if p_end_date is NULL Then
761: x_duration := NULL;
762: x_timeunit := NULL;

Line 763: x_return_status := OKC_API.G_RET_STS_ERROR;

759: --Bug 3272514 Set the x_return_status to error if the end date is null
760: if p_end_date is NULL Then
761: x_duration := NULL;
762: x_timeunit := NULL;
763: x_return_status := OKC_API.G_RET_STS_ERROR;
764: return;
765: end if;
766: if p_start_date > p_end_date then
767: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,

Line 767: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,

763: x_return_status := OKC_API.G_RET_STS_ERROR;
764: return;
765: end if;
766: if p_start_date > p_end_date then
767: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,
768: p_msg_name => G_DATE_ERROR,
769: p_token1 => G_COL_NAME_TOKEN,
770: p_token1_value => 'START_DATE');
771: x_return_status := OKC_API.G_RET_STS_ERROR;

Line 771: x_return_status := OKC_API.G_RET_STS_ERROR;

767: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,
768: p_msg_name => G_DATE_ERROR,
769: p_token1 => G_COL_NAME_TOKEN,
770: p_token1_value => 'START_DATE');
771: x_return_status := OKC_API.G_RET_STS_ERROR;
772: return;
773: end if;
774: /*
775: if to_char(p_start_date,'DDMM') = '2902' and

Line 782: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then

778: l_timeunit := 'YEAR';
779: p_duration := to_number(to_char(p_end_date,'YYYY')) -
780: to_number(to_char(p_start_date,'YYYY'));
781: get_uom_code(l_timeunit,p_duration,x_return_status,x_timeunit,x_duration);
782: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then
783: x_duration := NULL;
784: end if;
785: return;
786: end if;

Line 802: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then

798: l_timeunit := 'SECOND';
799: p_duration := l_offset;
800: end if;
801: get_uom_code(l_timeunit,p_duration,x_return_status,x_timeunit,x_duration);
802: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then
803: x_duration := NULL;
804: end if;
805: return;
806: end if;

Line 851: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then

847: -- added for pricing call bug 4919586 ( base bug 4917510)
848: x_duration := p_duration;
849: x_timeunit := l_timeunit;
850: -- get_uom_code(l_timeunit,p_duration,x_return_status,x_timeunit,x_duration);
851: if x_return_status <> OKC_API.G_RET_STS_SUCCESS then
852: x_duration := NULL;
853: end if;
854: END get_pricing_duration;
855: