aStruSX5 := SX5->(DbStruct())aAdd(aStruSX5,{"X5_OK","C",02,0}) cTabSX5 := CriaTrab(aStruSX5,.T.)
If Select("TABSX5") > 0 TABSX5->(DbCloseArea()) Endif
DbUseArea(.T.,,cTabSX5,"TABSX5")
aCpoBro := {}aAdd(aCpoBro,{"X5_OK" ,,"","@!"}) aAdd(aCpoBro,{"X5_CHAVE" ,,"Tipo","@!"}) aAdd(aCpoBro,{"X5_DESCRI" ,,"Descrição","@!"})
DbSelectArea("SX5") SX5->(DbSetOrder(1))
For nX5 := 1 to Len(aDados05) cX5OK := "" If SX5->(DbSeek( xFilial("SX5") + PADR("XT",TamSX3("X5_TABELA")[1]) + PADR(aDados05[nX5][3],TamSX3("X5_CHAVE")[1]) )) cX5OK := cMark Endif