1866:
1867: l_api_name CONSTANT VARCHAR2 (30) := 'PrintLn';
1868: l_location VARCHAR2(255);
1869: l_log UTL_FILE.file_type;
1870: l_debug_level VARCHAR2(240) := fnd_profile.value ('ONT_DEBUG_LEVEL');
1871: l_time VARCHAR2(10);
1872: l_file_name VARCHAR2(80);
1873:
1874: BEGIN
2355: , oe_transaction_types_tl tt
2356: , mtl_sales_orders mtl
2357: WHERE mtl.segment1 = to_char(soh.order_number)
2358: AND mtl.segment2 = tt.name
2359: AND mtl.segment3 = fnd_profile.value('ONT_SOURCE_CODE')
2360: -- AND tt.language = userenv('LANG') -- OPM bug 3770264
2361: AND tt.language = (select language_code -- OPM bug 3770264
2362: from fnd_languages
2363: where installed_flag = 'B')
3788: -- AND tt.language = userenv('LANG') -- OPM bug 3770264
3789: AND tt.language = (select language_code -- OPM bug 3770264
3790: from fnd_languages
3791: where installed_flag = 'B')
3792: AND mtl.segment3 = fnd_profile.value('ONT_SOURCE_CODE')
3793: AND tt.transaction_type_id = soh.order_type_id
3794: AND sol.header_id = soh.header_id;
3795: Cursor get_uom IS
3796: Select item_um, item_um2
3926: oe_transaction_types_tl tt
3927: Where sol.line_id = p_line_id
3928: AND mtl.segment1 = to_char(soh.order_number)
3929: AND mtl.segment2 = tt.name
3930: AND mtl.segment3 = fnd_profile.value('ONT_SOURCE_CODE')
3931: --AND tt.language = userenv('LANG') -- OPM bug 3770264
3932: AND tt.language = (select language_code -- OPM bug 3770264
3933: from fnd_languages
3934: where installed_flag = 'B')
4477: --
4478: -- BUG 3581429 Added the following anonymous block
4479: --
4480: BEGIN
4481: l_epsilon := to_number(NVL(FND_PROFILE.VALUE('IC$EPSILON'),0)) ;
4482: n := (-1) * round(log(10,l_epsilon));
4483: EXCEPTION
4484: WHEN OTHERS THEN
4485: n := 9;
4488: GMI_reservation_Util.PrintLn('converted_qty '|| l_converted_qty);
4489: --
4490: -- Bug 3776538 - See if the converted qty should be trucated rather than rounded!
4491: --
4492: l_ALLOW_OPM_TRUNCATE_TXN := nvl(fnd_profile.value ('ALLOW_OPM_TRUNCATE_TXN'),'N');
4493: GMI_Reservation_Util.PrintLn('Profile: ALLOW_OPM_TRUNCATE_TXN '||l_ALLOW_OPM_TRUNCATE_TXN);
4494: IF (l_ALLOW_OPM_TRUNCATE_TXN = 'Y') THEN
4495: l_converted_qty:=trunc(l_converted_qty, l_TRUNCATE_TO_LENGTH);
4496: GMI_reservation_Util.PrintLn('converted_qty after truncating '|| l_converted_qty);