DBA Data[Home] [Help]

APPS.GMD_SAMPLES_GRP dependencies on GMD_SAMPLES

Line 1: PACKAGE BODY GMD_SAMPLES_GRP AS

1: PACKAGE BODY GMD_SAMPLES_GRP AS
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:

Line 4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'GMD_SAMPLES_GRP';

1: PACKAGE BODY GMD_SAMPLES_GRP AS
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;

Line 28: --| Package Name : GMD_Samples_GRP |

24: --| Redwood Shores, CA, USA |
25: --| All rights reserved. |
26: --+==========================================================================+
27: --| File Name : GMDGSMPB.pls |
28: --| Package Name : GMD_Samples_GRP |
29: --| Type : Group |
30: --| |
31: --| Notes |
32: --| This package contains group layer APIs for Specification Entity |

Line 95: --| GMD_SAMPLES_GRP.UPDATE_LOT_GRADE_BATCH AT 030 22-Nov-2012 |

91: --| the INV_MATERIAL_STATUS_PUB.update_status API. Now when |
92: --| with no LPN found and the LPN is NOT passed from sample for |
93: --| a wms enabled org, there will still be a call to update the lot status |
94: --| PLOWE Bug 14769409 - SAMPLE DISPOSITION ERROR |
95: --| GMD_SAMPLES_GRP.UPDATE_LOT_GRADE_BATCH AT 030 22-Nov-2012 |
96: --| Bug is that in a certain cases there is NO onhand for material |
97: --| status update and Smuckers want change dispotion to go ahead regardless|
98: --| INV API update_material_status now passes a warning and we interpret |
99: --| this as NO ONHAND available |

Line 151: p_sample IN gmd_samples%ROWTYPE

147: -- End of comments
148:
149: FUNCTION sampling_event_with_vr_id
150: (
151: p_sample IN gmd_samples%ROWTYPE
152: , x_sampling_event_id OUT NOCOPY NUMBER
153: , p_spec_vr_id IN NUMBER DEFAULT NULL
154: ) RETURN BOOLEAN IS
155:

Line 567: p_sample IN gmd_samples%ROWTYPE

563: -- End of comments
564:
565: FUNCTION sampling_event_exist
566: (
567: p_sample IN gmd_samples%ROWTYPE
568: , x_sampling_event_id OUT NOCOPY NUMBER
569: , p_spec_vr_id IN NUMBER DEFAULT NULL
570: ) RETURN BOOLEAN IS
571:

Line 971: p_sample IN gmd_samples%ROWTYPE

967: -- End of comments
968:
969: FUNCTION sampling_event_exist_wo_spec
970: (
971: p_sample IN gmd_samples%ROWTYPE
972: , x_sampling_event_id OUT NOCOPY NUMBER
973: ) RETURN BOOLEAN IS
974:
975: CURSOR c_inv_sampling_event IS

Line 1275: FROM gmd_samples

1271: RETURN BOOLEAN IS
1272:
1273: CURSOR c_sample_no (p_organization_id VARCHAR2, p_sample_no VARCHAR2) IS
1274: SELECT 1
1275: FROM gmd_samples
1276: WHERE organization_id = p_organization_id
1277: AND sample_no = p_sample_no
1278: ;
1279:

Line 1339: p_sample IN gmd_samples%ROWTYPE

1335:
1336:
1337: PROCEDURE validate_sample
1338: (
1339: p_sample IN gmd_samples%ROWTYPE
1340: , p_called_from IN VARCHAR2
1341: , p_operation IN VARCHAR2
1342: , x_return_status OUT NOCOPY VARCHAR2
1343: ) IS

Line 1569: l_step_id GMD_SAMPLES.step_id%TYPE;

1565: l_final_event_disp VARCHAR2(4);
1566: l_sample_disp_curr_flag VARCHAR2(1);
1567: l_temp_numb NUMBER;
1568: -- Begin bug 4951244
1569: l_step_id GMD_SAMPLES.step_id%TYPE;
1570: l_sample_type GMD_SAMPLES.sample_type%TYPE;
1571: l_source GMD_SAMPLES.source%TYPE;
1572: return_status VARCHAR2(20);
1573: l_dummy_cnt NUMBER :=0;

