07-19-2018 7:06 PM
Hello experts,
I have created a simple program based on radio buttons to do foreground or background. For the background there is no output yet the job is successfully finished .
Please find below my code
REPORT ztest_bg_fg.
DATA: job_count TYPE btcjobcnt,
job_name TYPE btcjob VALUE 'TEST'.
PARAMETERS: px_fg RADIOBUTTON GROUP fb DEFAULT 'X',
px_bg RADIOBUTTON GROUP fb.
START-OF-SELECTION.
IF px_bg EQ abap_true.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = job_name
IMPORTING
jobcount = job_count.
SUBMIT (sy-cprog) VIA JOB job_name NUMBER job_count AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = job_count
jobname = job_name
SDLSTRTDT = sy-datum
SDLSTRTTM = sy-uzeit.
write: / 'Job scheduled'.
STOP.
ENDIF.
IF sy-batch EQ abap_true.
WRITE: / 'Background'.
ELSE.
WRITE: / 'Foreground'.
ENDIF.
WRITE: / 'Not really doing anything'.
07-20-2018 1:10 AM
07-20-2018 4:50 AM
I don't think so . As submit button will trigger this program with sy-batch being true . The message is not getting displayed and neither it is there in job logs . But yet the job status is finished .
07-20-2018 6:20 AM
07-20-2018 6:55 AM
07-20-2018 7:03 AM
07-20-2018 7:50 AM
Hi
Report looks good - please check Tx SP01 if the list was created.
Depending on system performance the link of spool list and job will take some time (Batch and Spool Services)
regards
Domi
07-20-2018 10:37 AM
I am afraid, OP doesn't know about spool and that he expected an online list display, but I hoped that he'll find out himself ...
07-20-2018 9:11 AM
Please check whether you assigned any program to the job 'TEST' in Tcode SM36
If not do it and execute the program
07-20-2018 11:24 AM