Background job name

Hi All,
Background job related info. not getting retrieved when using function module 'SAPWL_READ_STATISTIC_FILES' (version SAP ECC 5.0 compatible) in our SAP ECC 6.0 whereas if I use 'SWNC_STAD_READ_STATRECS' I'm getting the required info.
Can anyone let me know why FM 'SAPWL_READ_STATISTIC_FILES' doesn't give the required info. in SAP ECC 6.0?
Thank you.
Gandhi Subramani

Hi,
It would help you ,
Make your report automatically processed in background when it is being executed using JOB_OPEN, SUBMIT and JOB_CLOSE like following[example code],
DATA: d_jobcount LIKE TBTCJOB-JOBCOUNT,
           d_jobname LIKE TBTCJOB-JOBNAME.
03
04 d_jobname = 'JOB1'. " Here you may give the job name what ever you insist.05
06 CALL FUNCTION 'JOB_OPEN'
07 EXPORTING
08 jobname = d_jobname
09 IMPORTING
10 jobcount = d_jobcount
11 EXCEPTIONS
12 cant_create_job = 1
13 invalid_job_data = 2
14 jobname_missing = 3
15 OTHERS = 4.
16
17 IF sy-subrc NE 0.
18 MESSAGE s368(00) WITH 'Error Creating Job'
19 sy-subrc.
20 EXIT.
21 ENDIF.
22
23 SUBMIT <REPORT_NAME>" call the same program in Background with different job names 24
VIA JOB d_jobname
25 NUMBER d_jobcount
26 AND RETURN.
27
28 CALL FUNCTION 'JOB_CLOSE'
29 EXPORTING
30 jobcount = d_jobcount
31 jobname = d_jobname
32 strtimmed = 'X' " Immediate
33 EXCEPTIONS
34 invalid_startdate = 1
35 jobname_missing = 2
36 job_close_failed = 3
37 job_nosteps = 4
38 job_notex = 5
39 lock_failed = 6
40 OTHERS = 7.
41
42 IF sy-subrc > 0.
43 MESSAGE s368(00) WITH 'Closing Job Failed'
44 sy-subrc.
45 EXIT.
46 ENDIF.

