‎2018 Oct 30 10:17 AM
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!
‎2018 Oct 30 10:26 AM
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.
‎2018 Oct 30 10:43 AM
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.
‎2018 Oct 30 10:49 AM
Or
Go to SE38 and open and display the program2 and mark a breakpoint.
then run the program1
‎2018 Oct 30 1:06 PM
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