DBA Data[Home] [Help]

APPS.JMF_PROCESS_SHIKYU_RCV_TRX_PVT dependencies on RCV_STAGING_TABLE

Line 93: , error_status rcv_staging_table.status%Type

89: , task_id rcv_transactions.task_id%Type
90: , oe_order_line_id rcv_transactions.oe_order_line_id%Type
91: , process_type VARCHAR2(10)
92: , clubbed_transaction_id rcv_transactions.transaction_id%Type
93: , error_status rcv_staging_table.status%Type
94: );
95:
96: -- Define a table of above record type
97: TYPE rcv_pending_trx_tbl IS TABLE OF rcv_pending_trx_rec

Line 117: -- rcv_transactions and rcv_staging_table only if the Shipment_ID of the

113: l_api_name CONSTANT VARCHAR2(30) := 'Process_Shikyu_Rcv_trx';
114: l_api_version CONSTANT NUMBER := 1.0;
115:
116: -- vmutyala changed the cursor get_rcv_transactions to fetch transactions from
117: -- rcv_transactions and rcv_staging_table only if the Shipment_ID of the
118: -- transaction in RCV_STAGING_TABLE exists in jmf_subcontract_orders Bug 4670527
119:
120:
121:

Line 118: -- transaction in RCV_STAGING_TABLE exists in jmf_subcontract_orders Bug 4670527

114: l_api_version CONSTANT NUMBER := 1.0;
115:
116: -- vmutyala changed the cursor get_rcv_transactions to fetch transactions from
117: -- rcv_transactions and rcv_staging_table only if the Shipment_ID of the
118: -- transaction in RCV_STAGING_TABLE exists in jmf_subcontract_orders Bug 4670527
119:
120:
121:
122: CURSOR get_rcv_transactions_case1 IS

Line 127: FROM rcv_transactions rt, rcv_staging_table rst

123: SELECT distinct (rt.TRANSACTION_ID), rt.SOURCE_DOCUMENT_CODE,
124: rt.TRANSACTION_TYPE, rt.PRIMARY_QUANTITY, rt.PRIMARY_UNIT_OF_MEASURE,
125: rt.PARENT_TRANSACTION_ID,rt.PO_LINE_LOCATION_ID,
126: rt.PROJECT_ID, rt.TASK_ID, rt.OE_ORDER_LINE_ID, null, null, rst.status
127: FROM rcv_transactions rt, rcv_staging_table rst
128: WHERE rst.transaction_id = rt.transaction_id
129: AND rst.transaction_request_id = p_request_id
130: AND rst.transaction_group_id = p_group_id
131: AND rst.team = g_team_name

Line 152: FROM rcv_transactions rt, rcv_staging_table rst

