267: ) IS
268: l_debug_on BOOLEAN;
269: l_progress VARCHAR2(3) := '000';
270: BEGIN
271: IF NVL(FND_PROFILE.VALUE('AFLOG_ENABLED'),'N') = 'Y' THEN
272: l_debug_on := TRUE;
273: END IF;
274: -- add to fnd_log_messages
275: -- asn_debug.put_line(module||': '||message,log_level);
1446:
1447: -- validate that the PO is a valid, open PO
1448: DECLARE
1449: -- PO statuses
1450: l_include_closed_po fnd_profile_option_values.profile_option_value%TYPE;
1451:
1452: -- PO dates
1453: pol_start_date DATE;
1454: pol_end_date DATE;
1455: BEGIN
1456: -- Capture all the flags so we can print log them when the PO is invalid, to aid debugging
1457: -- We don't need to check the flags at Shipment level because there is only going to be 1
1458: -- shipment for the line, so the status will bubble up to the line level.
1459: l_include_closed_po := NVL (FND_PROFILE.value('RCV_CLOSED_PO_DEFAULT_OPTION'), 'N');
1460:
1461: /*bug 6902391 Changing to single org as in 11.5.10*/
1462:
1463: RCV_HXT_GRP.string( log_level => FND_LOG.LEVEL_STATEMENT
4455: ELSE
4456: /* bug 13850458 Null assignment check for old attributes */
4457: IF l_old_attributes(l_bb_id).po_line_id IS NOT NULL THEN
4458: IF NOT(get_po_line(l_old_attributes(l_bb_id).po_line_id).closed_code = 'FINALLY CLOSED' OR
4459: (NVL(FND_PROFILE.value('RCV_CLOSED_PO_DEFAULT_OPTION'), 'N')<> 'Y' AND
4460: get_po_line(l_old_attributes(l_bb_id).po_line_id).closed_code IN ('CLOSED','CLOSED FOR RECEIVING'))) THEN
4461: RCV_HXT_GRP.string( log_level => FND_LOG.LEVEL_STATEMENT
4462: , module => G_LOG_MODULE
4463: , message => 'Validating old block'
4499: ELSE
4500: /* bug 13850458 Null assignment check for old attributes */
4501: IF l_old_attributes(l_bb_id).po_line_id IS NOT NULL THEN
4502: IF NOT(get_po_line(l_old_attributes(l_bb_id).po_line_id).closed_code = 'FINALLY CLOSED' OR
4503: (NVL(FND_PROFILE.value('RCV_CLOSED_PO_DEFAULT_OPTION'), 'N')<> 'Y' AND
4504: get_po_line(l_old_attributes(l_bb_id).po_line_id).closed_code IN ('CLOSED','CLOSED FOR RECEIVING'))) THEN
4505: RCV_HXT_GRP.string( log_level => FND_LOG.LEVEL_STATEMENT
4506: , module => l_log_head
4507: , message => 'Validating new block'