DBA Data[Home] [Help]

APPS.GMI_MOVE_ORDER_LINE_UTIL dependencies on GMI_RESERVATION_UTIL

Line 445: gmi_reservation_util.println('Done updating ic_txn_requ_lines');

441: -- HW BUG#:2296620 added ship_set_id
442: , SHIP_SET_ID = p_mo_line_rec.ship_set_id
443: WHERE LINE_ID = p_mo_line_rec.line_id
444: ;
445: gmi_reservation_util.println('Done updating ic_txn_requ_lines');
446:
447: EXCEPTION
448:
449: WHEN OTHERS THEN

Line 506: gmi_reservation_util.println('In insert row in move order line');

502: err_num NUMBER;
503: err_msg VARCHAR2(100);
504: BEGIN
505:
506: gmi_reservation_util.println('In insert row in move order line');
507:
508: WSH_UTIL_CORE.Println(' Line Insert DML');
509: WSH_UTIL_CORE.Println(' Line id =>' || p_mo_line_rec.line_id );
510: gmi_reservation_util.Println(' Line id =>' || p_mo_line_rec.line_id );

Line 510: gmi_reservation_util.Println(' Line id =>' || p_mo_line_rec.line_id );

506: gmi_reservation_util.println('In insert row in move order line');
507:
508: WSH_UTIL_CORE.Println(' Line Insert DML');
509: WSH_UTIL_CORE.Println(' Line id =>' || p_mo_line_rec.line_id );
510: gmi_reservation_util.Println(' Line id =>' || p_mo_line_rec.line_id );
511: WSH_UTIL_CORE.Println(' Line number =>' || p_mo_line_rec.line_number );
512: WSH_UTIL_CORE.Println(' Header id =>' || p_mo_line_rec.header_id );
513: WSH_UTIL_CORE.Println(' Inventory Item Id =>' || p_mo_line_rec.inventory_item_id );
514: WSH_UTIL_CORE.Println(' date required =>' || p_mo_line_rec.date_required );

Line 658: gmi_reservation_util.println('End of insert row in move order lines');

654: -- HW BUG#:2296620 added ship_set_id
655: , p_mo_line_rec.ship_set_id
656: );
657:
658: gmi_reservation_util.println('End of insert row in move order lines');
659:
660: EXCEPTION
661:
662: WHEN OTHERS THEN

Line 668: gmi_reservation_util.Println(' Line Insert Error => ' || err_num || err_msg);

664: err_num :=SQLCODE;
665: err_msg :=SUBSTR(SQLERRM,1 ,100);
666:
667: WSH_UTIL_CORE.Println(' Line Insert Error => ' || err_num || err_msg);
668: gmi_reservation_util.Println(' Line Insert Error => ' || err_num || err_msg);
669:
670: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
671: THEN
672: FND_MSG_PUB.Add_Exc_Msg

Line 1063: GMI_Reservation_Util.PrintLn('(opm_dbg) Entering Lock_Row : line_id='||p_mo_line_rec.line_id);

1059:
1060: BEGIN
1061:
1062: x_return_status := FND_API.G_RET_STS_SUCCESS;
1063: GMI_Reservation_Util.PrintLn('(opm_dbg) Entering Lock_Row : line_id='||p_mo_line_rec.line_id);
1064:
1065: OPEN c_lock_mol(p_mo_line_rec.line_id);
1066: GMI_Reservation_Util.PrintLn('(opm_dbg) Entering Lock_Row :');
1067: FETCH c_lock_mol

Line 1066: GMI_Reservation_Util.PrintLn('(opm_dbg) Entering Lock_Row :');

1062: x_return_status := FND_API.G_RET_STS_SUCCESS;
1063: GMI_Reservation_Util.PrintLn('(opm_dbg) Entering Lock_Row : line_id='||p_mo_line_rec.line_id);
1064:
1065: OPEN c_lock_mol(p_mo_line_rec.line_id);
1066: GMI_Reservation_Util.PrintLn('(opm_dbg) Entering Lock_Row :');
1067: FETCH c_lock_mol
1068: INTO l_mo_line_rec.attribute1
1069: , l_mo_line_rec.attribute10
1070: , l_mo_line_rec.attribute11

Line 1142: GMI_Reservation_Util.PrintLn('(opm_dbg) in Lock_Row : after select.');

1138: , l_mo_line_rec.secondary_quantity_detailed
1139: -- HW BUG#:2296620 added ship_set_id
1140: , l_mo_line_rec.ship_set_id;
1141:
1142: GMI_Reservation_Util.PrintLn('(opm_dbg) in Lock_Row : after select.');
1143: /* Row locked. Compare IN attributes to DB attributes. */
1144: IF ( c_lock_mol%NOTFOUND
1145: OR SQLCODE = -54 )
1146: THEN

Line 1148: GMI_Reservation_Util.PrintLn('(opm_dbg) Lock_Row : the MO_line is locked for line_id='||p_mo_line_rec.line_id||', SQL_CODE='||SQLCODE);

1144: IF ( c_lock_mol%NOTFOUND
1145: OR SQLCODE = -54 )
1146: THEN
1147: CLOSE c_lock_mol;
1148: GMI_Reservation_Util.PrintLn('(opm_dbg) Lock_Row : the MO_line is locked for line_id='||p_mo_line_rec.line_id||', SQL_CODE='||SQLCODE);
1149: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1150: END IF;
1151: CLOSE c_lock_mol;
1152:

Line 1163: GMI_Reservation_Util.PrintLn('(opm_dbg) excp Lock_Row : the MO_line is NOTFOUND line_id='||p_mo_line_rec.line_id||', SQL_CODE='||SQLCODE);

1159:
1160: EXCEPTION
1161:
1162: WHEN NO_DATA_FOUND THEN
1163: GMI_Reservation_Util.PrintLn('(opm_dbg) excp Lock_Row : the MO_line is NOTFOUND line_id='||p_mo_line_rec.line_id||', SQL_CODE='||SQLCODE);
1164:
1165: x_return_status := FND_API.G_RET_STS_ERROR;
1166: x_mo_line_rec.return_status := FND_API.G_RET_STS_ERROR;
1167:

Line 1177: GMI_Reservation_Util.PrintLn('(opm_dbg) excp Lock_Row : the MO_line is locked for line_id='||p_mo_line_rec.line_id||', SQL_CODE='||SQLCODE);

1173:
1174: END IF;
1175: WHEN APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION THEN
1176:
1177: GMI_Reservation_Util.PrintLn('(opm_dbg) excp Lock_Row : the MO_line is locked for line_id='||p_mo_line_rec.line_id||', SQL_CODE='||SQLCODE);
1178: x_return_status := '54';
1179: x_mo_line_rec.return_status := FND_API.G_RET_STS_ERROR;
1180:
1181: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1189: GMI_Reservation_Util.PrintLn('(opm_dbg) excp Lock_Row : the MO_line is OTHERS line_id='||p_mo_line_rec.line_id||', SQL_CODE='||SQLCODE);

1185: FND_MSG_PUB.Add;
1186:
1187: END IF;
1188: WHEN OTHERS THEN
1189: GMI_Reservation_Util.PrintLn('(opm_dbg) excp Lock_Row : the MO_line is OTHERS line_id='||p_mo_line_rec.line_id||', SQL_CODE='||SQLCODE);
1190: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1191:
1192: x_mo_line_rec.return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1193:

Line 2110: GMI_Reservation_Util.PrintLn('(opm_dbg) Entering Line_Auto_Detail.');

2106:
2107:
2108: BEGIN
2109:
2110: GMI_Reservation_Util.PrintLn('(opm_dbg) Entering Line_Auto_Detail.');
2111:
2112: /* Init status : */
2113: x_return_status := FND_API.G_RET_STS_SUCCESS;
2114:

Line 2121: GMI_Reservation_Util.PrintLn('(opm_dbg) Line_Auto_Detail after init Mesg. mo_type='||p_move_order_type||', mo_line_id='||p_mo_line_id);

2117: THEN
2118: FND_MSG_PUB.Initialize;
2119: END IF;
2120:
2121: GMI_Reservation_Util.PrintLn('(opm_dbg) Line_Auto_Detail after init Mesg. mo_type='||p_move_order_type||', mo_line_id='||p_mo_line_id);
2122: /* check what is the move order type. If it's a non pick wave mo, */
2123: /* call the pick engine, otherwise, call the pick release api */
2124: /* call directed pick and put away api */
2125: IF ( p_move_order_type = 3 )

Line 2139: GMI_Reservation_Util.PrintLn('(opm_dbg) Line_Auto_Detail : the MO is locked for line_id='||p_mo_line_id);

2135: , x_return_status => x_return_status);
2136:
2137: IF ( x_return_status = '54' )
2138: THEN
2139: GMI_Reservation_Util.PrintLn('(opm_dbg) Line_Auto_Detail : the MO is locked for line_id='||p_mo_line_id);
2140: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2141: END IF;
2142:
2143: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_header_id ='||l_mo_line_tbl(1).header_id||', schedule_ship_date(date_required)='||l_mo_line_tbl(1).date_required);

Line 2143: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_header_id ='||l_mo_line_tbl(1).header_id||', schedule_ship_date(date_required)='||l_mo_line_tbl(1).date_required);

2139: GMI_Reservation_Util.PrintLn('(opm_dbg) Line_Auto_Detail : the MO is locked for line_id='||p_mo_line_id);
2140: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2141: END IF;
2142:
2143: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_header_id ='||l_mo_line_tbl(1).header_id||', schedule_ship_date(date_required)='||l_mo_line_tbl(1).date_required);
2144: /* Get The Move Order header */
2145: l_mo_hdr_rec := GMI_Move_Order_Header_Util.Query_Row( l_mo_line_tbl(1).header_id);
2146:
2147: /* B1513119 23-Nov-2000 odaboval : Added the grouping rules */