Line 1570: l_sample_type GMD_SAMPLES.sample_type%TYPE;

1566: l_sample_disp_curr_flag VARCHAR2(1);
1567: l_temp_numb NUMBER;
1568: -- Begin bug 4951244
1569: l_step_id GMD_SAMPLES.step_id%TYPE;
1570: l_sample_type GMD_SAMPLES.sample_type%TYPE;
1571: l_source GMD_SAMPLES.source%TYPE;
1572: return_status VARCHAR2(20);
1573: l_dummy_cnt NUMBER :=0;
1574: l_sg_disposition VARCHAR2(4); -- added for bug 8252179

Line 1571: l_source GMD_SAMPLES.source%TYPE;

1567: l_temp_numb NUMBER;
1568: -- Begin bug 4951244
1569: l_step_id GMD_SAMPLES.step_id%TYPE;
1570: l_sample_type GMD_SAMPLES.sample_type%TYPE;
1571: l_source GMD_SAMPLES.source%TYPE;
1572: return_status VARCHAR2(20);
1573: l_dummy_cnt NUMBER :=0;
1574: l_sg_disposition VARCHAR2(4); -- added for bug 8252179
1575: l_sg_event_id NUMBER(15); -- added for bug 8252179

Line 1582: FROM gmd_samples

1578: l_batch_organization_id NUMBER;
1579:
1580: Cursor cur_sample_details IS
1581: SELECT step_id,organization_id,sample_type,source, sampling_event_id -- added sampling_event_id for bug 8252179
1582: FROM gmd_samples
1583: WHERE sample_id = p_update_disp_rec.sample_id;
1584: -- End bug 4951244
1585:
1586: --Bug# 5440347 start

Line 1590: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,GMD_SAMPLES gs

1586: --Bug# 5440347 start
1587: --this cursor is used for single samples
1588: CURSOR cur_auto_complete_bstep IS
1589: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')
1590: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,GMD_SAMPLES gs
1591: WHERE gs.SAMPLE_ID = p_update_disp_rec.sample_id
1592: AND gse.SAMPLING_EVENT_ID = gs.SAMPLING_EVENT_ID
1593: AND wip.SPEC_VR_ID = gse.ORIGINAL_SPEC_VR_ID;
1594:

Line 2131: gmd_api_pub.log_message('GMD_REQ_FIELD_MIS','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');

2127: WHERE sampling_event_id = l_sampling_event_id ;
2128:
2129:
2130: EXCEPTION WHEN REQ_FIELDS_MISSING THEN
2131: gmd_api_pub.log_message('GMD_REQ_FIELD_MIS','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');
2132: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2133: x_return_status := FND_API.G_RET_STS_ERROR ;
2134: WHEN INVALID_PARAMETER THEN
2135: gmd_api_pub.log_message('GMD_INVALID_PARAM','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');

Line 2135: gmd_api_pub.log_message('GMD_INVALID_PARAM','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');

2131: gmd_api_pub.log_message('GMD_REQ_FIELD_MIS','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');
2132: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2133: x_return_status := FND_API.G_RET_STS_ERROR ;
2134: WHEN INVALID_PARAMETER THEN
2135: gmd_api_pub.log_message('GMD_INVALID_PARAM','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');
2136: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2137: x_return_status := FND_API.G_RET_STS_ERROR ;
2138: WHEN SAMPLE_SPEC_CHANGED THEN
2139: gmd_api_pub.log_message('GMD_SAMPLE_SPEC_CHANGED','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');

Line 2139: gmd_api_pub.log_message('GMD_SAMPLE_SPEC_CHANGED','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');

2135: gmd_api_pub.log_message('GMD_INVALID_PARAM','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');
2136: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2137: x_return_status := FND_API.G_RET_STS_ERROR ;
2138: WHEN SAMPLE_SPEC_CHANGED THEN
2139: gmd_api_pub.log_message('GMD_SAMPLE_SPEC_CHANGED','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');
2140: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2141: x_return_status := FND_API.G_RET_STS_ERROR ;
2142: WHEN SAMPLE_DISP_CHANGED THEN
2143: gmd_api_pub.log_message('GMD_SMPL_DISP_CHANGE','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');

Line 2143: gmd_api_pub.log_message('GMD_SMPL_DISP_CHANGE','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');

2139: gmd_api_pub.log_message('GMD_SAMPLE_SPEC_CHANGED','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');
2140: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2141: x_return_status := FND_API.G_RET_STS_ERROR ;
2142: WHEN SAMPLE_DISP_CHANGED THEN
2143: gmd_api_pub.log_message('GMD_SMPL_DISP_CHANGE','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');
2144: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2145: x_return_status := FND_API.G_RET_STS_ERROR ;
2146: WHEN OTHERS THEN
2147: gmd_api_pub.log_message('GMD_API_ERROR','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP','ERROR', SUBSTR(SQLERRM,1,100),'POSITION',l_position);

Line 2147: gmd_api_pub.log_message('GMD_API_ERROR','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP','ERROR', SUBSTR(SQLERRM,1,100),'POSITION',l_position);

2143: gmd_api_pub.log_message('GMD_SMPL_DISP_CHANGE','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');
2144: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2145: x_return_status := FND_API.G_RET_STS_ERROR ;
2146: WHEN OTHERS THEN
2147: gmd_api_pub.log_message('GMD_API_ERROR','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP','ERROR', SUBSTR(SQLERRM,1,100),'POSITION',l_position);
2148: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2149: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2150:
2151: END update_sample_comp_disp ;

Line 2257: gmd_api_pub.log_message('GMD_QM_CHANGE_DISP_ERR','PACKAGE','GMD_SAMPLES_GRP.UPDATE_CHANGE_DISP_TABLE');

2253: );
2254:
2255:
2256: IF SQL%NOTFOUND THEN
2257: gmd_api_pub.log_message('GMD_QM_CHANGE_DISP_ERR','PACKAGE','GMD_SAMPLES_GRP.UPDATE_CHANGE_DISP_TABLE');
2258: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2259: x_return_status := FND_API.G_RET_STS_ERROR ;
2260: END IF; -- SQL%NOTFOUND THEN
2261:

Line 2330: gmd_api_pub.log_message('GMD_QM_CHANGE_LOT_ERR','PACKAGE','GMD_SAMPLES_GRP.UPDATE_CHANGE_DISP_TABLE');

2326:
2327: END IF; -- (p_update_change_disp_rec.LOT_NUMBER IS NOT NULL)
2328:
2329: IF SQL%NOTFOUND THEN
2330: gmd_api_pub.log_message('GMD_QM_CHANGE_LOT_ERR','PACKAGE','GMD_SAMPLES_GRP.UPDATE_CHANGE_DISP_TABLE');
2331: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
2332: x_return_status := FND_API.G_RET_STS_ERROR ;
2333: END IF; -- SQL%NOTFOUND THEN
2334:

Line 2377: --| GMD_SAMPLES_GRP.UPDATE_LOT_GRADE_BATCH AT 030 22-Nov-2012 |

2373: --| the INV_MATERIAL_STATUS_PUB.update_status API. Now when |
2374: --| with no LPN found and the LPN is NOT passed from sample for |
2375: --| a wms enabled org, there will still be a call to update the lot status |
2376: --| PLOWE Bug 14769409 - SAMPLE DISPOSITION ERROR |
2377: --| GMD_SAMPLES_GRP.UPDATE_LOT_GRADE_BATCH AT 030 22-Nov-2012 |
2378: --| Bug is that in a certain cases there is NO onhand for material |
2379: --| status update and Smuckers want change dispotion to go ahead regardless|
2380: --| INV API update_material_status now passes a warning and we interpret |
2381: --| this as NO ONHAND available |

Line 2534: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,GMD_SAMPLES gs

2530: --Bug# 5440347 start
2531: --this cursor is used for single samples
2532: CURSOR cur_auto_complete_bstep_smpl IS
2533: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')
2534: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,GMD_SAMPLES gs
2535: WHERE gs.SAMPLE_ID = p_sample_id
2536: AND gse.SAMPLING_EVENT_ID = gs.SAMPLING_EVENT_ID
2537: AND wip.SPEC_VR_ID = gse.ORIGINAL_SPEC_VR_ID;
2538:

Line 2619: FROM GMD_SAMPLES gs,

