PROD_T1;Relacao de Produtos;sys_tbbrow; 0; 5;22;79;pseprod;;
:SKEL
variavel zNil:=se_prod->( Abra("0NOIDX", r_siga, "sccpfor",  "sccpfor","sccpfor",  "cp_nome"), Abra("0NOIDX", r_siga, "se_subd" , "se_subd", "seisd_c", "sdcod"), Abra("0NOIDX", r_siga, "se_divis", "Se_divis") )
variavel zbDiv:={|cpDivisao| Se_divis->( DbGoto(Val(Left(cpDivisao,2))), dDesc) }
variavel zbSubd:={|cpDivisao| Se_Subd->( DbSeek(cpDivisao), sdDesc) }
variavel zBlObs:={||!empty(wpObs:=Compl_obs(pCod,pObs,'edit')).and.(RegLock(),_field->pObs:=wpObs,DbCommit(),DbUnlock())}

variavel #TEXTO_FONTE
   //ONINIT
   hwg_TbFi(@D_oB, 'Descricao;PDESC;C;@s30; 30;;')
   hwg_TbFi(@D_oB, 'Ref.Fabr;Preffab;C;@S8;8;S;;')
   hwg_TbFi(@D_oB, 'Tp;Ptipoitem;C;99;2;S;')
   hwg_TbFi(@D_oB, 'Finalidade;Efd_TipoItem();P;@S13;13;N;')
   hwg_TbFi(@D_oB, 'SubD;PDIVISAO;C;9999;4;S;')
   hwg_TbFi(@D_oB, 'Divisao;eVal(zbDiv,pDivisao);P;@S15;15;N;')
   hwg_TbFi(@D_oB, 'SubDivisao;eVal(zbSubd,pDivisao);P;@S20;11;N;')
   se s_vb_numde>0 entao hwg_TbFi(@D_oB, 'EAtual;PEATUAL;N;999999.999;10;S;zbCor;') senao hwg_TbFi(@D_oB, 'EAtual;PEATUAL;N;999999;6;S;zbCor;')
   hwg_TbFi(@D_oB, 'Cod Barra;Pdic6;N;9999999999999;13;;')
   hwg_TbFi(@D_oB, 'Cod;PCOD;N;99999; 5;;')
   hwg_TbFi(@D_oB, 'Fam;pFamilia;C;@S20;20;;')
   hwg_TbFi(@D_oB, 'Fab;PprincForn;N;9999;4;;')
   //ENDONINIT
   //ONDLGINIT
      // oDlg:Maximize()
   //ENDDLGINIT
#FIM_TEXTO_FONTE
:TBMT
 13;psq_enter();Enter-Confirma ;
 80;tb_pesq(d_ob);P-Pesquisa ;
 22;tb_insert(D_OB);Ins-Inclui ;
 65;tb_update(D_OB);A-Altera ;
 67;tb_locate(D_OB);C-Continua_Busca ;
 84;tb_locate(D_OB);T-Busca_Trecho ;
 76;tb_locate(D_OB);L-Busca_Iniciais ;
 32;doget(D_ob);Barra-Edita ;