Line 2178: GMI_Reservation_Util.PrintLn('(opm_dbg) l_auto_pick_flag is ' || l_auto_pick_flag);

2174:
2175: IF ( l_auto_pick_flag is null ) THEN
2176: l_auto_pick_flag := 'Y';
2177: END IF;
2178: GMI_Reservation_Util.PrintLn('(opm_dbg) l_auto_pick_flag is ' || l_auto_pick_flag);
2179: EXCEPTION
2180: WHEN no_data_found THEN
2181: fnd_message.set_name('INV', 'INV_AUTO_PICK_CONFIRM_PARAM');
2182: fnd_msg_pub.add;

Line 2197: GMI_Reservation_Util.PrintLn('(opm_dbg) l_p_allow_delete = ' || l_p_allow_delete) ;

2193:
2194:
2195:
2196: l_p_allow_delete := p_allow_delete;
2197: GMI_Reservation_Util.PrintLn('(opm_dbg) l_p_allow_delete = ' || l_p_allow_delete) ;
2198: GMI_Reservation_Util.PrintLn('(opm_dbg) Before calling Auto_detail ='||l_mo_line_tbl(1).header_id);
2199: GMI_Pick_Release_PUB.Auto_Detail(
2200: p_api_version => 1.0,
2201: p_init_msg_lst => FND_API.G_FALSE,

Line 2198: GMI_Reservation_Util.PrintLn('(opm_dbg) Before calling Auto_detail ='||l_mo_line_tbl(1).header_id);

2194:
2195:
2196: l_p_allow_delete := p_allow_delete;
2197: GMI_Reservation_Util.PrintLn('(opm_dbg) l_p_allow_delete = ' || l_p_allow_delete) ;
2198: GMI_Reservation_Util.PrintLn('(opm_dbg) Before calling Auto_detail ='||l_mo_line_tbl(1).header_id);
2199: GMI_Pick_Release_PUB.Auto_Detail(
2200: p_api_version => 1.0,
2201: p_init_msg_lst => FND_API.G_FALSE,
2202: p_commit => l_commit,

Line 2212: GMI_Reservation_Util.PrintLn('(opm_dbg) l_return_status from GMI_pick_release_pub.Auto_detail is ' || l_return_status);

2208: x_return_status => l_return_status,
2209: x_msg_data => x_msg_data,
2210: x_msg_count => x_msg_count);
2211:
2212: GMI_Reservation_Util.PrintLn('(opm_dbg) l_return_status from GMI_pick_release_pub.Auto_detail is ' || l_return_status);
2213: /* Message('l_return_status from GMI_pick_release_pub.Auto_detail is ' || l_return_status); */
2214:
2215: if( l_return_status <> FND_API.G_RET_STS_SUCCESS ) then
2216: GMI_Reservation_Util.PrintLn('return error');

Line 2216: GMI_Reservation_Util.PrintLn('return error');

2212: GMI_Reservation_Util.PrintLn('(opm_dbg) l_return_status from GMI_pick_release_pub.Auto_detail is ' || l_return_status);
2213: /* Message('l_return_status from GMI_pick_release_pub.Auto_detail is ' || l_return_status); */
2214:
2215: if( l_return_status <> FND_API.G_RET_STS_SUCCESS ) then
2216: GMI_Reservation_Util.PrintLn('return error');
2217: /* fnd_msg_pub.count_and_get(p_count => l_count,
2218: p_data => l_message,
2219: p_encoded => 'F');
2220: if( l_count = 0) then

Line 2221: GMI_Reservation_Util.PrintLn('(opm_dbg) no message return');

2217: /* fnd_msg_pub.count_and_get(p_count => l_count,
2218: p_data => l_message,
2219: p_encoded => 'F');
2220: if( l_count = 0) then
2221: GMI_Reservation_Util.PrintLn('(opm_dbg) no message return');
2222: else
2223: for I in 1..l_count LOOP
2224: l_message := fnd_msg_pub.get(I, 'F');
2225: GMI_Reservation_Util.PrintLn(l_message);

Line 2225: GMI_Reservation_Util.PrintLn(l_message);

2221: GMI_Reservation_Util.PrintLn('(opm_dbg) no message return');
2222: else
2223: for I in 1..l_count LOOP
2224: l_message := fnd_msg_pub.get(I, 'F');
2225: GMI_Reservation_Util.PrintLn(l_message);
2226: end LOOP;
2227: end if;
2228: */
2229:

Line 2233: GMI_Reservation_Util.PrintLn('(opm_dbg) l_prick_release_status.count='||l_pick_release_status.count);

2229:
2230: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2231: end if;
2232:
2233: GMI_Reservation_Util.PrintLn('(opm_dbg) l_prick_release_status.count='||l_pick_release_status.count);
2234:
2235: x_number_of_rows := 0;
2236: IF ( l_pick_release_status.count > 0 ) THEN
2237: FOR l_index IN 1..l_pick_release_status.count LOOP

Line 2238: GMI_Reservation_Util.PrintLn('(opm_dbg) detail record loop pick_return_status=' || l_pick_release_status(l_index).return_status);

2234:
2235: x_number_of_rows := 0;
2236: IF ( l_pick_release_status.count > 0 ) THEN
2237: FOR l_index IN 1..l_pick_release_status.count LOOP
2238: GMI_Reservation_Util.PrintLn('(opm_dbg) detail record loop pick_return_status=' || l_pick_release_status(l_index).return_status);
2239: x_number_of_rows := x_number_of_rows + l_pick_release_status(l_index).detail_rec_count;
2240: IF (l_pick_release_status(l_index).return_status <> FND_API.G_RET_STS_SUCCESS)
2241: THEN
2242: l_return_status := l_pick_release_status(l_index).return_status;

Line 2245: GMI_Reservation_Util.PrintLn('(opm_dbg) Transaction row count=' || x_number_of_rows);

2241: THEN
2242: l_return_status := l_pick_release_status(l_index).return_status;
2243: END IF;
2244: END LOOP;
2245: GMI_Reservation_Util.PrintLn('(opm_dbg) Transaction row count=' || x_number_of_rows);
2246: END IF;
2247: GMI_Reservation_Util.PrintLn('(opm_dbg) after Checking the Pick_Release_rectype NO Error');
2248:
2249:

Line 2247: GMI_Reservation_Util.PrintLn('(opm_dbg) after Checking the Pick_Release_rectype NO Error');

2243: END IF;
2244: END LOOP;
2245: GMI_Reservation_Util.PrintLn('(opm_dbg) Transaction row count=' || x_number_of_rows);
2246: END IF;
2247: GMI_Reservation_Util.PrintLn('(opm_dbg) after Checking the Pick_Release_rectype NO Error');
2248:
2249:
2250: if( l_detail_rec_count > 0 and l_auto_pick_flag = 'Y') then
2251: /* comment this out since it will take a long time to do

Line 2255: GMI_Reservation_Util.PrintLn('(opm_dbg) auto pick confirm');

2251: /* comment this out since it will take a long time to do
2252: pick release if we wait this print pick slip
2253: */
2254: commit;
2255: GMI_Reservation_Util.PrintLn('(opm_dbg) auto pick confirm');
2256:
2257: /* odab Keep this for the Pick Slip
2258: for l_index in 1..l_trolin_tbl.count LOOP
2259: GMI_Reservation_Util.PrintLn('get mold');

Line 2259: GMI_Reservation_Util.PrintLn('get mold');

2255: GMI_Reservation_Util.PrintLn('(opm_dbg) auto pick confirm');
2256:
2257: /* odab Keep this for the Pick Slip
2258: for l_index in 1..l_trolin_tbl.count LOOP
2259: GMI_Reservation_Util.PrintLn('get mold');
2260: l_mold_tbl := INV_MO_LINE_DETAIL_UTIL.query_rows(
2261: p_line_id => l_trolin_tbl(l_index).line_id);
2262: l_mold_tbl_temp := l_mold_tbl;
2263: if( l_mold_tbl.count = 0 ) then

Line 2269: GMI_Reservation_Util.PrintLn('number of mold record is ' || l_mold_tbl.count);

2265: fnd_message.set_name('INV', 'INV_PICK_RELEASE_ERROR');
2266: fnd_msg_pub.add;
2267: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2268: else
2269: GMI_Reservation_Util.PrintLn('number of mold record is ' || l_mold_tbl.count);
2270: GMI_Reservation_Util.PrintLn('calling pick confirm');
2271: INV_PICK_WAVE_PICK_CONFIRM_PUB.Pick_Confirm(
2272: p_api_version_number => 1.0,
2273: p_init_msg_list => FND_API.G_FALSE,

Line 2270: GMI_Reservation_Util.PrintLn('calling pick confirm');

2266: fnd_msg_pub.add;
2267: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2268: else
2269: GMI_Reservation_Util.PrintLn('number of mold record is ' || l_mold_tbl.count);
2270: GMI_Reservation_Util.PrintLn('calling pick confirm');
2271: INV_PICK_WAVE_PICK_CONFIRM_PUB.Pick_Confirm(
2272: p_api_version_number => 1.0,
2273: p_init_msg_list => FND_API.G_FALSE,
2274: p_commit => FND_API.G_TRUE,

Line 2284: GMI_Reservation_Util.PrintLn('after pick confirm with return status = ' || l_return_status);

2280: p_trolin_tbl => l_trolin_tbl,
2281: p_mold_tbl => l_mold_tbl,
2282: x_mmtt_tbl => l_mold_tbl,
2283: x_trolin_tbl => l_trolin_tbl);
2284: GMI_Reservation_Util.PrintLn('after pick confirm with return status = ' || l_return_status);
2285: GMI_Reservation_Util.PrintLn('l_return_status = ' || l_return_status);
2286: if( l_return_status <> FND_API.G_RET_STS_SUCCESS ) then
2287: l_success := 0;
2288: GMI_Reservation_Util.PrintLn('rollback changes');

Line 2285: GMI_Reservation_Util.PrintLn('l_return_status = ' || l_return_status);

2281: p_mold_tbl => l_mold_tbl,
2282: x_mmtt_tbl => l_mold_tbl,
2283: x_trolin_tbl => l_trolin_tbl);
2284: GMI_Reservation_Util.PrintLn('after pick confirm with return status = ' || l_return_status);
2285: GMI_Reservation_Util.PrintLn('l_return_status = ' || l_return_status);
2286: if( l_return_status <> FND_API.G_RET_STS_SUCCESS ) then
2287: l_success := 0;
2288: GMI_Reservation_Util.PrintLn('rollback changes');
2289: GMI_Reservation_Util.PrintLn('l_mold_tbl_temp.count = ' || l_mold_tbl_temp.count);

Line 2288: GMI_Reservation_Util.PrintLn('rollback changes');

2284: GMI_Reservation_Util.PrintLn('after pick confirm with return status = ' || l_return_status);
2285: GMI_Reservation_Util.PrintLn('l_return_status = ' || l_return_status);
2286: if( l_return_status <> FND_API.G_RET_STS_SUCCESS ) then
2287: l_success := 0;
2288: GMI_Reservation_Util.PrintLn('rollback changes');
2289: GMI_Reservation_Util.PrintLn('l_mold_tbl_temp.count = ' || l_mold_tbl_temp.count);
2290: for l_index in 1..l_mold_tbl_temp.count LOOP
2291: GMI_Reservation_Util.PrintLn('calling delete details');
2292: INV_Replenish_Detail_PUB.Delete_Details(

Line 2289: GMI_Reservation_Util.PrintLn('l_mold_tbl_temp.count = ' || l_mold_tbl_temp.count);

2285: GMI_Reservation_Util.PrintLn('l_return_status = ' || l_return_status);
2286: if( l_return_status <> FND_API.G_RET_STS_SUCCESS ) then
2287: l_success := 0;
2288: GMI_Reservation_Util.PrintLn('rollback changes');
2289: GMI_Reservation_Util.PrintLn('l_mold_tbl_temp.count = ' || l_mold_tbl_temp.count);
2290: for l_index in 1..l_mold_tbl_temp.count LOOP
2291: GMI_Reservation_Util.PrintLn('calling delete details');
2292: INV_Replenish_Detail_PUB.Delete_Details(
2293: p_transaction_temp_id => l_mold_tbl_temp(l_index).transaction_temp_id,

Line 2291: GMI_Reservation_Util.PrintLn('calling delete details');

2287: l_success := 0;
2288: GMI_Reservation_Util.PrintLn('rollback changes');
2289: GMI_Reservation_Util.PrintLn('l_mold_tbl_temp.count = ' || l_mold_tbl_temp.count);
2290: for l_index in 1..l_mold_tbl_temp.count LOOP
2291: GMI_Reservation_Util.PrintLn('calling delete details');
2292: INV_Replenish_Detail_PUB.Delete_Details(
2293: p_transaction_temp_id => l_mold_tbl_temp(l_index).transaction_temp_id,
2294: p_move_order_line_id => l_mold_tbl_temp(l_index).move_order_line_id,
2295: p_reservation_id => l_mold_tbl_temp(l_index).reservation_id,

Line 2301: GMI_Reservation_Util.PrintLn('after detele details with return status ' || l_return_status);

2297: p_primary_trx_qty => l_mold_tbl_temp(l_index).primary_quantity,
2298: x_return_status => l_return_status,
2299: x_msg_data => x_msg_data,
2300: x_msg_count => x_msg_count);
2301: GMI_Reservation_Util.PrintLn('after detele details with return status ' || l_return_status);
2302: if( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2303: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2304: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
2305: RAISE FND_API.G_EXC_ERROR;

Line 2320: GMI_Reservation_Util.PrintLn('return status is ' || l_return_status);

2316: else
2317: l_success := 1;
2318: end if;
2319: x_return_status := l_return_status;
2320: GMI_Reservation_Util.PrintLn('return status is ' || l_return_status);
2321: end if;
2322: x_return_status := l_return_status;
2323: end loop;
2324: odab Keep this for the Pick Slip */

Line 2334: GMI_Reservation_Util.Get_DefaultLot_from_ItemCtl

2330: Prepare to retrieve the return value :
2331: Need the default lot index,
2332: and if the item is loct_ctl or lot_ctl
2333: ============================================================================ */
2334: GMI_Reservation_Util.Get_DefaultLot_from_ItemCtl
2335: ( p_organization_id => l_mo_line_tbl(1).organization_id
2336: , p_inventory_item_id => l_mo_line_tbl(1).inventory_item_id
2337: , x_default_lot_index => l_default_lot_index
2338: , x_return_status => x_return_status

Line 2345: Set the Returned values from the GMI_Reservation_Util.ic_tran_rec_tbl

2341:
2342:
2343:
2344: /* ==================================================================
2345: Set the Returned values from the GMI_Reservation_Util.ic_tran_rec_tbl
2346: ================================================================== */
2347: x_detailed_qty := 0;
2348: x_detailed_qty2 := 0;
2349: FOR l_count IN 1..GMI_Reservation_Util.ic_tran_rec_tbl.COUNT

Line 2349: FOR l_count IN 1..GMI_Reservation_Util.ic_tran_rec_tbl.COUNT

2345: Set the Returned values from the GMI_Reservation_Util.ic_tran_rec_tbl
2346: ================================================================== */
2347: x_detailed_qty := 0;
2348: x_detailed_qty2 := 0;
2349: FOR l_count IN 1..GMI_Reservation_Util.ic_tran_rec_tbl.COUNT
2350: LOOP
2351: IF (l_count <> l_default_lot_index)
2352: THEN
2353: x_detailed_qty := x_detailed_qty - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty;

Line 2353: x_detailed_qty := x_detailed_qty - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty;

2349: FOR l_count IN 1..GMI_Reservation_Util.ic_tran_rec_tbl.COUNT
2350: LOOP
2351: IF (l_count <> l_default_lot_index)
2352: THEN
2353: x_detailed_qty := x_detailed_qty - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty;
2354: x_qty_UM := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM;
2355: x_detailed_qty2 := x_detailed_qty2 - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty2;
2356: x_qty_UM2 := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM2;
2357: x_qc_grade := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).qc_grade;

Line 2354: x_qty_UM := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM;

2350: LOOP
2351: IF (l_count <> l_default_lot_index)
2352: THEN
2353: x_detailed_qty := x_detailed_qty - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty;
2354: x_qty_UM := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM;
2355: x_detailed_qty2 := x_detailed_qty2 - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty2;
2356: x_qty_UM2 := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM2;
2357: x_qc_grade := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).qc_grade;
2358: END IF;