2615: l_step_no,
2616: l_locator_id, -- 50061731
2617: l_subinventory, -- 50061731
2618: l_lpn_id -- 12829066
2619: FROM GMD_SAMPLES gs,
2620: MTL_SYSTEM_ITEMS_b_kfv iim
2621: WHERE gs.sample_id = p_sample_id
2622: AND gs.inventory_item_id = iim.inventory_item_id
2623: AND gs.organization_id = iim.organization_id;

Line 2665: --FROM GMD_SAMPLES

2661: -- select the orgn_code from the first sample.
2662: -- Bug 4165704: took out the following code since orgn is now kept on sampling event.
2663: -- added organization to select statement above
2664: --SELECT orgn_code INTO l_orgn_code
2665: --FROM GMD_SAMPLES
2666: --WHERE sampling_event_id = l_sampling_event_id
2667: --AND rownum = 1 ;
2668:
2669: END IF;

Line 3497: gmd_api_pub.log_message('GMD_QM_CURRENT_LOT_VALUE_CHANG','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');

3493:
3494: EXCEPTION
3495: WHEN SAMPLE_DISP_CHANGED THEN
3496: --RLNAGARA B5668965 Changed the message from GMD_SMPL_DISP_CHANGE to GMD_QM_CURRENT_LOT_VALUE_CHANG
3497: gmd_api_pub.log_message('GMD_QM_CURRENT_LOT_VALUE_CHANG','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');
3498: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
3499: x_return_status := FND_API.G_RET_STS_ERROR ;
3500: WHEN REQ_FIELDS_MISSING THEN
3501: gmd_api_pub.log_message('GMD_REQ_FIELD_MIS','PACKAGE','GMD_SAMPLES_GRP.UPDATE_LOT_GRADE_BATCH');

Line 3501: gmd_api_pub.log_message('GMD_REQ_FIELD_MIS','PACKAGE','GMD_SAMPLES_GRP.UPDATE_LOT_GRADE_BATCH');

3497: gmd_api_pub.log_message('GMD_QM_CURRENT_LOT_VALUE_CHANG','PACKAGE','GMD_SAMPLES_GRP.UPDATE_SAMPLE_COMP_DISP');
3498: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
3499: x_return_status := FND_API.G_RET_STS_ERROR ;
3500: WHEN REQ_FIELDS_MISSING THEN
3501: gmd_api_pub.log_message('GMD_REQ_FIELD_MIS','PACKAGE','GMD_SAMPLES_GRP.UPDATE_LOT_GRADE_BATCH');
3502: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
3503: x_return_status := FND_API.G_RET_STS_ERROR ;
3504: WHEN INVALID_SAMPLE THEN
3505: gmd_api_pub.log_message('GMD_QM_INVALID_SAMPLE');

Line 3525: gmd_api_pub.log_message('GMD_API_ERROR','PACKAGE','GMD_SAMPLES_GRP.UPDATE_LOT_GRADE_BATCH','ERROR', SUBSTR(SQLERRM,1,100),'POSITION',l_position);

3521: END IF;
3522: IF get_curr_lot_status_cv%ISOPEN THEN
3523: CLOSE get_curr_lot_status_cv;
3524: END IF;
3525: gmd_api_pub.log_message('GMD_API_ERROR','PACKAGE','GMD_SAMPLES_GRP.UPDATE_LOT_GRADE_BATCH','ERROR', SUBSTR(SQLERRM,1,100),'POSITION',l_position);
3526: x_message_data := FND_MSG_PUB.GET(FND_MSG_PUB.G_LAST,FND_API.G_FALSE);
3527: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3528: END update_lot_grade_batch ;
3529:

Line 3569: p_sample IN gmd_samples%ROWTYPE

3565: -- End of comments
3566:
3567: PROCEDURE check_for_null_and_fks_in_smpl
3568: (
3569: p_sample IN gmd_samples%ROWTYPE
3570: , x_return_status OUT NOCOPY VARCHAR2
3571: ) IS
3572:
3573: -- Bug 4165704: changed for inventory convergence

Line 4289: ( p_sample IN GMD_SAMPLES%ROWTYPE

4285: --| after INV_TXN_MANAGER_PUB.PROCESS_TRANSACTIONS failed|
4286: --+========================================================================+
4287:
4288: PROCEDURE create_inv_txn
4289: ( p_sample IN GMD_SAMPLES%ROWTYPE
4290: , p_user_name IN NUMBER
4291: , x_return_status OUT NOCOPY VARCHAR2
4292: , x_message_count OUT NOCOPY NUMBER
4293: , x_message_data OUT NOCOPY VARCHAR2

Line 4446: -- Gmd_samples_grp.Get_item_values( p_sample_display => l_item_rec);

4442: -- Bug 4165704: uom convergence not needed after inventory convergence
4443: -- l_item_rec.inventory_item_id := p_sample.inventory_item_id;
4444: -- l_item_rec.organization_id := p_sample.organization_id;
4445:
4446: -- Gmd_samples_grp.Get_item_values( p_sample_display => l_item_rec);
4447:
4448: -- IF l_item_rec.Dual_uom_control = 3 THEN
4449: -- l_trans_rec.trans_qty2
4450: -- := INV_CONVERT.inv_um_convert(

Line 4621: ( p_sample IN GMD_SAMPLES%ROWTYPE

4617: --+========================================================================+
4618: -- End of comments
4619:
4620: PROCEDURE create_wip_txn
4621: ( p_sample IN GMD_SAMPLES%ROWTYPE
4622: , x_return_status OUT NOCOPY VARCHAR2
4623: , x_message_count OUT NOCOPY NUMBER
4624: , x_message_data OUT NOCOPY VARCHAR2
4625: )

Line 5084: SELECT 'x' from gmd_samples

5080:
5081:
5082: -- added this code to prevent locking error if sample is locked by another form.
5083: CURSOR C_lock_sample(samp_id NUMBER) IS
5084: SELECT 'x' from gmd_samples
5085: where sample_id = samp_id
5086: for update of sample_id NOWAIT ;
5087:
5088: record_lock EXCEPTION ;

Line 5092: l_in_samples gmd_samples%ROWTYPE;

5088: record_lock EXCEPTION ;
5089: pragma exception_init(record_lock,-00054) ;
5090: -- end update for locking error
5091:
5092: l_in_samples gmd_samples%ROWTYPE;
5093: l_samples gmd_samples%ROWTYPE;
5094:
5095: l_in_results gmd_results%ROWTYPE;
5096: l_results gmd_results%ROWTYPE;

Line 5093: l_samples gmd_samples%ROWTYPE;

5089: pragma exception_init(record_lock,-00054) ;
5090: -- end update for locking error
5091:
5092: l_in_samples gmd_samples%ROWTYPE;
5093: l_samples gmd_samples%ROWTYPE;
5094:
5095: l_in_results gmd_results%ROWTYPE;
5096: l_results gmd_results%ROWTYPE;
5097:

Line 5153: result := GMD_SAMPLES_PVT.fetch_row(

5149: gmd_debug.put_line('sample id changed to: ');
5150: gmd_debug.put_line(' Sample ID: ' || l_in_samples.sample_id);
5151: END IF;
5152:
5153: result := GMD_SAMPLES_PVT.fetch_row(
5154: p_samples => l_in_samples,
5155: x_samples => l_samples);
5156:
5157: IF (l_debug = 'Y') THEN

Line 5226: UPDATE gmd_samples

5222: -- added this code to prevent locking error if sample is locked by another form.
5223: OPEN C_lock_sample(l_samples.sample_id);
5224: CLOSE C_lock_sample;
5225:
5226: UPDATE gmd_samples
5227: SET remaining_qty = remaining_qty - converted_qty
5228: WHERE sample_id = l_samples.sample_id;
5229:
5230: ELSE

Line 5246: UPDATE gmd_samples

5242: -- added this code to prevent locking error if sample is locked by another form.
5243: OPEN C_lock_sample(l_samples.sample_id);
5244: CLOSE C_lock_sample;
5245:
5246: UPDATE gmd_samples
5247: SET remaining_qty = remaining_qty - qty
5248: WHERE sample_id = l_samples.sample_id;
5249:
5250: ELSE

Line 5332: in_sample gmd_samples%ROWTYPE;

5328: SELECT license_plate_number
5329: FROM wms_license_plate_numbers
5330: WHERE lpn_id = p_lpn_id;
5331:
5332: in_sample gmd_samples%ROWTYPE;
5333: out_sample gmd_samples%ROWTYPE;
5334: in_sampling_event gmd_sampling_events%ROWTYPE;
5335: out_sampling_event gmd_sampling_events%ROWTYPE;
5336: sampling_event gmd_sampling_events%ROWTYPE;

Line 5333: out_sample gmd_samples%ROWTYPE;

5329: FROM wms_license_plate_numbers
5330: WHERE lpn_id = p_lpn_id;
5331:
5332: in_sample gmd_samples%ROWTYPE;
5333: out_sample gmd_samples%ROWTYPE;
5334: in_sampling_event gmd_sampling_events%ROWTYPE;
5335: out_sampling_event gmd_sampling_events%ROWTYPE;
5336: sampling_event gmd_sampling_events%ROWTYPE;
5337:

Line 5358: IF NOT ( gmd_samples_pvt.fetch_row(p_samples => in_sample,

5354:
5355: -- test for whether sample id or sampling event id was passed
5356: IF p_type = 'SAMPLE' THEN -- sample_id is passed
5357: in_sample.sample_id := p_id;
5358: IF NOT ( gmd_samples_pvt.fetch_row(p_samples => in_sample,
5359: x_samples => out_sample))
5360: THEN
5361: -- Fetch Error.
5362: RAISE e_sample_fetch_error;

Line 5442: Gmd_samples_grp.get_item_values(p_sample_display => x_display);

5438: x_display.sample_active_cnt := out_sampling_event.sample_active_cnt;
5439:
5440: END IF;
5441:
5442: Gmd_samples_grp.get_item_values(p_sample_display => x_display);
5443:
5444: IF out_sample.source = 'I' THEN
5445: Gmd_samples_grp.Inventory_source(p_locator_id => out_sample.locator_id
5446: , p_subinventory => out_sample.subinventory

Line 5445: Gmd_samples_grp.Inventory_source(p_locator_id => out_sample.locator_id

5441:
5442: Gmd_samples_grp.get_item_values(p_sample_display => x_display);
5443:
5444: IF out_sample.source = 'I' THEN
5445: Gmd_samples_grp.Inventory_source(p_locator_id => out_sample.locator_id
5446: , p_subinventory => out_sample.subinventory
5447: , p_organization_id => out_sample.organization_id
5448: , x_display => x_display);
5449: ELSIF out_sample.source = 'C' THEN

Line 5450: Gmd_samples_grp.customer_source(p_org_id => out_sample.org_id

5446: , p_subinventory => out_sample.subinventory
5447: , p_organization_id => out_sample.organization_id
5448: , x_display => x_display);
5449: ELSIF out_sample.source = 'C' THEN
5450: Gmd_samples_grp.customer_source(p_org_id => out_sample.org_id
5451: , p_ship_to_site_id => out_sample.ship_to_site_id
5452: , p_order_id => out_sample.order_id
5453: , p_order_line_id => out_sample.order_line_id
5454: , p_cust_id => out_sample.cust_id

Line 5457: Gmd_samples_grp.supplier_source(p_supplier_id => out_sample.supplier_id

5453: , p_order_line_id => out_sample.order_line_id
5454: , p_cust_id => out_sample.cust_id
5455: , x_display => x_display);
5456: ELSIF out_sample.source = 'S' THEN
5457: Gmd_samples_grp.supplier_source(p_supplier_id => out_sample.supplier_id
5458: , p_po_header_id => out_sample.po_header_id
5459: , p_po_line_id => out_sample.po_line_id
5460: , p_receipt_id => out_sample.receipt_id
5461: , p_receipt_line_id => out_sample.receipt_line_id

Line 5468: Gmd_samples_grp.wip_source(p_batch_id => out_sample.batch_id

5464: , p_organization_id => out_sample.organization_id
5465: , p_subinventory => out_sample.subinventory
5466: , x_display => x_display);
5467: ELSIF out_sample.source = 'W' THEN
5468: Gmd_samples_grp.wip_source(p_batch_id => out_sample.batch_id
5469: , p_step_id => out_sample.step_id
5470: , p_recipe_id => out_sample.recipe_id
5471: , p_formula_id => out_sample.formula_id
5472: , p_formulaline_id => out_sample.formulaline_id

Line 5480: Gmd_samples_grp.stability_study_source(p_variant_id => out_sample.variant_id

5476: , p_inventory_item_id => out_sample.inventory_item_id
5477: , p_organization_id => out_sample.organization_id
5478: , x_display => x_display);
5479: ELSIF out_sample.source = 'T' THEN
5480: Gmd_samples_grp.stability_study_source(p_variant_id => out_sample.variant_id
5481: ,p_time_point_id => out_sample.time_point_id
5482: , x_display => x_display);
5483: ELSIF out_sample.source = 'L' THEN
5484: Gmd_samples_grp.physical_location_source(p_locator_id => out_sample.locator_id

Line 5484: Gmd_samples_grp.physical_location_source(p_locator_id => out_sample.locator_id

5480: Gmd_samples_grp.stability_study_source(p_variant_id => out_sample.variant_id
5481: ,p_time_point_id => out_sample.time_point_id
5482: , x_display => x_display);
5483: ELSIF out_sample.source = 'L' THEN
5484: Gmd_samples_grp.physical_location_source(p_locator_id => out_sample.locator_id
5485: , p_subinventory => out_sample.subinventory
5486: , p_organization_id => out_sample.organization_id
5487: , x_display => x_display);
5488: ELSIF out_sample.source = 'R' THEN

Line 5489: Gmd_samples_grp.resource_source(p_instance_id => out_sample.instance_id

5485: , p_subinventory => out_sample.subinventory
5486: , p_organization_id => out_sample.organization_id
5487: , x_display => x_display);
5488: ELSIF out_sample.source = 'R' THEN
5489: Gmd_samples_grp.resource_source(p_instance_id => out_sample.instance_id
5490: , x_display => x_display);
5491: END IF;
5492:
5493: ELSIF p_type = 'EVENT' THEN -- sampling_event_id is passed

Line 5520: Gmd_samples_grp.get_item_values(p_sample_display => x_display);

5516: FETCH Cur_get_lpn INTO x_display.lpn;
5517: CLOSE Cur_get_lpn;
5518: END IF;
5519:
5520: Gmd_samples_grp.get_item_values(p_sample_display => x_display);
5521:
5522: IF out_sampling_event.source = 'I' THEN
5523: Gmd_samples_grp.Inventory_source(p_locator_id => out_sampling_event.locator_id
5524: , p_subinventory => out_sampling_event.subinventory

Line 5523: Gmd_samples_grp.Inventory_source(p_locator_id => out_sampling_event.locator_id

5519:
5520: Gmd_samples_grp.get_item_values(p_sample_display => x_display);
5521:
5522: IF out_sampling_event.source = 'I' THEN
5523: Gmd_samples_grp.Inventory_source(p_locator_id => out_sampling_event.locator_id
5524: , p_subinventory => out_sampling_event.subinventory
5525: , p_organization_id => out_sampling_event.organization_id
5526: , x_display => x_display);
5527: ELSIF out_sampling_event.source = 'C' THEN

Line 5528: Gmd_samples_grp.customer_source(p_org_id => out_sampling_event.org_id

5524: , p_subinventory => out_sampling_event.subinventory
5525: , p_organization_id => out_sampling_event.organization_id
5526: , x_display => x_display);
5527: ELSIF out_sampling_event.source = 'C' THEN
5528: Gmd_samples_grp.customer_source(p_org_id => out_sampling_event.org_id
5529: , p_ship_to_site_id => out_sampling_event.ship_to_site_id
5530: , p_order_id => out_sampling_event.order_id
5531: , p_order_line_id => out_sampling_event.order_line_id
5532: , p_cust_id => out_sampling_event.cust_id

Line 5535: Gmd_samples_grp.supplier_source(p_supplier_id => out_sampling_event.supplier_id

5531: , p_order_line_id => out_sampling_event.order_line_id
5532: , p_cust_id => out_sampling_event.cust_id
5533: , x_display => x_display);
5534: ELSIF out_sampling_event.source = 'S' THEN
5535: Gmd_samples_grp.supplier_source(p_supplier_id => out_sampling_event.supplier_id
5536: , p_po_header_id => out_sampling_event.po_header_id
5537: , p_po_line_id => out_sampling_event.po_line_id
5538: , p_receipt_id => out_sampling_event.receipt_id
5539: , p_receipt_line_id => out_sampling_event.receipt_line_id

Line 5546: Gmd_samples_grp.wip_source(p_batch_id => out_sampling_event.batch_id

5542: , p_organization_id => out_sampling_event.organization_id
5543: , p_subinventory => out_sampling_event.subinventory
5544: , x_display => x_display);
5545: ELSIF out_sampling_event.source = 'W' THEN
5546: Gmd_samples_grp.wip_source(p_batch_id => out_sampling_event.batch_id
5547: , p_step_id => out_sampling_event.step_id
5548: , p_recipe_id => out_sampling_event.recipe_id
5549: , p_formula_id => out_sampling_event.formula_id
5550: , p_formulaline_id => out_sampling_event.formulaline_id

Line 5558: Gmd_samples_grp.stability_study_source(p_variant_id => out_sampling_event.variant_id

5554: , p_inventory_item_id => out_sampling_event.inventory_item_id
5555: , p_organization_id => out_sample.organization_id
5556: , x_display => x_display);
5557: ELSIF out_sampling_event.source = 'T' THEN
5558: Gmd_samples_grp.stability_study_source(p_variant_id => out_sampling_event.variant_id
5559: ,p_time_point_id => out_sampling_event.time_point_id
5560: , x_display => x_display);
5561: ELSIF out_sampling_event.source = 'L' THEN
5562: Gmd_samples_grp.physical_location_source(p_locator_id => out_sampling_event.locator_id

Line 5562: Gmd_samples_grp.physical_location_source(p_locator_id => out_sampling_event.locator_id

5558: Gmd_samples_grp.stability_study_source(p_variant_id => out_sampling_event.variant_id
5559: ,p_time_point_id => out_sampling_event.time_point_id
5560: , x_display => x_display);
5561: ELSIF out_sampling_event.source = 'L' THEN
5562: Gmd_samples_grp.physical_location_source(p_locator_id => out_sampling_event.locator_id
5563: , p_subinventory => out_sampling_event.subinventory
5564: , p_organization_id => out_sampling_event.organization_id
5565: , x_display => x_display);
5566: ELSIF out_sampling_event.source = 'R' THEN

Line 5567: Gmd_samples_grp.resource_source(p_instance_id => out_sampling_event.instance_id

5563: , p_subinventory => out_sampling_event.subinventory
5564: , p_organization_id => out_sampling_event.organization_id
5565: , x_display => x_display);
5566: ELSIF out_sampling_event.source = 'R' THEN
5567: Gmd_samples_grp.resource_source(p_instance_id => out_sampling_event.instance_id
5568: , x_display => x_display);
5569: END IF;
5570: ELSE -- p_type parameter incorrect
5571: x_return_status := FND_API.G_RET_STS_ERROR ;

Line 6049: Gmd_samples_grp.Inventory_source (

6045: IS
6046: o_display sample_display_rec;
6047:
6048: BEGIN
6049: Gmd_samples_grp.Inventory_source (
6050: p_locator_id => p_locator_id
6051: , p_subinventory => p_subinventory
6052: , p_organization_id => p_organization_id
6053: , x_display => o_display);

Line 6266: gmd_samples s,

6262: d.meaning sample_disposition,
6263: e.meaning source
6264: FROM gmd_sample_spec_disp b,
6265: gmd_event_spec_disp c,
6266: gmd_samples s,
6267: fnd_lookup_values_vl d,
6268: fnd_lookup_values_vl e
6269: WHERE b.sample_id = p_sample.sample_id
6270: and b.event_spec_disp_id = c.event_spec_disp_id

Line 6283: gmd_samples s,

6279: d.meaning sample_disposition,
6280: e.meaning source
6281: FROM gmd_sample_spec_disp b,
6282: gmd_event_spec_disp c,
6283: gmd_samples s,
6284: fnd_lookup_values d,
6285: fnd_lookup_values e
6286: WHERE b.sample_id =p_sample.sample_id
6287: and b.event_spec_disp_id = c.event_spec_disp_id

Line 6315: END GMD_SAMPLES_GRP;

6311:
6312: END get_sample_spec_disposition;
6313:
6314:
6315: END GMD_SAMPLES_GRP;
6316: