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

Similar Messages

  • Limit user from submitting a background job

    Hi,
    Is there a  parameter that would limit the user from submitting a background job?
    Regards,
    Raquel

    Read about Authorization object S_BTCH_JOB
    http://help.sap.com/saphelp_nw70/helpdata/en/86/f7f3393bef4604e10000000a11402f/content.htm
    Regards
    Juan

  • 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

  • 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

  • How to delete the Background job for Deleted user

    Dear experts
    The User RAMESH  was delted before one month
    I dont know what job  had he Created and Scheduled
    where should i find the perticular user backgroung jobs and how to  delet it
    regards
    krishna

    From SM37....you can give the user name and find all jobs scheduled by the user
    select all jobs>>>>delete
    *This should have admin access on jobs
    Regards,
    Nick Loy

  • 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.

  • Background Job Scheduling

    Hi,
      I am scheduling a report to run in background.
    In this report it is creating background jobs automatically for different company codes.
    It submits the 1st background job and waits until it finishes.
    Then 2nd job starts in background and continues with other jobs.
    At end it finishes all the jobs and closes.
    Now my problem is.
    1.       Whether is it possible for us to submit all the jobs at 1 time. And execute at same time. Ie., 1st, 2nd job will start at same time.
    2.       If possible how can we do that.
    What I have written is
    loop at companycode.
    Create job name.
    call fun 'Job_Open'.
    submit xxxx user sy-uname via job job_name numer job_count
    to sap-spool
    spool parameters l_spool_parameter
    without spool dynpro
    with companycode
    with ......
    and return.
    endloop.
    Please help ASAP, urgent.

    hi praveen,
    Job Scheduling Explained
    Definition
    Before any background processing can actually begin, background jobs must be defined and scheduled. The scheduled time for when a job runs is one part of the job’s definition. There are several ways to schedule jobs:
    From Transaction SM36 (Define Background Job)
    With the "start program in the background" option of either Transaction SA38 (ABAP: Execute Program) or Transaction SE38 (the ABAP editor)
    Through the background processing system’s own programming interface. (Many SAP applications use the internal programming interface to schedule long-running reports for background processing.)
    Through an external interface.
    Scheduling Background Jobs   
    Use
    You can define and schedule background jobs in two ways from the Job Overview:
    ·         Directly from Transaction SM36. This is best for users already familiar with background job scheduling.
    ·         The Job Scheduling Wizard. This is best for users unfamiliar with SAP background job scheduling. To use the Job Wizard, start from Transaction SM36, and either select Goto ® Wizard version or simply use the Job Wizard button.
    Procedure
           1.      Call Transaction SM36 or choose CCMS ® Jobs ® Definition.
           2.      Assign a job name. Decide on a name for the job you are defining and enter it in the Job Name field.
           3.      Set the job’s priority, or “Job Class”:
    ·         High priority:      Class A
    ·         Medium priority: Class B
    ·         Low priority: Class C
           4.      In the Target server field, indicate whether to use system load balancing.
    ·         For the system to use system load balancing to automatically select the most efficient application server to use at the moment, leave this field empty.
    ·         To use a particular application server to run the job, enter a specific target server.
           5.      If spool requests generated by this job are to be sent to someone as email, specify the email address. Choose the Spool list recipient button.
           6.      Define when the job is to start by choosing Start Condition and completing the appropriate selections. If the job is to repeat, or be periodic, check the box at the bottom of this screen.
           7.      Define the job’s steps by choosing Step, then specify the ABAP program, external command, or external program to be used for each step.
           8.      Save the fully defined job to submit it to the background processing system.
           9.      When you need to modify, reschedule, or otherwise manipulate a job after you've scheduled it the first time, you'll manage jobs from the Job Overview.
    Note: Release the job so that it can run. No job, even those scheduled for immediate processing, can run without first being released.
    Specifying Job Start Conditions
    Use
    When scheduling a background job (either from Transaction SM36, Define Background Job or CCMS ® Jobs ® Definition), you must specify conditions that will trigger the job to start.
    Procedure
    Choose the Start condition button at the top of the Define Background Job screen.
    Choose the button at the top of the Start Time screen for the type of start condition you want to use (Immediate, Date/Time, After job, After event, or At operation mode) and complete the start time definition in the screen that appears.
    For the job to repeat, check the Periodic job box at the bottom of the Start Time screen and choose the Period values button below it to define the frequency of repetition (hourly, daily, weekly, monthly, or another specific time-related period). Then choose the Save button in the Period values screen to accept the periodicity and return to the Start Time screen.
    Once you’ve completed specifying the job start conditions, choose the Save button at the bottom of the Start Time screen to return to the Define Background Job screen.
    No job can be started until it is released, including jobs scheduled to start immediately. Since releasing jobs can be done only by a system administrator from the job management screen (Transaction SM37) or by other users who have been granted the appropriate Authorizations for Background Processing, no unauthorized user can start a job without explicit permission
    Managing Jobs from the Job Overview
    Use
    The Job Overview, or Job Maintenance, screen is the single, central area for completing a wide range of tasks related to monitoring and managing jobs, including defining jobs; scheduling, rescheduling, and copying existing jobs; rescheduling and editing jobs and job steps; repeating a job; debugging an active job; reviewing information about a job; canceling a job's release status; canceling and deleting jobs; comparing the specifications of several jobs; checking the status of jobs; reviewing job logs; and releasing a job so it can run.
    Procedures
    To display the Job Overview screen, choose CCMS ® Jobs ® Maintenance or call Transaction SM37. Before entering the Job Overview screen, the system first displays the Select Background Jobs screen. You'll need to complete this Job Selection screen to define the criteria for the jobs you want to manage. Once you've selected jobs to manage, you can choose from a wide range of management tasks:
    To copy a single existing job, choose Job ® Copy.
    To reschedule or edit job steps or attributes of a single job, choose Job ® Change. A job step is an independent unit of work within a background job. Each job step can execute an ABAP or external program. Other variants or authorizations may be used for each job step. The system allows you to display ABAP programs and variants. You can scan a program for syntax errors. You can also display the authorizations for an authorized user of an ABAP job step.
    To repeat a single job, choose Job ® Repeat scheduling.
    To debug an active job, choose Job ® Capture: active job. Only a single selection is allowed. If an active job seems to be running incorrectly (e.g., running for an excessively long time), you can interrupt and analyze it in debugging mode in a background process, and then either release it again or stop it altogether.
    You will be able to capture a background job only if you are logged on to the SAP server on which the job is running. To find server information in the Job Overview, select and mark the job, then choose Job ® Job details.
    To review information about a job, choose Job ® Job details. Details displayed can include:
    current job status
    periodicity, or the repetition interval
    other jobs linked to the current job, either as previous or subsequent jobs
    defined job steps
    spool requests generated by the current job
    To cancel a job's "Released" status, select the job or jobs from the Job Overview list and choose Job ® Release -> Scheduled.
    To cancel a job from running but keep the job definition available, select the job or jobs from the Job Overview list and choose Job ® Cancel active job.
    To delete a job entirely, select the job or jobs from the Job Overview list and choose Job ® Delete. Jobs with the status of Ready or Running cannot be deleted.
    To compare the specifications of more than one job, select the jobs from the Job Overview list and choose Job ® Compare jobs.
    To check the status of jobs, select the job or jobs from the Overview Job list and choose Job ® Check status. This allows you to either change the job status back to Planned or cancel the job altogether. This is especially useful when a job has malfunctioned.
    To review job logs, select a job or jobs with the status Completed or Canceled from the Job Overview list and
    regards
    karthik
    reward me points if helpfull

  • Exact Steps to schedule a background job a specific time daily :

    Dear  All,
               Please let me know  the whole process involved in schedule a background job a specific time daily. what is calender id. I could not understand what it has given in SM36.
    Thanks in advance.
    Rgds
    Prem.

    Hi prem
    this is complte procedure for ur requirment.
    Scheduling Background Jobs 
    Use
    You can define and schedule background jobs in two ways from the Job Overview:
    Directly from Transaction SM36. This is best for users already familiar with background job scheduling.
    The Job Scheduling Wizard. This is best for users unfamiliar with SAP background job scheduling. To use the Job Wizard, start from Transaction SM36, and either select Goto ® Wizard version or simply use the Job Wizard button.
    Procedure
    Call Transaction SM36 or choose CCMS ® Jobs ® Definition .
    Assign a job name. Decide on a name for the job you are defining and enter it in the Job Name field.
    Set the jobu2019s priority, or "Job Class":
    High priority: Class A
    Medium priority: Class B
    Low priority: Class C
    In the Target server field, indicate whether to use system load balancing.
    For the system to use system load balancing to automatically select the most efficient application server to use at the moment, leave this field empty.
    To use a particular application server to run the job, enter a specific target server.
    If spool requests generated by this job are to be sent to someone as email, specify the email address. Choose the Spool list recipient button.
    Define when the job is to start by choosing Start Condition and completing the appropriate selections. If the job is to repeat, or be periodic, check the box at the bottom of this screen.
    Define the jobu2019s steps by choosing Step, then specify the ABAP program, external command, or external program to be used for each step.
    Save the fully defined job to submit it to the background processing system.
    When you need to modify, reschedule, or otherwise manipulate a job after you've scheduled it the first time, you'll manage jobs from the Job Overview.
    pls give points if it is usefull
    Regards
    Saimedha

  • Background job- getting printed automatically

    In my BDC Program i have submitted  Session for Background Processing using
    Submit RSBDCSUB..........
    my code is also given below..The problem is after the user executes the program, background job is automatically going to his Local printer and getting printed. HOw to avoid this?
    CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname          = gf_jobname
           IMPORTING
                jobcount         = gf_jobcount
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
    *-Submit the selected sales orders for changes.
      SUBMIT rsbdcsub AND RETURN
             WITH mappe = v_sess
             WITH von = sy-datum
             WITH bis = sy-datum
             WITH z_verarb = 'X'
             WITH fehler = space
             WITH batchsys = space
             WITH logall = space
             USER sy-uname VIA JOB gf_jobname NUMBER gf_jobcount.
      IF sy-subrc NE 0.
        MESSAGE i999 WITH text-013.
        EXIT.
      ENDIF.
    *-Close job and start immediately.
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                jobcount             = gf_jobcount
                jobname              = gf_jobname
                strtimmed            = 'X'
           IMPORTING
                job_was_released     = gf_release
           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.

    On SUBMIT use
    SUBMIT zxxxxxx TO SAP-SPOOL
                        WITHOUT SPOOL DYNPRO
                        IMMEDIATELY  ' '
                        KEEP IN SPOOL 'X'
                        DESTINATION printer
                         NUMBER  number
                        AND RETURN

  • Program for Background Job for COGI

    Does anyone know what is the Program name for creating background job to run COGI? I'm using CORUAFFW to create variants and run the program but its not working as I guess it isonly generating the report but not deleting the records if inventory is added.
    Thanks
    Mama
    Edited by: Amit Raichura on Mar 21, 2008 1:31 AM

    Amit,
    Use Program "CORUAFWP" to schedule background job to post COGI error records if the error is corrected, as in your case stock is corrected.
    Regards,
    Prasobh

  • Performance issues-assigning background jobs to a designated server

    Hello all, we have been having peformance issues in our production enviorment and were entertaining the idea of running all our our background jobs on a separate/designated server.  Has anyone had any experience with this and if so any insight on how you did this would be appreciated?  Thanks.

    I suppose your performance issues are then for the online users? In general, the best option should be to distribute the workload as much as possible, to avoid performance problems for online users as well as background jobs.
    I agree with Atish, this is something for Basis people. Ask them (hopefully that's not you to look at their application server settings. I know where I used to work before they had set up the system so only a certain part of the dialog processes could be occupied by background jobs. I am sure SAP has a lot of parameters that can be tweaked, possibly also with time-dependent settings?

  • Background Job cancellation-Alert config in Solman

    Team,
    We would like to send an alert to the distribution list or the user whenever a particular background job is getting cancelled.
    Could you please let me know the steps how it can be done in solution manager.
    Regds,
    Satyanarayana N

    Hello,
    I recommend to setup the Job Monitoring of Business Process Montoring from a Job Documentation. The alerts can either generate notifications (E-Mail, SMS) or workflow documents (messages in Support Desk).
    This is demonstrated in a RKT tutorial:
    http://service.sap.com/~sapidb/011000358700001911422008E.sim
    The process is also documented:
    http://help.sap.com/saphelp_smehp1/helpdata/en/8e/3ad6f807e147669036d2a6aed597aa/frameset.htm
    Please also visit our Service Markteplace representation: http://service.sap.com/jsm
    Kind regards,
    Martin

  • CCMS Background Job Monitoring Runtime Alert

    Our Basis team has configured CCMS and the Background Job Monitoring for long-running jobs.  They want to set up a "generic" entry (for example, * for job name) so that all jobs will be monitored for runtime longer than 1 hours (will be longer duration when moved to production).  This seems to be working correctly but the alert message does not give the name of the background job that triggered the alert. The altert text is "Alert Text:3821 Sec > 3600 Sec Current value over threshold value System:DEV ".   This message is coming from message class RT, number 001.   How do we get the job name included in the alter message?  I have looked at the messages available in message class RT but do not see one that includes a variable for job name.  We do not know where to look to see what data is actually available for the alert text message and what other message classes might be possible.

    Hi,
    This is possible and perhaps the link in the thread below should help:
    Simple question for CCMS Output format
    Regards,
    Srikishan

  • Reg : Background job

    Hi Guru's
    I am sending IDOC from R/3 System to APO System.when idoc reached APO system.its triggers immediately and creating one file in application server(APO).sometimes this process makes more than 10 to 15 hours so user dont know whether is executing or failed. so i gave one soltion to user that is creating background job while idoc is executing when its idoc is processed then the background job also shows that finished..i dont know how to write this background job code in IDOC function module and also i dont know its possible in IDOC. i dont have knowledge in IDOC..Please helpme on this issue.
    anybody helpme on this issue.????
    Regards
    P.Senthil Kumar

    Hi,
    You have not to write Back Ground Code in FM of IDOC.
    To Process Idoc in Back Ground do following Step
    Go to T-CODE We20
    Select Partner
    Double Click on any IDOC Message type in Outbound Parameter like INVOIC
    In Outbound Options Tab, at Output Mode select Collect Idoc Radio Button.
    For Inbound parameterDouble Click on any Message type.
    Select Trigger by BackGround Program Radio Button
    Please use T-code SM36 to schedule program which process Idoc.
    The Program used is,
    RSEOUT00 : For Processing 30 Status IDocs For outbound Idoc
    RBDAPP01 : For Processing 64 Status IDocs For Inbound Idocs
    T-code BD87
    To Refer more about IDOC,
    https://wiki.sdn.sap.com/wiki/display/ABAP/ALE%2CIDOC
    https://wiki.sdn.sap.com/wiki/display/ABAP/ALE+IDOCS
    Thanks & Regards,
    ShreeMohan
    Thanks & Regards,
    ShreeMohan

  • Reg Background Job Notifications

    Hi,
    I wanna add a user email id for background job failure notifications. How do I do that.
    Thanks
    NM

    Hi,
    You can create a Custom program, which will pick the Jobs which have failed and then send the information through EMAIL.
    Check the following link.
    http://jplamontre.free.fr/SAP/Send%20background%20job%20failure%20alerts%20by%20email.htm
    Also go through this link. It might be useful
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/97d2e8b3-0b01-0010-b787-b8ce558a51c2
    Regards,
    Aj
    Reward points if useful
    Message was edited by:
            Abhishek Jolly

Maybe you are looking for