Line 2355: x_detailed_qty2 := x_detailed_qty2 - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty2;

2351: IF (l_count <> l_default_lot_index)
2352: THEN
2353: x_detailed_qty := x_detailed_qty - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty;
2354: x_qty_UM := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM;
2355: x_detailed_qty2 := x_detailed_qty2 - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty2;
2356: x_qty_UM2 := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM2;
2357: x_qc_grade := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).qc_grade;
2358: END IF;
2359: END LOOP;

Line 2356: x_qty_UM2 := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM2;

2352: THEN
2353: x_detailed_qty := x_detailed_qty - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty;
2354: x_qty_UM := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM;
2355: x_detailed_qty2 := x_detailed_qty2 - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty2;
2356: x_qty_UM2 := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM2;
2357: x_qc_grade := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).qc_grade;
2358: END IF;
2359: END LOOP;
2360:

Line 2357: x_qc_grade := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).qc_grade;

2353: x_detailed_qty := x_detailed_qty - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty;
2354: x_qty_UM := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM;
2355: x_detailed_qty2 := x_detailed_qty2 - GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_qty2;
2356: x_qty_UM2 := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).trans_UM2;
2357: x_qc_grade := GMI_Reservation_Util.ic_tran_rec_tbl(l_count).qc_grade;
2358: END IF;
2359: END LOOP;
2360:
2361: /* ==================================================================

Line 2362: Set the Returned values from the GMI_Reservation_Util.ic_tran_rec_tbl

2358: END IF;
2359: END LOOP;
2360:
2361: /* ==================================================================
2362: Set the Returned values from the GMI_Reservation_Util.ic_tran_rec_tbl
2363: ================================================================== */
2364: GMI_Reservation_Util.PrintLn('In Reallocate : default_lot_index='||l_default_lot_index||', detail_qty='||x_detailed_qty||', mo_line_id='||l_mo_line_tbl(1).line_id);
2365:
2366: update ic_txn_request_lines

Line 2364: GMI_Reservation_Util.PrintLn('In Reallocate : default_lot_index='||l_default_lot_index||', detail_qty='||x_detailed_qty||', mo_line_id='||l_mo_line_tbl(1).line_id);

2360:
2361: /* ==================================================================
2362: Set the Returned values from the GMI_Reservation_Util.ic_tran_rec_tbl
2363: ================================================================== */
2364: GMI_Reservation_Util.PrintLn('In Reallocate : default_lot_index='||l_default_lot_index||', detail_qty='||x_detailed_qty||', mo_line_id='||l_mo_line_tbl(1).line_id);
2365:
2366: update ic_txn_request_lines
2367: set quantity_detailed = x_detailed_qty
2368: , secondary_quantity_detailed = x_detailed_qty2

Line 2443: gmi_reservation_util.println('In line_pick_confirm and line_id is '||p_mo_line_id);

