2014 Nov 15 5:16 PM
Hi Friends
There are another custom program inside main program
I want to execute rows of 2nd program , but I have to run the 1st program ,
I have set the breakpoint on submit statement its taking one time to 2nd program ,
but then its going to START of SELECTION and coming back to first main program and not going down of code
What I should do to run the other rows of 2nd program and if am using Breakpoint Set on statement then its taking to so many places of standard programs where ever that statement is getting use.
Thanks
Meeta
2014 Nov 16 7:51 AM
Hi,
You should set to breakpoints in the called (the second, if I understand correctly) program. Theer must be something wrong with program structure if the program returns upon reaching start-of-selection - one would need to see the code.
Other than that, you could and probably should invest few hours to watch the debugging series of videos created by Olga Dolinskaja - they are well worth the time...
cheers
Jānis
2014 Nov 16 7:51 AM
Hi,
You should set to breakpoints in the called (the second, if I understand correctly) program. Theer must be something wrong with program structure if the program returns upon reaching start-of-selection - one would need to see the code.
Other than that, you could and probably should invest few hours to watch the debugging series of videos created by Olga Dolinskaja - they are well worth the time...
cheers
Jānis
2014 Nov 16 8:15 AM
Thanks Janis B for your reply
actually the 2nd program calling by submit and Job creation happening its like this ,
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
jobgroup = 'FEB '
IMPORTING
jobcount = jobcount.
SUBMIT ZFEJKE0 USING SELECTION-SET par_vari
WITH infile INCL w_physical_name
AND RETURN
USER sy-uname
VIA JOB jobname NUMBER jobcount.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobname = jobname
jobcount = jobcount
strtimmed = 'X'.
ELSE.
SUBMIT (p_prog) USING SELECTION-SET par_vari
WITH infile INCL w_physical_name
AND RETURN .
here it goes to 2nd prog by submit and come back and doing background job debugging is not easy .
Regards
Meeta
2014 Nov 16 8:28 AM
You can force the background job into debugger from process overview in SM50 (look for debugging option under the SM50 menu) while it's still running, or use job overview to execute a finished job again under debugger.
or, if you can change the programs that are submited via job, write some kind of endless loop at initialization event, which you can exit via debugger, then use SM50 to enter debugger:
while some_variable is initial .
wait up to 1 seconds.
endwhile.
cheers
Jānis
Message was edited by: Jānis B
2014 Nov 17 8:05 AM
Hi Meeta,
You cannot debug directly if the submit statement is called in session method using FM JOB_OPEN.
There are ways you can perform the debugging though by not letting the session to process and by executing the report with all inputs separately.
From the code i could see there is an option without session after ELSE statement. If you put the breakpoint in second program and the code after ELSE is executed means the debugger will trigger.
Thanks and Regards,
Ajith
2014 Nov 17 8:57 AM
Hi,
If you want to debug the completed job, go to SM37 and then select the same and only put JDBG command in the command bar and execute it and then you can check line by line.