DBA Data[Home] [Help]

APPS.CST_LCMADJUSTMENTS_PVT dependencies on CST_LC_ADJ_INTERFACE

Line 174: FROM cst_lc_adj_interface

170: l_stmt_num := 15;
171:
172: SELECT Count(*)
173: INTO l_no_of_validated
174: FROM cst_lc_adj_interface
175: WHERE process_status = 2
176: AND organization_id = p_organization_id
177: AND group_id = p_group_id
178: AND ROWNUM = 1;

Line 420: from cst_lc_adj_interface

416: l_precision NUMBER;
417:
418: cursor c_lcm_txns (p_group_id number) is
419: select transaction_id, transaction_date, rcv_transaction_id
420: from cst_lc_adj_interface
421: where process_status = 2
422: and organization_id = p_organization_id
423: and group_id = p_group_id;
424:

Line 583: FROM cst_lc_adj_interface li,

579: l_precision,
580: gps.period_name,
581: oap.acct_period_id,
582: msi.inventory_asset_flag
583: FROM cst_lc_adj_interface li,
584: gl_period_statuses gps,
585: mtl_system_items_b msi,
586: po_headers_all poh,
587: org_acct_periods oap,

Line 911: INSERT INTO cst_lc_adj_interface_errors

907: l_error_msg := 'Retrieval of ' || c_account.accounting_line_type || ' account' ||
908: ' from client extension errored out with: ' || '(' || substr(l_error_code, 10) || ') - ' || substr(Nvl(l_error_msg, 'Unknown Error'), 100);
909:
910: l_stmt_num := 110;
911: INSERT INTO cst_lc_adj_interface_errors
912: (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
913: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
914: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
915: VALUES (p_group_id, c_account.lcm_transaction_id, 'ACCOUNT', l_error_msg,

Line 944: UPDATE cst_lc_adj_interface i

940:
941: END LOOP;
942:
943: l_stmt_num := 140;
944: UPDATE cst_lc_adj_interface i
945: SET process_status = 3,
946: group_id = NULL
947: WHERE group_id = p_group_id
948: AND process_status IN (1,2)

Line 951: FROM cst_lc_adj_interface_errors e

947: WHERE group_id = p_group_id
948: AND process_status IN (1,2)
949: AND organization_id = p_organization_id
950: AND EXISTS (SELECT 1
951: FROM cst_lc_adj_interface_errors e
952: WHERE e.transaction_id = i.transaction_id
953: AND e.group_id = p_group_id
954: AND error_column = 'ACCOUNT');
955:

Line 969: FROM cst_lc_adj_interface_errors e

965:
966: l_stmt_num := 150;
967: DELETE FROM cst_lc_accounts_gt t
968: WHERE EXISTS (SELECT 1
969: FROM cst_lc_adj_interface_errors e
970: WHERE e.transaction_id = t.lcm_transaction_id
971: AND e.group_id = p_group_id
972: AND error_column = 'ACCOUNT');
973:

Line 987: FROM cst_lc_adj_interface_errors e

983:
984: l_stmt_num := 160;
985: DELETE FROM cst_lc_rcv_txn_gt t
986: WHERE EXISTS (SELECT 1
987: FROM cst_lc_adj_interface_errors e
988: WHERE e.transaction_id = t.lcm_transaction_id
989: AND e.group_id = p_group_id
990: AND error_column = 'ACCOUNT');
991:

Line 1005: FROM cst_lc_adj_interface_errors e

1001:
1002: l_stmt_num := 170;
1003: DELETE FROM cst_lc_adj_acctg_info_gt t
1004: WHERE EXISTS (SELECT 1
1005: FROM cst_lc_adj_interface_errors e
1006: WHERE e.transaction_id = t.lcm_transaction_id
1007: AND e.group_id = p_group_id
1008: AND error_column = 'ACCOUNT');
1009:

Line 2423: FROM cst_lc_adj_interface

2419: fnd_global.conc_request_id,
2420: fnd_global.prog_appl_id,
2421: fnd_global.conc_program_id,
2422: SYSDATE
2423: FROM cst_lc_adj_interface
2424: WHERE group_id = p_group_id
2425: AND organization_id = p_organization_id
2426: AND process_status = 2;
2427:

Line 2440: FROM cst_lc_adj_interface e

2436: END IF;
2437:
2438: l_stmt_num := 90;
2439: DELETE
2440: FROM cst_lc_adj_interface e
2441: WHERE e.group_id = p_group_id
2442: AND e.organization_id = p_organization_id
2443: AND e.process_status = 2
2444: AND EXISTS (SELECT 1

Line 2507: | CST_LC_ADJ_INTERFACE_ERRORS and updates the process_status|

2503: | PROCEDURE : Validate_Lc_Interface |
2504: | |
2505: | DESCRIPTION : This procedure validates unvalidated interface records, |
2506: | populates details of failed validation into table |
2507: | CST_LC_ADJ_INTERFACE_ERRORS and updates the process_status|
2508: | of interface records to validated = 2 or errored = 3. |
2509: | |
2510: | |
2511: | |

Line 2600: the cst_lc_adj_interface_errors table and the adjustment interface record will be

2596: l_stmt_num := 10;
2597:
2598: /* Validating the lcm adjustments.
2599: A record will be created for each, lcm adjustment transaction and error combination in
2600: the cst_lc_adj_interface_errors table and the adjustment interface record will be
2601: set to error status */
2602: INSERT ALL
2603: WHEN new_landed_cost < 0 THEN
2604: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

Line 2604: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2600: the cst_lc_adj_interface_errors table and the adjustment interface record will be
2601: set to error status */
2602: INSERT ALL
2603: WHEN new_landed_cost < 0 THEN
2604: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2605: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2606: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2607: VALUES (p_group_id, transaction_id, 'NEW_LANDED_COST', 'The column cannot have negative value',
2608: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,

Line 2611: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2607: VALUES (p_group_id, transaction_id, 'NEW_LANDED_COST', 'The column cannot have negative value',
2608: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,
2609: fnd_global.login_id, fnd_global.user_id, fnd_global.conc_request_id)
2610: WHEN prior_landed_cost < 0 THEN
2611: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2612: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2613: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2614: VALUES (p_group_id, transaction_id, 'PRIOR_LANDED_COST', 'The column cannot have negative value',
2615: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,

Line 2618: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2614: VALUES (p_group_id, transaction_id, 'PRIOR_LANDED_COST', 'The column cannot have negative value',
2615: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,
2616: fnd_global.login_id, fnd_global.user_id, fnd_global.conc_request_id)
2617: WHEN closing_status <> 'O' THEN
2618: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2619: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2620: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2621: VALUES (p_group_id, transaction_id, 'TRANSACTION_DATE', 'Purchasing Period is Closed or in the Future',
2622: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,

Line 2625: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2621: VALUES (p_group_id, transaction_id, 'TRANSACTION_DATE', 'Purchasing Period is Closed or in the Future',
2622: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,
2623: fnd_global.login_id, fnd_global.user_id, fnd_global.conc_request_id)
2624: WHEN open_flag = 'N' THEN
2625: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2626: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2627: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2628: VALUES (p_group_id, transaction_id, 'TRANSACTION_DATE', 'Inventory Period is Closed',
2629: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,

Line 2632: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2628: VALUES (p_group_id, transaction_id, 'TRANSACTION_DATE', 'Inventory Period is Closed',
2629: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,
2630: fnd_global.login_id, fnd_global.user_id, fnd_global.conc_request_id)
2631: WHEN rcv_transaction_id = -1 THEN
2632: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2633: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2634: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2635: VALUES (p_group_id, transaction_id, 'RCV_TRANSACTION_ID', 'Invalid Rcv Transaction',
2636: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,

Line 2639: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2635: VALUES (p_group_id, transaction_id, 'RCV_TRANSACTION_ID', 'Invalid Rcv Transaction',
2636: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,
2637: fnd_global.login_id, fnd_global.user_id, fnd_global.conc_request_id)
2638: WHEN destination_type_code = 'EXPENSE' OR destination_type_code = 'SHOP FLOOR' THEN
2639: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2640: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2641: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2642: VALUES (p_group_id, transaction_id, 'RCV_TRANSACTION_ID',
2643: 'Destination type is set to ' || destination_type_code, fnd_global.user_id, SYSDATE,

Line 2647: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2643: 'Destination type is set to ' || destination_type_code, fnd_global.user_id, SYSDATE,
2644: fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE, fnd_global.login_id,
2645: fnd_global.user_id, fnd_global.conc_request_id)
2646: WHEN NOT (parent_transaction_id = -1 AND transaction_type IN ('RECEIVE', 'MATCH') ) THEN
2647: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2648: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2649: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2650: VALUES (p_group_id, transaction_id, 'RCV_TRANSACTION_ID', 'The receipt transaction is not the parent receipt',
2651: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,

Line 2654: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2650: VALUES (p_group_id, transaction_id, 'RCV_TRANSACTION_ID', 'The receipt transaction is not the parent receipt',
2651: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,
2652: fnd_global.login_id, fnd_global.user_id, fnd_global.conc_request_id)
2653: WHEN lcm_flag = 'N' THEN
2654: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2655: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2656: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2657: VALUES (p_group_id, transaction_id, 'RCV_TRANSACTION_ID', 'PO Shipment is not LCM Enabled',
2658: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,

Line 2661: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2657: VALUES (p_group_id, transaction_id, 'RCV_TRANSACTION_ID', 'PO Shipment is not LCM Enabled',
2658: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,
2659: fnd_global.login_id, fnd_global.user_id, fnd_global.conc_request_id)
2660: WHEN pol_item_id <> clai_inventory_item_id THEN
2661: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2662: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2663: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2664: VALUES (p_group_id, transaction_id, 'INVENTORY_ITEM_ID',
2665: 'Item Id in adjustment transaction and original receipt donot match', fnd_global.user_id, SYSDATE,

Line 2669: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2665: 'Item Id in adjustment transaction and original receipt donot match', fnd_global.user_id, SYSDATE,
2666: fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE, fnd_global.login_id,
2667: fnd_global.user_id, fnd_global.conc_request_id)
2668: WHEN rt_organization_id <> clai_organization_id THEN
2669: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2670: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2671: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2672: VALUES (p_group_id, transaction_id, 'ORGANIZATION_ID', 'Organization Id in adjustment transaction
2673: and original receipt donot match', fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id,

Line 2677: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2673: and original receipt donot match', fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id,
2674: fnd_global.conc_program_id, SYSDATE, SYSDATE, fnd_global.login_id, fnd_global.user_id,
2675: fnd_global.conc_request_id)
2676: WHEN lcm_enabled_flag = 'N' THEN
2677: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2678: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2679: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2680: VALUES (p_group_id, transaction_id, 'ORGANIZATION_ID', 'Organization is not LCM Enabled',
2681: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,

Line 2684: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2680: VALUES (p_group_id, transaction_id, 'ORGANIZATION_ID', 'Organization is not LCM Enabled',
2681: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE,
2682: fnd_global.login_id, fnd_global.user_id, fnd_global.conc_request_id)
2683: WHEN nvl(lcm_account_id, -1) = -1 THEN
2684: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2685: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2686: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2687: VALUES (p_group_id, transaction_id, 'ORGANIZATION_ID',
2688: 'Landed cost absorption account is not defined for the organization', fnd_global.user_id, SYSDATE,

Line 2692: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,

2688: 'Landed cost absorption account is not defined for the organization', fnd_global.user_id, SYSDATE,
2689: fnd_global.prog_appl_id, fnd_global.conc_program_id, SYSDATE, SYSDATE, fnd_global.login_id,
2690: fnd_global.user_id, fnd_global.conc_request_id)
2691: WHEN Decode(primary_cost_method, 1, 0, Nvl(lcm_var_account, -1)) = -1 THEN
2692: INTO cst_lc_adj_interface_errors (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2693: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2694: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2695: VALUES (p_group_id, transaction_id, 'ORGANIZATION_ID',
2696: 'Landed cost variance account is not defined for the organization', fnd_global.user_id, SYSDATE,

Line 2709: cst_lc_adj_interface clai,

2705: Nvl(lcm_enabled_flag, 'N') lcm_enabled_flag,
2706: mp.lcm_var_account, rp.lcm_account_id, mp.primary_cost_method,
2707: msi.inventory_item_id msi_item_id
2708: FROM org_acct_periods oap,
2709: cst_lc_adj_interface clai,
2710: rcv_transactions rt,
2711: rcv_accounting_events rae,
2712: po_lines_all pol,
2713: po_line_locations_all poll,

Line 2755: INSERT INTO cst_lc_adj_interface_errors

2751: END IF;
2752:
2753: l_stmt_num := 20;
2754: /* For already validated transactions only check if PO period is still open */
2755: INSERT INTO cst_lc_adj_interface_errors
2756: (GROUP_ID, transaction_id, error_column, error_message, CREATED_BY,
2757: CREATION_DATE, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, LAST_UPDATE_DATE,
2758: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2759: SELECT p_group_id, transaction_id, 'TRANSACTION_DATE', 'Purchasing Period is Closed or in the Future',

Line 2762: FROM cst_lc_adj_interface clai,

2758: LAST_UPDATE_LOGIN, LAST_UPDATED_BY, REQUEST_ID)
2759: SELECT p_group_id, transaction_id, 'TRANSACTION_DATE', 'Purchasing Period is Closed or in the Future',
2760: fnd_global.user_id, SYSDATE, fnd_global.prog_appl_id, fnd_global.conc_program_id,
2761: SYSDATE, SYSDATE, fnd_global.login_id, fnd_global.user_id, fnd_global.conc_request_id
2762: FROM cst_lc_adj_interface clai,
2763: gl_period_statuses gps,
2764: cst_acct_info_v cai
2765: WHERE clai.group_id = p_group_id
2766: AND clai.process_status = 2

Line 2788: UPDATE cst_lc_adj_interface i

2784: END IF;
2785:
2786: l_stmt_num := 30;
2787: /* Set the errored adjustment interface records for the group to ERROR status */
2788: UPDATE cst_lc_adj_interface i
2789: SET process_status = 3,
2790: group_id = NULL
2791: WHERE group_id = p_group_id
2792: AND process_status IN (1,2)

Line 2795: FROM cst_lc_adj_interface_errors e

2791: WHERE group_id = p_group_id
2792: AND process_status IN (1,2)
2793: AND organization_id = p_organization_id
2794: AND EXISTS (SELECT 1
2795: FROM cst_lc_adj_interface_errors e
2796: WHERE e.transaction_id = i.transaction_id
2797: AND e.group_id = p_group_id);
2798:
2799: IF (l_sLog AND l_pLog) THEN

Line 2813: UPDATE cst_lc_adj_interface

2809: x_no_of_errored := SQL%ROWCOUNT;
2810:
2811: l_stmt_num := 40;
2812: /* Set all unerrored adjustment interface records for the group to VALIDATED status */
2813: UPDATE cst_lc_adj_interface
2814: SET process_status = 2
2815: WHERE group_id = p_group_id
2816: AND organization_id = p_organization_id
2817: AND process_status = 1;