Similar Messages

  • How to get the Background job name

    Hi,
    I am executing a report in background and i want to get the background job name in the same report program. How can i get the same.
    Regards,
    Rajgopal Dara.

    Hi,
    for this fm is used 148 times in our system, I made a check program and it works:
    report  zsbatchfm.
                                                                                    data: xv_jobcn type btcjobcnt.
    data: xv_jobnm type btcjob.
    data: xv_stepc type btcstepcnt.
                                                                                    call function 'GET_JOB_RUNTIME_INFO'
      importing
    *   EVENTID                       =
    *   EVENTPARM                     =
    *   EXTERNAL_PROGRAM_ACTIVE       =
        jobcount                      = xv_jobcn
        jobname                       = xv_jobnm
        stepcount                     = xv_stepc
      exceptions
        no_runtime_info               = 1
        others                        = 2.
                                                                                    if sy-subrc <> 0.
      write:  /1 'SY-SUBRC = ', sy-subrc.
    else.
      write:  /1 'JOBCOUNT  = ', xv_jobcn.
      write:  /1 'JOBNAME   = ', xv_jobnm.
      write:  /1 'STEPCOUNT = ', xv_stepc.
    endif.
                                                                                    commit work.
    In online mode you get a SUBRC = 1, in batch mode you get the informations (here: in SPOOL)
    Please check it on your system!
    Regards,
    Klaus

  • How to get Current Background Job name and Job Count programmically?

    Hi all,
            I have a requirement wherein I need to get the Current Background Job name and Job Count in the program and store it in a custom table. In other words, whenever I schedule a particular program ( This is a Std program) in background, I need to update this table with the Job Name and Job Count. This will be used by another program later to read the Job Information from table TBTCO. TBTCO has key fields Job Name and Job ID. The sheduled program will be a SAP standard program and I'll be writing the logic to get the info in an Implicit Enhancement Spot.
    Is there anyway I can do this? Any FM to get this information?
    Thanks,
    Mahesh.

    Hey Adrian,
                             Thanks a lot. This is what exactly i was looking for. Appreciate it.
    Mahesh.

  • Read current background job name

    Hello,
    I would like to know if there exists a way to find out the name of the background job where your ABAP program is currenctly running in.
    Does there exist a function that I can call ?
    Best Regards,
    Erwin

    I agree with Rich. I use the same function module and works very well.
    call function 'GET_JOB_RUNTIME_INFO'       
        importing                              
    *         EVENTID                 =        
    *         EVENTPARM               =        
    *         EXTERNAL_PROGRAM_ACTIVE =        
    *         JOBCOUNT                =        
             jobname                 = jobname 
    *         STEPCOUNT               =        
        exceptions                             
             no_runtime_info         = 1       
             others                  = 2       
    Regards,
    Subramanian V.

  • HOw to find out a report name when you know only the name of background job

    Hi experts ,
    my question is i need to find out teh report name for which i knew only the background job name of the report .
    thanx
    Venky.

    Go to tcode SM37->Give job name and execute->choose tool bar button STEPS (Disply Steps list) ->Then you will get program or command

  • How to find Spool number for a 2 steps background job.

    Hi All,
    How to find spool number (and also the background job name ) for a 2 steps background job.
    in the table TBTCO i can see step numbers but i dont get the spool number. Is there any link between TBTCO and TSP01.
    Also after getting the spool number i need to drill down on ALV report. I hard coded the spool number and was able to drill down using BDC and call transaction but when i press back button it is not returning to the ALV report.
    Thanks,
    Shiva.

    Which one creates the spool? (first one I guess)
    What kind of spool? (WRITE, sapscript, smartform, pdf...)
    Do you use special statements like NEW-PAGE, or other things?
    Are you sure that the spools are generated by these jobs? (did you compare the spool generation times and job run dates to be sure...)

  • Thru MEB4 the Tax amount and Tax percenatage not trigger in Background Job

    Hi,
              When I am executing the T.Code- MEB4 (Rebate Settlement) thru Foreground the Vendor Rebate Amount and Tax are showing.
                                      When I am executing in Background job the Tax amount and Tax Percentage are not triggering (Only the Rebate amount only showing) after execution of Background job in when viewing the job display.
                       Background Job Name: RWMBON01.
       Please suggest.

    Shankar,
    Thanks for reply.
    If I don't put amount in the basic data tab( MIRO) then it does not allow to "simulate" or "Post". But here I can simulate and Post
    I check every thing in WHT Config but I could't found the solution.
    I want to tell another thing, we recently went to patch upgrade from Version 4.7 E  SP 22   to 4.7 E  SP30.
    My question, Is the pacth upgrade affects in anyway???
    If any suitable answer appreciatable.
    Thanks once again for your reply.

  • How to setup background job for QI06

    Dear all,
    We have massive QIR to create and the volumn is extremely big to run in foreground in QI06.
    Can you show me the steps to setup QI06 to run in background, and how to view if the background job is complete, etc.
    Appreciate millions.
    Tuffy

    Hello,
    Just enter all the details in QI06. like:
    Complete list of Materials in Material field +plant+ vendor. ( if you have one plant then its ok and if you have same material with different plant and vendor combination then better to set variants plant wise)
    ENter rlease until, model inspection type ( if you have any )
    Now. goto Program and there is an option for EXECUTE in BCKGRND. clcik on it .
    Provide background job name and time for its job start and period ( If you want periodic job like monthly, weekly or daily etc.)
    then execute it.
    and monitor the job via SM37.
    Regards

  • Table for background job spool list ?

    i know the table for spool request : TSP01
    But how should i link it to background job name ?
    i want the link between background job name and spool request.
    TBTCPV is the view but it stores only one spool request.....rather than multiple spoolreq generated by background job..

    Hi,
    Table TBTCP has the Spool Request field PLIST field as well as Jobname JOBNAME field in it. Youc an link them together.
    Regards,
    Anji

  • Background Job Monitoring

    Hi everbody,
    Please tell how to get the program name  which r scheduled in the background jobs  in SM36,37 if we know the background job name.
    Thanx and regards,
    Rajvinder Sahni

    Hi Rajvinder,
                Just look into table <b>TBTCP</b>. It will gives you about Background Job Step Overview.
    Give background job name in field <b>JOBNAME</b> then it will you report name in field <b>PROGNAME</b>.
    In addition to this there is another table which gives about Job Status is <b>TBTCO.</b>
    Thanks,
    Vinay
    Note: Reward points to all helpful answers
    Message was edited by: Vinaykumar Gorrela

  • WHICH TABLE STORES SPOOL REQUEST GENERATED BY BACKGROUND JOB ?

    Background job is generating multiple request.
    i am not able to find the table which stores all the spool request for a particular background job.

    i know the table for spool request :  TSP01
    But how should i link it to background job name ?
    i want the link between background job name and spool request generated by it......
    TBTCPV is the view but it stores only one spool request.....rather than multiple spoolreq generated by background job..

  • Background job in APO does not start because of invalid user name

    Hello,
    I have a macro in a planning book and the /sapapo/cons_check program which a triggered via a background job. Now, I have problems with the start of the job:
    At the time the job was created inside SAP, an error occured. The job contains invalid values.
    The user name within the job does not exist any more.
    Now, I try to change the user name of the job (via step in sm37), but the error occured again.
    I have the possibility to create the invalid user name once again in su01.
    But I want to change the user name of the job - does somebody know how to do it?
    Thanks for your help!
    Kind regards
    Heinz

    Hello Heinz, this looks surprising.
    It's quite easy to change the user name in the SM37 job step, and we haven't faced issues with this.
    Could you check how many jobs are in either "scheduled" or in "released" status, and change steps for all of them? May be you changed the scheduled job, but the released job wasn't changed.
    Use your job name and give a search date as 1-2 years in the past, and around 1 month in the future. With this time horizon, you should most likely be able to capture all the relevant jobs having the same name that you are using.
    Now change the user name in step for all the jobs received above to be fully sure.
    One more trial could be to copy the current scheduled job to another job, modify the user name in this newly created job and then delete the old one.
    One of the above trials might possibly help you in some way, else its very tough to understand/explain your situation.
    Thanks - Pawan

  • Background Job with User Name

    I am trying to submit report program in background job. I want to submit it with specific user name so I am submitting with user name as 'ABC'  as below
    data: user type sy-uname.
    user = 'ABC'.
    SUBMIT z_program AND RETURN
                 WITH matnr = matnr
                 WITH werks = werks
                 USER user
                 VIA JOB jobname
                 NUMBER jobcount
    But it creates job with current user(sy-uname) running the program and  not 'ABC'. How I can change it for specified user?

    SUBMIT z_program AND RETURN
    WITH matnr = matnr
    WITH werks = werks
    USER user
    VIA JOB jobname
    NUMBER jobcount
    AND RETURN.    "you forgot to return back
    Of course the user should be the one existing in the system. I guess there is no such ABC. Find the one which exists (use i.e. su01).

  • Job Name of a Program scheduled as a Background Job

    Hi,
    In our production system. We have a program which is scheduled to run in the background by various job names. At runtime, I need the program to figure out under which Job Name is it running. I dont think there is any system field which stores the Job Name of the background job.
    Any inputs?

    Hi,
    It will run in default with <b>the name of the program</b>.
    Goto SM36 and put a * in job name u will see all the jobs that are schedule, if u specify the program name for the job schedule u will get that list alone.
    U can differentiate by seeing the time the job was scheduled.
    http://www.sap-img.com/ab007.htm
    Please reward and close the thread if u got the info.
    Message was edited by: Judith Jessie Selvi

  • User Name in a background job

    Hello All,
    I am running a report in background that creates data in IT0105. This table has a field "UNAME". When I run it in
    foreground this field takes up the id from which I am logged in. The program doesn't complete in background because
    it has a BDC which we complete forcefully in foreground due to some data issue.
    So I need to know what will be the "UNAME" in IT0105 when the report runs in background?
    Thanks,
    Ritika Mathur

    Hello Neal,
    Actually I don't need to check any authority. The issue is that I need to track and give a proof that it is not the program putting in inconsistent data into the database. So in foreground I can run and test that the user name is the id I was logged into from. But in background I assume that the user name is set to "BATCH". (I see the data previously created in IT0105 and the username is either the ids of logged in users or "BATCH" as the report is actually meant to run as a background job).
    Now I cannot test in background and hence need to know if the username is set to "BATCH" if a program runs in background.
    Thanks,
    Ritika

