Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

TBTCO - get Job Name

Former Member
0 Kudos

Hi,

Is there any where I can get the job name when the program are running in background mode as I need to pass the job name with the date/time to the output log.

I'm trying get the job name from table TBTCO. However, i hint the error in ' incorrect expression ''SDLSTRTDT ' or 'SDLSTRTTM' in logical condition.

Below are the code i hint the errors. Is there any incorrectly. Please advise. Thanks.

SELECT jobname INTO TABLE i_job

FROM TBTCO

WHERE sdluname = sy-uname

SDLSTRTDT = p_date

SDLSTRTTM = p_time.

5 REPLIES 5

raymond_giuseppi
Active Contributor
0 Kudos

Try to use the FM [GET_JOB_RUNTIME_INFO|https://www.sdn.sap.com/irj/scn/advancedsearch?query=get_job_runtime_info&cat=sdn_all].

Regards

0 Kudos

Hi,

If I use the FM you've mentioned, can I know where I can get all the import parameter value that need to pass to the FM?

0 Kudos

No parameter is needed, you will get the current job name.

Regards

former_member222860
Active Contributor
0 Kudos

Hey,

Just a corrected where clause

SELECT jobname INTO TABLE i_job
  FROM TBTCO
 WHERE sdluname = sy-uname
   AND SDLSTRTDT = p_date
   AND SDLSTRTTM = p_time.

thanks\

Mahesh

0 Kudos

Thanks for the errors spotted. My careless..:-)