3163: --
3164: BEGIN
3165: select 'Y'
3166: into l_exists
3167: from pay_user_columns PUC
3168: where PUC.USER_COLUMN_NAME = p_ws_name
3169: and NVL(business_group_id, p_bg_id) = p_bg_id
3170: and NVL(legislation_code,'US') = 'US';
3171:
3177: else
3178: BEGIN
3179: select PUC.USER_COLUMN_NAME
3180: into v_ws_name
3181: from pay_user_columns PUC
3182: where PUC.USER_COLUMN_ID = p_ws_name
3183: and NVL(business_group_id, p_bg_id) = p_bg_id
3184: and NVL(legislation_code,'US') = 'US';
3185: