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 program generated through a subroutine pool in a background process?

former_member579349
Participant
0 Likes
1,512

Hi Experts,

I am generating a program using subroutine pool. And all this i am doing in a program which will be launched as a background process.

So it's like:

Program1{

* some code

internalTable = {"Program2"}.

GENERATE SUBROUTINE POOL internalTable NAME DATA(prog).

}

If there is any way to access this program2 and debug it then please help me with the same.

Thanks!

4 REPLIES 4
Read only

franois_henrotte
Active Contributor
0 Likes
1,118

Yes when the program will be called, you will be able to go through it in debug mode, even if it has been generated.

BUT you will not be able to do so if it is executed in the background.

So for the development process, I recommend to execute it in the foreground, then when it works you can switch to background.

Read only

tan_michael
Active Participant
0 Likes
1,118

Hi,

I'm not using generate to run subroutine pools but when I'm using perform I can debug the subroutines. if I'm running it in background, im just editting the SY-BATCH = 'X' to debug it.

so my program is like this ..

*put break-point in perform*

 PERFORM FORM_NAME_IN_SUBROUTINEPOOL(PROGRAM_NAME) 
   USING INTERNAL_TABLE1(TABLE TO IMPORT IN SUBROUTINE)
CHANGING INTERNAL_TABLE2(TABLE TO EXPORT FROM SUBROUTINE).

Hope this will give you some idea.

Read only

0 Likes
1,118

Or

Go to SE38 and open and display the program2 and mark a breakpoint.

then run the program1

Read only

natiele_bohn
Product and Topic Expert
Product and Topic Expert
0 Likes
1,118

Hello,

If you want to start debug from background job you can try this approach:

1. Place a session debug break-point in your code

2. Go to SM37->Enter job name->Execute

3. Enter JDBG(no / before JDBG) in command field and place the cursor on the job name.

4. Now press ENTER button. It takes you to debug mode