148: -- ===========================================================================
149:
150: PROCEDURE Get_LE_TimeZone_Info(
151: p_api_version IN NUMBER,
152: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
153: p_commit IN VARCHAR2 := FND_API.G_FALSE,
154: x_return_status OUT NOCOPY VARCHAR2,
155: x_msg_count OUT NOCOPY NUMBER,
156: x_msg_data OUT NOCOPY VARCHAR2,
149:
150: PROCEDURE Get_LE_TimeZone_Info(
151: p_api_version IN NUMBER,
152: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
153: p_commit IN VARCHAR2 := FND_API.G_FALSE,
154: x_return_status OUT NOCOPY VARCHAR2,
155: x_msg_count OUT NOCOPY NUMBER,
156: x_msg_data OUT NOCOPY VARCHAR2,
157: p_legalentity_id IN XLE_ENTITY_PROFILES.legal_entity_id%TYPE,
165: l_commit VARCHAR2(100);
166: BEGIN
167:
168: -- Initialize API return status to success
169: x_return_status := FND_API.G_RET_STS_SUCCESS;
170:
171: IF p_legalentity_id IS NOT NULL THEN
172:
173: -- Initialize the out variables to NULL
191: AND xlep.legal_entity_id = p_legalentity_id
192: AND ftb.timezone_code = hrl.timezone_code ;
193:
194: ELSE
195: x_return_status := FND_API.G_RET_STS_ERROR;
196: x_msg_data := 'Missing mandatory arguments.';
197: END IF;
198:
199: EXCEPTION
197: END IF;
198:
199: EXCEPTION
200: /* WHEN NO_DATA_FOUND THEN
201: x_return_status := FND_API.G_RET_STS_ERROR ;
202: x_msg_data := 'Could not find an Timezone Information for the Legal Entity : ' || p_legalentity_id;
203: RAISE FND_API.G_EXC_ERROR; */
204: WHEN NO_DATA_FOUND THEN
205: NULL;
199: EXCEPTION
200: /* WHEN NO_DATA_FOUND THEN
201: x_return_status := FND_API.G_RET_STS_ERROR ;
202: x_msg_data := 'Could not find an Timezone Information for the Legal Entity : ' || p_legalentity_id;
203: RAISE FND_API.G_EXC_ERROR; */
204: WHEN NO_DATA_FOUND THEN
205: NULL;
206: WHEN TOO_MANY_ROWS THEN
207: x_return_status := FND_API.G_RET_STS_ERROR ;
203: RAISE FND_API.G_EXC_ERROR; */
204: WHEN NO_DATA_FOUND THEN
205: NULL;
206: WHEN TOO_MANY_ROWS THEN
207: x_return_status := FND_API.G_RET_STS_ERROR ;
208: x_msg_data := 'The Legal Entity : ' || p_legalentity_id || ' is associated with more than one Country';
209: RAISE FND_API.G_EXC_ERROR;
210:
211: END Get_LE_TimeZone_Info;
205: NULL;
206: WHEN TOO_MANY_ROWS THEN
207: x_return_status := FND_API.G_RET_STS_ERROR ;
208: x_msg_data := 'The Legal Entity : ' || p_legalentity_id || ' is associated with more than one Country';
209: RAISE FND_API.G_EXC_ERROR;
210:
211: END Get_LE_TimeZone_Info;
212:
213: -- ===========================================================================
269: -- Get the timezone code of the legal entity
270: -- Call the Get_LE_TimeZone_Info API to get the timezone information
271: Get_LE_TimeZone_Info (
272: p_api_version => 1.0
273: , p_init_msg_list => FND_API.G_FALSE
274: , p_commit => FND_API.G_FALSE
275: , x_return_status => l_return_status
276: , x_msg_count => l_msg_count
277: , x_msg_data => l_msg_data
270: -- Call the Get_LE_TimeZone_Info API to get the timezone information
271: Get_LE_TimeZone_Info (
272: p_api_version => 1.0
273: , p_init_msg_list => FND_API.G_FALSE
274: , p_commit => FND_API.G_FALSE
275: , x_return_status => l_return_status
276: , x_msg_count => l_msg_count
277: , x_msg_data => l_msg_data
278: , p_legalentity_id => l_legal_entity_id
279: , x_timezone_code => l_timezone_code
280: , x_timezone_id => l_timezone_id) ;
281:
282: -- if any error occurs propagate as unexpected error
283: IF l_return_status = FND_API.G_RET_STS_ERROR OR
284: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
285: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
286: END IF ;
287: END IF;
280: , x_timezone_id => l_timezone_id) ;
281:
282: -- if any error occurs propagate as unexpected error
283: IF l_return_status = FND_API.G_RET_STS_ERROR OR
284: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
285: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
286: END IF ;
287: END IF;
288: -- If NO Timezone code was associated to the Location of the LE
281:
282: -- if any error occurs propagate as unexpected error
283: IF l_return_status = FND_API.G_RET_STS_ERROR OR
284: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
285: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
286: END IF ;
287: END IF;
288: -- If NO Timezone code was associated to the Location of the LE
289: -- OR the server and LE timezone are identycal then return the sysdate
295: -- Call the get_time API to convert the server timezone date
296: -- to the LE timezone
297: HZ_TIMEZONE_PUB.Get_Time
298: ( p_api_version => 1.0
299: , p_init_msg_list => FND_API.G_FALSE
300: , p_source_tz_id => G_SERVER_TZ_ID
301: , p_dest_tz_id => l_timezone_id
302: , p_source_day_time => SYSDATE
303: , x_dest_day_time => l_le_sysdate
305: , x_msg_count => l_msg_count1
306: , x_msg_data => l_msg_data1 ) ;
307:
308: -- if any error occurs propagate as unexpected error
309: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
310: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
311: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
312: END IF ;
313:
306: , x_msg_data => l_msg_data1 ) ;
307:
308: -- if any error occurs propagate as unexpected error
309: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
310: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
311: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
312: END IF ;
313:
314: END IF ;
307:
308: -- if any error occurs propagate as unexpected error
309: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
310: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
311: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
312: END IF ;
313:
314: END IF ;
315:
390: -- Get the timezone code of the legal entity
391: -- Call the Get_LE_TimeZone_Info API to get the timezone information
392: Get_LE_TimeZone_Info (
393: p_api_version => 1.0
394: , p_init_msg_list => FND_API.G_FALSE
395: , p_commit => FND_API.G_FALSE
396: , x_return_status => l_return_status
397: , x_msg_count => l_msg_count
398: , x_msg_data => l_msg_data
391: -- Call the Get_LE_TimeZone_Info API to get the timezone information
392: Get_LE_TimeZone_Info (
393: p_api_version => 1.0
394: , p_init_msg_list => FND_API.G_FALSE
395: , p_commit => FND_API.G_FALSE
396: , x_return_status => l_return_status
397: , x_msg_count => l_msg_count
398: , x_msg_data => l_msg_data
399: , p_legalentity_id => l_legal_entity_id
400: , x_timezone_code => l_timezone_code
401: , x_timezone_id => l_timezone_id) ;
402:
403: -- if any error occurs propagate as unexpected error
404: IF l_return_status = FND_API.G_RET_STS_ERROR OR
405: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
406: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
407: END IF ;
408: END IF;
401: , x_timezone_id => l_timezone_id) ;
402:
403: -- if any error occurs propagate as unexpected error
404: IF l_return_status = FND_API.G_RET_STS_ERROR OR
405: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
406: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
407: END IF ;
408: END IF;
409: -- If NO Timezone code was associated to the Location of the LE
402:
403: -- if any error occurs propagate as unexpected error
404: IF l_return_status = FND_API.G_RET_STS_ERROR OR
405: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
406: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
407: END IF ;
408: END IF;
409: -- If NO Timezone code was associated to the Location of the LE
410: -- OR the server and LE timezone are identycal then return the sysdate
416: -- Call the get_time API to convert the server timezone date
417: -- to the LE timezone
418: HZ_TIMEZONE_PUB.Get_Time
419: ( p_api_version => 1.0
420: , p_init_msg_list => FND_API.G_FALSE
421: , p_source_tz_id => G_SERVER_TZ_ID
422: , p_dest_tz_id => l_timezone_id
423: , p_source_day_time => SYSDATE
424: , x_dest_day_time => l_le_sysdate
426: , x_msg_count => l_msg_count1
427: , x_msg_data => l_msg_data1 ) ;
428:
429: -- if any error occurs propagate as unexpected error
430: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
431: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
432: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
433: END IF ;
434:
427: , x_msg_data => l_msg_data1 ) ;
428:
429: -- if any error occurs propagate as unexpected error
430: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
431: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
432: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
433: END IF ;
434:
435: END IF ;
428:
429: -- if any error occurs propagate as unexpected error
430: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
431: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
432: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
433: END IF ;
434:
435: END IF ;
436:
518:
519: -- Call the Get_LE_TimeZone_Info API to get the timezone informatio
520: Get_LE_TimeZone_Info (
521: p_api_version => 1.0
522: , p_init_msg_list => FND_API.G_FALSE
523: , p_commit => FND_API.G_FALSE
524: , x_return_status => l_return_status
525: , x_msg_count => l_msg_count
526: , x_msg_data => l_msg_data
519: -- Call the Get_LE_TimeZone_Info API to get the timezone informatio
520: Get_LE_TimeZone_Info (
521: p_api_version => 1.0
522: , p_init_msg_list => FND_API.G_FALSE
523: , p_commit => FND_API.G_FALSE
524: , x_return_status => l_return_status
525: , x_msg_count => l_msg_count
526: , x_msg_data => l_msg_data
527: , p_legalentity_id => l_legal_entity_id
528: , x_timezone_code => l_timezone_code
529: , x_timezone_id => l_timezone_id) ;
530:
531: -- if any error occurs propagate as unexpected error
532: IF l_return_status = FND_API.G_RET_STS_ERROR OR
533: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
534: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
535: END IF ;
536: END IF ;
529: , x_timezone_id => l_timezone_id) ;
530:
531: -- if any error occurs propagate as unexpected error
532: IF l_return_status = FND_API.G_RET_STS_ERROR OR
533: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
534: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
535: END IF ;
536: END IF ;
537:
530:
531: -- if any error occurs propagate as unexpected error
532: IF l_return_status = FND_API.G_RET_STS_ERROR OR
533: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
534: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
535: END IF ;
536: END IF ;
537:
538: -- If NO Timezone code was associated to the Location of the LE
545: -- Call the get_time API to convert the server timezone date
546: -- to the LE timezone
547: HZ_TIMEZONE_PUB.Get_Time
548: ( p_api_version => 1.0
549: , p_init_msg_list => FND_API.G_FALSE
550: , p_source_tz_id => G_SERVER_TZ_ID
551: , p_dest_tz_id => l_timezone_id
552: , p_source_day_time => p_trxn_date
553: , x_dest_day_time => l_le_day_for_inv
555: , x_msg_count => l_msg_count1
556: , x_msg_data => l_msg_data1 ) ;
557:
558: -- if any error occurs propagate as unexpected error
559: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
560: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
561: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
562: END IF ;
563:
556: , x_msg_data => l_msg_data1 ) ;
557:
558: -- if any error occurs propagate as unexpected error
559: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
560: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
561: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
562: END IF ;
563:
564: END IF ;
557:
558: -- if any error occurs propagate as unexpected error
559: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
560: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
561: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
562: END IF ;
563:
564: END IF ;
565:
684:
685: -- Call the Get_LE_TimeZone_Info API to get the timezone informatio
686: Get_LE_TimeZone_Info (
687: p_api_version => 1.0
688: , p_init_msg_list => FND_API.G_FALSE
689: , p_commit => FND_API.G_FALSE
690: , x_return_status => l_return_status
691: , x_msg_count => l_msg_count
692: , x_msg_data => l_msg_data
685: -- Call the Get_LE_TimeZone_Info API to get the timezone informatio
686: Get_LE_TimeZone_Info (
687: p_api_version => 1.0
688: , p_init_msg_list => FND_API.G_FALSE
689: , p_commit => FND_API.G_FALSE
690: , x_return_status => l_return_status
691: , x_msg_count => l_msg_count
692: , x_msg_data => l_msg_data
693: , p_legalentity_id => l_legal_entity_id
694: , x_timezone_code => l_timezone_code
695: , x_timezone_id => l_timezone_id) ;
696:
697: -- if any error occurs propagate as unexpected error
698: IF l_return_status = FND_API.G_RET_STS_ERROR OR
699: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
700: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
701: END IF ;
702: END IF ;
695: , x_timezone_id => l_timezone_id) ;
696:
697: -- if any error occurs propagate as unexpected error
698: IF l_return_status = FND_API.G_RET_STS_ERROR OR
699: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
700: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
701: END IF ;
702: END IF ;
703:
696:
697: -- if any error occurs propagate as unexpected error
698: IF l_return_status = FND_API.G_RET_STS_ERROR OR
699: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
700: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
701: END IF ;
702: END IF ;
703:
704: -- If NO Timezone code was associated to the Location of the LE
711: -- Call the get_time API to convert the server timezone date
712: -- to the LE timezone
713: HZ_TIMEZONE_PUB.Get_Time
714: ( p_api_version => 1.0
715: , p_init_msg_list => FND_API.G_FALSE
716: , p_source_tz_id => G_SERVER_TZ_ID
717: , p_dest_tz_id => l_timezone_id
718: , p_source_day_time => p_trxn_date
719: , x_dest_day_time => l_le_day_time_for_ou
721: , x_msg_count => l_msg_count1
722: , x_msg_data => l_msg_data1 ) ;
723:
724: -- if any error occurs propagate as unexpected error
725: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
726: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
727: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
728: END IF ;
729:
722: , x_msg_data => l_msg_data1 ) ;
723:
724: -- if any error occurs propagate as unexpected error
725: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
726: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
727: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
728: END IF ;
729:
730: END IF ;
723:
724: -- if any error occurs propagate as unexpected error
725: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
726: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
727: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
728: END IF ;
729:
730: END IF ;
731:
798:
799: -- Call the Get_LE_TimeZone_Info API to get the timezone information of the Legal Entity
800: Get_LE_TimeZone_Info (
801: p_api_version => 1.0
802: , p_init_msg_list => FND_API.G_FALSE
803: , p_commit => FND_API.G_FALSE
804: , x_return_status => l_return_status
805: , x_msg_count => l_msg_count
806: , x_msg_data => l_msg_data
799: -- Call the Get_LE_TimeZone_Info API to get the timezone information of the Legal Entity
800: Get_LE_TimeZone_Info (
801: p_api_version => 1.0
802: , p_init_msg_list => FND_API.G_FALSE
803: , p_commit => FND_API.G_FALSE
804: , x_return_status => l_return_status
805: , x_msg_count => l_msg_count
806: , x_msg_data => l_msg_data
807: , p_legalentity_id => l_legal_entity_id
808: , x_timezone_code => l_timezone_code
809: , x_timezone_id => l_timezone_id) ;
810:
811: -- if any error occurs propagate as unexpected error
812: IF l_return_status = FND_API.G_RET_STS_ERROR OR
813: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
814: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
815: END IF ;
816: END IF ;
809: , x_timezone_id => l_timezone_id) ;
810:
811: -- if any error occurs propagate as unexpected error
812: IF l_return_status = FND_API.G_RET_STS_ERROR OR
813: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
814: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
815: END IF ;
816: END IF ;
817:
810:
811: -- if any error occurs propagate as unexpected error
812: IF l_return_status = FND_API.G_RET_STS_ERROR OR
813: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
814: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
815: END IF ;
816: END IF ;
817:
818: END IF ;
884:
885: -- Call the Get_LE_TimeZone_Info API to get the timezone information of the legal entity
886: Get_LE_TimeZone_Info (
887: p_api_version => 1.0
888: , p_init_msg_list => FND_API.G_FALSE
889: , p_commit => FND_API.G_FALSE
890: , x_return_status => l_return_status
891: , x_msg_count => l_msg_count
892: , x_msg_data => l_msg_data
885: -- Call the Get_LE_TimeZone_Info API to get the timezone information of the legal entity
886: Get_LE_TimeZone_Info (
887: p_api_version => 1.0
888: , p_init_msg_list => FND_API.G_FALSE
889: , p_commit => FND_API.G_FALSE
890: , x_return_status => l_return_status
891: , x_msg_count => l_msg_count
892: , x_msg_data => l_msg_data
893: , p_legalentity_id => l_legal_entity_id
894: , x_timezone_code => l_timezone_code
895: , x_timezone_id => l_timezone_id) ;
896:
897: -- if any error occurs propagate as unexpected error
898: IF l_return_status = FND_API.G_RET_STS_ERROR OR
899: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
900: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
901: END IF ;
902: END IF ;
895: , x_timezone_id => l_timezone_id) ;
896:
897: -- if any error occurs propagate as unexpected error
898: IF l_return_status = FND_API.G_RET_STS_ERROR OR
899: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
900: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
901: END IF ;
902: END IF ;
903:
896:
897: -- if any error occurs propagate as unexpected error
898: IF l_return_status = FND_API.G_RET_STS_ERROR OR
899: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
900: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
901: END IF ;
902: END IF ;
903:
904: END IF ;
977:
978: -- Call the Get_LE_TimeZone_Info API to get the timezone information for LE
979: Get_LE_TimeZone_Info (
980: p_api_version => 1.0
981: , p_init_msg_list => FND_API.G_FALSE
982: , p_commit => FND_API.G_FALSE
983: , x_return_status => l_return_status
984: , x_msg_count => l_msg_count
985: , x_msg_data => l_msg_data
978: -- Call the Get_LE_TimeZone_Info API to get the timezone information for LE
979: Get_LE_TimeZone_Info (
980: p_api_version => 1.0
981: , p_init_msg_list => FND_API.G_FALSE
982: , p_commit => FND_API.G_FALSE
983: , x_return_status => l_return_status
984: , x_msg_count => l_msg_count
985: , x_msg_data => l_msg_data
986: , p_legalentity_id => l_legal_entity_id
987: , x_timezone_code => l_timezone_code
988: , x_timezone_id => l_timezone_id) ;
989:
990: -- if any error occurs propagate as unexpected error
991: IF l_return_status = FND_API.G_RET_STS_ERROR OR
992: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
993: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
994: END IF ;
995:
988: , x_timezone_id => l_timezone_id) ;
989:
990: -- if any error occurs propagate as unexpected error
991: IF l_return_status = FND_API.G_RET_STS_ERROR OR
992: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
993: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
994: END IF ;
995:
996: END IF ;
989:
990: -- if any error occurs propagate as unexpected error
991: IF l_return_status = FND_API.G_RET_STS_ERROR OR
992: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
993: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
994: END IF ;
995:
996: END IF ;
997:
1005: -- Call the get_time API to convert the server timezone date
1006: -- to the LE timezone
1007: HZ_TIMEZONE_PUB.Get_Time
1008: ( p_api_version => 1.0
1009: , p_init_msg_list => FND_API.G_FALSE
1010: , p_source_tz_id => l_timezone_id
1011: , p_dest_tz_id => G_SERVER_TZ_ID
1012: , p_source_day_time => p_le_date
1013: , x_dest_day_time => l_srv_day_time
1015: , x_msg_count => l_msg_count1
1016: , x_msg_data => l_msg_data1 ) ;
1017:
1018: -- if any error occurs propagate as unexpected error
1019: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
1020: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
1021: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1022: END IF ;
1023:
1016: , x_msg_data => l_msg_data1 ) ;
1017:
1018: -- if any error occurs propagate as unexpected error
1019: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
1020: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
1021: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1022: END IF ;
1023:
1024: END IF ;
1017:
1018: -- if any error occurs propagate as unexpected error
1019: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
1020: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
1021: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1022: END IF ;
1023:
1024: END IF ;
1025:
1101:
1102: -- Call the Get_LE_TimeZone_Info API to get the timezone information for LE
1103: Get_LE_TimeZone_Info (
1104: p_api_version => 1.0
1105: , p_init_msg_list => FND_API.G_FALSE
1106: , p_commit => FND_API.G_FALSE
1107: , x_return_status => l_return_status
1108: , x_msg_count => l_msg_count
1109: , x_msg_data => l_msg_data
1102: -- Call the Get_LE_TimeZone_Info API to get the timezone information for LE
1103: Get_LE_TimeZone_Info (
1104: p_api_version => 1.0
1105: , p_init_msg_list => FND_API.G_FALSE
1106: , p_commit => FND_API.G_FALSE
1107: , x_return_status => l_return_status
1108: , x_msg_count => l_msg_count
1109: , x_msg_data => l_msg_data
1110: , p_legalentity_id => l_legal_entity_id
1111: , x_timezone_code => l_timezone_code
1112: , x_timezone_id => l_timezone_id) ;
1113:
1114: -- if any error occurs propagate as unexpected error
1115: IF l_return_status = FND_API.G_RET_STS_ERROR OR
1116: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1117: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1118: END IF ;
1119:
1112: , x_timezone_id => l_timezone_id) ;
1113:
1114: -- if any error occurs propagate as unexpected error
1115: IF l_return_status = FND_API.G_RET_STS_ERROR OR
1116: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1117: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1118: END IF ;
1119:
1120: END IF ;
1113:
1114: -- if any error occurs propagate as unexpected error
1115: IF l_return_status = FND_API.G_RET_STS_ERROR OR
1116: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1117: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1118: END IF ;
1119:
1120: END IF ;
1121:
1129: -- Call the get_time API to convert the server timezone date
1130: -- to the LE timezone
1131: HZ_TIMEZONE_PUB.Get_Time
1132: ( p_api_version => 1.0
1133: , p_init_msg_list => FND_API.G_FALSE
1134: , p_source_tz_id => G_SERVER_TZ_ID
1135: , p_dest_tz_id => l_timezone_id
1136: , p_source_day_time => p_trxn_date
1137: , x_dest_day_time => l_le_day_time
1139: , x_msg_count => l_msg_count1
1140: , x_msg_data => l_msg_data1 ) ;
1141:
1142: -- if any error occurs propagate as unexpected error
1143: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
1144: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
1145: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1146: END IF ;
1147:
1140: , x_msg_data => l_msg_data1 ) ;
1141:
1142: -- if any error occurs propagate as unexpected error
1143: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
1144: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
1145: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1146: END IF ;
1147:
1148: END IF ;
1141:
1142: -- if any error occurs propagate as unexpected error
1143: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
1144: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
1145: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1146: END IF ;
1147:
1148: END IF ;
1149:
1224:
1225: -- Call the Get_LE_TimeZone_Info API to get the timezone information for LE
1226: Get_LE_TimeZone_Info (
1227: p_api_version => 1.0
1228: , p_init_msg_list => FND_API.G_FALSE
1229: , p_commit => FND_API.G_FALSE
1230: , x_return_status => l_return_status
1231: , x_msg_count => l_msg_count
1232: , x_msg_data => l_msg_data
1225: -- Call the Get_LE_TimeZone_Info API to get the timezone information for LE
1226: Get_LE_TimeZone_Info (
1227: p_api_version => 1.0
1228: , p_init_msg_list => FND_API.G_FALSE
1229: , p_commit => FND_API.G_FALSE
1230: , x_return_status => l_return_status
1231: , x_msg_count => l_msg_count
1232: , x_msg_data => l_msg_data
1233: , p_legalentity_id => l_legal_entity_id
1234: , x_timezone_code => l_timezone_code
1235: , x_timezone_id => l_timezone_id) ;
1236:
1237: -- if any error occurs propagate as unexpected error
1238: IF l_return_status = FND_API.G_RET_STS_ERROR OR
1239: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1241: END IF ;
1242:
1235: , x_timezone_id => l_timezone_id) ;
1236:
1237: -- if any error occurs propagate as unexpected error
1238: IF l_return_status = FND_API.G_RET_STS_ERROR OR
1239: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1241: END IF ;
1242:
1243: END IF ;
1236:
1237: -- if any error occurs propagate as unexpected error
1238: IF l_return_status = FND_API.G_RET_STS_ERROR OR
1239: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1241: END IF ;
1242:
1243: END IF ;
1244:
1252: -- Call the get_time API to convert the server timezone date
1253: -- to the LE timezone
1254: HZ_TIMEZONE_PUB.Get_Time
1255: ( p_api_version => 1.0
1256: , p_init_msg_list => FND_API.G_FALSE
1257: , p_source_tz_id => G_SERVER_TZ_ID
1258: , p_dest_tz_id => l_timezone_id
1259: , p_source_day_time => p_trxn_date
1260: , x_dest_day_time => l_le_day_time
1262: , x_msg_count => l_msg_count1
1263: , x_msg_data => l_msg_data1 ) ;
1264:
1265: -- if any error occurs propagate as unexpected error
1266: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
1267: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
1268: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1269: END IF ;
1270:
1263: , x_msg_data => l_msg_data1 ) ;
1264:
1265: -- if any error occurs propagate as unexpected error
1266: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
1267: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
1268: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1269: END IF ;
1270:
1271: END IF ;
1264:
1265: -- if any error occurs propagate as unexpected error
1266: IF l_return_status1 = FND_API.G_RET_STS_ERROR OR
1267: l_return_status1 = FND_API.G_RET_STS_UNEXP_ERROR THEN
1268: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1269: END IF ;
1270:
1271: END IF ;
1272: