OSRSET;;sys_tbbrow; 3; 0;23;79;padrao;;
:SKEL
VARIAVEL Z_NIL = se_setor->(ABRA("0NOIDX",r_siga,"se_setor","se_setor", "sf_pn", "fnumped"))
VARIAVEL Z_NIL = ABRA("0NOIDX",r_siga,"sccrcli","sccrcli")
VARIAVEL Z_NIL = ABRA("0NOIDX",r_siga,"se_prod","se_prod","seip_c","pcod") 
VARIAVEL Z_NIL = DbSelectArea('os_set')
comando saida se_prod->(DbCloseArea())
comando saida sccrcli->(DbCloseArea())
comando saida sf_pn->(DbCloseArea())
:TBFI
Setor;CODSETOR;C;xx;5;;
QtdOS;QUANT;N;99999;6;;
CodComp;PCOD;N;999999;7;;
Composicao;eVal(zbPrd,pCod);P;@S25; 25;;
CodIns;PCODINSUMO;N;999999;  6;;
Descricao do Insumo;eVal(zbPrd,pCodInsumo);P;@S25; 25;;
QtdInsumo;Quant*MQUANT;P;999999.999;10;;
Atendida;MQATEND;N;99999999.999; 15;;
OrdProd;FNUMPED;N;9999999999; 10;;
Data;sf_pn->(DbSeek(OS_SET->FNUMPED),fDataEmi);P;99.99.9999;10;;
Cliente;(sf_pn->(fNumPed<>Os_Set->fNumPed.or.DbSeek(Os_Set->fNumPed)),sccrcli->(DbGoTo(sf_pn->fCli),cr_nome));P;@S20;20;;
ObsForma;POBSFORMA;C;@S20; 20;;
Pr;PRIORIDADE;C;xx;  2;;
