fnkey
TRANSCRIPT
-
7/31/2019 fnkey
1/2
PROCEDUREPRO_HLT_KEY(v_hotnumbernumber)ISv_curformvarchar2(7);--currentformv_usercodevarchar2(12); --currentusercur_blkVARCHAR2(40);--currentBlockv_orig_itmvarchar2(40);--currentItemv_hotkeyvalvarchar2(150);--associatedvaluev_cnt1number;v_cnt2number;v_cnt3number;v_cnt4number;LOGNAME VARCHAR2(8):=UPPER(NAME_IN(':GLOBAL.logname'));--LOGNAME VARCHAR2(8):=upper('nlto');
BEGINv_curform:=get_application_property(current_form_name);v_usercode:= LOGNAME;cur_blk:=name_in(':System.Cursor_Block');v_orig_itm:=name_in(':SYSTEM.CURRENT_ITEM');
selectcount(*)intov_cnt1frombs2650whereupper(bs2650.vc_usrcd)=v_usercode
andupper(bs2650.vc_frmno)=v_curformandupper(bs2650.vc_fldnm)=v_orig_itmand
bs2650.no_hotkey=v_hotnumber;ifv_cnt1=1then
selectvc_hotkeyvalintov_hotkeyvalfrombs2650whereupper(bs2650.vc_usrcd)=v_usercodeandupper(bs2650.vc_frmno)=v_curformandupper(bs2650.vc
_fldnm)=v_orig_itmandbs2650.no_hotkey=v_hotnumber;
copy(v_hotkeyval,name_in(':system.cursor_item'));endif;--user,screen&field
ifv_cnt11thenselectcount(*)intov_cnt2frombs2650whereupper(bs2
650.vc_usrcd)=v_usercodeandbs2650.vc_frmnoisnullandupper(bs2650.vc_fldnm)=
v_orig_itmand
bs2650.no_hotkey=v_hotnumber;ifv_cnt2=1then-- message(v_cnt2);-- message(v_cnt2);selectvc_hotkeyvalintov_hotkeyvalfrombs2650whereupper(
bs2650.vc_usrcd)=v_usercodeandbs2650.vc_frmnoisnullandbs2650.vc_fldnm=v_orig_
itmandbs2650.no_hotkey=v_hotnumber;
copy(v_hotkeyval,name_in(':system.cursor_item'));endif;--user,screenisnull&fieldendif;ifv_cnt11andv_cnt21then
selectcount(*)intov_cnt3frombs2650wherevc_usrcdisnull
andupper(bs2650.vc_frmno)=v_curformandupper(bs2650.vc_fldnm)=v_orig_itmand
bs2650.no_hotkey=v_hotnumber;
ifv_cnt3=1then-- message(v_cnt3);-- message(v_cnt3);
selectvc_hotkeyvalintov_hotkeyvalfrombs2650whereb
-
7/31/2019 fnkey
2/2
s2650.vc_usrcdisnullandupper(bs2650.vc_frmno)=v_curformandupper(bs2650.vc
_fldnm)=v_orig_itmandbs2650.no_hotkey=v_hotnumber;
copy(v_hotkeyval,name_in(':system.cursor_item'));endif;endif;
selectcount(*)intov_cnt4frombs2650wherevc_usrcdisnullandvc_frmnoisnullandupper(vc_fldnm)=v_orig_itmandbs2650.no_hotkey=v_hotnumber;
ifv_cnt11andv_cnt21andv_cnt31andv_cnt4=1then-- message(v_cnt4);-- message(v_cnt4);
selectvc_hotkeyvalintov_hotkeyvalfrombs2650wherebs2650.vc_usrcdisnull
andbs2650.vc_frmnoisnullandupper(bs2650.vc_fldnm)=v_orig_itmand
bs2650.no_hotkey=v_hotnumber;copy(v_hotkeyval,name_in(':system.cursor_item'));endif;end;
END;