HI HOW TO DEBUGGING A PROGRAM IN BACKGROUND
HI
HOW TO DEBUGG A PROGRAM IN BACK GROUND
Go to SM37 and check the spool there. You can find your
output there. If you want to debug the program then first put a
break point in your program after finishing of the execution of
the job, then select the job in SM37 and enter JDBG in
command prompt and press enter. It will go to debug mode. It
is equivivalent to /H which we will enter while debugging in
foreground
Similar Messages
-
How to debug the program in background
hi
how to debug the program in backgroundHello everyone,
I often debug my programs via the sm50 transaction and it works very well (especially when you put the dummy loop ^ - ^ ). However we are confronted to a major problem when more than one user tries to debug. We get a message saying that the maximum number of users in the debugging mode has been reached!! Thus we each have to wait for our turn to debug our program. It's a real pain.
We've searched for a parameter to configure the number of users for the debugging mode but in vain
Has anyone else had this kind of problem? If yes, what do I need to do to correct it?
Any suggestion would be helpful as I am new to BW.
Thank you beforehand.
Regards,
Dimple -
How to debug a program exit in a Workflow ?
Hi experts,
How to debug a program exit in a workflow when the workflow is triggered ?
thanks in advance
regards
AshwinIn 4.6c I did this by creating a function module and a table (zsm50_debug). In the table are just two fields: User name (key), and a flag (yes/no).
The function module:
FUNCTION zsm50_debug.
*"*"Local interface:
*" IMPORTING
*" REFERENCE(Z_DEBUG_USER) LIKE SY-UNAME
DATA: z_exit,
z_debug.
CLEAR: z_debug.
DATA: starttime TYPE t,
currenttime TYPE t,
time_passed TYPE i.
starttime = sy-uzeit.
* Check if debugging is switched on
SELECT SINGLE debug FROM zsm50_debug
INTO z_debug
WHERE uname = z_debug_user.
* Debugging is switched on:
IF z_debug = 'X'.
* Not an endless loop, but it will continue after approx. 1 minute...
* Plenty of time to go to SM50 to debug the program and continue!
DO.
* Change the value of z_exit to 'X' to exit the loop an stay in
* debug mode.
IF z_exit = 'X'.
EXIT.
ENDIF.
* To prevent an endless loop (if the user forgot that debugging was
* switched on in ZSM50_DEBUG, time is measured to allow the program
* to continue after 2 minutes
GET TIME FIELD currenttime.
time_passed = currenttime - starttime.
IF time_passed > 120.
WRITE: / '!!!==========================================!!!'.
WRITE: / '!!!DEBUGGING STILL SWITCHED ON IN ZSM50_DEBUG!!!'.
WRITE: / '!!! Program was delayed by two minutes !!!'.
WRITE: / '!!!==========================================!!!'.
EXIT.
ENDIF.
ENDDO.
ENDIF.
ENDFUNCTION.
This FM reads the table and checks if the flag is switched on. If so, it loops for two minutes. After that, it continues regardless. If not flagged, it continues immediately.
This way, you can debug any program that is running in the background.
In every method I program I add this FM right in the beginning. With authorization for SM50, I can then debug the program (in production it may be difficult to get the correct server, if there are more). -
How to schedule BDC program in background when we use GUI_UPLOAD
Hi,
I need to run the BDC program in the back ground. But my flat file is in presentation server and i am using GUI_UPLOAD F.M to upload data into I.T. How to schedule BDC program in background.
Will anybody help me in this regards.
Thanks in advance,
MythilyYou will either have to put your data file on the application server or make the directory of the presentation server available as part of the file system so that the background job will have access to it via OPEN DATASET... TRANSFER... CLOSE DATASET.
-
How to debug a program which is running in background (Job)
Hi,
I have a program which can be run only in background. I have to debug that program. Could you please let me know, how can I do that?
Thanks,
Sandeepbasic FAQ, please search before asking.
Thread locked.
Thomas -
How to schedule a program in background after 5 or 10 sec
Hi All,
Can anyone tell me how to schedule a program after 5 or 10 sec in background after the transaction is completed.
It is not a custom transaction. I want to execute a Z program in background in a BADI
Regards
Yathish
Message was edited by:
Yathish GundlupetProgramattically? You can add this code to the end of your transaction(if it is custom, of course).
report zrich_0004 .
data: sdate type sy-datum,
stime type sy-uzeit,
l_valid,
ls_params like pri_params,
l_jobcount like tbtcjob-jobcount,
l_jobname like tbtcjob-jobname.
start-of-selection.
* Get Print Parameters
call function 'GET_PRINT_PARAMETERS'
exporting
no_dialog = 'X'
importing
valid = l_valid
out_parameters = ls_params.
* Open Job
l_jobname = 'THIS_JOB'.
call function 'JOB_OPEN'
exporting
jobname = l_jobname
importing
jobcount = l_jobcount.
* Submit report to job
submit <your_program_name
via job l_jobname
number l_jobcount
to sap-spool without spool dynpro
spool parameters ls_params
and return.
* Kick job off 10 seconds from now.
sdate = sy-datum.
stime = sy-uzeit + 10.
* Schedule and close job.
call function 'JOB_CLOSE'
exporting
jobcount = l_jobcount
jobname = l_jobname
sdlstrtdt = sdate
sdlstrttm = stime
Regards,
RIch Heilman -
How to validate a program in background
hello folks,
i need to validate my program, my program should run only in background
in case if it runs in foreground it should give error message. how to validate my
program.
can any one just tell the procedure how to do it.
any help will be greatly appreciated,
thanks in advance.
regards,
cnuHello CNU,
following snippet should do.
Regards
Klaus
if ( 'X' ne sy-Batch ).
message e000 with 'Only in Batch'(BTC).
endif. -
How to run a program in background?
Hi abapers,
I want to run a program in background using sm36 and sm37.But i am not aware of input in that tansaction.So kindly tell me the steps ho run a program in background.
Regards
AnsumanHi Ansuman Parhi,
by useing T-codes
First go to transaction SM36 to schedule the job.
When you enter the "Start condition" for job, do as follow.
Select processing by "Date/Time".
Enter date as current date.
Let us say you are scheduling this job today then give date 08/30/2007.
Check "periodic job" checkbox.
Hit "periodic value" button and select to run "Daily"
Also have a look on below thread
Re: How to run program in background?
This is how to do it through code
data: lv_job_name like tbtco-jobname,
lv_job_nr like tbtco-jobcount,
lv_job_released type c,
lv_job_start_sofort type c,
lv_print_parameters type pri_params.
lv_job_name = 'Z_test'. " your background program name
call function 'JOB_OPEN'
exporting
jobname = lv_job_name
importing
jobcount = lv_job_nr
exceptions
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
others = 4.
if syst-subrc = 0.
*submit job with all the selection screen params...
submit (lv_job_name)
with applfile = applfile
with p_lines = p_lines
with rfc_dest = rfcdest
with p_selmtd = lv_selmtd
with px_shsim = px_shsim
with px_sherr = px_sherr
user syst-uname
via job lv_job_name number lv_job_nr and return.
if sy-subrc = 0.
call function 'JOB_CLOSE'
exporting
jobcount = lv_job_nr
jobname = lv_job_name
strtimmed = 'X'
importing
job_was_released = lv_job_released
exceptions
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
others = 8.
if syst-subrc 0.
message i162(00) with
'An error occured while closing the background job.'.
stop.
endif.
endif.
endif.
skip 1.
write: / 'Background process', lv_job_name ,
'called successfully' no-gap.
write: / 'You can check the job in transaction SM37'.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7 -
hi abapers i need to know how to debug the crm programs.
Hi Rockey,
IF u have the integration with CRM and R/3.Then u will use the Middle ware BADI's to copy the data from CRm to r/3 or R73 to CRM.
You can debug that that BADI and u can see where u are going wrong.
Mainly in CRM
we will have the FM's.Through this function modules we ill do evrything in the CRM.
CRM_ORDER_SAVE.
CRM_ORDER_MAINTAIN
CRM_ORDER_READ.
IF we want to get the Data from R73 to CRM. then you can write RFC'S toget the data.
There are so many ways are there.JUst put the breakpoints.In ur middle ware BADI's
then i hope it may help you.
Thanks -
How tu run the program in background
Hi SapAll.
actually iam new to ABAP ,i just want to know on how i can run the particular program in background .
can any one explain me in steps .
i also want to know on how to delete the particular job which has been already created in sm36 .
will be waiting for best response.
regards.
VarmaHi
Find the below steps to be defined.
1. Go to SM36 -
> Give the Program Name
2. If you have priority defined that to in Job class
3. Click -
> Start Condition
4. Select Data/Time Tab
5. Give the Date and Time for the job execution. (If you want to certain intervale provide it) -
How to run a program in background and how to check the output
I have to run my program as background job... it has a selection screen...... and i need to check the output after its complete.
hi,
u need to create one program for this.
tables:btcevtjob.
parameters:job(32).
data:count like btcevtjob-jobcount.
call the function modules JOB_OPEN,JOB_SUBMIT AND JOB_CLOSE
and pass the parameters in those function modules.
once u execute this program,
go with sm37->provide jobname->select the option scheduled
->execute
selct the entry->go with release option.
under releasae select immediate option
save
select the job name again
go with release
status is in finished stage
now go with spool option
give spool no
go for display
o/p displayed.
before this,go for se38->provide the name of program which u want to run in back ground->seelct variants->change->provide variant name->go for create->provide input value->go with attributes->provide description->save
this variant name u have to give in the job_submit fm.
or
se38->program->execute->in back ground
Reward points if useful,
Thanks,
Usha -
How to debug a program running in background ?
How do we debug a prorgram running in the background ?
Is BREAK-POINT statement is used for this or ne other method exists
I have gone thr the standard documentation help for BREAK-POINT Statement, but not getting it.
Regards,
NitinHi Nitin, try to do this:
1. use the following code instead of break-point:
data a type c.
do.
if a = 'X'.
exit.
endif.
enddo.
2. while the program is running in background, launch transaction SM50.
3. select the program in the list and choose Program/Mode -> Program -> Debugging
4. at this point the program should stop in the infinite loop. to exit from the loop, set the variable a to 'X'
Best regards, Manuel -
How to Debug Standard Program & Customised Scripts in Cheque Printing
Hii
Am working on APP Cheque Printing...
here am using standard driver Program 'RFFOUS_C'
and two customised script for Cheque print and payment advice print..
please let me know , How to dubug my cutostomised script while printing through F110 .....
its not working evenif am activating Debugger in Script or also through RSTXDBUG Prgm
Note : In APP , when am Processing through F110 , In background mode processing takes place and finally Spool is generated....
Awaiting for ur reply...
Thanks in AdvanceHi,
yes offcource you have to activate debugger for script ....but additionally
1. The point in the program where your script is triggered put an external breakpoint.
2. Before giving the Print Preview or whichever button put '/h'
3. After putting /h and pressing the button it goes in Debug mode then you can F8 and it will reach the point where you have set the Breakpoint or External breakpoint.
Thanks,
Neha -
How to submit a Program in Background without wait ?
hi experts,
I have one requirement in which i want to call another executable program from one program by passing some parameters to the calling program from called program. <b>I dont want to wait till the executatio of the calling program gets over.</b>i just want to submit the program & <b>wants to continue with my calling program</b>.
i am not bothered with the results of the called program.
How to do this...
if possible pl. send me the code. especially i am using some parameters & internal tables to be passed to the called program from calling program.
Regards,
UmeshHi Umesh,
You can schedule a job programatically .. Please find below the steps..
This will schedule a background job (and this you can view in Sm37) and returns control to the calling program.
DATA: jobnumber TYPE tbtcjob-jobcount,
jobname TYPE tbtcjob-jobname.
Set the job name
jobname = 'xxx'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobnumber
EXCEPTIONS
OTHERS = 0.
SUBMIT reportname USER sy-uname
VIA JOB jobname
NUMBER jobnumber
WITH param1 = "fill the parms/sel fields with new values
WITH Param2= "fill the parameters/sel fields
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobnumber
jobname =jobname
strtimmed = 'X'
EXCEPTIONS
OTHERS = 0.
Thank You.
Regards,
Uma -
How to run the program in background job,program should run in 3 days.
Dear Gurus,
i have a program , that program should run approximately 3 days to get the result.
i scheduled this program as a background job.
how can i run sto5 t-code for this same program.
i that case how we can trace the output.
Experts please help me out.
Thank u very much.
Regards
sudheerHello Sudheer,
The trace can be set on background jobs by using ST12 transaction. Please make sure that the trace is activated for only few minutes in production environment.
Contact your basis team to activate trace on background job and the transaction used is ST12.
Thanks
Maybe you are looking for
-
Help with emailing a URL instead of attachment
Hi all: I have this question. We have hundreds of Oracle Reports .rdf's from way back. We now want to run them in Oracle Reports Server 10g (9.0.4.1). What we want to do is set destype=FILE when we run rwservlet. And then when the process/job finishe
-
How do I delete photos from my iPhone that have been downloaded from my pc?
I am not sure how to delete photos from my iPhone that I have downloaded from my pc or that I have taken with my iPhone (on my camera roll)
-
AVCD on MAC: are there any processing problems using say, VLC?
AVCD on MAC: are there any processing problems using say, VLC?
-
Failure Class not bundled with BDK Samples
Hi, I'm trying to test the sample codes that are bundled with the BDK however jDeveloper shows me that the class Failure (com.oracle.beehive.rest.Failure) is missing. I understand that these classes where generated by the JAXB script that we executed
-
G4 MDD Boots up with Circle and slash with gears
Hi when i boot up my Server AKA PowerMac G4 i get the default apple and gears for a few seconds then the apple turns into a circle with a slash in it still with the gears then stays there forever HELP