X;Dicionario de Codigos;sys_tbbrow; 5; 0;20;79;SEPRODDI;;
:SKEL
* Voce esta no Se_Prod
VARIAVEL w_colsep   = " "+chr(179)
VARIAVEL z_blockPpo = "Z_Sele:=Select(),"
VARIAVEL z_blockPpo = z_blockPpo + "Z_OrderPrd:=IndexOrd(),"
VARIAVEL z_blockPpo = z_blockPpo + "Z_RecnPrd:=Recno(),"
VARIAVEL z_blockPpo = z_blockPpo + "DbSetOrder(3),"
VARIAVEL z_blockPpo = z_blockPpo + "DbSelectArea('Se_Dic5'),"
VARIAVEL z_blockPpo = z_blockPpo + "DbSetOrder(2),"
* VARIAVEL z_blockPpo = z_blockPpo + "DbSeek(Left(Se_Prod->Pdesc,At(' ',Se_Prod->Pdesc)),.t.),"
VARIAVEL z_blockPpo = z_blockPpo + "DbSeek(Se_Prod->Pdesc,.t.),"
VARIAVEL z_blockPpo = z_blockPpo + "if(Left(Se_Prod->Pdesc,At(' ',Se_Prod->Pdesc))<>Left(Se_Dic5->Pdesc,At(' ',Se_Dic5->Pdesc)),DbSkip(-1),DbSkip(0)),"
VARIAVEL z_blockPpo = z_blockPpo + "Brow_Db('Se_Dic5a',.t.),"
VARIAVEL z_blockPpo = z_blockPpo + "DbSetOrder(1),"
VARIAVEL z_blockPpo = z_blockPpo + "DbSelectArea(z_sele),"
VARIAVEL z_blockPpo = z_blockPpo + "DbGoto(Z_RecnPrd),"
VARIAVEL z_blockPpo = z_blockPpo + "DbSetOrder(Z_OrderPrd)"
VARIAVEL z_blockPpo = _CreateBlock( z_blockPpo )

VARIAVEL Z_blk = { |x_pcod| Se_Dic5->(DbSeek(x_pcod)), Se_Dic5->Pdesc}
COMANDO ANTES Se_Prod->( DbCloseArea() )
COMANDO ANTES Ferase(r_siga+"ntx\se_dic5p"+ordbagext())
COMANDO ANTES Ferase(r_siga+"ntx\se_dic5"+ordbagext())
COMANDO ANTES Ferase(r_siga+"ntx\se_dic5n"+ordbagext())
COMANDO ANTES ABRA("0",R_SIGA,"SE_PROD","SE_PROD","SEIP_N","PDESC","SEIP_C","PCOD","Se_Dic5P","Pdic5")
COMANDO ANTES ABRA("0RO",R_SIGA,"Se_Dic5","Se_Dic5","Se_Dic5","PCPRODFORN","Se_Dic5N","PDESC")
COMANDO DEPOIS Se_Dic5->( DBCLOSEAREA() )
* VARIAVEL Z_blkx = { |x_pcod| Se_Dic5->( DbGoto(x_pcod) ), Str(x_pcod,5)+" "+Se_Dic5->Pdesc}
* VARIAVEL Z_ACAO = _CreateBlock("Scroll(0,0,24,79,0),SetPos(0,0),Qqout('Teste'),Inkey(0)")
:TBMT
 13;doget(D_ob);Enter-Edita ;
 80;tb_pesq(D_OB);P-Pesquisa ;
 32;Eval(z_blockPpo);Barra-Associa ;
 79;tb_index(D_OB);O-Ordena ;
 73;lst_alias(D_OB);I-Imprime ;
:TBFI
Cod;PCOD;N;99999;5;N;
Descricao;PDESC;C;@S29;29;N;
CAbc;Pdic5;N;999999;6;S;
Desc_Abc;Eval(z_blk,Pdic5);P;@S30;30;N;
Frac;pitens;N;9999;4;S;
