Application Development and Automation 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: 
Read only

Dump

Former Member
0 Likes
401

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

2 REPLIES 2
Read only

Former Member
0 Likes
361

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.

Read only

Former Member
0 Likes
361

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