DBA Data[Home] [Help]

APPS.MIGRATE_BATCH dependencies on FND_API

Line 729: x_return_status := FND_API.G_RET_STS_SUCCESS;

725:
726: l_return_status VARCHAR2 (1);
727: l_pos NUMBER := 0;
728: BEGIN
729: x_return_status := FND_API.G_RET_STS_SUCCESS;
730: l_pos := 1;
731: OPEN get_resource_capacity (p_resources, p_batch_id);
732: l_pos := 2;
733: FETCH get_resource_capacity INTO x_min_capacity,

Line 1283: x_return_status := FND_API.G_RET_STS_SUCCESS;

1279: d.in_use <
1280: 100 -- => ensure you only get those materials that were not migrated.
1281: ORDER BY h.plant_code, h.batch_type, h.batch_no, d.line_no;
1282: BEGIN
1283: x_return_status := FND_API.G_RET_STS_SUCCESS;
1284: l_pos := 1;
1285:
1286: IF g_mig_date IS NULL THEN
1287: g_mig_date := SYSDATE;

Line 1313: p_error_type => FND_API.G_RET_STS_ERROR

1309: || l_batch_header.batch_id
1310: || ' line_id = '
1311: || get_rec.line_id,
1312: p_message => 'Unable to load the transactions',
1313: p_error_type => FND_API.G_RET_STS_ERROR
1314: );
1315: ELSE
1316: l_load_trans_fail := FALSE;
1317: l_pos := 4;

Line 1343: p_error_type => FND_API.G_RET_STS_ERROR

1339: || l_batch_header.batch_id
1340: || ' line_id = '
1341: || get_rec.line_id,
1342: p_message => 'Unable to determine the default lot.',
1343: p_error_type => FND_API.G_RET_STS_ERROR
1344: );
1345: END IF;
1346: ELSE
1347: l_pos := 7;

Line 1410: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1406: x_tran_row => l_tran_reverse,
1407: x_return_status => l_return_status
1408: );
1409:
1410: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1411: RAISE error_build_ic_tran_row;
1412: END IF;
1413:
1414: -- Check that the trans_date is in an open calendar period and whse.

Line 1448: p_error_type => FND_API.G_RET_STS_ERROR

1444: p_procedure_name => 'CHECK_WIP_BATCHES',
1445: p_parameters => 'Batch_Id=>'
1446: || TO_CHAR (get_rec.batch_id),
1447: p_message => l_message,
1448: p_error_type => FND_API.G_RET_STS_ERROR
1449: );
1450: ELSE
1451: l_reversible := TRUE;
1452: l_message :=

Line 1493: p_init_msg_list => FND_API.g_false,

1489: l_tran_reverse.trans_qty2 :=
1490: -1 * l_tran_reverse.trans_qty2;
1491: gmi_trans_engine_pub.create_completed_transaction (
1492: p_api_version => 1,
1493: p_init_msg_list => FND_API.g_false,
1494: p_commit => FND_API.g_false,
1495: p_validation_level => FND_API.g_valid_level_full,
1496: p_tran_rec => l_tran_reverse,
1497: x_tran_row => l_ic_tran_cmp_out,

Line 1494: p_commit => FND_API.g_false,

1490: -1 * l_tran_reverse.trans_qty2;
1491: gmi_trans_engine_pub.create_completed_transaction (
1492: p_api_version => 1,
1493: p_init_msg_list => FND_API.g_false,
1494: p_commit => FND_API.g_false,
1495: p_validation_level => FND_API.g_valid_level_full,
1496: p_tran_rec => l_tran_reverse,
1497: x_tran_row => l_ic_tran_cmp_out,
1498: x_return_status => l_return_status,

Line 1495: p_validation_level => FND_API.g_valid_level_full,

1491: gmi_trans_engine_pub.create_completed_transaction (
1492: p_api_version => 1,
1493: p_init_msg_list => FND_API.g_false,
1494: p_commit => FND_API.g_false,
1495: p_validation_level => FND_API.g_valid_level_full,
1496: p_tran_rec => l_tran_reverse,
1497: x_tran_row => l_ic_tran_cmp_out,
1498: x_return_status => l_return_status,
1499: x_msg_count => l_msg_count,

Line 1504: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1500: x_msg_data => l_msg_data,
1501: p_table_name => 'IC_TRAN_PND'
1502: );
1503:
1504: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1505:
1506: --dbms_output.put_line (fnd_msg_pub.get (p_encoded => FND_API.g_false));
1507:
1508: l_message :=

Line 1506: --dbms_output.put_line (fnd_msg_pub.get (p_encoded => FND_API.g_false));

1502: );
1503:
1504: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1505:
1506: --dbms_output.put_line (fnd_msg_pub.get (p_encoded => FND_API.g_false));
1507:
1508: l_message :=
1509: 'Error creating reversing transaction for trans_id '
1510: || l_tran_row.trans_id

Line 1525: p_encoded => FND_API.g_false

1521: l_message :=
1522: l_message
1523: || ' with following error: '
1524: || fnd_msg_pub.get (
1525: p_encoded => FND_API.g_false
1526: );
1527: END IF;
1528:
1529: l_return_status := FND_API.G_RET_STS_ERROR;

Line 1529: l_return_status := FND_API.G_RET_STS_ERROR;

1525: p_encoded => FND_API.g_false
1526: );
1527: END IF;
1528:
1529: l_return_status := FND_API.G_RET_STS_ERROR;
1530: insert_message (
1531: p_table_name => 'IC_TRAN_PND',
1532: p_procedure_name => 'CHECK_WIP_BATCHES',
1533: p_parameters => 'Batch_Id=>'

Line 1563: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1559: x_tran_row => l_tran_pending,
1560: x_return_status => l_return_status
1561: );
1562:
1563: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1564: RAISE error_build_ic_tran_row;
1565: END IF;
1566:
1567: -- Stamp the pending transaction with sysdate if it was determined that trans_date is not usable

