textElement.text(some_other_variable);
Of course, to do that you'll need some way to identify the textElement, so you can call text() on it. You could either do that by storing a reference to it in a variable, by changing your code below to:
var textElement = some_var.append('svg:text')
.attr('class', 'abc')
.attr('text-anchor', 'end')
.text(some_other_variable);
Or just use d3.select() to reselect it:
d3.select("text.abc").text(some_other_variable);