Submit batch job daynamically using batch user id

Hi,
I need to submit the background job dynamically from ABAP program with BATCH user id.
I have created new program. Users will execute program in foreground.
Had issue with USER id. If I give my user id then batch job successfully creating. If I give u2018BAICHu2019 id then it is giving the error.
Am I doing any thing wrong here?
Code:
Open Job
  CALL FUNCTION 'JOB_OPEN'
    EXPORTING
      jobname  = jobname
    IMPORTING
      jobcount = w_jobcount.
    SUBMIT zrufilep WITH p_file1 = sourfile
                    WITH p_file2 = destfile
                    VIA JOB jobname NUMBER w_jobcount
                    USER 'BATCH_FI'
                    AND RETURN.
Schedule and close job.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount  = w_jobcount
          jobname   = jobname
          sdlstrtdt = sy-datum
          sdlstrttm = sy-uzeit.
Thanks

Can any body tell me if that authorization is given to the user, can he submit any other job from front end?
As you can see if he can, it will conflict security issues of business. So If he is not permitted to execute these kind of statements in any other program, would he be confined to using diff user in this program only?
Or is there any other way-out to confine the user for getting this authorization for a single T-code or such?

Similar Messages

  • Batch Jobs fail because User ID is either Locked or deleted from SAP System

    Business Users releases batch jobs under their user id.
    And when these User Ids are deleted or locked by system administrator, these batch jobs fail, due to either user being locked or deleted from the system.
    Is there any way that these batch jobs can be stopped from cancelling or any SAP standard report to check if there are any batch jobs running under specific user id.

    Ajay,
    What you can do is, if you want the jobs to be still running under the particular user's name (I know people crib about anything and everything), and not worry about the jobs failing when the user is locked out, you can still achieve this by creating a system (eg bkgrjobs) user and run the Steps in the jobs under that System User name. You can do this while defining the Step in SM37
    This way, the jobs will keep running under the Business User's name and will not fail if he/she is locked out. But make sure that the System User has the necessary authorizations or the job will fail. Sap_all should be fine, but it really again depends on your company.
    Kunal

  • How to find out batch job failure and taking action:

    Normally We will monitor the batch jobs  through transaction code sm37 for job monitoring. In SM37 we will give a batch job name date and time  as  input. In the first step we will check the batch job for the reason failure or check the spool request for the batch job for failures an help in analyzing the error
    I understand from the my experience is that the batch may fail due to below reasons.
    1.,Data issues :             ex: Invalid character in quantity (Meins) field  >>>> We will correct the corresponding document with correct value or we will manually run or request the team to rerun the batch job by excluding  the problematic documents from the batch job variant  so that it may process other documents.
    2.Configuration issues : Materials XXXX is not extended for Plant >>>> we will contact the material master team or business to correct the data or we will raise sub contract call with support team to correct he data. Once the data been corrected and will request the team to rerun the batch job.
    3.Performance issues : Volume of the data being processed  by the batch job ,network problems.>>>Normally these kind of issues we will encounter during the month end process as there will lot of accounting transactions or documents being posted business hence it may cause the batch job failure as there is enough memory to complete the program or select queries in the program will timeout because of volume of the records.
    4.Network issues. : Temporary connectivity issues in other partner systems :Outage in other partner systems like APO or other system like GTS  will cause the batch job failure as Batch job not in position to connect other system to get the inforamtion and proceed for further steps.Nornmally we will check RFC destination status by running a custom program  weather connectivity between system are in progress or not. then intimate other partner system  for the further actions, Once the partner system comes online then we will intimate the team to restart or manually submit batch job.
    Some times we will create a manual job by transaction code SM36.

    I'm not sure what the question is among all that but if you want to check on jobs that are viewable via SM37 and started via SM36. The tables are TBTCP -Background Job Step Overview and TBTCO - Job Status Overview Table.
    You can use the following FM to get job details:
    GET_JOB_RUNTIME_INFO - Reading Background Job Runtime Data

  • Batch job with 2 conditions

    Hi,
    We have a program that will create a batch job and then we need to go to SM35 to run that batch job manually. We want to avoid this manual step and what we want to do is to as soon as our program runs it will create a batch job and then batch job should kick off automatically.
    One of the solution that came to my mind is to schedule a batch job with two conditions:
    1. in first condition it will run our main program
    2. and in 2nd step it will look out for the batch job that created in SM35 and will kick off that, but I am not sure how can i do this using Sm36.
    I was also wondering if there is another way so that we can just avoid the batch run for the second step?
    So can you please help me with this.
    Thanks,
    Rajeev

    SM35 -> batch sessions, so I assume you are talking about these.
    You can start sessions under program control by submitting program RSBDCSUB after creation of the session.
    Thomas

  • Maintaining Constant Sender Address in the Email of Batch Job

    Hi,
    I have created a smartform whcih will be sent via Batch job at a partcular time .And everytime the Sender Id is "BATCH.JOB". 
    Actually the businesswants the sender address to be XYZ.com instead of BATCH.JOB
    Iam using the below FM to send email.
    Can anyone help in this issue.
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
         EXPORTING
              document_data              = l_doc_data_objl
             document_type              = 'RAW'
              put_in_outbox              = 'X'
         IMPORTING
              sent_to_all                = l_sent_all
         TABLES
              object_content             = l_contents
              receivers                  = l_receivers
         EXCEPTIONS
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
    Helpful answers will be rewarded.
    Regards
    Naveen

    Hi,
    Sorry for the delay. We can create a Outlook Inbox rule to achieve it. Please click Inbox > Rules > Manage Rules & Alerts > New Rule to create a rule with the following conditions and actions:
    Please change “people or public group” to [email protected] and edit a specific template by clicking “a specific template” in the action part.
    Hope it helps.
    Regards,
    Winnie Liang
    TechNet Community Support

  • Is there a way to access ABAP OO instances from a batch job report

    Hello,
    I am looking for a way to access ABAP OO instances from a batch job report. My circumstances are the following:
    I have got some ABAP OO coding that identifies other objects (class instances) that have to be processed (they have a DoIt method that does some calculation). As this processing is time consuming and performace relevant I have to parallelize this in batch jobs. This batch jobs however can only be "simple" ABAP reports according to SM36. The problem is now that I dont really know how to tell the batch job report what objects to process. Somehow I have to access theses instances from  that batch job report.
    Does anybody have an idea?
    Greetings
    Matthias

    Hi David,
    thanks a lot for your help. After a lot of searching on the net this seems to be the only way to cope with it. However I am not sure about the locking mechanisms and if its suitable for mass data processing. In the help page you suggested the following is stated which I do not fully understand::
    "The current lock logic does not enable you to set specific locks for the following requirements:
    ·        Many parallel read and write accesses
    ·        Frequent write accesses
    ·        Division into changeable and non-changeable areas
    Although the lock logic makes the first two points technically possible, they are not practical because most accesses would be rejected."
    Does this mean
    a) if I dont want to set "specific locks" for frequent write accessess I am fine
    or
    b) I am discouraged from use shared memory technics for frequent write accessess?
    In the latter case I will have a problem...
    What do you think?
    Greets
    Matthias

  • Bogus print from cycle count batch job

    Hi all,
    We are using cycle count process for certain materials.
    Two std batch jobs are used for this purpose.
    1. To create cycle count document in the system.
    2. To print created cycle count document.
    For last few days we are facing a strange problem. Cycle count print job is printing some documents which are not available in SAP Environment. (Tables IKPF and ISEG)
    Any pointers to solve the issue would be helpful.
    regards,
    Parshuram

    check the settings made for the print job.
    Use SM37 find your print job. Click the step button.
    What program do you use?
    put your cursor onto  the step line, then choose from menu GOTO > Variants.
    What selection criteria are used in the variant?

  • Batch Job Processing

    Hi,
    I have 2 selection screens.i have entered the data in 1st screen and press 'F8',now i wil be getting 2nd screen.In this i have to select the check boxes.once i checked this check boxes that could be saved automatically.
    Can any one please suggest me how to get this.  I have to go for a batch job for this.
    thanks
    BAlu

    To set up a batch job for delivery creation use SM36 T-code.
    Input batch job name say - ZSD_CREATE_DELY_SALES_ORG
    Select class = C or B.
    Set up by / created by = BATCHADMIN or your id
    Program Name = WS_DELIVERY_UPDATE
    Varient = (as per your requirement - say for a particular sales area and plant)
    Click on "Check" icon and "Save".
    Go to the main page, select icon "Schedule a Batch job".
    Give detils like daily, weekly or periodic or Immediate.
    Enter date and time accordingly. Save it.
    Same thing applies for Invoice creation batch job.
    Use program name:RSBDCSUB
    All other steps remain the same.
    Hope this will help you out !
    Regards,
    Rajesh Banka
    Reward suitable Points

  • How to start a batch job through a web service call

    I have a batch job created Data Services that I would like to be able to start through a web service call.
    I have exposed the batch job as a Web Service through the mangement console.
    The Integrators guide is not the clearest piece of documentation that I have ever read so I'm now having a little trouble.
    In C# I'm issuing the following statements:
                DataServices.Batch_JobsClient batchClient = new DataServices.Batch_JobsClient();
                batchClient.Open();
                DataServices.Testjob_Match_GlobalVariables myVar = new DataServices.Testjob_Match_GlobalVariables();
                myVar.ptd_FilePath = "D:
    Jobs
    Test";
                batchClient.Testjob_Match(myVar);
    That all executes without error -- but the job is not started. Obviously I'm missing a step here but I can not figure out what is needed to acutally start the job execution from the Integrators Guide.
    Any help would be appricated.

    first test invoking the batch job webservice using SoapUI
    does your client application logs the SOAP message that is sent to DS WebServer ?
    Check the %LINK_DIR%\lg\webservices.log if there is any errors logged in it ?

  • Batch job invoke Sharepoint web service

    Hi all,
    Can BODS job invoke a SharePoint web service which accepts two parameters?
    The first parameter is a string and the second one is an XML.
    Any inputs will be greatly helpful.
    Thanks and Regards,
    Prateek

    first test invoking the batch job webservice using SoapUI
    does your client application logs the SOAP message that is sent to DS WebServer ?
    Check the %LINK_DIR%\lg\webservices.log if there is any errors logged in it ?

  • How to schedule azure batch jobs?

    Hi.
    I created an azure batch job app using Azure Batch .net client, following the instructions on http://azure.microsoft.com/en-us/documentation/articles/batch-dotnet-get-started/.
    All the concepts are not very clear to me yet, and it lacks a complete documentation (I understand it is still new/under development).
    Where do I upload the azure batch program?
    How do I schedule it?

    Hi
    If I understand correctly you want to try to only use Batch to run both the web crawling jobs and tasks as well as the client code that creates the jobs and tasks.
    I'm pretty sure you can do what you want using Batch.  I'll give you the high-level concepts here and some documentation pointers, then hopefully you can find the low-level info in the docs.
    To host the client code you should use a Job Manager which is specified when creating a Work Item.  The Job Manager is a special task that is run first when a job is created.
    To have a job created and run every two hours you need to specify a schedule with the Work Item. A recurrence interval can be specified so a job is created every 2 hours.
    To only create the VM's when needed then you should specify an Auto-Pool when creating your Work Item.  You will need at least two VM's - one to run the Job Manager task and at least one to run the crawler tasks.  Pool lifetime configuration can
    be specified so that the pool lifetime is tied to each job that is created every 2 hours - the pool is created when the job is created and the pool is deleted when the job completes.
    You'll find these concepts described in the REST API reference for Add Workitem -
    http://msdn.microsoft.com/en-us/library/azure/dn820179.aspx
    Assuming you're using the C# client API, you'll need some client code to bootstrap and create the Workitem, and will need to find the corresponding C# API's in that documentation -
    http://msdn.microsoft.com/en-us/library/azure/dn865466.aspx
    Hope that helps.
    Regards, Mark

  • Shedule a Batch job to run every one min

    Hello all,
    I'm new to data services . My requirement is to shedule a batch job to run every minute .
    Please help me on this.
    Thanks,
    David king J

    Hi David,
    Regarding your query below is the suggestion from my side:
    Option I: Schedule the Job from Data Services Management Console below is the steps.
    (a) Log in in SAP Business Objects Data Services Management console
    Link:<Server Name>:<Port Number>/DataServices
    (b) Go to Administrator Tab and click on Batch Job
    (c) Select Batch Job and in right hand side click on Add schedule
    Where you have Option to schedule as per your requirement
    Note : You can use Data Services scheduler Or BOE scheduler.
    Option II: Schedule the Job from UNIX environment below is the steps.
    (a) Cron Tab Access rights required
    for checking cron tab rights use below command
    crontab -l  ---> List of schedule Jobs
    crontab -e  ---> for editing or creating new schedule
    (b)Log in in SAP Business Objects Data Services Management console
    Link:<Server Name>:<Port Number>/DataServices
    (c) Go to Administrator Tab and click on Batch Job
    (d) Select Batch Job and in right hand side click on Export execution command
    (e) Update the details regarding JOb Server, Global Variable if used in the Job and click on export;Now check the "SHELL Schript" .SH file mentioned in Data Services management console link
    (f) Copy and Paste the Script in your desired location
    (g) Then create SHELL script, below is sample example
    Test:
    1 * * * * /usr/sap/BODS/BO_Script/ABC.SH
    For cronjobs details please refer below link
    Run crontab (cron jobs) Every 10 Minutes
    Note: As Michael suggested that option is also good, you can also implement the same.
    Hope this will help!!!!!
    Thanks,
    Daya

  • Batch job run-

    Hi gurus,
    How to schedule and run a batch job run using SM36 and SM37?
    In MM area what are the transacions/programs are they used most?
    Regards,
    Deepak.

    hi,
    You can create any of the new program as per your requirement, but only you have to provide the technical ABAP name of the program while making the settings at SM36...
    Also please go through the SDN thread..Re: Scheduling Batch Job
    Regards
    Priyanka.P

  • Printing to the wrong Printer from the Batch Job

    Hi,
    Morning every one!
    I am facing a problem with Print which is coming from Batch Job. The Batch job contains 10 steps. Previously all steps out put has configured to one printer. Recently I changed one step out put to the another printer with the request. But the print is going to the old printer still.
    When I am checking at the batch job -> Steps -> Specific step ->Print Specifications -> Output Device .. able to see New Printer.
    But batch job -> Steps-> Select Specific step -> Spool -> Doble click .. There spool is going to the old printer. I am facing this problem for only one step.
    The issue is dragging from past one week.. I tried couple of options..No luck
    I appreciate any inputs/Solution for this.
    Env:  ECC5.0/Solaris/Oracle
    Thanks,
    Sri.

    I got the solution finally from ABAP team. The printer is maintained in the Condition records of the Variant for the particular step. Even though I assigned the printer in Batch job..It is taking the printer from Condition record.
    Thanks,
    Sri.

  • Running Customized Batch Jobs

    We currently have batch jobs that are running hourly.  Theste jobs processes IDOCs that are in the queue.  Sometimes the job runs for more than an hour causing a concurrrent session to be running at the same time which cause issues. 
    I was wondering if there was a way to set up the job so it will postpone the job if there is a current job running already.
    I know of other external applications like Autosys or Tidal that can do it but I was wondering if there is anything in SAP.
    Thanks for the help in advance

    The reason why we need to do this is because we don't want the job running at the same time trying to process the same IDOCs which may cause inconsistencies.  So we were wondering if there was an option some where that will:
    -run a batch job hourly,
    -if batch job is still running, hold the next batch job and run during the next available hour.
    -and have this run periodically.
    Another reason is we only have 8 background processes - "limited resources". if multiple instances of same job start every hour due to large number of IDOCs, other jobs will have to wait.
    your replies are much appreciated.
    Thanks

Maybe you are looking for

  • Invalid objects in APEX Schemas after import.

    Hi, After importing the APEX_040100 user in the database I got several invalid objects that are causing APEX not to work. I gave up to compile them. After using all kind of tricks such as compile one schema at a time or compile all of them using the

  • EPM 11.1.2.0 Re install

    Hi, I had a EPM 11.1.2.0 instance running which stopped working when i tried to uninstall web analysis component. After this I was not able to uninstall this installation completely, so I tried manually cleaning the registry and re installed a fresh

  • How to get a Printer Claim. Code for OfficeJet 8500a 909g AIO series.

    I tried following the instructions by attempting to use Option 2, BUT there is NO WEb Services option in the SETUP menu. How do I go about getting the Claim Code OR get the Web. Service Information that has the information that I need to register my

  • Where has the TextEdit search bar gone?

    I have just loaded Yosemite. When I open a TextEdit document the search bar no longer appears in the top right hand corner of the window. Is there a setting to get it back?

  • Two Problems in CS5

    Just Installed CS5 and there are two things Photoshop now does that it didn't do before and I find it very annoying. 1- It used to be that if I hit the delete key my selection would disappear, replaced by the background color.  Now I get the dialogue