SE_SUBD;Subdivisoes do Estoque;sys_tbbrow; 8;15;18;77;psq_brow;;
:SKEL
VARIAVEL w_colsep = chr(179)
VARIAVEL w_headsep = chr(196)
VARIAVEL bNomeDivisao := {|cSubd| nCodDiv:=Val(Left(cSubd,2)), Se_Divis->(DbGoto(nCodDiv),dDesc) }
VARIAVEL zFgDivOpen:= select('se_divis')>0
COMANDO ANTES znil:=if(!zFgDivOpen,(abra_arq('se_divis'),DbSelectArea('se_subd')),'')
COMANDO SAIDA znil:=if(!zFgDivOpen.and.select('se_divis')>0,se_divis->(DbCloseArea()),'')
//T;abrev;C;x;  1;;
:TBMT
 13;psq_enter();Enter-Confirma ;
 80;tb_pesq(d_ob);P-Pesquisa ;
 22;tb_insert(D_OB);Ins-Inclui ;
 84;tb_locate(D_oB);T-Trecho ;
 76;tb_locate(D_oB);L-Iniciais ;
 67;tb_locate(D_oB);C-Repete_Busca ; 
 65;tb_update(D_OB);A-Altera ;
  7;tb_del(D_ob);DEL-DELeta ;
 32;doget(D_ob);Barra-Edita ;
 70;tb_filter(d_ob);F-Filtra ;
 69;tb_filter(d_ob,"Exp");E-Filtra_Expressao ;
 61;doget(D_ob,,.t.);=-Repete_Edicao ;
:TBFI
Div;Left(SDCOD,2);C;xx; 3;;
Divisao;eVal(bNomeDivisao,SdCod);C;@S20;20;;
Subd;SDCOD;C;xxxx;  4;;
Subdivisao;SDDESC;C;@s30;30;;