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

Background job

Former Member
0 Likes
911

Hi Abapers,

I have a report which is executed as a background job in Test server, once the job is executed user clicks on one button "transfer Unix file to network folder " then the report output will be saved in PC.

When its saved some fields are spaced out.. there are no values for

a aprticular variant.

vendor number – vendor name – clearing document and clearing date.

my doubt is how can i debug for this variant as its executed in background.

Kindly help me... very urgent....

Points are sure for helpful answers.

Regards,

Radhika.

Hi Abapers,

I have a report which is executed as a background job in Test server, once the job is executed user clicks on one button "transfer Unix file to network folder " then the report output will be saved in PC.

When its saved some fields are spaced out.. there are no values for

a aprticular variant.

vendor number – vendor name – clearing document and clearing date.

my doubt is how can i debug for this variant as its executed in background.

Kindly help me... very urgent....

Points are sure for helpful answers.

Regards,

Radhika.

5 REPLIES 5
Read only

Former Member
0 Likes
782

you got to switch on debugging in background task.

type in /H in your ok-code box and press enter.

then goto the menu Settings. there click on update debugging and to be sure click as well system debugging.

Read only

suresh_datti
Active Contributor
0 Likes
782

sm37.. place the cursor on the completed job & type in JDBG in the command window.. this will put you in debug mode with a simulated session of that job.. patiently single step through the first few screens & you will get into your ABAP Program..

~Suresh

Read only

Former Member
0 Likes
782

1. Execute SM36 Transaction

2. Enter Job Name & Click START CONDITION

3. Click Period Values & type 12 in Months

4. CLick SAVE

5. Enter Schedule Start Date & Time

6. Click Save

7. Click on STEP

8. ABAP Program Name

9. enter program name & Variant if any

10. CLick on SAVE.

pls reward if helpful.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
782

There is a blog that explain DEBUG in BACKGROUND: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap+debugger&">abap Debugger</a>

Extract :

<b>How do I debug background Processes?</b>

<i>In transaction SM50 (process overview), you can select a background process and choose Program/Mode -> Program -> Debugging from the menu.

An alternative workaround, which allows you to step into a particular piece of code is to place a piece of code in a endless DO-ENDDO, where you can change a variable to step out of the DO at a particular point in your code. This allows you to hold the process at that point and debug it from SM50 as described above. An implementation of this exists in function module C160_HOLD_FOR_DEBUG, which will enter the endless loop if a particular environment variable is set, thereby allowing you to control its behaviour. (Further instructions are found in the comments in subroutine INC14Z_HOLD_FOR_DEBUG of include LC14ZFCB).</i>

Regards

Read only

Former Member
0 Likes
782

Hi,

1. Run the specified program in the background by choosing program->Execute in Background. This step would execute the required program in background.

2. To debug the background job. Go to the transaction Sm37. You will see the job that was run under your name. Now, type ‘’JDBG’’ in command line and put the cursor on the respective job which you want to debug.

3. Now, press enter. It would directly go into the program in the debugging mode. This would now simulate the exact background scenario with the same selection screen values as used in the job and sy-batch set to ‘X’.

Now, you can debug in the same way as you do in an interactive session of running a program.

Regards,

JLN