148: SELECT distinct (rt.TRANSACTION_ID), rt.SOURCE_DOCUMENT_CODE,
149: rt.TRANSACTION_TYPE, rt.PRIMARY_QUANTITY, rt.PRIMARY_UNIT_OF_MEASURE,
150: rt.PARENT_TRANSACTION_ID,rt.PO_LINE_LOCATION_ID,
151: rt.PROJECT_ID, rt.TASK_ID, rt.OE_ORDER_LINE_ID, null, null, rst.status
152: FROM rcv_transactions rt, rcv_staging_table rst
153: WHERE rst.transaction_id = rt.transaction_id
154: AND rst.transaction_request_id = p_request_id
155: AND rst.team = g_team_name
156: AND EXISTS(

Line 175: FROM rcv_transactions rt, rcv_staging_table rst

171: SELECT distinct (rt.TRANSACTION_ID), rt.SOURCE_DOCUMENT_CODE,
172: rt.TRANSACTION_TYPE, rt.PRIMARY_QUANTITY, rt.PRIMARY_UNIT_OF_MEASURE,
173: rt.PARENT_TRANSACTION_ID,rt.PO_LINE_LOCATION_ID,
174: rt.PROJECT_ID, rt.TASK_ID, rt.OE_ORDER_LINE_ID, null, null, rst.status
175: FROM rcv_transactions rt, rcv_staging_table rst
176: WHERE rst.transaction_id = rt.transaction_id
177: AND rst.transaction_group_id = p_group_id
178: AND rst.team = g_team_name
179: AND EXISTS(

Line 198: FROM rcv_transactions rt, rcv_staging_table rst

194: SELECT distinct (rt.TRANSACTION_ID), rt.SOURCE_DOCUMENT_CODE,
195: rt.TRANSACTION_TYPE, rt.PRIMARY_QUANTITY, rt.PRIMARY_UNIT_OF_MEASURE,
196: rt.PARENT_TRANSACTION_ID,rt.PO_LINE_LOCATION_ID,
197: rt.PROJECT_ID, rt.TASK_ID, rt.OE_ORDER_LINE_ID, null, null, rst.status
198: FROM rcv_transactions rt, rcv_staging_table rst
199: WHERE rst.transaction_id = rt.transaction_id
200: AND rst.team = g_team_name
201: AND EXISTS(
202: SELECT 1

Line 501: UPDATE rcv_staging_table

497: FOR i IN 1 .. l_rcv_pending_trx_tbl.COUNT LOOP
498: IF (l_rcv_pending_trx_tbl(i).clubbed_transaction_id IS NOT NULL) THEN
499: FOR k IN 1 .. rcv_error_trx_ids.COUNT LOOP
500: IF (l_rcv_pending_clubbed_trx_tbl(rcv_error_trx_ids(k)).transaction_id = l_rcv_pending_trx_tbl(i).transaction_id) THEN
501: UPDATE rcv_staging_table
502: SET status = 'CL_ERROR'
503: , LAST_UPDATE_DATE = sysdate
504: , LAST_UPDATED_BY = FND_GLOBAL.user_id
505: , LAST_UPDATE_LOGIN = FND_GLOBAL.login_id

Line 509: UPDATE rcv_staging_table

505: , LAST_UPDATE_LOGIN = FND_GLOBAL.login_id
506: WHERE transaction_id = l_rcv_pending_trx_tbl(i).clubbed_transaction_id
507: AND team = g_team_name;
508: ELSIF (l_rcv_pending_clubbed_trx_tbl(rcv_error_trx_ids(k)).transaction_id = l_rcv_pending_trx_tbl(i).clubbed_transaction_id) THEN
509: UPDATE rcv_staging_table
510: SET status = 'CL_ERROR'
511: , LAST_UPDATE_DATE = sysdate
512: , LAST_UPDATED_BY = FND_GLOBAL.user_id
513: , LAST_UPDATE_LOGIN = FND_GLOBAL.login_id

Line 543: UPDATE rcv_staging_table

539:
540: -- Update status in staging table.
541: FOR i IN 1 .. rcv_error_trx_ids.COUNT LOOP
542: l_error_trx_index := rcv_error_trx_ids(i);
543: UPDATE rcv_staging_table
544: SET status = l_rcv_pending_clubbed_trx_tbl(l_error_trx_index).error_status
545: , LAST_UPDATE_DATE = sysdate
546: , LAST_UPDATED_BY = FND_GLOBAL.user_id
547: , LAST_UPDATE_LOGIN = FND_GLOBAL.login_id

Line 556: DELETE rcv_staging_table

552: -- Delete successful transactions from staging table.
553:
554:
555: FORALL i IN 1 .. rcv_success_trx_ids.COUNT
556: DELETE rcv_staging_table
557: WHERE transaction_id = rcv_success_trx_ids(i)
558: AND team = g_team_name;
559:
560: /* vmutyala added the following query to delete the 'PO' records which are not processed and whose supplier org is not a trading partner org

Line 562: delete rcv_staging_table

558: AND team = g_team_name;
559:
560: /* vmutyala added the following query to delete the 'PO' records which are not processed and whose supplier org is not a trading partner org
561: Bug 4670527 */
562: delete rcv_staging_table
563: where transaction_id IN
564: (select distinct(rst.transaction_id)
565: from hr_organization_information hoi, rcv_transactions rt, rcv_staging_table rst, mtl_parameters mp
566: where rt.SOURCE_DOCUMENT_CODE = 'PO'

Line 565: from hr_organization_information hoi, rcv_transactions rt, rcv_staging_table rst, mtl_parameters mp

561: Bug 4670527 */
562: delete rcv_staging_table
563: where transaction_id IN
564: (select distinct(rst.transaction_id)
565: from hr_organization_information hoi, rcv_transactions rt, rcv_staging_table rst, mtl_parameters mp
566: where rt.SOURCE_DOCUMENT_CODE = 'PO'
567: and hoi.ORG_INFORMATION_CONTEXT = 'Customer/Supplier Association'
568: and hoi.ORG_INFORMATION3 = to_char(rt.vendor_id)
569: and hoi.ORG_INFORMATION4 = to_char(rt.vendor_site_id)

Line 579: delete rcv_staging_table

575: /* vmutyala added the following query to delete the 'RMA' records which are not processed and
576: a corresponding return reference id doesn't exist in OE_ORDER_LINES_ALL or even if it exists, a corresponding
577: replenishent so line id doesn't exist in JMF_SHIKYU_REPLENISHMENTS.
578: Bug 4670527 */
579: delete rcv_staging_table
580: where transaction_id IN
581: (select distinct(rst.transaction_id)
582: from OE_ORDER_LINES_ALL OOLA, rcv_transactions rt, rcv_staging_table rst
583: where rt.SOURCE_DOCUMENT_CODE = 'RMA'

Line 582: from OE_ORDER_LINES_ALL OOLA, rcv_transactions rt, rcv_staging_table rst

578: Bug 4670527 */
579: delete rcv_staging_table
580: where transaction_id IN
581: (select distinct(rst.transaction_id)
582: from OE_ORDER_LINES_ALL OOLA, rcv_transactions rt, rcv_staging_table rst
583: where rt.SOURCE_DOCUMENT_CODE = 'RMA'
584: and rt.OE_ORDER_LINE_ID = OOLA.LINE_ID
585: and (OOLA.REFERENCE_LINE_ID is NULL OR NOT EXISTS (select 1 from JMF_SHIKYU_REPLENISHMENTS
586: where REPLENISHMENT_SO_LINE_ID=