2007 Dec 06 11:30 AM
Hi all,
can we get the variant for job done in background mode.actually i got the dump but i dont have variant for which the report has run.
Regards
Lalit
Hi all,
can we get the variant for job done in background mode.actually i got the dump but i dont have variant for which the report has run.
Regards
Lalit
2007 Dec 06 11:45 AM
Hi,
Goto SM37 , give the job name and then click step and then click goto button you can see the variant for the job was run.
Reward if usefull,
Thanks,
Ramya.
2007 Dec 06 11:49 AM
Hi ...
hope you are submitting a report to background right !!...
use
<b> SUBMIT zsd_background TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITH <i>p_file EQ 'ZSD47'</i> "<<-- Selection screen parameter of prog ZSD_BACKGROUND
WITHOUT SPOOL DYNPRO
VIA JOB new_jobname NUMBER jobcount
AND RETURN.</b>
instead of the job_submit function module ....
________________________________________________________________
Check this piece of code !!
*-- CREATE THE JOB
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = new_jobname
IMPORTING
jobcount = jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
SUBMIT zsd_background TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITH p_file EQ 'ZSD47'
WITHOUT SPOOL DYNPRO
VIA JOB new_jobname NUMBER jobcount
AND RETURN.
IF sy-subrc EQ 4.
MESSAGE s000(38) WITH 'User cancelled the action'.
ELSEIF sy-subrc <> 0.
MOVE sy-subrc TO rc.
CONCATENATE 'Job Submit Failed. sy-subrc:' rc INTO info_msg
SEPARATED BY space.
MESSAGE w208(00) WITH info_msg.
ELSE.
MESSAGE 'Background Job Scheduled Successfully' TYPE 'I'.
*--- START JOB IMMEDIATELY FOR THE CURRENT PLANT
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobcount
jobname = new_jobname
strtimmed = 'X'
targetserver = 'ctecpci_ECP_02'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
________________________________________________________________
Regards,
Sai Ramesh
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |