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

how to debug the program

Former Member
0 Likes
1,602

Hi guys,

we scheduled a background job. It was canceled and in the job log it is showing an error message with msg id no.

Now i have to debug this program to find out where exactly the program is throwing this error message.

Please suggest me how to start debugging and how to find the statement which is throwing this msg id no.

Thanks & regards,

Rams

8 REPLIES 8
Read only

Former Member
0 Likes
1,050

If you have msg id, find it where it is used in your program.

Mark a break point there in SE38.

If you are not able to trace the msg in your program due to dynamic call,

then before executing the program write /h at transaction Code position and press enter and then executie your program.

Regds,

Anil

Read only

former_member194416
Contributor
0 Likes
1,050

in sm37 find the job select it and write jdbg to transaction window. For setting breakpoint at message statement in debug mode go breakpoint -> breakpoint at statement and write message to field.

Edited by: Gungor Ozcelebi on Jul 22, 2009 2:23 PM

Read only

Former Member
0 Likes
1,050

Hi Rams,

you can debug your program through t-code se38 .

execute in debug mode.

or you can set a break-point in code and simply execute.

or before executing a program give t-code /h

in debug, go to breakpoints option in menu and click on statement.

give keyword 'Message '.

then you will be able to find where is the exact error.

Regards,

Vijay

Read only

RahulKeshav
Active Contributor
0 Likes
1,050

Hi,

Goto you program , put a breakpoint before the line where you have written sy-batch eq 'X'....

while debugging make the sy-batch to space...and debugg.

Thnx

Rahul

Read only

Former Member
0 Likes
1,050

Hi,

Basically You want to debug your background job right?

Here is the Link To know how.

Also try...

1. select active job in sm37.

2. type "jdbg" command in command field.

No need to type /n or /o .

3. Double click the job , it will go in debug mode.

OR

1. Go to sm50 .

2. place the cursor on active job.

3. goto program mode> program> Debugging.

That works!!

Regards,

Vimal.

Edited by: Vimal V on Jul 22, 2009 2:14 PM

Read only

Former Member
0 Likes
1,050

Hi ,

Select job in the sm37 and run JDBG transaction so you can debug background job and the find the problem . Also check st22 to see if there is any short dump.

Please let me know if you still need any more help.

Thanks and regards,

Rajeshwar

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,050

In SM37 Select the job, type JDBG in the area where u enter the transaction code and press enter.

Read only

Former Member
0 Likes
1,050

Hello,

Execute the the program.

With /h go in debugging mode. then in the debugging mode goto Breakpoints->Create breakpoints. There write MESSAGE in create breakpoints window and press enter. Now press F8 it will take u to the error message where u r getting the error. Further u can check accordingly.

Hope it helps.

Regards