2439:
2440:
2441: BEGIN
2442:
2443: gmi_reservation_util.println('In line_pick_confirm and line_id is '||p_mo_line_id);
2444: /* Init status : */
2445: x_return_status := FND_API.G_RET_STS_SUCCESS;
2446:
2447: IF (p_init_msg_list = 1)

Line 2458: gmi_reservation_util.println('Move Order type is 3');

2454: call directed pick and put away api
2455: */
2456: IF ( p_move_order_type = 3 )
2457: THEN
2458: gmi_reservation_util.println('Move Order type is 3');
2459: /* Get The Move Order line (1 line) */
2460: gmi_reservation_util.println('Going to query the row with id = '||p_mo_line_id);
2461: l_mo_line_tbl(1) := GMI_Move_Order_Line_Util.Query_Row( p_mo_line_id);
2462:

Line 2460: gmi_reservation_util.println('Going to query the row with id = '||p_mo_line_id);

2456: IF ( p_move_order_type = 3 )
2457: THEN
2458: gmi_reservation_util.println('Move Order type is 3');
2459: /* Get The Move Order line (1 line) */
2460: gmi_reservation_util.println('Going to query the row with id = '||p_mo_line_id);
2461: l_mo_line_tbl(1) := GMI_Move_Order_Line_Util.Query_Row( p_mo_line_id);
2462:
2463:
2464: l_mo_line_rec.line_id := p_mo_line_id;

Line 2465: gmi_reservation_util.println('Value of l_mo_line_rec.line_id using to lock row is '||l_mo_line_rec.line_id);

2461: l_mo_line_tbl(1) := GMI_Move_Order_Line_Util.Query_Row( p_mo_line_id);
2462:
2463:
2464: l_mo_line_rec.line_id := p_mo_line_id;
2465: gmi_reservation_util.println('Value of l_mo_line_rec.line_id using to lock row is '||l_mo_line_rec.line_id);
2466: GMI_Move_Order_Line_Util.Lock_Row(
2467: p_mo_line_rec => l_mo_line_rec
2468: , x_mo_line_rec => ll_mo_line_rec
2469: , x_return_status => x_return_status);

Line 2473: GMI_Reservation_Util.PrintLn('(opm_dbg) Line_Pick_Confirm : the MO is locked for line_id='||p_mo_line_id);

2469: , x_return_status => x_return_status);
2470:
2471: IF ( x_return_status = '54' )
2472: THEN
2473: GMI_Reservation_Util.PrintLn('(opm_dbg) Line_Pick_Confirm : the MO is locked for line_id='||p_mo_line_id);
2474: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2475: END IF;
2476:
2477:

Line 2478: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_header_id ='||l_mo_line_tbl(1).header_id);

2474: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2475: END IF;
2476:
2477:
2478: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_header_id ='||l_mo_line_tbl(1).header_id);
2479: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_line_tbl.COUNT ='||l_mo_line_tbl.COUNT);
2480:
2481: SAVEPOINT GMI_Before_Pick_Confirm;
2482: l_commit := FND_API.G_FALSE;

Line 2479: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_line_tbl.COUNT ='||l_mo_line_tbl.COUNT);

2475: END IF;
2476:
2477:
2478: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_header_id ='||l_mo_line_tbl(1).header_id);
2479: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_line_tbl.COUNT ='||l_mo_line_tbl.COUNT);
2480:
2481: SAVEPOINT GMI_Before_Pick_Confirm;
2482: l_commit := FND_API.G_FALSE;
2483:

Line 2484: GMI_Reservation_Util.PrintLn('(opm_dbg) Before calling Pick_Confirm ='||l_mo_line_tbl(1).header_id);

2480:
2481: SAVEPOINT GMI_Before_Pick_Confirm;
2482: l_commit := FND_API.G_FALSE;
2483:
2484: GMI_Reservation_Util.PrintLn('(opm_dbg) Before calling Pick_Confirm ='||l_mo_line_tbl(1).header_id);
2485: /* NC 11/14/02 changed the call from GMI_Pick_Wave_Confirm_PUB
2486: to GMI_Pick_Wave_Confirm_PVT. enhancement # 2557029 */
2487:
2488: GMI_Pick_Wave_Confirm_PVT.Pick_Confirm(

Line 2500: GMI_Reservation_Util.PrintLn('(opm_dbg) l_return_status from GMI_pick_wave_Confirm_pub.Pick_Confirm is ' || l_return_status);

2496: x_msg_data => x_msg_data,
2497: x_msg_count => x_msg_count);
2498:
2499:
2500: GMI_Reservation_Util.PrintLn('(opm_dbg) l_return_status from GMI_pick_wave_Confirm_pub.Pick_Confirm is ' || l_return_status);
2501: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_line.count=' || l_mo_line_tbl.count);
2502: /* Message('l_return_status from GMI_pick_release_pub.Auto_detail is ' || l_return_status); */
2503:
2504: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS )

Line 2501: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_line.count=' || l_mo_line_tbl.count);

2497: x_msg_count => x_msg_count);
2498:
2499:
2500: GMI_Reservation_Util.PrintLn('(opm_dbg) l_return_status from GMI_pick_wave_Confirm_pub.Pick_Confirm is ' || l_return_status);
2501: GMI_Reservation_Util.PrintLn('(opm_dbg) mo_line.count=' || l_mo_line_tbl.count);
2502: /* Message('l_return_status from GMI_pick_release_pub.Auto_detail is ' || l_return_status); */
2503:
2504: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS )
2505: THEN

Line 2506: GMI_Reservation_Util.PrintLn('return error');

2502: /* Message('l_return_status from GMI_pick_release_pub.Auto_detail is ' || l_return_status); */
2503:
2504: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS )
2505: THEN
2506: GMI_Reservation_Util.PrintLn('return error');
2507: FND_MESSAGE.Set_Name('GMI','PICK_CONFIRM_ERROR');
2508: FND_MESSAGE.Set_Token('WHERE', 'AFTER_CALL_PICK_CONFIRM');
2509: FND_MESSAGE.Set_Token('WHAT', 'UnexpectedError');
2510: FND_MSG_PUB.Add;

Line 2516: GMI_Reservation_Util.PrintLn('return error');

2512: END IF;
2513:
2514: IF ( l_mo_line_tbl.count = 0 )
2515: THEN
2516: GMI_Reservation_Util.PrintLn('return error');
2517: FND_MESSAGE.Set_Name('GMI','PICK_CONFIRM_ERROR');
2518: FND_MESSAGE.Set_Token('WHERE', 'MO_LINE_COUNT_0');
2519: FND_MESSAGE.Set_Token('WHAT', 'UnexpectedError');
2520: FND_MSG_PUB.Add;

Line 2527: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value');

2523:
2524: END IF;
2525:
2526:
2527: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value');
2528: /* ==================================================================
2529: Set the Returned values from the GMI_Reservation_Util.ic_tran_rec_tbl
2530: ================================================================== */
2531: x_delivered_qty := l_mo_line_tbl(1).quantity_delivered;

Line 2529: Set the Returned values from the GMI_Reservation_Util.ic_tran_rec_tbl

2525:
2526:
2527: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value');
2528: /* ==================================================================
2529: Set the Returned values from the GMI_Reservation_Util.ic_tran_rec_tbl
2530: ================================================================== */
2531: x_delivered_qty := l_mo_line_tbl(1).quantity_delivered;
2532: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 1');
2533: x_qty_UM := l_mo_line_tbl(1).uom_code;

Line 2532: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 1');

2528: /* ==================================================================
2529: Set the Returned values from the GMI_Reservation_Util.ic_tran_rec_tbl
2530: ================================================================== */
2531: x_delivered_qty := l_mo_line_tbl(1).quantity_delivered;
2532: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 1');
2533: x_qty_UM := l_mo_line_tbl(1).uom_code;
2534: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 2');
2535: x_delivered_qty2 := l_mo_line_tbl(1).secondary_quantity_delivered;
2536: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 3');

Line 2534: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 2');

2530: ================================================================== */
2531: x_delivered_qty := l_mo_line_tbl(1).quantity_delivered;
2532: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 1');
2533: x_qty_UM := l_mo_line_tbl(1).uom_code;
2534: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 2');
2535: x_delivered_qty2 := l_mo_line_tbl(1).secondary_quantity_delivered;
2536: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 3');
2537: x_qty_UM2 := l_mo_line_tbl(1).secondary_uom_code;
2538:

Line 2536: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 3');

2532: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 1');
2533: x_qty_UM := l_mo_line_tbl(1).uom_code;
2534: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 2');
2535: x_delivered_qty2 := l_mo_line_tbl(1).secondary_quantity_delivered;
2536: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 3');
2537: x_qty_UM2 := l_mo_line_tbl(1).secondary_uom_code;
2538:
2539: GMI_Reservation_Util.PrintLn('(opm_dbg) End of GMI_pick_wave_Confirm_pub.Pick_Confirm, l_return_status is ' || l_return_status);
2540:

Line 2539: GMI_Reservation_Util.PrintLn('(opm_dbg) End of GMI_pick_wave_Confirm_pub.Pick_Confirm, l_return_status is ' || l_return_status);

2535: x_delivered_qty2 := l_mo_line_tbl(1).secondary_quantity_delivered;
2536: GMI_Reservation_Util.PrintLn('(opm_dbg) Before setting the return value 3');
2537: x_qty_UM2 := l_mo_line_tbl(1).secondary_uom_code;
2538:
2539: GMI_Reservation_Util.PrintLn('(opm_dbg) End of GMI_pick_wave_Confirm_pub.Pick_Confirm, l_return_status is ' || l_return_status);
2540:
2541:
2542: EXCEPTION
2543: WHEN FND_API.G_EXC_ERROR THEN

