Allows the formation of correctly charged Asn-tRNA(Asn) or Gln-tRNA(Gln) through the transamidation of misacylated Asp-tRNA(Asn) or Glu-tRNA(Gln) in organisms which lack either or both of asparaginyl-tRNA or glutaminyl-tRNA synthetases. The reaction takes place in the presence of glutamine and ATP through an activated phospho-Asp-tRNA(Asn) or phospho-Glu-tRNA(Gln). ATP + H2O + L-glutamine + L-glutamyl-tRNA(Gln) = ADP + H(+) + L-glutamate + L-glutaminyl-tRNA(Gln) + phosphate ATP + H2O + L-aspartyl-tRNA(Asn) + L-glutamine = ADP + 2 H(+) + L-asparaginyl-tRNA(Asn) + L-glutamate + phosphate Heterotrimer of A, B and C subunits. Belongs to the GatB/GatE family. GatB subfamily.