Setting up a job

1) Can I run RWRUN60.EXE(oracle reports) from within PL/SQL to generate a PDF file? I would like to run the bat file below from PL/SQL - The report server and the oracle DB are on different machines.
---run.bat end-----
RWRUN60.EXE REPORT=SummaryReport.RDF P_Parameter1=123
USERID=report_user/[email protected] server=Rep60_XYZ BATCH=YES
DESFORMAT=PDF DESTYPE=FILE DESNAME=123.PDF
---run.bat end-----
Can we schedule to run reports from the report server as a job, with the output being saved to a PDF file.
Oracle reports version: 6i
Oracle DB version: 9.2.0.4
Thank you

Hi,
Reports Builder Help has more detailed info. Let me quote completely from there since it answers your specific Q's:
About the Reports Builder built-in package (SRW)
Reports Builder is shipped with a built-in package (SRW), a collection of PL/SQL constructs that include many functions, procedures, and exceptions you can reference in any of your libraries or reports.
The PL/SQL provided by the SRW package enables you to perform such actions as change the formatting of fields, run reports from within other reports, create customized messages to display in the event of report error, and execute SQL statements.
You can reference the contents of the SRW package from any of your libraries or reports without having to attach it. However, you cannot reference its contents from within another product, e.g., from SQL*Plus. Constructs found in a package are commonly referred to as "packaged"; i.e., packaged functions, packaged procedures, and packaged exceptions.
SRW.RUN_REPORT built-in procedure
This procedure invokes rwrun with the string that you specify. Syntax SRW.RUN_REPORT (command_line CHAR);
ParametersDescriptioncommand_lineIs a valid rwrun command. 
Example
Suppose you have the following two reports: MGR_RUN, which queries manager names, and invokes a second report named MAIL_IT.MAIL_IT, which queries employee names for the manager that MGR_RUN passes it, and sends the report output to the manager via e-mail. The description of MGR_RUN could be as follows:
Query:
SELECT ENAME, EMPNO FROM EMP WHERE JOB='MANAGER'
Group Filter:
FUNCTION FOO RETURN BOOLEAN IS BEGIN
SRW.RUN_REPORT('report=MAIL_IT
desname='||:ename ||' desformat=dflt batch=yes
mgr_no='|| TO_CHAR(:empno) );
RETURN (TRUE);
EXCEPTION
when SRW.RUN_REPORT_FAILURE then
SRW.MESSAGE(30, 'Error mailing reports.');
raise SRW.PROGRAM_ABORT;
END;
This PL/SQL invokes MAIL_IT, specifies that MAIL_IT's output should be sent to the manager via e-mail, and passes the manager number, so that the MAIL_IT report can query only the manager's employees. Note: EMPNO's values must be converted to characters (TO_CHAR in the PL/SQL above), because SRW.RUN_REPORT requires a character string. Layout: None is needed, because this report only fetches data, then passes it to a second report. The description of MAIL_IT could be as follows: Query: SELECT DEPTNO, ENAME, SAL FROM EMP WHERE MGR=:MGR_NO
Layout: Master/Detail Suppose that you have three reports that you almost always run together. The reports are named SALARY, COMMISS, and TAXES. To run these reports with one rwrun command, you create a driver report named PAYROLL. The description of PAYROLL could be as follows:
Query:
SELECT DEPTNO FROM DEPT
Before Report Trigger:
FUNCTION FOO RETURN BOOLEAN IS
BEGIN
SRW.RUN_REPORT('batch=yes report=SALARY
destype=file desformat=dflt desname=salary.lis')
SRW.RUN_REPORT('batch=yes report=COMMISS
destype=file desformat=dflt desname=comiss.lis');
SRW.RUN_REPORT('batch=yes report=TAXES
destype=file desformat=dflt desname=comiss.lis');
RETURN (TRUE);
END;
Layout:
Tabular
When you run PAYROLL from the designer or rwrun, the other three reports will all be run. (Note that, in this case, the query and the layout for Payroll could be anything. They are only used here in order to make it possible to run PAYROLL.)
Navneet.

Similar Messages

  • Can I set up a job that kills multiple jobs?

    So, I've got some jobs that access a remote DB, and the link is not terribly reliable. When it hiccups, if a job is running, it hangs forever. Using this forum, I was able to set up a job that is triggered when a job goes over max duration, and it simply kills and restarts the job, it works great for the one job that typically runs long enough to get hit on a daily basis. This morning, I noticed one of the other jobs hung. So, I realize I can easily set up another kill job that gets fired off when this other job hangs, but what I'd really like to do is have one master kill job that can be used to kill any of several jobs so I don't have to have a kill job for each job that might get hung.
    Is there a way to reference, in the PL/SQL block, any of the "tab" fields used in the condition block? I'd like to check tab.user_data.object_name in the PL/SQL block and kill/restart the appropriate job. So, my condition would be a generic event_type of JOB_OVER_MAX_DUR and would fire for any job meeting that condition. Possible? Feasible? Dangerous?

    Thanks for the reply, Tom.
    I am using version 10.2.0.4.
    Point of clarification: I don't want to kill multiple jobs on one execution. I just want to write one job that can handle killing any one of the several jobs that I'm having issues with. So, for example, I have jobs A, B, and C. I want one snipe job that is generically called when anything raises a job_over_max_duration event, and it would figure out which job (A,B, or C) that is stuck and kill it.
    From your reply, it sounds like I could do this in 11g, but probably not in 10g?
    Thanks again!
    ---dale

  • Setting Back ground job

    Hi Friends,
    I wnat to set the background job with following conditions:
    Monday to Friday
    From 9AM to 6 PM
    To run on every half an hour.
    Can any one guide for the same.
    Regards,
    Sai Krishna

    Hi Friends,
    In our Organization PR is created by user dept. & PR release is completed accordingly. In this process Purchase dept. is not in the release strategy. Now PR is completly released & while converting to make PR to PO, purchase dept. found there is some problem in PR. Is there any way Purchase dept. can reject PR & send to user dept. for correcting it.
    One method is to have Purchase dept. also in release strategy loop. We are having nearly 400 release strategies. To change all these will take much time. Is there any other way.
    Thanks & Regards
    Sai Krishna

  • HT1937 I've set a factory job and now I can not remember my mail and I could not activate the phone ..alrjae help me re- activate the phone and this zip to communicate with me *****

    I've set a factory job and now I can not remember my mail and I could not activate the phone ..alrjae help me re- activate the phone and this zip to communicate with me ******
    <Email Edited by Host>

    Contact that someone else to have them delete their account.
    The previous owner needs to do this:
    Prepare your device to sell or give away
    There is no workaround for Activation Lock.
    iCloud: Find My iPhone Activation Lock in iOS 7 & later
    http://support.apple.com/kb/HT5818?viewlocale=en_US&locale=en_US
    http://support.apple.com/kb/TS4515

  • Sinple Set Up run job question

    Hi bw expert please help me asap, I have run the set up job by oli9bw for billing with out any number range, but then i realized that it will take the long time, so i run a parallel set up job with number range. please help me now how to delete or end the old set up job that has no number range
    thanks
    soniya

    lbwg  - to delete set up tables (as 2 jobs will be responsible to have duplicate enrties in set-up tables)
    If u want to stop job...
    SM37> check for jobs having ur onwership > click on the set-up table job will start with R*** > there will be "STOP" sign at the tool bar click on it
    Hope this helps...
    But even stopping the job will have duplicate entries in set-up table as it must have feteched some entries by now.
    Hope this helps.
    monica

  • Procedure for setting a background job

    Hi Experts,
    Please give me the step by step procedure in setting a background job.
    Thanks,
    Kavin

    Hi,
    Specifying ABAP Program to Run in Background
    ABAP program or external program can be specified to be run in the background. More than one program can be executed with a single background job. To do it you should add a job step for each program.
    Let us first discuss the procedure for creating an ABAP report.
    The Users field will, by default, display your name, indicating that the user (you) is authorized to run this program.
    In case there is another user authorized for scheduling the job, then the default name is changed and system displays the name of the other user.
    Now choose ABAP and enter the name of the report.
    Choose variant from the Variant list. Specify the language you want the report to be in.
    With Print specifications, you can specify whether you want the report output to be held in the SAP spool system or have it printed as soon as the job has run.
    For external command, by default, the job step will run under your SAP System authorizations. So your name will appear in the User field.
    But if the program is running under the authorization of another user, you can change this default option by entering another user name.
    Then choose External command and enter the predefined SAP name. If required, enter any additional arguments required for the command.
    The host system on which the command should run and the type of operating system at the host should be specified. You can determine the host name using the host name command on the target host system.
    You can also specify how the output from the external program should be treated, as well as other runtime options by using Control flags. It is advisable to use default settings for these options. If you are authorized for background processing, you can also choose External programs as a job step option.
    To run an external program, enter the exact path, program or script name, arguments required by the program, and the name of the host system on which the program is to run. After this, save the job step and return to the job identification screen.
    Note that in the SAP system the ABAP programs are not predefined; therefore, the system does not perform an authorization check. Hence, the system does not bother to check whether you are allowed to use the command.
    For detailed information on Background Job, Check the following link and help.sap.com,
    http://aspalliance.com/1129_Background_Processing_SAP_R3_System
    Hope this helps you.
    Regards,
    Vinodh

  • Alert set through timer job is not working in sharepoint 2010 as expected

    Hi,
    I create the standard sharepoint alerts through timer job.
    in my timer job, i loop through a list and based on the user value in the alert to field i create alert for the users and the condition for the alert are only when new items are created and something changes in the below view.
    all the properties are set fine. Email triggered on new items additions and on specific daily or weekly summary.
    The view filteration is not working at all:(
    But after the timer job ran and set the alert, if i open the alert settings on UI and without changing anything if i click ok , then the view filteration is happening and alerts are working fine.
    What is wrong here? is it a bug or anything am missing?
    Aruna
    try
    SPList Configlist = web.Lists.TryGetList("Configuration");
    foreach (SPListItem oItem in Configlist.Items)
    ProfilePicker = oItem["ProfilePicker"].ToString();
    ProfileViewer = oItem["ProfileViewer"].ToString();
    string MIS = oItem["MIS"].ToString();
    SPList list = web.Lists.TryGetList(ProfileViewer);
    SPList ProfileList = web.Lists[ProfilePicker];
    foreach (SPListItem oItem in ProfileList.Items)
    frequency = oItem["Frequenzy"].ToString();
    created = (DateTime)oItem["Created"];
    string createdDate = created.ToString();
    createdDate = DateTime.Parse(createdDate).ToShortDateString();
    DateTime today = DateTime.Today.Date;
    string dateonly = today.ToString(); ;
    dateonly = DateTime.Parse(dateonly).ToShortDateString();
    SPFieldUserValue fieldValue = null;
    SPFieldUser UserColumn = (SPFieldUser)oItem.Fields.GetField("Alert_x0020_owner");
    fieldValue = UserColumn.GetFieldValue(oItem["Alert_x0020_owner"].ToString()) as SPFieldUserValue;
    if (fieldValue != null)
    alertowner = fieldValue.User;
    alert = alertowner.ToString();
    //if (createdDate == dateonly)
    SPUser user = web.EnsureUser(alert);
    SPAlert newAlert = user.Alerts.Add();
    newAlert.AlertType = SPAlertType.List;
    newAlert.List = list;
    newAlert.DeliveryChannels = SPAlertDeliveryChannels.Email;
    newAlert.EventType = SPEventType.Add;
    if (frequency == "Daily")
    createDailyAlert(newAlert, list, user);
    else
    createWeeklyAlert(newAlert, list, user);
    catch (Exception ex)
    // Danfoss.Sharepoint.Logger.DanfossLogger.LogToOperations(ex, "Exception occurred in setting the profile alert", 0, EventSeverity.Error, DanfossExceptionCategory.General);
    private static void createDailyAlert(SPAlert newAlert, SPList list, SPUser user)
    newAlert.Title = "My Daily Profile viewer Alert";
    newAlert.AlertFrequency = SPAlertFrequency.Daily;
    newAlert.AlertTemplate = list.AlertTemplate;
    newAlert.AlertTime = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 10, 0, 0);
    newAlert.AlertTime = newAlert.AlertTime.AddDays(0);
    SPAlert existingAlert = null;
    newAlert.Properties.Add("filterindex", "4");
    newAlert.Properties.Add("viewid", list.Views["Daily Alert"].ID.ToString("D"));
    newAlert.Properties.Add("filterpath", string.Format("{0}/", list.Views["Daily Alert"].ServerRelativeUrl.TrimStart('/')));
    foreach (SPAlert alerts in user.Alerts)
    string al = alerts.AlertFrequency.ToString();
    // Filter down the alert to the list you wish to report on.
    if (al == "Daily")
    // Found your existing your custom alert. Don't create one.
    existingAlert = alerts;
    if (existingAlert == null)
    newAlert.Update(false);
    private static void createWeeklyAlert(SPAlert newAlert, SPList list, SPUser user)
    newAlert.Title = "My weekly profile viewer Alert";
    newAlert.AlertFrequency = SPAlertFrequency.Weekly;
    newAlert.AlertTemplate = list.AlertTemplate;
    newAlert.AlertTime = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 10, 0, 0);
    newAlert.AlertTime = newAlert.AlertTime.AddDays(0);
    SPAlert existingAlert = null;
    newAlert.Properties.Add("filterindex", "4");
    newAlert.Properties.Add("viewid", list.Views["Weekly Alert"].ID.ToString("D"));
    newAlert.Properties.Add("filterpath", string.Format("{0}/", list.Views["Weekly Alert"].ServerRelativeUrl.TrimStart('/')));
    foreach (SPAlert alerts in user.Alerts)
    string al = alerts.AlertFrequency.ToString();
    // Filter down the alert to the list you wish to report on.
    if (al == "Weekly")
    // Found your existing your custom alert. Don't create one.
    existingAlert = alerts;
    if (existingAlert == null)
    newAlert.Update(false);
    This is my code. alerts are not sending based on the view:(

    Hi sathyaav,
    I followed the example and made a test in my environment, it works like a charm.
    I suggest you check if you have inputed the valid site URL when you create the project solution.
    If you deployed succeed in the Central Administrator Site using Visual Studio, then the job named "Simple Job Definition" will appear in the job definition list.
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Zhengyu Guo
    TechNet Community Support

  • How to set Back ground job & get my desired output layout in sm36 & sm37 ?

    Hai SAP ABAP/BASIS Gurus,
    I am currently taking ME2N PO Pending value Report by setting variant in input screen & setting my own output layout  ie only four field ie.Plant, Material,Currency,Still to be delivered value will be visible in output screen
    I set Back ground in sm36 using my variant & i saw my output in sm37.. But I cant get output as my desired field..
    This is my problem..
    1) I Cant Get the Same output in shedule job [sm36 & sm37] like When i run in foreground for ME2n.
        I am using ALV Scope of list..
    2) If I use BEST Layout in Scope of list means i get the desired Output field layout as same as my foreground output field..
    I want to get the output layout as desired & also in ALV format[ Useful for excel work]
    Kindly guide me.
    Thanks in advance..
    swetha
    Edited by: Swetha SAP Girl on Jul 2, 2009 5:06 PM

    Hi Swetha,
    To get the missed fields in the spool, while creating the background job(execute in background option) you can see the printer setting block at the end of the background job settings window, in that check the 'Spool Request Max. Width 255 char' check box and then continue. It will generate the spool list with maximum width and you can see all the fields in the spool output.
    Thanks,
    Muthu
    Edited by: Muthu Prabakaran Selvam on Jul 3, 2009 2:35 PM

  • Setting up a Job/Announcement Extension

    Greetings,
    I have been asked to provide a "job line," for lack of a better term, that outside callers would be able to dial into and hear an announcement on the jobs that our company has available. The stipulations are that I need to be able to have the human resources individual in charge of new hires to be able to record an announcement whenever she needs to. Also, she doesn't want callers to be able to leave a message, just once the announcements are read, give the caller the option to disconnect or listen to the announcements again. No information gathering or any voice responses are required.
    My first solution was to simply set up a voice mailbox for this, but then I got to thinking that maybe a custom call handler might be better suited. Just looking for some suggestions, as I'm trying to make this as simple as possible. We are currently running CCM 4.2(3) and Unity 4.2(1).
    Thanks.

    You can setup a voicemail mailbox or CallHandler.
    Either way, you need to a CTI built in CCM. When you build a CTI, you will need to put a line or DN on the CTI Device. Check mark the box to forward to voicemail.
    Once Unity answers, you can use a voicemail box or CallHandler. In either scenario, you can turn off "take message". HR will be able log into the voicemail box to update the message whenever they want, etc. If it's a CallHandler, you will need to add access to login into the CallHandler with Greetings Administrator access.
    Hope this helps.

  • Environment setting for cron job

    What are necessary oracle varaibles to run a oracle job from crontab.
    does any one has some example. I can run er export job from the command line but when i scheduled that from crontab, it did not run. I need to set environment for that but my knowledge in unix is close to zero. ur help will be hughly appreciated. Thanks

    Basically following 3 variable needed to run cron job
    ORACLE_SID=<SID>
    ORACLE_HOME=<ORACLE_HOME>
    PATH=$ORACLE_HOME/bin;$PATH
    - Virag

  • Rule set import - Background job did not run

    Hi,
    I am setting up my CC 5.2 production system. I have downloaded from ruleset from the dev CC and imported it into production. However the background job generated did not run. I am implementing SAP note 999785 to fix this, but am wondering what should I do about the rule set? Do I need to delete the rule set and reimport it? As this background job did not run I notice that the permission rules did not generate.
    Any advice is welcome.
    Thanks

    Hi,
    as the backgorund job never ran and no rules were created, I can just reimport the ruleset and let the job run. I have tried this and the rules were created successfully

  • Set Notification for Jobs

    Hi there,
    I am using 10.2 grid control (OS: Solaris 5.9 Sparc (64 bit)).We have some jobs scheduled in some of target database.These are the jobs that not set through Grid control.It is directly configured in target databases through dbms_scheduler package.I can view these job status in Grid by login onto the database target.I want to get the notification for these jobs through email.
    How to set up the notification method for these kind of jobs?
    Please give me some ideas.
    Thanks in advance,
    Rajesh

    If you "can view these job status in Grid by login onto the database target", you can be able to Create a new Notification Rule for the Job ..Could you please tell me the steps for that.
    If I go to Target-> Databases -> Administration -> Jobs , then i can view all the jobs which is created in that specific database.I just want to set up a notification rule for this job , in the grid whenever it fails.
    I tried to go to Preferences -> Notification-Rules-> Create .But, I am not able to see the list of any jobs(above mentioned jobs which are created directly in database).. What shall I do for this.
    Any tips would be appreciated.
    Thanks,
    Rajesh

  • Setting up Background job

    Hello Guys,
    I gone thru the forum and tried to set up the background job for an requirement but could not able to proceed further as I was not sure how to move on..
    Requirement
    We would like setup to call our PM's automatically when they are due or at least 3 days before.This would save time to plan well in advance.
    In this case where should I mention the 3 day period ? I just started getting into SM36 and clikc the start condition and set the time to run and then flagged the periodic job and clicked the periodic values as daily and save it. Then I hit steps button and maintain ristra20 as prog name and keep the variant as blank and save it .(Is variant is neccessary ?) Then I get into sm37 where I could see some * on job name .I dont know how to proceed from here and wht would be the job name and other steps Also I tested job wizard and not sure what is the purpose of this ?
    Could anyone walk me through for the above mentioned requirement
    Mahee

    Mahee,
      Creating the work order ahead of the actual due date is actually accomplished by the "call Horizon" parameter on the Maintenance Plan. A 100% Value on this field indicates that the Call object be created on the date its due. Please enter a appropriate value here based on the plan to get the order created 3 days ahead.
    You actually schedule the PM in background using IP30 transaction.First create and save a variant for the plan that you would liek to schedule.Then call up the variant In here enter the plan details and then choose Program > execute in background.Enter a valid SAP printer and then choose "DATE AND TIME" push button to enter the start date and time of the job.After this, Choose the "Periodic job" check box and then choose "period values" at the bottom of the screen to indicate the frequency at which you would like to run the program and then choose the "SAVE" button.
    This should complete teh job creation for you.
    Regards
    Narasimhan

  • Billing Set up - Parallel jobs and size of set up table

    Hello All,
    I want to do a billing (13) set up using comp code, sales org and document number range as selection criteria.
    Would it be okay to to run jobs in parallel. I will be setting up jobs for different variants containing different document ranges. Would there be a conflict in running parallel jobs if they belong to same company codes/ sales org?
    Q.2 Is there a limit to which we can fill up the set up table and will need to empty it after transferring the data into BI?
    Thanks!
    Edited by: BI Quest on Oct 7, 2009 6:22 PM

    You can run multiple concurrent setup jobs without an issue. I'd recommend that you only execute 4 concurrently, however, unless you have a huge amount of memory on your source R3/ECC server(s). If you're using the Billing Document as part of the selection criteria, there shouldn't be a conflict. In fact, if you're using Billing Document as the selection criteria for your multiple setups, the Company Code and Sales Org designations really aren't necessary, unless the Billing Document numbering in your source R3/ECC environment has been configured to number based on Company Code and/or Sales Org, whereby you could have duplicate Billing Document numbers and the way to distinguish between them is to further qualify by Company Code and/or Sales Org.

  • Set a batch job for LP21 transaction

    How to set up a batch job for LP21 transaction.

    first you call LP21.
    enter your selection criteria
    click save button
    give name and a description for the variant and save.
    leave LP21
    call SM36
    enter a job name e.g. "MY Replenishment run"
    click start conditons button
    click date/time button
    enter a date and a time when the job shall run
    click button for periodic value
    click daily
    click save
    click save
    now your back at define job
    click step button
    enter a user  that has the rights to run this job (maybe your own user id, maybe a functional user id)
    enter the ABAP name e.g. RLLNACH1
    enter the variant name of the variant you created earlier in LP21 (you can use F4 to find it)
    enter language
    SAVE
    now you are in the step list overview.
    you can leave this screen
    back on the job definition  just click the SAVE button
    thats all

  • Set a dbms job which will flush the shared pool on box everyday 12.00am on

    Hello ,
    i want to set dbms job to flush shared pool everyday at 12.00 am on windows box.
    so can you please provide me script for that or idea on that.
    also i want to know where i have to set that job on sys or system or in user account.
    Thanks

    Receiving the 404 on box. Since the Oracle 404 error is
    ORA-00404: Convert file not found: "string"
    Cause: The file used for converting the database from V7 to V8 could not be found.
    Action: Verify that the migration process has been started on this database and that the convert filename is accessable.
    I'm going to go out on a limb and assume that you're talking about the HTTP 404 (Not Found) error. If that's the case, that would seem to be an issue with your web server/ web application and not with the database. Why do you believe that the database has any involvement with the error you're getting or that flushing the shared pool will resolve the error?
    Justin

Maybe you are looking for

  • JBO-25002: Definition of type ApplicationModule not found

    Hello Gurus, I am getting this Error for a LOV page, oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition company.oracle.apps.xxscp.lov.server.BufferStockLovAM of type ApplicationModule not found after deploying to

  • HTML Emails With Logos

    Post Author: deanrhurst CA Forum: General Hi I am trying to send emails created in Crystal that contain graphics (Company Logo) The emails send ok but the image is not there. Does anyone know how this can be done. Thanks DEAN

  • Having problems opening Yahoo Mail Beta

    When I log into Yahoo Mail Beta I can't open my Mail. I can't open new mail or folders and I can't compose a new Email. I also can't get Yahoo Help......while I am using Firefox. If I log into Yahoo Mail Beta using Internet Explorer it works perfectl

  • Project Revenue as in Project Currency

    Hi , Can we generate the revenue in the project Currency irrespective of Project Functional Currency ? In Project Billing Manual -- It has been mentioned that If you select Project Functional Currency and Invoice Transaction currency as Revenue Trans

  • I had my computer cleaned. Now I can't Sync my apple itunes shuffle. What do I do?

    How do I Sync my ipad shuffle, after my computer was cleaned?