Line 1576: FND_API.g_false,

1572: /* Insert a pending transaction */
1573:
1574: gmi_trans_engine_pub.create_pending_transaction (
1575: 1,
1576: FND_API.g_false,
1577: FND_API.g_false,
1578: FND_API.g_valid_level_full,
1579: l_tran_pending,
1580: l_ic_tran_pnd_out,

Line 1577: FND_API.g_false,

1573:
1574: gmi_trans_engine_pub.create_pending_transaction (
1575: 1,
1576: FND_API.g_false,
1577: FND_API.g_false,
1578: FND_API.g_valid_level_full,
1579: l_tran_pending,
1580: l_ic_tran_pnd_out,
1581: l_return_status,

Line 1578: FND_API.g_valid_level_full,

1574: gmi_trans_engine_pub.create_pending_transaction (
1575: 1,
1576: FND_API.g_false,
1577: FND_API.g_false,
1578: FND_API.g_valid_level_full,
1579: l_tran_pending,
1580: l_ic_tran_pnd_out,
1581: l_return_status,
1582: l_msg_count,

Line 1586: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1582: l_msg_count,
1583: l_msg_data
1584: );
1585:
1586: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1587: l_message :=
1588: 'Error creating pending transaction for trans_id '
1589: || l_tran_row.trans_id
1590: || ' in batch no '

Line 1604: p_encoded => FND_API.g_false

1600: l_message :=
1601: l_message
1602: || ' with following error: '
1603: || fnd_msg_pub.get (
1604: p_encoded => FND_API.g_false
1605: );
1606: END IF;
1607:
1608: l_return_status := FND_API.G_RET_STS_ERROR;

Line 1608: l_return_status := FND_API.G_RET_STS_ERROR;

1604: p_encoded => FND_API.g_false
1605: );
1606: END IF;
1607:
1608: l_return_status := FND_API.G_RET_STS_ERROR;
1609: insert_message (
1610: p_table_name => 'IC_TRAN_PND',
1611: p_procedure_name => 'CHECK_WIP_BATCHES',
1612: p_parameters => 'Batch_Id=>'

Line 1653: l_return_status := FND_API.G_RET_STS_ERROR;

1649: || ' for '
1650: || l_line_type_desc
1651: || ' line number '
1652: || get_rec.line_no;
1653: l_return_status := FND_API.G_RET_STS_ERROR;
1654: insert_message (
1655: p_table_name => 'IC_TRAN_PND',
1656: p_procedure_name => 'CHECK_WIP_BATCHES',
1657: p_parameters => 'Batch_Id=>'

Line 1713: l_return_status VARCHAR2 (1) := FND_API.G_RET_STS_SUCCESS;

1709: x_tran_row OUT NOCOPY gmi_trans_engine_pub.ictran_rec,
1710: x_return_status OUT NOCOPY VARCHAR2
1711: ) IS
1712: l_api_name CONSTANT VARCHAR2 (30) := 'BUILD_GMI_TRANS';
1713: l_return_status VARCHAR2 (1) := FND_API.G_RET_STS_SUCCESS;
1714: l_tran_row gmi_trans_engine_pub.ictran_rec;
1715: BEGIN
1716: -- The trans_um,trans_um will Should always be in the Items Base
1717: -- Units of measure. No Conversions are done in this routine.

Line 1932: x_return_status := FND_API.G_RET_STS_SUCCESS;

1928: for p_table_name. This is because in is_table_migrated, if the record is
1929: not found, it is created. And since is_table_migrated is always called before
1930: this procedure, we can assume that the record is there. */
1931:
1932: x_return_status := FND_API.G_RET_STS_SUCCESS;
1933:
1934: l_pos := 1;
1935:
1936: UPDATE gme_migration_control

Line 2200: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2196: l_pos := 2;
2197: insert_batch_header (x_return_status => l_return_status);
2198: l_pos := 3;
2199:
2200: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2201: RAISE error_detail;
2202: END IF;
2203:
2204: set_table_migrated (

Line 2224: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2220: p_reverse_compl_def_txns => TRUE
2221: );
2222: l_pos := 5;
2223:
2224: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2225: RAISE error_detail;
2226: END IF;
2227:
2228: set_table_migrated (

Line 2243: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2239: l_pos := 6;
2240: insert_material_details (x_return_status => l_return_status);
2241: l_pos := 7;
2242:
2243: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2244: RAISE error_detail;
2245: END IF;
2246:
2247: set_table_migrated (

Line 2262: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2258: l_pos := 8;
2259: insert_batch_steps (x_return_status => l_return_status);
2260: l_pos := 9;
2261:
2262: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2263: RAISE error_detail;
2264: END IF;
2265:
2266: set_table_migrated (

Line 2281: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2277: l_pos := 10;
2278: insert_batch_step_dtls (x_return_status => l_return_status);
2279: l_pos := 11;
2280:
2281: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2282: RAISE error_detail;
2283: END IF;
2284:
2285: set_table_migrated (

Line 2300: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2296: l_pos := 12;
2297: insert_batch_step_items (x_return_status => l_return_status);
2298: l_pos := 13;
2299:
2300: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2301: RAISE error_detail;
2302: END IF;
2303:
2304: set_table_migrated (

Line 2319: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2315: l_pos := 14;
2316: insert_batch_step_dependencies (x_return_status => l_return_status);
2317: l_pos := 15;
2318:
2319: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2320: RAISE error_detail;
2321: END IF;
2322:
2323: set_table_migrated (

Line 2338: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2334: l_pos := 16;
2335: insert_batch_history (x_return_status => l_return_status);
2336: l_pos := 17;
2337:
2338: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2339: RAISE error_detail;
2340: END IF;
2341:
2342: set_table_migrated (

Line 2357: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2353: l_pos := 18;
2354: insert_batch_step_transfers (x_return_status => l_return_status);
2355: l_pos := 19;
2356:
2357: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2358: RAISE error_detail;
2359: END IF;
2360:
2361: set_table_migrated (

Line 2378: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2374: l_pos := 20;
2375: insert_text_header (x_return_status => l_return_status);
2376: l_pos := 21;
2377:
2378: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2379: RAISE error_detail;
2380: END IF;
2381:
2382: set_table_migrated (

Line 2399: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2395: l_pos := 22;
2396: insert_text_dtl (x_return_status => l_return_status);
2397: l_pos := 23;
2398:
2399: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2400: RAISE error_detail;
2401: END IF;
2402:
2403: set_table_migrated (

Line 2498: x_return_status := FND_API.G_RET_STS_SUCCESS;

2494: END run;
2495:
2496: PROCEDURE insert_batch_header (x_return_status OUT NOCOPY VARCHAR2) IS
2497: BEGIN
2498: x_return_status := FND_API.G_RET_STS_SUCCESS;
2499:
2500: INSERT INTO gme_batch_header
2501: (batch_id,
2502: plant_code,

Line 2673: x_return_status := FND_API.G_RET_STS_SUCCESS;

2669: l_count NUMBER (5) DEFAULT 0;
2670: l_return_status VARCHAR2 (1);
2671: error_detail EXCEPTION;
2672: BEGIN
2673: x_return_status := FND_API.G_RET_STS_SUCCESS;
2674:
2675: INSERT INTO gme_material_details
2676: (material_detail_id,
2677: batch_id,

Line 2819: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2815: p_error_type => 'P'
2816: );
2817: split_trans_line (x_return_status => l_return_status);
2818:
2819: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2820: RAISE error_detail;
2821: END IF;
2822:
2823: UPDATE pm_matl_dtl_bak

Line 2853: x_return_status := FND_API.G_RET_STS_SUCCESS;

2849: v_actual_charges NUMBER;
2850: v_process_qty_uom VARCHAR2 (4);
2851: l_return_status VARCHAR2 (1);
2852: BEGIN
2853: x_return_status := FND_API.G_RET_STS_SUCCESS;
2854:
2855: INSERT INTO gme_batch_steps
2856: (batch_id,
2857: batchstep_id,

Line 3071: x_return_status := FND_API.G_RET_STS_SUCCESS;

3067: l_return_status VARCHAR2 (1);
3068: l_act_cnt NUMBER := 0;
3069: error_insert_rsrc_txns EXCEPTION;
3070: BEGIN
3071: x_return_status := FND_API.G_RET_STS_SUCCESS;
3072: OPEN get_activities;
3073: FETCH get_activities INTO v_activities;
3074:
3075: WHILE (get_activities%FOUND)

Line 3336: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3332: delete_mark <> 1;
3333:
3334: insert_resource_txns (l_return_status);
3335:
3336: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3337: RAISE error_insert_rsrc_txns;
3338: END IF;
3339:
3340: EXCEPTION

Line 3357: x_return_status := FND_API.G_RET_STS_SUCCESS;

3353:
3354: PROCEDURE insert_batch_step_items (x_return_status OUT NOCOPY VARCHAR2) IS
3355: l_return_status VARCHAR2 (1);
3356: BEGIN
3357: x_return_status := FND_API.G_RET_STS_SUCCESS;
3358:
3359: report_step_item_orphans;
3360:
3361: INSERT INTO gme_batch_step_items

Line 3474: x_return_status := FND_API.G_RET_STS_SUCCESS;

3470: END report_step_item_orphans;
3471:
3472: PROCEDURE insert_batch_step_dependencies (x_return_status OUT NOCOPY VARCHAR2) IS
3473: BEGIN
3474: x_return_status := FND_API.G_RET_STS_SUCCESS;
3475:
3476: report_step_dep_orphans;
3477:
3478: INSERT INTO gme_batch_step_dependencies

Line 3698: x_return_status := FND_API.G_RET_STS_SUCCESS;

3694: END report_step_dep_orphans;
3695:
3696: PROCEDURE insert_resource_txns (x_return_status OUT NOCOPY VARCHAR2) IS
3697: BEGIN
3698: x_return_status := FND_API.G_RET_STS_SUCCESS;
3699:
3700: INSERT INTO gme_resource_txns
3701: (poc_trans_id,
3702: orgn_code,

Line 3856: x_return_status := FND_API.G_RET_STS_SUCCESS;

3852: END insert_resource_txns;
3853:
3854: PROCEDURE insert_batch_history (x_return_status OUT NOCOPY VARCHAR2) IS
3855: BEGIN
3856: x_return_status := FND_API.G_RET_STS_SUCCESS;
3857:
3858: INSERT INTO gme_batch_history
3859: (event_id,
3860: batch_id,

Line 3920: x_return_status := FND_API.G_RET_STS_SUCCESS;

3916: END insert_batch_history;
3917:
3918: PROCEDURE insert_batch_step_transfers (x_return_status OUT NOCOPY VARCHAR2) IS
3919: BEGIN
3920: x_return_status := FND_API.G_RET_STS_SUCCESS;
3921:
3922: INSERT INTO gme_batch_step_transfers
3923: (wip_trans_id,
3924: batch_id,

Line 4044: x_return_status := FND_API.G_RET_STS_SUCCESS;

4040: END insert_batch_step_transfers;
4041:
4042: PROCEDURE insert_text_header (x_return_status OUT NOCOPY VARCHAR2) IS
4043: BEGIN
4044: x_return_status := FND_API.G_RET_STS_SUCCESS;
4045:
4046: INSERT INTO gme_text_header
4047: (text_code,
4048: last_updated_by,

Line 4113: x_return_status := FND_API.G_RET_STS_SUCCESS;

4109: END insert_text_header;
4110:
4111: PROCEDURE insert_text_dtl (x_return_status OUT NOCOPY VARCHAR2) IS
4112: BEGIN
4113: x_return_status := FND_API.G_RET_STS_SUCCESS;
4114:
4115: INSERT INTO gme_text_table_tl
4116: (text_code,
4117: lang_code,

Line 4231: x_return_status := FND_API.G_RET_STS_SUCCESS;

4227: l_flip_count NUMBER := 0;
4228: l_new_txn_count NUMBER := 0;
4229: l_return_status VARCHAR2 (1);
4230: BEGIN
4231: x_return_status := FND_API.G_RET_STS_SUCCESS;
4232: l_pos := 1;
4233: OPEN cur_get_materials;
4234: l_pos := 2;
4235: FETCH cur_get_materials INTO l_matl;

Line 4256: p_error_type => FND_API.G_RET_STS_ERROR

4252: || l_batch_header.batch_id
4253: || ' line_id = '
4254: || l_matl.line_id,
4255: p_message => 'Unable to load the transactions',
4256: p_error_type => FND_API.G_RET_STS_ERROR
4257: );
4258: ELSE
4259: l_load_trans_fail := FALSE;
4260: l_pos := 5;

Line 4284: p_error_type => FND_API.G_RET_STS_ERROR

4280: || l_batch_header.batch_id
4281: || ' line_id = '
4282: || l_matl.line_id,
4283: p_message => 'Unable to determine the default lot.',
4284: p_error_type => FND_API.G_RET_STS_ERROR
4285: );
4286: END IF;
4287: ELSE
4288: SELECT *

Line 4507: l_return_status VARCHAR2 (1) := FND_API.G_RET_STS_SUCCESS;

4503: init_revs c_get_init_reversal%ROWTYPE;
4504: match_revs c_get_match_reversal%ROWTYPE;
4505: l_last_txn c_get_cmplt_zero_def_txns%ROWTYPE;
4506: l_current_txn c_get_cmplt_zero_def_txns%ROWTYPE;
4507: l_return_status VARCHAR2 (1) := FND_API.G_RET_STS_SUCCESS;
4508: l_batch_row pm_btch_hdr_bak%ROWTYPE;
4509: no_batch_id EXCEPTION;
4510: error_inserting_txn EXCEPTION;
4511: BEGIN

Line 4512: x_return_status := FND_API.G_RET_STS_SUCCESS;

4508: l_batch_row pm_btch_hdr_bak%ROWTYPE;
4509: no_batch_id EXCEPTION;
4510: error_inserting_txn EXCEPTION;
4511: BEGIN
4512: x_return_status := FND_API.G_RET_STS_SUCCESS;
4513:
4514: /* Check that we have at least a BATCH ID */
4515: IF ((p_batch_row.batch_id IS NULL) OR
4516: (p_batch_row.batch_id = FND_API.g_miss_num)

Line 4516: (p_batch_row.batch_id = FND_API.g_miss_num)

4512: x_return_status := FND_API.G_RET_STS_SUCCESS;
4513:
4514: /* Check that we have at least a BATCH ID */
4515: IF ((p_batch_row.batch_id IS NULL) OR
4516: (p_batch_row.batch_id = FND_API.g_miss_num)
4517: ) THEN
4518: RAISE no_batch_id;
4519: END IF;
4520:

Line 4682: x_return_status := FND_API.G_RET_STS_SUCCESS;

4678: p_trans_id IN ic_tran_pnd.trans_id%TYPE DEFAULT NULL
4679: ) IS
4680: l_all_txns VARCHAR2 (100);
4681: BEGIN
4682: x_return_status := FND_API.G_RET_STS_SUCCESS;
4683:
4684: INSERT INTO gme_inventory_txns_gtmp
4685: (trans_id,
4686: item_id,

Line 4847: x_return_status := FND_API.G_RET_STS_SUCCESS;

4843: l_doc_type gme_inventory_txns_gtmp.doc_type%TYPE;
4844: l_pos NUMBER := 0;
4845: l_cnt NUMBER;
4846: BEGIN
4847: x_return_status := FND_API.G_RET_STS_SUCCESS;
4848: l_pos := 1;
4849: SELECT *
4850: INTO l_matl_dtl
4851: FROM pm_matl_dtl_bak

Line 4970: x_return_status := FND_API.G_RET_STS_SUCCESS;

4966: l_pos := 17;
4967: END IF;
4968: END IF;
4969:
4970: x_return_status := FND_API.G_RET_STS_SUCCESS;
4971: EXCEPTION
4972: WHEN OTHERS THEN
4973: x_return_status := 'D';
4974: insert_message (