DBA Data[Home] [Help]

APPS.OPIMPXWP dependencies on OPI_IDS_PUSH_LOG

Line 206: - delete existing WIP opi_ids_push_log rows within the process

202:
203: /*--------------------------------------------------------------
204: Check if this is the first push for the organization.
205: If so, we need to do the following:
206: - delete existing WIP opi_ids_push_log rows within the process
207: date ranges to avoid duplication in case of repush
208: - calculate the beginning balance at the start date
209: - update beginning balances with daily WIP transactions within
210: the process date ranges.

Line 226: delete opi_ids_push_log

222: l_stmt_num := 10;
223: if i_first_push > 0 then -- first push process
224:
225: l_stmt_num := 15;
226: delete opi_ids_push_log
227: where organization_id = i_org_id
228: and trx_date between l_start_date and i_push_end_txn_date
229: and cost_group_id is null
230: and subinventory_code is null

Line 250: update opi_ids_push_log

246: if l_err_num <> 0 then
247: raise process_error;
248: end if;
249: else
250: update opi_ids_push_log
251: set push_flag = null,
252: last_update_date = sysdate
253: where organization_id = i_org_id
254: and trx_date between l_start_date and i_push_end_txn_date

Line 310: -- At the beginning of the process, opi_ids_push_log.push_flag is

306:
307: end if; -- end checking wip_txn_val
308: end loop; -- c_txn_daily_sum
309:
310: -- At the beginning of the process, opi_ids_push_log.push_flag is
311: -- set to null to ensure there is no balance duplication. Since
312: -- potentially some keys may not have transactions at the beginning
313: -- of the date range, their push flag remain at null. They should be
314: -- reset to 1 to make them available to be pushed.

Line 317: update opi_ids_push_log

313: -- of the date range, their push flag remain at null. They should be
314: -- reset to 1 to make them available to be pushed.
315:
316: l_stmt_num := 40;
317: update opi_ids_push_log
318: set push_flag = 1,
319: last_update_date = sysdate
320: where organization_id = i_org_id
321: and trx_date between l_start_date and i_push_end_txn_date

Line 699: delete from opi_ids_push_log

695: -- for in-transit or cost update. Therefore, it should be safe to delete
696: -- rows that meet the following where clause conditions without running
697: -- the risk of deleting rows inserted by INV
698:
699: delete from opi_ids_push_log
700: where beg_wip_val_b = 0
701: and end_wip_val_b = 0
702: and subinventory_code is null
703: and push_flag = 1 -- available to be pushed

Line 785: from opi_ids_push_log ipl

781: l_stmt_num := 10;
782:
783: select count(*)
784: into l_push_log_count
785: from opi_ids_push_log ipl
786: where ipl.ids_key = i_ids_key;
787:
788: if l_push_log_count <> 0 then -- check existing row
789: l_stmt_num := 20;

Line 791: update opi_ids_push_log ipl

787:
788: if l_push_log_count <> 0 then -- check existing row
789: l_stmt_num := 20;
790:
791: update opi_ids_push_log ipl
792: set beg_wip_val_b =
793: nvl(ipl.beg_wip_val_b,0) + nvl(l_wip_amount,0),
794: end_wip_val_b =
795: nvl(ipl.end_wip_val_b,0) + nvl(l_wip_amount,0),

Line 905: from opi_ids_push_log ipl

901:
902: -- Get the previous day that has balances.
903: select max(trx_date)
904: into l_trx_date
905: from opi_ids_push_log ipl
906: where ipl.organization_id = i_org_id
907: and ipl.inventory_item_id = i_item_id
908: and ipl.revision = i_revision
909: and ipl.trx_date < i_txn_date

Line 932: from opi_ids_push_log ipl

928:
929: -- ending wip balance of previous day.
930: select Nvl(end_wip_val_b,0)
931: into l_return_val
932: from opi_ids_push_log ipl
933: where ipl.ids_key = l_ids_key;
934:
935: return l_return_val;
936:

Line 1007: from opi_ids_push_log ipl

1003:
1004: l_ipl_count := 0;
1005: select count(*)
1006: into l_ipl_count
1007: from opi_ids_push_log ipl
1008: where ipl.ids_key = i_ids_key;
1009:
1010: -- If row exists and it's a repushed row, make sure we get the previous ending
1011: -- balance for beg bal. If there is no prev. ending bal, it is probably the

Line 1017: from opi_ids_push_log ipl

1013:
1014: if l_ipl_count <> 0 then -- have existing push log row
1015: select push_flag, Nvl(beg_wip_val_b,0), Nvl(end_wip_val_b,0)
1016: into l_push_flag, l_start_value,l_end_value
1017: from opi_ids_push_log ipl
1018: where ipl.ids_key = i_ids_key;
1019: l_end_value := nvl(l_end_value,0) + nvl(i_wip_amount,0);
1020:
1021: if l_push_flag is null then -- repushed row

Line 1048: update opi_ids_push_log ipl

1044: /*
1045: DBMS_OUTPUT.PUT_LINE('daily upd - upd key: ' || i_ids_key);
1046: */
1047: l_stmt_num := 12;
1048: update opi_ids_push_log ipl
1049: set ipl.beg_wip_val_b = l_start_value,
1050: ipl.end_wip_val_b = l_end_value,
1051: ipl.avg_wip_val_b = (l_start_value + l_end_value) / 2,
1052: ipl.push_flag = 1,