Line 2949: GMI_Reservation_Util.PrintLn('(opm_dbg) in alloc engine b4 call to LINE_AUTO_DETAIL');

2945: l_return_status := FND_API.G_RET_STS_SUCCESS;
2946: */
2947:
2948:
2949: GMI_Reservation_Util.PrintLn('(opm_dbg) in alloc engine b4 call to LINE_AUTO_DETAIL');
2950:
2951: GMI_Move_Order_Line_Util.Line_Auto_Detail
2952: ( p_mo_line_id => l_mo_line_id
2953: , p_init_msg_list => 1

Line 2969: GMI_Reservation_Util.PrintLn('(opm_dbg) in alloc engine after call to LINE_AUTO_DETAIL');

2965: , x_msg_count => l_msg_count
2966: , x_msg_data => l_msg_data
2967: );
2968:
2969: GMI_Reservation_Util.PrintLn('(opm_dbg) in alloc engine after call to LINE_AUTO_DETAIL');
2970:
2971: WSH_UTIL_CORE.PRINTMSG(' Quantity Detailed => ' || NVL(l_detailed_qty,0));
2972:
2973: IF nvl(l_detailed_qty,0) = 0 OR ( l_detailed_qty = l_qty_det ) THEN

Line 3270: AND (lot_id > 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)

3266: AND staged_ind = 0
3267: AND delete_mark = 0
3268: AND doc_type = 'OMSO'
3269: AND trans_qty <> 0
3270: AND (lot_id > 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)
3271: -- Bug 3962760 - exclude the default transaction.
3272: ORDER BY trans_qty desc; /* the smaller qty is at the top, keep in mind it is neg */
3273: /* or should consider the alloc rules */
3274: BEGIN

Line 3275: GMI_Reservation_Util.PrintLn('Entering Cancel_Move_order_line and line_id is '||p_line_id);

3271: -- Bug 3962760 - exclude the default transaction.
3272: ORDER BY trans_qty desc; /* the smaller qty is at the top, keep in mind it is neg */
3273: /* or should consider the alloc rules */
3274: BEGIN
3275: GMI_Reservation_Util.PrintLn('Entering Cancel_Move_order_line and line_id is '||p_line_id);
3276: --SAVEPOINT CANCELMO_SP;
3277:
3278: l_deleted_quantity := 0;
3279:

Line 3283: gmi_reservation_util.println('L_delete is set to N');

3279:
3280: /*IF p_delete_reservations IS NULL OR
3281: p_delete_reservations <> 'Y' THEN
3282: l_delete_reservations := 'N';
3283: gmi_reservation_util.println('L_delete is set to N');
3284: ELSE
3285: l_delete_reservations := 'Y';
3286: gmi_reservation_util.println('L_delete is set to Y');
3287: END IF;*/

Line 3286: gmi_reservation_util.println('L_delete is set to Y');

3282: l_delete_reservations := 'N';
3283: gmi_reservation_util.println('L_delete is set to N');
3284: ELSE
3285: l_delete_reservations := 'Y';
3286: gmi_reservation_util.println('L_delete is set to Y');
3287: END IF;*/
3288: /* for OPM delete is always Y*/
3289: --l_delete_reservations := 'Y';
3290: l_delete_reservations := p_delete_reservations;

Line 3291: GMI_Reservation_Util.PrintLn('Delete_rsvs = ' || l_delete_reservations);

3287: END IF;*/
3288: /* for OPM delete is always Y*/
3289: --l_delete_reservations := 'Y';
3290: l_delete_reservations := p_delete_reservations;
3291: GMI_Reservation_Util.PrintLn('Delete_rsvs = ' || l_delete_reservations);
3292:
3293: gmi_reservation_util.println('Going to call open_C_line info in cancel_move_order ');
3294: --query mo line info
3295: OPEN c_line_info;

Line 3293: gmi_reservation_util.println('Going to call open_C_line info in cancel_move_order ');

3289: --l_delete_reservations := 'Y';
3290: l_delete_reservations := p_delete_reservations;
3291: GMI_Reservation_Util.PrintLn('Delete_rsvs = ' || l_delete_reservations);
3292:
3293: gmi_reservation_util.println('Going to call open_C_line info in cancel_move_order ');
3294: --query mo line info
3295: OPEN c_line_info;
3296: FETCH c_line_info
3297: INTO l_quantity

Line 3303: GMI_Reservation_Util.PrintLn('Error: Could not find mo line');

3299: ,l_quantity_detailed
3300: ,l_quantity2_detailed
3301: ,l_organization_id;
3302: IF c_line_info%NOTFOUND THEN
3303: GMI_Reservation_Util.PrintLn('Error: Could not find mo line');
3304: RAISE fnd_api.g_exc_error;
3305: END IF;
3306: CLOSE c_line_info;
3307:

Line 3314: GMI_Reservation_Util.PrintLn('Qty to delete = ' || l_quantity_to_delete);

3310: --AND l_quantity >= l_quantity_detailed
3311: THEN
3312: l_quantity_to_delete := l_quantity_detailed;
3313: l_quantity2_to_delete := l_quantity2_detailed;
3314: GMI_Reservation_Util.PrintLn('Qty to delete = ' || l_quantity_to_delete);
3315:
3316: -- we query by the sales order line id. If that value is not
3317: -- passed in, we need to get it from shipping table
3318: If p_txn_source_line_id IS NOT NULL Then

Line 3331: GMI_Reservation_Util.PrintLn('Src line id = ' || l_txn_source_line_id);

3327: RAISE no_data_found;
3328: end if;
3329: CLOSE c_txn_source_line;
3330: End If;
3331: GMI_Reservation_Util.PrintLn('Src line id = ' || l_txn_source_line_id);
3332:
3333: OPEN c_reservations;
3334: LOOP
3335: EXIT WHEN l_quantity_to_delete <= 0;

Line 3341: GMI_Reservation_Util.PrintLn('Rsv id = ' || l_reservation_id);

3337: FETCH c_reservations INTO l_reservation_id;
3338: EXIT WHEN c_reservations%NOTFOUND;
3339:
3340: l_trans_rec.trans_id := l_reservation_id;
3341: GMI_Reservation_Util.PrintLn('Rsv id = ' || l_reservation_id);
3342:
3343: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
3344: (l_trans_rec, l_trans_rec )
3345: THEN

Line 3346: GMI_Reservation_Util.PrintLn('trans_qty = ' || l_trans_rec.trans_qty);

3342:
3343: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
3344: (l_trans_rec, l_trans_rec )
3345: THEN
3346: GMI_Reservation_Util.PrintLn('trans_qty = ' || l_trans_rec.trans_qty);
3347: IF abs(l_trans_rec.trans_qty) <= l_quantity_to_delete THEN
3348: -- if so, simply delete the rsv , will balance default later
3349: GMI_Reservation_Util.PrintLn('set delete trans' );
3350: GMI_TRANS_ENGINE_PUB.DELETE_PENDING_TRANSACTION

Line 3349: GMI_Reservation_Util.PrintLn('set delete trans' );

3345: THEN
3346: GMI_Reservation_Util.PrintLn('trans_qty = ' || l_trans_rec.trans_qty);
3347: IF abs(l_trans_rec.trans_qty) <= l_quantity_to_delete THEN
3348: -- if so, simply delete the rsv , will balance default later
3349: GMI_Reservation_Util.PrintLn('set delete trans' );
3350: GMI_TRANS_ENGINE_PUB.DELETE_PENDING_TRANSACTION
3351: ( 1
3352: , FND_API.G_FALSE
3353: , FND_API.G_FALSE

Line 3363: GMI_RESERVATION_UTIL.PrintLn('Error returned by Delete_Pending_Transaction');

3359: , x_msg_data
3360: );
3361: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
3362: THEN
3363: GMI_RESERVATION_UTIL.PrintLn('Error returned by Delete_Pending_Transaction');
3364: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3365: END IF;
3366: l_deleted_quantity := l_deleted_quantity + abs(l_trans_rec.trans_qty);
3367: l_deleted_quantity2 := l_deleted_quantity2 + abs(l_trans_rec.trans_qty2);

Line 3369: GMI_Reservation_Util.PrintLn('update ic_tran_pnd ' );

3365: END IF;
3366: l_deleted_quantity := l_deleted_quantity + abs(l_trans_rec.trans_qty);
3367: l_deleted_quantity2 := l_deleted_quantity2 + abs(l_trans_rec.trans_qty2);
3368: ELSE
3369: GMI_Reservation_Util.PrintLn('update ic_tran_pnd ' );
3370: l_trans_rec.trans_qty := -1 * (abs(l_trans_rec.trans_qty) - l_quantity_to_delete);
3371: l_trans_rec.trans_qty2 := -1 * (abs(l_trans_rec.trans_qty2) - l_quantity2_to_delete);
3372: GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION
3373: ( 1

Line 3385: GMI_RESERVATION_UTIL.println('Error returned by Update_Pending_Transaction');

3381: , x_msg_data
3382: );
3383: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
3384: THEN
3385: GMI_RESERVATION_UTIL.println('Error returned by Update_Pending_Transaction');
3386: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3387: END IF;
3388:
3389: l_deleted_quantity := l_deleted_quantity + l_quantity_to_delete;

Line 3397: GMI_RESERVATION_UTIL.find_default_lot

