/**
* @description program begin logging in
* @field-mapping vv_task_pos = ('program begin logging in')
* @call LBI_SYS_VDF#prc_s_sys_log
*/
vv_task_pos := 'program begin logging in';
LBI_SYS_VDF.prc_s_sys_log(vi_task_id,
vv_task_name,
vv_table_name,
substr(iv_date_year, 1, 8),
1,
null,
null);
/**
* @description it will raise customized error exception when static date is null
* @field-mapping vi_err_code = (-1)
* @field-mapping vv_err_msg = ('static date is null')
*/
vv_task_pos := 'check input parameter';
if (iv_date_year is null) then
vi_err_code := -1;
vv_err_msg := 'static date is null';
raise exc_error;
end if;
vd_date_year:=to_date(substr(iv_date_year,0,4) || '1231', 'yyyyMMdd');
vd_date_temp := to_date(substr(iv_date_year,0,4) || '0101', 'yyyyMMdd');
select t.dict_value into vv_date_format from t_s_dict_code t where t.dict_code='DateFormat' ;
select t.dict_value into vv_month_format from t_s_dict_code t where t.dict_code='MonthFormat' ;
select t.dict_value into vv_week_format from t_s_dict_code t where t.dict_code='WeekFormat' ;
select t.dict_value into vi_week_tsart_flag from t_s_dict_code t where t.dict_code='WeekStartFlag' ;