BAP Log/Error Report in case of Background Job
Hi Friends,
I have to develop one program where I am creating purchase orders using BAPI. This Program would be scheduled in background
hence the Error/log report can not be seen .I have been told to use SAP Application Log for getting the Error Report.
How this can be achieved using SAP Application log functionality. Any Help would be appreciated.
Thanks
>
TANGO18 wrote:
> I have to develop one program where I am creating purchase orders using BAPI. This Program would be scheduled in
> background hence the Error/log report can not be seen .
Incorrect. How are you displaying your error / log report ?
Even if you use simple WRITE statements to display the log, the details would be there in the corresponding spool generated.
BR,
Suhas
Similar Messages
-
How to avoid use of function module in case of background jobs?
Hi ,
I am working a file tranfer interface .Functionality is to extract file either apllication or presentation server , and process the file through bapi , send the result in their respective server. This program should run through batch jobs in background mode.
I am using following function module :
SUBST_GET_FILE_LIS : Get the file list from application server
TMP_GUI_DIRECTORY_LIST_FILES : Get the file list from presentation server
GUI_UPLOad : to extract file data from presentation server
GUI_downLOAD : to download data to presentation server
in case of background job these function modules will not work.... so how to resolve this issue...
what are the methods we can apply?
Thanks & Regards
SandeepHi,
This FM is used to get list of files from Application server (will work in Background). This cannot be used to list files from presentation server. There is no way , by which you can process presentation server files in background mode.
Regards
Vinod -
Reg: Error in Mail sending through background job in SCOT
Hello experts,
I am trying to schedule a background job through SCOT so as to send the mails present in SOST.
The job is running but it is giving error as "Invalid status for recipient" in SOST.
But when I am sending it directly from SOST it is delivered without any errors. The email address is maintained correctly and SMTP settings are also correct as while sending it directly from SOST it reaches the required recipient without any error.
This error is observed only through background job. I am using program RSCONN01 with variant SAP&CONNECTINT in background job.
Kindly suggest why I am getting the error "Invalid status for recipient" in background job.
Thanks & Regards
Meraz
+91 8894522860I am getting the exact same issue.
were you able to fix this in the last 3 weeks?
thanks. -
Error after a scheduling a background job
Hi all,
I'm trying to schedule an interface program in background which reads data from application server and posts a document in Finance through a BAPI funtion module.But after scheduling the job in the immediate mode,its getting canceled showing the error
"Could not ascertain code page"
"Job cancelled after system exception ERROR_MESSAGE" in the job log.
Please help me with this...
thanksHi ,
To decode the reason behind job failure , use ST22 Tcode with Exception Name as ERROR_MESSAGE ( as that is what is given in the Job log ) and User - SAP Logon Id
This would give the system dump log and tell you where exactly the job failed .
Please note this applies for any background job and is not specific for your case .
Do have a look at the dump in future ...
Thanks -
Error when running SWN_SELSEN as background job.
Hello Gurus,
I am facing a typical problem these days.
The background job for program SWN_SELSEN is scheduled in every 5 mins. It has started to fail intermittently with the error message 'An instance of the report SWN_SELSEN is still active'. But the stange thing is that the program completes its execution in approx. 12 - 15 secs then why this kind of error it is throwing.
This error message should not come as the program completes itself in 12- 15 secs and it has more than 4 mins as free time.
Please help as this kind of failure is happenning quite frequently i.e. once in nearly every three times it executes. In a day around 100 times.
Please help.
Thanks in advance.
NehaHello,
I assume you've checked in SM37 to see how often it actually runs and whether perhaps two instances have been scheduled?
Also check the log in SLG1 to see if there is any clue there.
regards
Rick Bakker
Hanabi Technology -
Job failure ( report RFFDKU00 scheduled for background job)
Hi Experts,
When iam scheduling the report RFFDKU00 for background job. Job is getting cancelled with status "ABAP/4 processor: DBIF_RSQL_SQL_ERROR" . when iam obesrving this job it is going to dump at this select query
" select ausbk belnr gjahr bzkey buzei
033370 from vbsegs into table t_vbsegsfields
033380 where bukrs in r_bukrs
033390 and not ( fdlev = space
033400 and fdgrp = space
033410 and fdtag = init_date
033420 and fdwbt = 0 )
033430 and not saknr in r_cm_sk "
Can anyone helpme to deal with this issues ,
thanks in advance,
Kranthinote 167301 might help.
-
Spool report line width in background jobs
Hi All,
I wrote a report and specified the line size in the report header:
REPORT /sappssrm/option_handler
NO STANDARD PAGE HEADING
LINE-SIZE 185.
I want to run this report as background job and get a spool list with results of the report. I expected the width of the spool output to be well defined and it works in one system. However, in another systen, the line / page width is much smaller, and the system inserts line breaks in the output splitting my lines into two which causes very ugly results.
It seems that the LINE-SIZE specified in the report header doesn't affect the output width in every system.
Can anyone advice?
Regards
WolfgangHi Siggi,
thanks for your reply. Actually I changed that already yesterday...
But I found out what it was:
It seems, the background job keeps old versions of the program, even if you import a new program version. I created a new job with the same program and it worked.
Thanks again and best regards
Wolfgang -
Report layout - ME2N - Automatic background job
HI all
We are using the above report for Pending PO-RElease ie., dynamic selection - release indicator "B" thru automatic background programme schedueld thru SM36 (after setting the variant) for the relevant/concerned users.
The issue is, the report layout be default standard sap layout is taking, actually i have saved layout as PO no & date, but always, whenever background job is run, default sap report is taken in HTML.
request kindly help how i can ensure my our report layout for backgrounds jobs thru ME2N or is there any other report which can give the pending PO-Release report for my requirement.
thanks in advance
regards
srihariI am doing same as suggested by you for all other reports, but i am not successful with ME2N, because after having your own default layout, but for background it is default taking sap report. even i have tried to delete the sap - std report format but not allowed.
if any one knows how to change the sap-default std report layout then also it's okay for us, as default report as 15 columns whereas we need only max 5 columns in report layout
thanx in advance
regards
srihari -
Report to cancel released background jobs
Hi Folks,
Can anyone guide me whether there is any standard report/program where i can delete/cancel the background jobs already released/scheduled? We can cancel individual job using SM37, but i need to cancel "n" number of jobs at one slot.
Thanks in advance.
Regards,
ShivaSiva,
can plz tell me how to change or reschedule the time on background job ?
Dilip -
Emailing the report to external email - Background job
HI
We are creating background job for running the report in background...but i want the output(report) to send an email in Excel format after the job run successfully...
Here the email is External email not SAP inbox..
Do you have any idea how to achieve this? any user-exit or even handling will help this?
Please let me know
Thanks
GoviIam not using custom program to send the email...I know about the FM SO_DOCUMENT_SEND_API1...to send email.
My requirement is to send email to user the report in Excel after the background job runs.
we will define the job in SM36 with variant for the report with program name and variant.
after the job runs the spool request will be created and we can also setup the output of the report to be sent to SAP inbox.
my question is to how to send the output of this report in Excel format to external email i.e. Gmail, yahoo etc...
I hope u r clear now...
Please let me know if you know the answer.
Thanks -
Error in ALV list at background job
Hello,
I am executing one custom report in bckground with layout 'Z_65_400'.After executed, it created spool.If we will try to look the output by using our spool, the layout is truncating.Here , in SP01. based on our spool, in menu bar->GOTO->REQUEST ATTRIBUTES->In this screen, it is showing X_65_255'Format. I tried all basic ways to resolve the issue.I am thinking that this is coming due to 'SAPKB62064(SAP_BASIS).I tried in sap service market place also.Could you please give the solution in detail .
Thanks and Regards
NTRHi NTR,
Pass the error records into a separate internal table and append them. once the Background processing was completed then loop on that error internal table and list them in the Basiclist for the identification.
-Thanks & Regards
Saurabh Goel -
Error message supercedes output in background job.
Hi,
When I run my ALV report in foreground, the output (of several pages) is correctly presented, and upon clicking "BACK", the screen displays the authorization message "Personnel numbers skipped by database driver : ... Reason 1 : insufficient authorization, no. skipped personnel nos : .." which is expected, as the user is subjected to authorization granted to the user.
However, when I run the job in background and upon completion, the spool shows only 1 page, i.e. the authorization message above is displayed on the spool output, and the report/output list result is suppressed. Is there a way to get the output of the report instead of the authorization message above ?
Thank you.
Regards
Kir ChernKir,
This is a common problem which everyone faces when running such reports with Error messages in the background. Any error message that encounters in the background mode would make the job to fail.
So, what you can do develop your own message class and give the error messages as Information messages. But, as you told that you are running it on PNP Database and you cannot have access to change it I dont think there is another way to achieve this.
Anyways,
Try to check the below link
Re: Background Processing? how schedule job for "System Error" Message .
Thanks,
Babu Kilari -
BACKGROUND JOB WAS NOT SCHEDULED/LOG FILE NOT YET GENERATED
Hello,
To generate the log report, /VIRSA/ZVFATBAK program is scheduled on hourly basis but some time report doesn't get generated and if we see the background job then it shows sucessfully finished.
If we see the maually the log report for FFID then below error message is displayed.
" BACKGROUND JOB WAS NOT SCHEDULED/LOG FILE NOT YET GENERATED"
Can anyone guide me to solve the issue.
Thanks in advance.
Best Regards,
Prashant DubeyHi,
once chk the status of the job by selecting that and check job status(cltr+shift_f12)
since it was periodically scheduled job there will be a RELEASED job after every active job..
so try to copy that into another job using copy option and give some new name which u have to remember...
the moment u copy u can find the same copied job in SCHEDULED status...
from here, try to run it again on hourly basis....
After copying the job u can unschedule the old released job to scheduled otherwise 2 will run at a time...
rgds, -
Submit background job for a report
Hai Friends,
I want to submit a report in background which should run on first monday of every month. otherthen SM36 and SM37. Because we cant give date and time like this.
If any coding required Pl give me the code.
regards,
vamsykrishna.This is the Basic code to Achieve that.
Call Function 'JOB_OPEN'
SUBMIT RSBDCBTC
via background Job <Job info>
With QIE = <QID Returned by BDC_OPEN_Group FM>
AND RETURN.
Call Function 'JOB_CLOSE'
2) Also go through this
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_BGPROGRAM'.
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 " these are the parameters of the background program
WITH p_lines = p_lines
USER syst-uname " you must use this
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'. -
SUBMIT REPORT AS A BACKGROUND JOB
Hi all,
I am executing one report in foreground in that report i want to submit one report which should be executed in background only. how it is possible to execute 2nd report in <b>background mode</b> only.
Regards
deepakThis is the Basic code to Achieve that.
Call Function 'JOB_OPEN'
SUBMIT RSBDCBTC
via background Job <Job info>
With QIE = <QID Returned by BDC_OPEN_Group FM>
AND RETURN.
Call Function 'JOB_CLOSE'
2) Also go through this
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_BGPROGRAM'.
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 " these are the parameters of the background program
WITH p_lines = p_lines
USER syst-uname " you must use this
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'.
Thanks
Maybe you are looking for
-
How do i put firefox on a flash drive
How do i put fire fox on a flash drive so that i can install it on a PC that has a corrupted IE
-
Adding leading zeros to a field in an Internal table
HI Experts, I have an Internal table with 3 fileds and the second filed is of lengh 10, In this filed i get the data which is of 4 character I want the leading 6 0's to be added for that 2 field For Eg HI 1234 HELLO HI 1222 HELLO I need the
-
I had a fully functioning installation of CS3 on my iMac (Intel 2.16 MHz) and had a hard disc crash. After replacing the hard disc, I reinstalled from my original discs, but get the following message: "Licensing for this product has stopped working.
-
Reverse engineering SQL (not database)
Hello, Is it planned to provide a tool to reverse engineer SQL statements as Sourceforge's Revj (Reverse Snowflakes Joins) do ? This tool generates an ER Diagramm from an SQL Statement without connecting to the database. a demo is available at http:/
-
I need customize a rotary control, I must replace the needle with an image but this image doesn't rotate at the same mode. I send my attachment with my image and control, if you have some time and you like try..... I'll be eternally grateful to you.