422: begin
423: select put.user_table_name
424: into c_ws_tab_name
425: from hr_organization_information hoi
426: ,pay_user_tables put
427: where hoi.organization_id = p_bg_id
428: and hoi.org_information_context ='Work Schedule'
429: and hoi.org_information1 = put.user_table_id ;
430:
468: --
469: BEGIN
470: select 'Y'
471: into l_exists
472: from pay_user_tables PUT,
473: pay_user_columns PUC
474: where PUC.USER_COLUMN_NAME = p_ws_name
475: and NVL(PUC.business_group_id, p_bg_id) = p_bg_id
476: and NVL(PUC.legislation_code,'CA') = 'CA'
486: else
487: BEGIN
488: select PUC.USER_COLUMN_NAME
489: into v_ws_name
490: from pay_user_tables PUT,
491: pay_user_columns PUC
492: where PUC.USER_COLUMN_ID = p_ws_name
493: and NVL(PUC.business_group_id, p_bg_id) = p_bg_id
494: and NVL(PUC.legislation_code,'CA') = 'CA'