2: --$Header: GMDGSMPB.pls 120.46.12020000.3 2012/11/29 17:37:28 plowe ship $
3: -- Global variables
4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'GMD_SAMPLES_GRP';
5:
6: --Bug 3222090, magupta removed call to FND_PROFILE.VALUE('AFLOG_ENABLED')
7: --forward decl.
8: FUNCTION set_debug_flag RETURN VARCHAR2;
9: --l_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('AFLOG_ENABLED'),'N');
10: l_debug VARCHAR2(1) := set_debug_flag;
5:
6: --Bug 3222090, magupta removed call to FND_PROFILE.VALUE('AFLOG_ENABLED')
7: --forward decl.
8: FUNCTION set_debug_flag RETURN VARCHAR2;
9: --l_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('AFLOG_ENABLED'),'N');
10: l_debug VARCHAR2(1) := set_debug_flag;
11:
12: FUNCTION set_debug_flag RETURN VARCHAR2 IS
13: l_debug VARCHAR2(1):= 'N';
2564: /*
2565: Changes made as a part of Bug#10170611 Starts
2566: */
2567:
2568: l_lot_update_profile := NVL(fnd_profile.value('GMD: Update On-hand Status in All Locators'),'1');
2569:
2570: /*
2571: Changes made as a part of Bug#10170611 ends
2572: */
3640: SELECT 1
3641: FROM gme_batch_header bh
3642: WHERE bh.batch_id = p_sample.batch_id
3643: AND bh.batch_type = 0 -- Only Batches, No FPOs
3644: AND ( ( bh.batch_status IN (1,2) and ( NVL(fnd_profile.value('GMD_SAMPLE_CLOSED_BATCHES'),'N') = 'N') ) -- Bug # 4619570 Pending or WIP Batches Only
3645: OR ( bh.batch_status IN (1,2, 4 ) and ( NVL(fnd_profile.value('GMD_SAMPLE_CLOSED_BATCHES'),'N') = 'Y') ) ) -- Pending or WIP Or Closed Batches Only
3646: AND exists -- Only Batches with Spec Item in it
3647: (SELECT 1
3648: FROM gme_material_details md
3641: FROM gme_batch_header bh
3642: WHERE bh.batch_id = p_sample.batch_id
3643: AND bh.batch_type = 0 -- Only Batches, No FPOs
3644: AND ( ( bh.batch_status IN (1,2) and ( NVL(fnd_profile.value('GMD_SAMPLE_CLOSED_BATCHES'),'N') = 'N') ) -- Bug # 4619570 Pending or WIP Batches Only
3645: OR ( bh.batch_status IN (1,2, 4 ) and ( NVL(fnd_profile.value('GMD_SAMPLE_CLOSED_BATCHES'),'N') = 'Y') ) ) -- Pending or WIP Or Closed Batches Only
3646: AND exists -- Only Batches with Spec Item in it
3647: (SELECT 1
3648: FROM gme_material_details md
3649: WHERE md.batch_id = bh.batch_id