Skip to Content
0
Jun 15, 2022 at 12:31 PM

Get the content of SAP DS Job Variable from which we only have the name as String

78 Views

Dear SAP DS Gurus,

I have the challenge to access the content from a variable within a SAP DS Job but I do not effectively have the scripting variable but just the variable name within another variable. An example to highlight:

$G_JobId = sql('Repo', 'select JOB_ID from [REPO_SCHEMA].ALVW_JOBINFO where JOB_NAME = \''||job_name()||'\'');
$G_VarName = sql('Repo', 'select VP_NAME from [REPO_SCHEMA].AL_VARPARAM where PARENT_OBJID = '||$G_JobId||' and VP_SEQNUM = 1');
print('Variable name:\''||$G_VarName||'\'');
print('Variable content {$G_VarName}');

The last statement only outputs the variable name again but I in fact would like to access the variable's content (behind the name) during the execution of the job.

Any guess how I could get the content of the variable for which I only have its name as a String? Is there an internal table where the runtime-execution value of the job variables are temporarily held?

Thank you.