3106: l_sql_stmt_no := 30;
3107: select c1.calendar_date
3108: into l_need_by_date
3109: from mtl_parameters o,
3110: bom_calendar_dates c1,
3111: bom_calendar_dates c
3112: where o.organization_id = l_kanban_card_Rec_Tbl(1).Organization_id
3113: and c1.calendar_code = c.calendar_code
3114: and c1.exception_set_id = c.exception_set_id
3107: select c1.calendar_date
3108: into l_need_by_date
3109: from mtl_parameters o,
3110: bom_calendar_dates c1,
3111: bom_calendar_dates c
3112: where o.organization_id = l_kanban_card_Rec_Tbl(1).Organization_id
3113: and c1.calendar_code = c.calendar_code
3114: and c1.exception_set_id = c.exception_set_id
3115: and c1.seq_num = (c.next_seq_num + trunc(nvl(p_lead_time,l_need_by_time)))