How to use join field name in a variable?

I’m trying this query

$abnahme_id = {tkapp_abnahme_grunddaten.abnahme_id}; // field name in grid
// SQL statement parameters
$update_table = ‘tkapp_abnahme_grunddaten’; // Table name
$update_where = “$abnahme_id = ‘[v]’”; // Where clause
$update_fields = array( // Field list, add as many as needed
“abnahmestatus = ‘5’”,
“abnahme_abgeschlossen = ‘1’”
);
// Update record
$update_sql = ‘UPDATE ’ . $update_table
. ’ SET ’ . implode(’, ', $update_fields)
. ’ WHERE ’ . $update_where;
sc_exec_sql($update_sql);
sc_redir(grid_tkapp_abnahmestatus);

and getting this error

Undefined variable: tkapp_abnahme_grunddaten_abnahme_id

Also using single quotes instead of the brackets doesn’t work. The dot in the field name is always replaced with an underscore.

Thank you,
single quotes work.