3393: l_quantity_to_delete := l_quantity_to_delete - abs(l_trans_rec.trans_qty);
3394: l_quantity2_to_delete := l_quantity2_to_delete - abs(l_trans_rec.trans_qty2);
3395: END LOOP;
3396: CLOSE c_reservations;
3397: GMI_RESERVATION_UTIL.find_default_lot
3398: ( x_return_status => x_return_status,
3399: x_msg_count => x_msg_count,
3400: x_msg_data => x_msg_data,
3401: x_reservation_id => l_reservation_id,

Line 3420: GMI_Reservation_Util.PrintLn('om line ship_from_org_id '||l_ship_from_org_id );

3416: Into l_organization_id
3417: From ic_whse_mst
3418: Where whse_code = l_trans_rec.whse_code;
3419:
3420: GMI_Reservation_Util.PrintLn('om line ship_from_org_id '||l_ship_from_org_id );
3421: GMI_Reservation_Util.PrintLn('trans organization_id'||l_organization_id);
3422: IF l_ship_from_org_id = l_organization_id THEN
3423: GMI_RESERVATION_UTIL.balance_default_lot
3424: ( p_ic_default_rec => l_trans_rec

Line 3421: GMI_Reservation_Util.PrintLn('trans organization_id'||l_organization_id);

3417: From ic_whse_mst
3418: Where whse_code = l_trans_rec.whse_code;
3419:
3420: GMI_Reservation_Util.PrintLn('om line ship_from_org_id '||l_ship_from_org_id );
3421: GMI_Reservation_Util.PrintLn('trans organization_id'||l_organization_id);
3422: IF l_ship_from_org_id = l_organization_id THEN
3423: GMI_RESERVATION_UTIL.balance_default_lot
3424: ( p_ic_default_rec => l_trans_rec
3425: , p_opm_item_id => l_trans_rec.item_id

Line 3423: GMI_RESERVATION_UTIL.balance_default_lot

3419:
3420: GMI_Reservation_Util.PrintLn('om line ship_from_org_id '||l_ship_from_org_id );
3421: GMI_Reservation_Util.PrintLn('trans organization_id'||l_organization_id);
3422: IF l_ship_from_org_id = l_organization_id THEN
3423: GMI_RESERVATION_UTIL.balance_default_lot
3424: ( p_ic_default_rec => l_trans_rec
3425: , p_opm_item_id => l_trans_rec.item_id
3426: , x_return_status => x_return_status
3427: , x_msg_count => x_msg_count

Line 3432: GMI_RESERVATION_UTIL.PrintLn('cancle move order Error returned by balancing default lot');

3428: , x_msg_data => x_msg_data
3429: );
3430: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
3431: THEN
3432: GMI_RESERVATION_UTIL.PrintLn('cancle move order Error returned by balancing default lot');
3433: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3434: END IF;
3435: ELSE
3436: /* delete this default lot, and created a new one */

Line 3437: GMI_Reservation_Util.PrintLn('delete trans trans_id'||l_trans_rec.trans_id);

3433: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3434: END IF;
3435: ELSE
3436: /* delete this default lot, and created a new one */
3437: GMI_Reservation_Util.PrintLn('delete trans trans_id'||l_trans_rec.trans_id);
3438: GMI_TRANS_ENGINE_PUB.DELETE_PENDING_TRANSACTION
3439: ( 1
3440: , FND_API.G_FALSE
3441: , FND_API.G_FALSE

Line 3452: GMI_RESERVATION_UTIL.PrintLn('Error returned by Delete_Pending_Transaction');

3448: );
3449:
3450: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
3451: THEN
3452: GMI_RESERVATION_UTIL.PrintLn('Error returned by Delete_Pending_Transaction');
3453: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3454: END IF;
3455:
3456: Select whse_code

Line 3476: GMI_RESERVATION_UTIL.println('Error returned by Create_Pending_Transaction');

3472: );
3473:
3474: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
3475: THEN
3476: GMI_RESERVATION_UTIL.println('Error returned by Create_Pending_Transaction');
3477: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3478: END IF;
3479: l_trans_rec.trans_id := l_trans_row.trans_id;
3480: GMI_Reservation_Util.PrintLn('created trans trans_id'||l_trans_rec.trans_id);

Line 3480: GMI_Reservation_Util.PrintLn('created trans trans_id'||l_trans_rec.trans_id);

3476: GMI_RESERVATION_UTIL.println('Error returned by Create_Pending_Transaction');
3477: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3478: END IF;
3479: l_trans_rec.trans_id := l_trans_row.trans_id;
3480: GMI_Reservation_Util.PrintLn('created trans trans_id'||l_trans_rec.trans_id);
3481: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
3482: (l_trans_rec, l_trans_rec )
3483: THEN
3484: GMI_RESERVATION_UTIL.balance_default_lot

Line 3484: GMI_RESERVATION_UTIL.balance_default_lot

3480: GMI_Reservation_Util.PrintLn('created trans trans_id'||l_trans_rec.trans_id);
3481: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
3482: (l_trans_rec, l_trans_rec )
3483: THEN
3484: GMI_RESERVATION_UTIL.balance_default_lot
3485: ( p_ic_default_rec => l_trans_rec
3486: , p_opm_item_id => l_trans_rec.item_id
3487: , x_return_status => x_return_status
3488: , x_msg_count => x_msg_count

Line 3493: GMI_RESERVATION_UTIL.PrintLn('cancle move order Error returned by balancing default lot');

3489: , x_msg_data => x_msg_data
3490: );
3491: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
3492: THEN
3493: GMI_RESERVATION_UTIL.PrintLn('cancle move order Error returned by balancing default lot');
3494: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3495: END IF;
3496: END IF;
3497: END IF;

Line 3516: GMI_Reservation_Util.PrintLn('No allocations. Closing MO line');

3512: l_quantity_detailed <= 0 THEN
3513: l_quantity := 0;
3514: l_quantity2 := 0;
3515: l_line_status := 5;
3516: GMI_Reservation_Util.PrintLn('No allocations. Closing MO line');
3517: ELSE
3518: -- If all of the quantity for the move order line was deleted,
3519: -- close the move order line
3520: If l_deleted_quantity >= l_quantity Then

Line 3524: GMI_Reservation_Util.PrintLn('Closing MO Line');

3520: If l_deleted_quantity >= l_quantity Then
3521: l_quantity := 0;
3522: l_quantity2 := 0;
3523: l_line_status := 5;
3524: GMI_Reservation_Util.PrintLn('Closing MO Line');
3525: Else
3526: l_quantity := l_quantity - l_deleted_quantity;
3527: l_quantity2 := l_quantity2 - l_deleted_quantity2;
3528: l_line_status := 9;

Line 3529: GMI_Reservation_Util.PrintLn('Canceling MO Line New qty = ' || l_quantity);

3525: Else
3526: l_quantity := l_quantity - l_deleted_quantity;
3527: l_quantity2 := l_quantity2 - l_deleted_quantity2;
3528: l_line_status := 9;
3529: GMI_Reservation_Util.PrintLn('Canceling MO Line New qty = ' || l_quantity);
3530: GMI_Reservation_Util.PrintLn('Canceling MO Line New qty2 = ' || l_quantity2);
3531: End If;
3532: END IF;
3533: -- Update line status, quantity, and required_quantity

Line 3530: GMI_Reservation_Util.PrintLn('Canceling MO Line New qty2 = ' || l_quantity2);

3526: l_quantity := l_quantity - l_deleted_quantity;
3527: l_quantity2 := l_quantity2 - l_deleted_quantity2;
3528: l_line_status := 9;
3529: GMI_Reservation_Util.PrintLn('Canceling MO Line New qty = ' || l_quantity);
3530: GMI_Reservation_Util.PrintLn('Canceling MO Line New qty2 = ' || l_quantity2);
3531: End If;
3532: END IF;
3533: -- Update line status, quantity, and required_quantity
3534: UPDATE ic_txn_request_lines

Line 3541: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);

3537: ,line_status = l_line_status
3538: WHERE line_id = p_line_id;
3539:
3540: x_return_status := fnd_api.g_ret_sts_success;
3541: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);
3542:
3543:
3544:
3545: EXCEPTION

Line 3549: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);

3545: EXCEPTION
3546: WHEN fnd_api.g_exc_error THEN
3547: ROLLBACK TO CANCELMO_SP;
3548: x_return_status := fnd_api.g_ret_sts_error;
3549: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);
3550: WHEN fnd_api.g_exc_unexpected_error THEN
3551: ROLLBACK TO CANCELMO_SP;
3552: x_return_status := fnd_api.g_ret_sts_unexp_error;
3553: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);

Line 3553: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);

3549: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);
3550: WHEN fnd_api.g_exc_unexpected_error THEN
3551: ROLLBACK TO CANCELMO_SP;
3552: x_return_status := fnd_api.g_ret_sts_unexp_error;
3553: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);
3554: WHEN OTHERS THEN
3555: ROLLBACK TO CANCELMO_SP;
3556: x_return_status := fnd_api.g_ret_sts_unexp_error;
3557: GMI_Reservation_Util.PrintLn('Other error in Cancel_Move_Order_line');

Line 3557: GMI_Reservation_Util.PrintLn('Other error in Cancel_Move_Order_line');

3553: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);
3554: WHEN OTHERS THEN
3555: ROLLBACK TO CANCELMO_SP;
3556: x_return_status := fnd_api.g_ret_sts_unexp_error;
3557: GMI_Reservation_Util.PrintLn('Other error in Cancel_Move_Order_line');
3558: GMI_Reservation_Util.PrintLn('Error Code = ' || SQLCODE);
3559: GMI_Reservation_Util.PrintLn('Error Msg:' || SQLERRM);
3560: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);
3561: END Cancel_Move_Order_Line;

Line 3558: GMI_Reservation_Util.PrintLn('Error Code = ' || SQLCODE);

3554: WHEN OTHERS THEN
3555: ROLLBACK TO CANCELMO_SP;
3556: x_return_status := fnd_api.g_ret_sts_unexp_error;
3557: GMI_Reservation_Util.PrintLn('Other error in Cancel_Move_Order_line');
3558: GMI_Reservation_Util.PrintLn('Error Code = ' || SQLCODE);
3559: GMI_Reservation_Util.PrintLn('Error Msg:' || SQLERRM);
3560: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);
3561: END Cancel_Move_Order_Line;
3562:

