DBA Data[Home] [Help]

APPS.FLM_EKB_LEAD_TIME SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 40

        select  organization_id
        Bulk Collect
        into    l_all_orgs
        from    MTL_PARAMETERS;
Line: 61

        select  organization_id
        into    p_organization_id
        from    MTL_PARAMETERS
        where   organization_code = p_organization_code;
Line: 88

l_update_required		varchar2(1) := 'Y';
Line: 91

l_update_last_run		varchar2(1) := 'N';
Line: 95

select
	PULL_SEQUENCE_ID,
	KANBAN_CARD_ID,
	REPLENISHMENT_ACTIVITY_ID,
	REPLENISHMENT_CYCLE_ID,
	REPLENISHMENT_DATE
FROM 	FLM_EKB_ACT_SNAPSHOT
WHERE 	PULL_SEQUENCE_ID = l_pull_sequence_id
AND   	lead_time = 0;
Line: 107

Select
	PULL_SEQUENCE_ID,
	ORGANIZATION_ID
FROM 	MTL_KANBAN_PULL_SEQUENCES
where 	ORGANIZATION_ID = p_organization_id
and kanban_plan_id = -1;
Line: 117

select 	count(*)
into	l_row_count
from 	flm_ekb_run_details
where 	organization_id = p_organization_id;
Line: 124

	select 	Organization_code
	into	l_organization_code
	from	mtl_parameters
	where	Organization_id = p_organization_id;
Line: 135

	l_update_required := 'N';
Line: 137

	l_update_last_run := 'Y';
Line: 142

select 	lead_time_run_date
into 	l_last_run_date
from	flm_ekb_run_details
where 	organization_id  = p_organization_id;
Line: 167

Select
	KANBAN_ACTIVITY_ID,
	CREATION_DATE
into	l_kanban_activity_id,
	l_recv_date
FROM 	MTL_KANBAN_CARD_ACTIVITY MKCA
WHERE 	KANBAN_CARD_ID = c_card_activity.kanban_card_id
AND   	SUPPLY_STATUS >= 2 AND SUPPLY_STATUS < 3   -- Supply Status Full
AND	KANBAN_ACTIVITY_ID = ( select 	min(kanban_activity_id)
				from 	MTL_KANBAN_CARD_ACTIVITY
				where 	KANBAN_CARD_ID = c_card_activity.kanban_card_id
				AND     SUPPLY_STATUS >= 2  AND SUPPLY_STATUS < 3  -- Supply Status Full
				AND     CREATION_DATE > l_last_run_date
				AND  	KANBAN_ACTIVITY_ID > c_card_activity.REPLENISHMENT_activity_id)
AND   	CREATION_DATE > l_last_run_date;
Line: 184

		l_update_required := 'N';
Line: 187

if l_update_required = 'Y' then
	-- FND_FILE.put_line(FND_FILE.LOG, 'Received Activity ID is : '||l_kanban_activity_id);
Line: 189

Update	FLM_EKB_ACT_SNAPSHOT
Set	RECEIVED_DATE = l_recv_date,
	lead_time = to_number( l_recv_date - REPLENISHMENT_DATE ),
	RECEIVED_ACTIVITY_ID = l_kanban_activity_id,
	last_update_date = sysdate,
	last_updated_by = G_LOGIN_ID,
	last_update_login = G_LOGIN_ID
where 	KANBAN_CARD_ID = c_card_activity.kanban_card_id
and	REPLENISHMENT_ACTIVITY_ID = c_card_activity.REPLENISHMENT_activity_id
and	lead_time = 0;
Line: 210

select lead_time
into	l_lead_time
from 	FLM_EKB_ACT_SNAPSHOT
where  	REPLENISHMENT_ACTIVITY_ID = c_card_activity.REPLENISHMENT_activity_id;
Line: 220

l_update_required := 'Y';
Line: 226

if l_update_last_run = 'Y' then
Update 	flm_ekb_run_details
set	lead_time_run_date = sysdate,
	Last_lead_time_request_id = g_request_id,
        last_updated_by = G_LOGIN_ID,
        last_update_date = sysdate,
        last_update_login = G_LOGIN_ID
where 	organization_id = p_organization_id;
Line: 238

select count(*)
into l_row_count
from flm_ekb_act_snapshot
where lead_time > 0
and organization_id = p_organization_id;
Line: 244

FND_FILE.put_line(FND_FILE.LOG, 'Total rows updated are : '||l_row_count);