Maybe you are looking for

  • Javascript to pull a PDF field into the Subject line of email?

    I've created a fillable PDF form using Pro X.  I'd like to program the Submit button so that once in the email portion, the subject line would automatically pull 3 specific fields from the PDF file. Example:  After hitting "Submit"....once in the ema

  • CS5 Flash Embed Code and IE8

    When using the default HTML embed code generated by Flash CS5, what appears to be an "object not found" icon is displayed momentarily as the HTML file is loaded in IE8 under a restricted bandwidth situation.  (Admittedly, I haven't had a chance to te

  • Sounds disappears in iMovie '11

    I'm helping a friend who has iMovie '11.  We took 20 still images and put them into a new iMovie project.  We added sound. (The tune is in iTunes and appears listed in the iMovie window.) We adjusted timing of images and transitions.  It ran perfectl

  • Issue with avelsieve+squirrelmail

    Hi, I'm a bit newbie so I'll try to clearly explain the situation : I'm trying to setup Avelsieve for Squirrelmail on my XServ to automatically store mails in differents folders. I created many IMAP accounts and for each account I created aliases. Pe

  • Won't work as a startup anymore.

    I have been running my Imac with Snow Leopard on an external Lacie disk and backing it up on another disk with Time Machine. Today the power went out for a couple of minutes and my computer will no longer allow me to select it as a startup disk. Fort