Line 3559: GMI_Reservation_Util.PrintLn('Error Msg:' || SQLERRM);

3555: ROLLBACK TO CANCELMO_SP;
3556: x_return_status := fnd_api.g_ret_sts_unexp_error;
3557: GMI_Reservation_Util.PrintLn('Other error in Cancel_Move_Order_line');
3558: GMI_Reservation_Util.PrintLn('Error Code = ' || SQLCODE);
3559: GMI_Reservation_Util.PrintLn('Error Msg:' || SQLERRM);
3560: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);
3561: END Cancel_Move_Order_Line;
3562:
3563: --Procedure

Line 3560: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);

3556: x_return_status := fnd_api.g_ret_sts_unexp_error;
3557: GMI_Reservation_Util.PrintLn('Other error in Cancel_Move_Order_line');
3558: GMI_Reservation_Util.PrintLn('Error Code = ' || SQLCODE);
3559: GMI_Reservation_Util.PrintLn('Error Msg:' || SQLERRM);
3560: GMI_Reservation_Util.PrintLn('Return status = ' || x_return_status);
3561: END Cancel_Move_Order_Line;
3562:
3563: --Procedure
3564: -- Reduce_Move_Order_Quantity

Line 3670: AND (lot_id > 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)

3666: AND staged_ind = 0
3667: AND delete_mark = 0
3668: AND doc_type = 'OMSO'
3669: AND trans_qty <> 0
3670: AND (lot_id > 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)
3671: -- Bug 3962760 - exclude the default transaction.
3672: ORDER BY line_detail_id desc,
3673: trans_qty desc; /* the smaller qty is at the top, keep in mind it is neg */
3674: /* should we do it by the alloc rules? auto-fifo, fefo? */

Line 3682: AND (lot_id = 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT);

3678: FROM ic_tran_pnd
3679: WHERE line_id = l_txn_source_line_id
3680: AND doc_type = 'OMSO'
3681: AND delete_mark = 0
3682: AND (lot_id = 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT);
3683:
3684: BEGIN
3685: GMI_Reservation_Util.PrintLn('entering reduce move order ');
3686: gmi_reservation_util.println('Value of p_line_id is '||p_line_id);

Line 3685: GMI_Reservation_Util.PrintLn('entering reduce move order ');

3681: AND delete_mark = 0
3682: AND (lot_id = 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT);
3683:
3684: BEGIN
3685: GMI_Reservation_Util.PrintLn('entering reduce move order ');
3686: gmi_reservation_util.println('Value of p_line_id is '||p_line_id);
3687: gmi_reservation_util.println('Value of p_txn_source_line_id is '||p_txn_source_line_id);
3688: gmi_reservation_util.println('Value of p_delivery_detail_id is is '||p_delivery_detail_id);
3689: gmi_reservation_util.println('Value of p_reduction_quantity is '||p_reduction_quantity);

Line 3686: gmi_reservation_util.println('Value of p_line_id is '||p_line_id);

3682: AND (lot_id = 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT);
3683:
3684: BEGIN
3685: GMI_Reservation_Util.PrintLn('entering reduce move order ');
3686: gmi_reservation_util.println('Value of p_line_id is '||p_line_id);
3687: gmi_reservation_util.println('Value of p_txn_source_line_id is '||p_txn_source_line_id);
3688: gmi_reservation_util.println('Value of p_delivery_detail_id is is '||p_delivery_detail_id);
3689: gmi_reservation_util.println('Value of p_reduction_quantity is '||p_reduction_quantity);
3690:

Line 3687: gmi_reservation_util.println('Value of p_txn_source_line_id is '||p_txn_source_line_id);

3683:
3684: BEGIN
3685: GMI_Reservation_Util.PrintLn('entering reduce move order ');
3686: gmi_reservation_util.println('Value of p_line_id is '||p_line_id);
3687: gmi_reservation_util.println('Value of p_txn_source_line_id is '||p_txn_source_line_id);
3688: gmi_reservation_util.println('Value of p_delivery_detail_id is is '||p_delivery_detail_id);
3689: gmi_reservation_util.println('Value of p_reduction_quantity is '||p_reduction_quantity);
3690:
3691: --SAVEPOINT REDUCEMO_SP;

Line 3688: gmi_reservation_util.println('Value of p_delivery_detail_id is is '||p_delivery_detail_id);

3684: BEGIN
3685: GMI_Reservation_Util.PrintLn('entering reduce move order ');
3686: gmi_reservation_util.println('Value of p_line_id is '||p_line_id);
3687: gmi_reservation_util.println('Value of p_txn_source_line_id is '||p_txn_source_line_id);
3688: gmi_reservation_util.println('Value of p_delivery_detail_id is is '||p_delivery_detail_id);
3689: gmi_reservation_util.println('Value of p_reduction_quantity is '||p_reduction_quantity);
3690:
3691: --SAVEPOINT REDUCEMO_SP;
3692:

Line 3689: gmi_reservation_util.println('Value of p_reduction_quantity is '||p_reduction_quantity);

3685: GMI_Reservation_Util.PrintLn('entering reduce move order ');
3686: gmi_reservation_util.println('Value of p_line_id is '||p_line_id);
3687: gmi_reservation_util.println('Value of p_txn_source_line_id is '||p_txn_source_line_id);
3688: gmi_reservation_util.println('Value of p_delivery_detail_id is is '||p_delivery_detail_id);
3689: gmi_reservation_util.println('Value of p_reduction_quantity is '||p_reduction_quantity);
3690:
3691: --SAVEPOINT REDUCEMO_SP;
3692:
3693: IF p_reduction_quantity <= 0 THEN

Line 3711: GMI_Reservation_Util.PrintLn('Move order line not found');

3707: ,l_organization_id
3708: ,l_inventory_Item_id
3709: ,l_mo_uom_code;
3710: IF c_line_info%NOTFOUND THEN
3711: GMI_Reservation_Util.PrintLn('Move order line not found');
3712:
3713: RAISE fnd_api.g_exc_error;
3714: END IF;
3715:

Line 3724: gmi_reservation_util.println('Value of l_reduction_quantity is '||l_reduction_quantity);

3720: l_remaining_quantity := l_quantity - l_quantity_detailed;
3721: l_quantity_to_delete := -l_reduction_quantity + l_remaining_quantity;
3722: l_quantity2_to_delete := -p_reduction_quantity2 + (l_quantity2 - l_quantity2_detailed);
3723:
3724: gmi_reservation_util.println('Value of l_reduction_quantity is '||l_reduction_quantity);
3725: gmi_reservation_util.println('Value of l_remaining_quantity is '||l_remaining_quantity);
3726: gmi_reservation_util.println('Value of l_quantity_to_delete is '||l_quantity_to_delete);
3727:
3728: -- Call Cancel MO Line when reduction qu antity is greater than

Line 3725: gmi_reservation_util.println('Value of l_remaining_quantity is '||l_remaining_quantity);

3721: l_quantity_to_delete := -l_reduction_quantity + l_remaining_quantity;
3722: l_quantity2_to_delete := -p_reduction_quantity2 + (l_quantity2 - l_quantity2_detailed);
3723:
3724: gmi_reservation_util.println('Value of l_reduction_quantity is '||l_reduction_quantity);
3725: gmi_reservation_util.println('Value of l_remaining_quantity is '||l_remaining_quantity);
3726: gmi_reservation_util.println('Value of l_quantity_to_delete is '||l_quantity_to_delete);
3727:
3728: -- Call Cancel MO Line when reduction qu antity is greater than
3729: -- required quantity or quantity

Line 3726: gmi_reservation_util.println('Value of l_quantity_to_delete is '||l_quantity_to_delete);

3722: l_quantity2_to_delete := -p_reduction_quantity2 + (l_quantity2 - l_quantity2_detailed);
3723:
3724: gmi_reservation_util.println('Value of l_reduction_quantity is '||l_reduction_quantity);
3725: gmi_reservation_util.println('Value of l_remaining_quantity is '||l_remaining_quantity);
3726: gmi_reservation_util.println('Value of l_quantity_to_delete is '||l_quantity_to_delete);
3727:
3728: -- Call Cancel MO Line when reduction qu antity is greater than
3729: -- required quantity or quantity
3730: IF l_reduction_quantity >= l_quantity THEN

Line 3731: gmi_reservation_util.println('Going to call cancel_move_order_line in reduce');

3727:
3728: -- Call Cancel MO Line when reduction qu antity is greater than
3729: -- required quantity or quantity
3730: IF l_reduction_quantity >= l_quantity THEN
3731: gmi_reservation_util.println('Going to call cancel_move_order_line in reduce');
3732: cancel_move_order_line(
3733: x_return_status => l_return_status
3734: ,x_msg_count => x_msg_count
3735: ,x_msg_data => x_msg_data

Line 3742: gmi_reservation_util.println('Error coming back from cancel_move order in reduce_move_qty');

3738: ,p_delete_reservations => 'Y'
3739: ,p_txn_source_line_id => p_txn_source_line_id);
3740:
3741: IF l_return_status = fnd_api.g_ret_sts_error Then
3742: gmi_reservation_util.println('Error coming back from cancel_move order in reduce_move_qty');
3743: RAISE fnd_api.g_exc_error;
3744: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error Then
3745: gmi_reservation_util.println('Error coming back from cancel_move but this is different');
3746: RAISE fnd_api.g_exc_unexpected_error;

Line 3745: gmi_reservation_util.println('Error coming back from cancel_move but this is different');

