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

Debug a submit and return statement

former_member295881
Contributor
0 Likes
4,707

Hello Experts,

I'm calling a program from a function module using Submit and return statement as shown below. There is a logic that I need to debug and I've set External break point as well as Session break point in both FM (before and on this statement) and in the Program but SAP doesn't stop at any of the break points. I've spend so much time but I'm not able to reach into the program z_craete_rerate_doc_batch.

 

       submit z_craete_rerate_doc_batch
              user sy-uname
              via job lv_jname
              number lv_jcount
              to sap-spool without spool dynpro
              with destination = 'LOCL'
              with immediately = space
              with keep_in_spool = 'X'
              with selection-table i_seltab
              and return.

I'm wondering is there any special way to set break point for Submit and return programs? Please let me know if there is any possibility to debug this.

I've also tried all the options provided in the following thread but nothing works.

http://scn.sap.com/thread/1598840

Many thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,150

Hi,

You are calling the program in a background job which means you cannot debug directly.

You can simulate the debugging by SM37 and JDBJ option.

Thanks

Bhanu

3 REPLIES 3
Read only

Former Member
0 Likes
2,151

Hi,

You are calling the program in a background job which means you cannot debug directly.

You can simulate the debugging by SM37 and JDBJ option.

Thanks

Bhanu

Read only

arindam_m
Active Contributor
0 Likes
2,150

HI,

Its getting submitted as a Job. You will have to use the transaction JDBG to debug the Job after submission and processing is complete.

Cheers,

Arindam

Read only

0 Likes
2,150

Many thanks to both of you. Your suggestion has resolved my problem and I've learned something new.