3741: IF l_return_status = fnd_api.g_ret_sts_error Then
3742: gmi_reservation_util.println('Error coming back from cancel_move order in reduce_move_qty');
3743: RAISE fnd_api.g_exc_error;
3744: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error Then
3745: gmi_reservation_util.println('Error coming back from cancel_move but this is different');
3746: RAISE fnd_api.g_exc_unexpected_error;
3747: END IF;
3748: END IF;
3749:

Line 3756: GMI_Reservation_Util.get_opm_converted_qty(

3752: /* move order uom should be always primary uom */
3753: /*If l_primary_uom_code <> l_mo_uom_code Then
3754: null;
3755: l_prim_quantity_to_delete :=
3756: GMI_Reservation_Util.get_opm_converted_qty(
3757: p_apps_item_id => l_inventory_item_id,
3758: p_organization_id => l_organization_id,
3759: p_apps_from_uom => l_uom_code
3760: p_apps_to_uom => c.requested_quantity_uom,

Line 3772: gmi_reservation_util.println('Assigning value for l_txn_source_line_id');

3768: -- CLOSE c_txn_source_line;
3769: -- we query by the sales order line id. If that value is not
3770: -- passed in, we need to get it from shipping table
3771: If p_txn_source_line_id IS NOT NULL Then
3772: gmi_reservation_util.println('Assigning value for l_txn_source_line_id');
3773: l_txn_source_line_id := p_txn_source_line_id;
3774: Else
3775: gmi_reservation_util.println('Going to fetch c_txn_source_line');
3776: OPEN c_txn_source_line;

Line 3775: gmi_reservation_util.println('Going to fetch c_txn_source_line');

3771: If p_txn_source_line_id IS NOT NULL Then
3772: gmi_reservation_util.println('Assigning value for l_txn_source_line_id');
3773: l_txn_source_line_id := p_txn_source_line_id;
3774: Else
3775: gmi_reservation_util.println('Going to fetch c_txn_source_line');
3776: OPEN c_txn_source_line;
3777: FETCH c_txn_source_line INTO l_txn_source_line_id;
3778: if c_txn_source_line%NOTFOUND then
3779: CLOSE c_txn_source_line;

Line 3780: GMI_Reservation_Util.PrintLn('Did not find any sales order line');

3776: OPEN c_txn_source_line;
3777: FETCH c_txn_source_line INTO l_txn_source_line_id;
3778: if c_txn_source_line%NOTFOUND then
3779: CLOSE c_txn_source_line;
3780: GMI_Reservation_Util.PrintLn('Did not find any sales order line');
3781: RAISE no_data_found;
3782: end if;
3783: CLOSE c_txn_source_line;
3784: End If;

Line 3794: gmi_reservation_util.println('Going to fetch record from ic in reduce_move');

3790: FETCH c_reservations INTO l_reservation_id;
3791: EXIT WHEN c_reservations%NOTFOUND;
3792:
3793: l_trans_rec.trans_id := l_reservation_id;
3794: gmi_reservation_util.println('Going to fetch record from ic in reduce_move');
3795: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
3796: (l_trans_rec, l_trans_rec )
3797: THEN
3798: GMI_Reservation_Util.PrintLn('trans_qty = ' || l_trans_rec.trans_qty);

Line 3798: GMI_Reservation_Util.PrintLn('trans_qty = ' || l_trans_rec.trans_qty);

3794: gmi_reservation_util.println('Going to fetch record from ic in reduce_move');
3795: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
3796: (l_trans_rec, l_trans_rec )
3797: THEN
3798: GMI_Reservation_Util.PrintLn('trans_qty = ' || l_trans_rec.trans_qty);
3799: /* may have to consider indivisible */
3800: IF abs(l_trans_rec.trans_qty) <= l_quantity_to_delete THEN
3801: -- if so, simply delete the rsv , will balance default later
3802: gmi_reservation_util.println('Going to delete tran in reduceMove');

Line 3802: gmi_reservation_util.println('Going to delete tran in reduceMove');

3798: GMI_Reservation_Util.PrintLn('trans_qty = ' || l_trans_rec.trans_qty);
3799: /* may have to consider indivisible */
3800: IF abs(l_trans_rec.trans_qty) <= l_quantity_to_delete THEN
3801: -- if so, simply delete the rsv , will balance default later
3802: gmi_reservation_util.println('Going to delete tran in reduceMove');
3803: GMI_TRANS_ENGINE_PUB.DELETE_PENDING_TRANSACTION
3804: ( 1
3805: , FND_API.G_FALSE
3806: , FND_API.G_FALSE

Line 3816: GMI_RESERVATION_UTIL.PrintLn('Error returned by Delete_Pending_Transaction');

3812: , x_msg_data
3813: );
3814: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
3815: THEN
3816: GMI_RESERVATION_UTIL.PrintLn('Error returned by Delete_Pending_Transaction');
3817: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3818: END IF;
3819: l_deleted_quantity := l_deleted_quantity + abs(l_trans_rec.trans_qty);
3820: l_deleted_quantity2:= l_deleted_quantity2 + abs(l_trans_rec.trans_qty2);

Line 3822: gmi_reservation_util.println('In ELSE and will be updateing ic_tran');

3818: END IF;
3819: l_deleted_quantity := l_deleted_quantity + abs(l_trans_rec.trans_qty);
3820: l_deleted_quantity2:= l_deleted_quantity2 + abs(l_trans_rec.trans_qty2);
3821: ELSE
3822: gmi_reservation_util.println('In ELSE and will be updateing ic_tran');
3823: l_trans_rec.trans_qty := -1 * (abs(l_trans_rec.trans_qty) - l_quantity_to_delete);
3824: l_trans_rec.trans_qty2:= -1 * (abs(l_trans_rec.trans_qty2) - l_quantity2_to_delete);
3825: GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION
3826: ( 1

Line 3838: GMI_RESERVATION_UTIL.println('Error returned by Update_Pending_Transaction');

3834: , x_msg_data
3835: );
3836: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
3837: THEN
3838: GMI_RESERVATION_UTIL.println('Error returned by Update_Pending_Transaction');
3839: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3840: END IF;
3841: l_deleted_quantity := l_deleted_quantity + l_quantity_to_delete;
3842: l_deleted_quantity2 := l_deleted_quantity2 + l_quantity2_to_delete;

Line 3850: GMI_RESERVATION_UTIL.find_default_lot

3846: l_quantity2_to_delete := l_quantity2_to_delete - l_deleted_quantity2;
3847: END LOOP;
3848: CLOSE c_reservations;
3849:
3850: GMI_RESERVATION_UTIL.find_default_lot
3851: ( x_return_status => x_return_status,
3852: x_msg_count => x_msg_count,
3853: x_msg_data => x_msg_data,
3854: x_reservation_id => l_reservation_id,

Line 3863: GMI_RESERVATION_UTIL.balance_default_lot

3859: l_trans_rec.trans_id := l_reservation_id;
3860: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
3861: (l_trans_rec, l_trans_rec )
3862: THEN
3863: GMI_RESERVATION_UTIL.balance_default_lot
3864: ( p_ic_default_rec => l_trans_rec
3865: , p_opm_item_id => l_trans_rec.item_id
3866: , x_return_status => x_return_status
3867: , x_msg_count => x_msg_count

Line 3872: GMI_RESERVATION_UTIL.PrintLn('cancle move order Error returned by balancing default lot');

3868: , x_msg_data => x_msg_data
3869: );
3870: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
3871: THEN
3872: GMI_RESERVATION_UTIL.PrintLn('cancle move order Error returned by balancing default lot');
3873: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3874: END IF;
3875: END IF;
3876: END IF;

Line 3879: gmi_reservation_util.println('Value of p_line_id before update is '||p_line_id);

3875: END IF;
3876: END IF;
3877: END IF;
3878:
3879: gmi_reservation_util.println('Value of p_line_id before update is '||p_line_id);
3880: l_quantity := l_quantity - l_reduction_quantity;
3881: l_quantity2 := l_quantity2 - p_reduction_quantity2;
3882:
3883: GMI_Reservation_Util.PrintLn('updating move order line with qty '||l_quantity);

Line 3883: GMI_Reservation_Util.PrintLn('updating move order line with qty '||l_quantity);

3879: gmi_reservation_util.println('Value of p_line_id before update is '||p_line_id);
3880: l_quantity := l_quantity - l_reduction_quantity;
3881: l_quantity2 := l_quantity2 - p_reduction_quantity2;
3882:
3883: GMI_Reservation_Util.PrintLn('updating move order line with qty '||l_quantity);
3884: gmi_reservation_util.println('For line id '||p_line_id);
3885: -- Update line status, quantity, and required_quantity
3886: UPDATE ic_txn_request_lines
3887: SET quantity = l_quantity

Line 3884: gmi_reservation_util.println('For line id '||p_line_id);

3880: l_quantity := l_quantity - l_reduction_quantity;
3881: l_quantity2 := l_quantity2 - p_reduction_quantity2;
3882:
3883: GMI_Reservation_Util.PrintLn('updating move order line with qty '||l_quantity);
3884: gmi_reservation_util.println('For line id '||p_line_id);
3885: -- Update line status, quantity, and required_quantity
3886: UPDATE ic_txn_request_lines
3887: SET quantity = l_quantity
3888: , primary_quantity = l_quantity

Line 3902: GMI_Reservation_Util.PrintLn('Others error' || Sqlerrm);

3898: --ROLLBACK TO REDUCEMO_SP;
3899: x_return_status := fnd_api.g_ret_sts_error;
3900: WHEN OTHERS THEN
3901: --ROLLBACK TO REDUCEMO_SP;
3902: GMI_Reservation_Util.PrintLn('Others error' || Sqlerrm);
3903: x_return_status := fnd_api.g_ret_sts_unexp_error;
3904: END Reduce_Move_Order_Quantity;
3905:
3906: --Update_Txn_Source_Line