How to create a Background Job?

Hi All,
A ABAP List report is taking too long to run. It takes nearly 5 mints sometimes it is halted by a timeout. I would like to run this report as a background job. What's the transaction I should use & could U give me the steps. Also is it possible to schedule the Job to run on 1st of every month.
Thanks,
Kishan

1.programatically ( job_open , job_close)
2.thorugh sm36 ( defining a job & scheduling)
doing something programmatically certainly has an advantage of automation... there may be cases wherein depending on certain conditions u need to run different programs in the background.. so this can be incorporated in the program itself using if/else or other condition commands..
there may be numerous other differences too.
SM36 option is more of static one and programmitaclly is more on the fly scheduling a job.
Using SM36, it not a one time thing. If you want program to run at a specific frequency, say every 24 hrs, that also can be done.
1)data: sdate type sy-datum,
stime type sy-uzeit,
l_valid,
ls_params like pri_params,
l_jobcount like tbtcjob-jobcount,
l_jobname like tbtcjob-jobname.
start-of-selection.
Get Print Parameters
call function 'GET_PRINT_PARAMETERS'
exporting
no_dialog = 'X'
importing
valid = l_valid
out_parameters = ls_params.
Open Job
l_jobname = 'ZRICH_0005'.
call function 'JOB_OPEN'
exporting
jobname = l_jobname
importing
jobcount = l_jobcount.
Submit report to job
submit zrich_0005
via job l_jobname
number l_jobcount
to sap-spool without spool dynpro
spool parameters ls_params
and return.
Kick job off 30 seconds from now.
sdate = sy-datum.
stime = sy-uzeit + 30.
Schedule and close job.
call function 'JOB_CLOSE'
exporting
jobcount = l_jobcount
jobname = l_jobname
sdlstrtdt = sdate
2)Use transaction SM36.
http://help.sap.com/saphelp_bw30b/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
sdlstrttm = stime
strtimmed = 'X'
Please use T/code SM36> enter your Job name Starts with Z or Y Ex: ZTEST> STEP>ABAP Program> Define your Report /Variant--> Save.
Start condition--> Press Date and Time > Enter your start date and time> Save
Then Use SM37--To execute ur job
Lanka

Similar Messages

  • How to create a background job without a variant ?

    How to create a background job without a variant ?

    Hi,
    Go to se38.. specify the program name and execute Or use Tcode
    On the selection screen specify the variant...
    Then from the menu options choose program->excute in background...
    In this way we can crate a backgroup job with out crateing any varinat for the report...
    Satya.

  • How to create a background job for call transaction

    hi gurus
    can any one suggest me
    how to create the background job for call transaction.
    thank you
    regards
    kals.

    Hi,
       Refer
    https://forums.sdn.sap.com/click.jspa?searchID=10926107&messageID=889652
    Regards
    Kiran Sure

  • How to Create event, background Job & Assing event to backgroud job to trig

    Hi Experts,
    I want to trigger events in Backgroud for data scheduling purpose to automate.
    I can able to create event in SM62. then i want to create background job in SM36 then how to assign to event in Background to trigger.
    can anybody give some suggestion on this.
    Best Regards
    Siri

    Hi,
    There are two cases
    1) to raise an event after the completion of a job
    This can be done by using ABAP coding, trigger the event using a program by the 'RAISE' statement. The job can be scheduled to run in the background daily or weekly(or anything as per the requirements)
    2) to run a job after an event
    in the start condition of the job, give the event name which should trigger that job in the after event field.
    or if you want to run multiple jobs after one event completes, give that event in the start condition of all the jobs.. or model a process chain which will run this jobs..
    I hope this clrifies your doubt...
    Regards
    Shilpa

  • How to create a background job in CE and assign a Web Service to it?

    Hi,
    We have a specific requirement here.
    We have an application service which perform some updates based on timestamp etc, it will be exposed as a Web Service.
    The requirement here is that a background job should invoke this Web Service everyday at Midnight.
    But here I don't know how to implement this functionality in SAP CE 7.1.
    Please reply ASAP.
    Regards,
    Manish

    Hi Manish,
    Job Scheduler is available as part of the app server,
    Create a class and extend MDBJobImplementation override the method onJob in this method trigger your webservice.
    for more details please go through this document
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10fed553-0e01-0010-9bb8-ed55659e1236
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90a95132-8785-2b10-bda5-90d82a76431e
    Regards
    Ayyapparaj

  • How to create a background job to replicate the datasource from R3 to BW?

    Dear all
    I always got error msg when use the RSA1 to do the relicate from R3. Did anybody can tell me how to do it in background? Thank you!
    Jialin

    Try this:
    1) Go to tcode SE38 - ABAP Editor
    2) Enter ABAP program name RSDS_REPL_RESET
    3) Click on Execute
    4) In the Selection-Screen, enter the source system to replicate from, or * if you want to replicate from all source systems.
    5) If you just want to replicate BW 3.5 DataSource, enter ISFS as the Preferred Type. Or, if your preference is for BW 7.x DataSources, etner RSDS as the Preferred Type. If there is no preference, leave the field blank and it will replicate both types.
    6) Go to the menu option Program > Execute in Background

  • How to identify what are all the events are created in background jobs?

    Hi all,
    how to identify what are all the events are created for  background jobs. And what events gets triggered for a particular job.
    thanxs
    haritha

    Hi Haritha,
    JOB is a program which starts to a determined point of time and executes some standard programs in the system. JOBs can be planed to a determined point of time on the regular basis (every night, for example) or to some discret time moments. So, the JOB can be planed and then will be started automatically without the manual start.
    Realtime programs are understood in the most cases as actual program execution which is started by somebody to the actual moment of time.
    Typically per JOBs some special processes will be started that should be executed automatically and regularly: for example, IDOC application, some correction reports, statistic updates etc.
    Standard jobs are those background jobs that should be run regularly in a production SAP System These jobs are usually jobs that clean up parts of the system, such as by deleting old spool requests.
    Use
    As of Release 4.6C, the Job Definition transaction ( sm36 ) provides a list of important standard jobs, which you can schedule, monitor, and edit.
    Standard jobs are those background jobs that should be run regularly in a production SAP System. These jobs are usually jobs that clean up parts of the system, such as by deleting old spool requests.
    for more information you can go thru the following thread:
    http://help.sap.com/saphelp_nw70/helpdata/en/24/b884388b81ea55e10000009b38f842/frameset.htm
    About Events:
    Events have meaning only in the background processing system. You can use events only to start background jobs.
    Triggering an event notifies the background processing system that a named condition has been reached. The background processing system reacts by starting any jobs that were waiting for the event.
    Types of Events:
    There are two types of events:
    1.)System events are defined by SAP. These events are triggered automatically when such system changes as the activation of a new operation mode take place.
    2.)User events are events that you define yourself. You must trigger these events yourself from ABAP or from external programs. You could, for example, signal the arrival of external data to be read into the SAP system by using an external program to trigger a background processing event.The event scheduler processes an event if the event is defined in the system.
    For example, if a system (System 1) receives an event from another system (System 2), the event scheduler of System 1 processes the event only if it is defined in System 1. That event does not need to be defined in System 2 (the sending system).
    You define an event by assigning a name (EVENTID) to it. When defining an event, you do not define the event arguments.
    for more information you can go thru the following thread:
    http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e2a543b11d1898e0000e8322d00/frameset.htm
    When you schedule the process chain or infopackages the jobs associated with it run in the background mode. In case you want to create a job for a specific activity you can do so in SM36. You would be creating jobs that would get executed in any one of the options:
    1. Immediate
    2. Date & Time
    3. After event.
    4. After job.
    5. At Operation mode.
    In case you want to view the job logs go to sm37.
    Also Pls check DB02 for database performance and ST03 for workload .
    Analyse u will have an idea ,
    *pls assign points,if info is useful**
    Regards
    CSM reddy
    null

  • How to cancel the background job processing in ABAP programming?

    Hi,
    I have a requirement where i need to cancel the job depending on some constraint. My code is something like this:
    Select some data from the table.
    if sy-subrc = 0.
    Do nothing.
    Else
    Cancel the job
    call function 'BP_JOB_ABORT'
      exporting
       jobcount                         = number
        jobname                          = name
    EXCEPTIONS
       CHECKING_OF_JOB_HAS_FAILED       = 1
       JOB_ABORT_HAS_FAILED             = 2
       JOB_DOES_NOT_EXIST               = 3
       JOB_IS_NOT_ACTIVE                = 4
       NO_ABORT_PRIVILEGE_GIVEN         = 5
       OTHERS                           = 6
    The above code is cancelling the job but it is throwing an exception called CX_SY_DYN_CALL_PARAM_MISSING because i dint pass job count. How can we find the job count of next job that is going to run? Or How to handle the exception which it is throwing. Even if i try to handle that exception something like this:
    TRY
    call function 'BP_JOB_ABORT'
      exporting
       jobcount                         = number
        jobname                          = name
    EXCEPTIONS
       CHECKING_OF_JOB_HAS_FAILED       = 1
       JOB_ABORT_HAS_FAILED             = 2
       JOB_DOES_NOT_EXIST               = 3
       JOB_IS_NOT_ACTIVE                = 4
       NO_ABORT_PRIVILEGE_GIVEN         = 5
       OTHERS                           = 6
    RAISE EXCEPTION TYPE CX_SY_DYN_CALL_PARAM_MISSING.
    CATCH
    CX_SY_DYN_CALL_PARAM_MISSING.
    ENDTRY.
    It avoids the exception but it doesnt cancel the job.  I even tried with function modules like JOB_OPEN
    JOB_SUBMIT,BP_JOB_SELECT,BP_JOB_ABORT and tried to build some logic using status overview table (TBTCO) and TBTCP (Jobstep overview table).
    Can someone suggest me the right way to write this program ?
    Thanks in advance.
    Rashmi

    Hi,
    Problem is solved.
    Create an background job with 2 steps. The first step in the background job calls the program ZBACKJOB_STEP1.  In the variant we have a wrong material number
    If the material number is not found in Mara, the next step in the job should not get executed and the job should get cancelled..
    In the above posts i had asked how do I get the job count of the job that is currently triggering the program at the runtimeu2026..If u see the below code uu2019ll get to know.. We have to use the standard structure TBTCM which captures the properties/characteristics of the job.
    REPORT ZBACKJOB_STEP1.
    TABLES: MARA,TBTCM.
    PARAMETERS : MATNR TYPE MATNR.
    START-OF-SELECTION.
      SELECT SINGLE * FROM MARA WHERE MATNR = MATNR.
      IF SY-SUBRC IS INITIAL.
        WRITE / : 'This is the material selected on the selection-screen' , MARA-MATNR.
    ELSE.
            CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
          IMPORTING
            EVENTID                                    = TBTCM-EVENTID
            EVENTPARM                             = TBTCM-EVENTPARM
            EXTERNAL_PROGRAM_ACTIVE = TBTCM-XPGACTIVE
            JOBCOUNT                                = TBTCM-JOBCOUNT
            JOBNAME                                  = TBTCM-JOBNAME
            STEPCOUNT                              = TBTCM-STEPCOUNT
          EXCEPTIONS
            NO_RUNTIME_INFO                    = 1
            OTHERS                                     = 2.
        IF SY-SUBRC = 0.
          CALL FUNCTION 'BP_JOB_ABORT'
            EXPORTING
              JOBCOUNT                                     = TBTCM-JOBCOUNT
              JOBNAME                                       = TBTCM-JOBNAME
            EXCEPTIONS
              CHECKING_OF_JOB_HAS_FAILED  = 1
              JOB_ABORT_HAS_FAILED              = 2
              JOB_DOES_NOT_EXIST                   = 3
              JOB_IS_NOT_ACTIVE                      = 4
              NO_ABORT_PRIVILEGE_GIVEN       = 5
              OTHERS                                         = 6.
          IF SY-SUBRC <> 0.
          ENDIF.
        ENDIF.
      ENDIF.
    Regards,
    Rashmi

  • How to schedule a background Job based on events

    Hi,
    We are on 4.6 C.
    We have a background job that has two ABAP programs.
    We need to start the 2nd ABAP program only after the first one has run successfully.
    If the second ABAP program does not run, the the job should have a status "FINISHED".
    Help appreciated.
    Thanks
    Mala

    Hi,
    How to schedule a background Job based on events,please refer to the follow SAP help:
    You can use events that have already been defined, or you can create new events for scheduling background jobs.
    If you wish to use new events, do the following to implement the event scheduling:
    Define and transport the event as a user event with transaction SM62.
    You must define only event IDs; event arguments are not defined in the R/3 System. Instead, you specify event arguments when you schedule a job to wait for an event and when you trigger the event.
    If you define a new event, you must also transport it to your production systems. The event transaction does not have a connection to the transport system. Instead, you must create a transport request for the event yourself.
    Do this to transport an event:
    Create a transport request.
    Start the editor in the transport request and enter the following:
    R3TR TABU <table name> where table name is BTCSEV for a system event ID, BTCUEV for a user event ID.
    Press F2 with the cursor on the table name to call up the screen for specifying the table entries to transport. In this screen, enter the event ID’s that you have created.
    Save and release the transport request. Ensure that it is imported into your production system(s).
    To trigger an event, add:
    – the function module BP_EVENT_RAISE to your ABAP program, or
    – the program SAPEVT to your external script, batch file, or program.
    When your programs execute these keywords, an event will be triggered in the R/3 background processing system. The event-based scheduler is started immediately. It in turn starts all jobs that were waiting upon the event, subject to normal background processing restrictions, such as the requirement that the job has been released to start.
    Schedule the jobs that are to run when your events are triggered.
    You can schedule jobs for one-time start or to be started whenever an event is triggered.
    Regards,
    collysun

  • How to schedule the background job using current selection screen field val

    Hello Friends,
    How to schedule the background job using current selection screen field values.
    after completion of the job the spool should be sent as a mail to SAP Inbox.
    Is there any way to create the variant dynamically by reading the current selection screen values.
    Thanks,
    Ravi

    Hi,
    To get the variant details you can use teh following FM.
    'RS_VARIANT_CONTENTS'.
    Regards,
    Ankur Parab

  • How to schedule the background job daily twice?

    Hi,
    How to schedule the background job daily twice? any conditions?
    Regards,
    Srihitha

    see the step by step procedure.
    Scheduling Background Jobs:
    1. Background jobs are scheduled by Basis administrators using transaction SM36.
    2. To run a report in a background, a job needs to be created with a step using the report name
    and a variant for selection parameters. It is recommended to create a separate variant for each
    scheduled job to produce results for specific dates (e.g. previous month) or organizational units (e.g.
    company codes).
    3. While defining the step, the spool parameters needs to be specified
    (Step-> Print Specifications->Properties) to secure the output of the report and help authorized users
    to find the spool request. The following parameters needs to be maintained:
    a. Time of printing: set to “Send to SAP spooler Only for now”
    b. Name – abbreviated name to identify the job output
    c. Title – free form description for the report output
    d. Authorization – a value defined by Security in user profiles to allow those users to access
    this spool request (authorization object S_SPO_ACT, value SPOAUTH). Only users with matching
    authorization value in their profiles will be able to see the output.
    e. Department – set to appropriate department/functional area name. This field can be used in
    a search later.
    f. Retention period – set to “Do not delete” if the report output needs to be retained for more
    than 8 days. Once the archiving/document repository solution is in place the spool requests could
    be automatically moved to the archive/repository. Storage Mode parameter on the same screen
    could be used to immediately send the output to archive instead of creating a spool request.
    Configuring user access:
    1. To access a report output created by a background job, a user must have at
    least access to SP01 (Spool requests) transaction without restriction on the user
    name (however by itself it will not let the user to see all spool requests). To have
    that access the user must have S_ADMI_FCD authorization object in the profile with
    SPOR (or SP01) value of S_ADMI_FCD parameter (maintained by Security).
    2. To access a particular job’s output in the spool, the user must have
    S_SPO_ACT object in the profile with SPOAUTH parameter matching the value used
    in the Print Specifications of the job (see p. 3.d above).
    3. Levels of access to the spool (display, print once, reprint, download, etc) are
    controlled by SPOACTION parameter of S_SPO_ACT. The user must have at least
    BASE access (display).
    On-line reports:
    1. Exactly the same configuration can be maintained for any output produced
    from R/3. If a user clicks “Parameters” button on a SAP Printer selection dialog, it
    allows to specify all the parameters as described in p. 3 of
    “Scheduling background jobs” section. Thus any output created by an online report
    can be saved and accessed by any user authorized to access that spool request
    (access restriction provided by the Authorization field of the spool request
    attributes, see p. 3.d of “Scheduling background jobs” section).
    Access to report’s output:
    1. A user that had proper access (see Configuring user access above) can
    retrieve a job/report output through transaction SP01.
    2. The selection screen can be configured by clicking “Further selection
    criteria…” button (e.g. to bring “Spool request name (suffix 2)” field or hide other
    fields).
    3. The following fields can be used to search for a specific output (Note that
    Created By must be blank when searching for scheduled job’s outputs)
    a. Spool request name (suffix 2) – corresponds to a spool name in p. 3.b in
    “Scheduling background jobs” section above).
    b. Date created – to find an output of a job that ran within a certain date range.
    c. Title – corresponds to spool Title in p. 3.c in “Scheduling background jobs”
    section above).
    d. Department - corresponds to spool Department in p. 3.e in “Scheduling
    background jobs” section above).
    4. Upon entering selection criteria, the user clicks the Execute button to
    retrieve the list of matching spool requests.
    5. From the spool list the user can use several function such as view the
    content of a spool request, print the spool request, view attributed of the spool
    request, etc. (some functions may need special authorization, see p.3 in
    Configuring user access)
    a. Click the Print button to print the spool request with the default attributes
    (usually defined with the job definition). It will print it on a printer that was
    specified when a job was created.
    b. Click the “Print with changed attributed” button to print the spool request
    with the different attributes (e.g. changing the printer name).
    c. Click the “Display contents” button to preview the spool request contents. A
    Print and Download functions are available from the preview mode.

  • How to debug the background job in ABAP

    Hi Guys,
    Can anyone let me know how to debug the background job in ABAP.
    Thanks in advance
    peter

    Hi,
    Goto SM37 and see the log if any is there and based on that you can check the code.
    you can't debug background job.
    Create a Variant for the Program and
    Schedule JOB in background:
    Go to SM36 create a Job
    enter Program and Variant for that program in STEP..
    click on Start Condition
    Click on DATE and TIME enter date scheduled Start and END times
    click on Period Values
    Click on HOURLY/WEEKLY etc
    CLick on RESTRICTIONS also to use further criteria.
    so your job will be scheduled and run as per your requirement.
    and in SM37 Transaction check the status of that JOB
    Check this link for scheduling jobs..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
    Check this
    http://jplamontre.free.fr/SAP/Debug%20background%20process.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap+debugger&
    Regards,
    Padmam.

  • Is it possible to create a  background job without a variant

    Hi all,
    Is it possible to create a  background job without a variant ?
    If Yes ..How ?
    Thanks in advance
    KR

    Hi KR,
       if you have any selection-screen in your programm it is not possible otherwise it is possible.
    Plzz Reward if it is useful,
    Mahi.

  • How to create a batch job through coding

    Hi Experts,
    How to create a batch job through coding?
    Regards
    Saroj

    Hi, below is the code.
    ***Create Variant for the job
    ***Get the dynamic variant name
      DATA: variant_name TYPE  varid-variant value 'test'.
      DATA: vari_desc LIKE varid,
            vari_contents LIKE rsparams OCCURS 0 WITH HEADER LINE,
            vari_text     LIKE varit    OCCURS 0 WITH HEADER LINE.
      CLEAR: vari_desc,vari_contents,vari_text.
      REFRESH: vari_contents[], vari_text[].
      vari_desc-mandt = sy-mandt.
      vari_desc-report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
      vari_desc-variant = variant_name.
      vari_desc-transport = 'F'.
      vari_desc-environmnt = 'A'.
      vari_desc-version = 1.
      vari_desc-mlangu = sy-langu.
    ***Varint Text
      vari_text-mandt = sy-mandt.
      vari_text-langu = sy-langu.
      vari_text-report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
      vari_text-variant = variant_name.
      CONCATENATE 'job' 'Background' INTO vari_text-vtext SEPARATED BY space.
      APPEND vari_text.
    ***Partner
      IF ( p_partner-low IS NOT INITIAL ).
        vari_contents-selname = 'PARTNER'.
        vari_contents-kind    = 'S'.
        vari_contents-sign    = 'I'.
        IF ( ( p_partner-low IS NOT INITIAL ) AND ( p_partner-high IS INITIAL ) ).
          vari_contents-option = 'EQ'.
          vari_contents-low = p_partner-low.
        ENDIF.
        IF ( ( p_partner-low IS NOT INITIAL ) AND ( p_partner-high IS NOT INITIAL ) ).
          vari_contents-option = 'BT'.
          vari_contents-low = p_partner-low.
          vari_contents-high = p_partner-high.
        ENDIF.
        APPEND vari_contents.
      ENDIF.
    ***Contract Account
      IF ( p_cont_acct-low IS NOT INITIAL ).
        vari_contents-selname = 'CA_ACC'.
        vari_contents-kind    = 'S'.
        vari_contents-sign    = 'I'.
        IF ( ( p_cont_acct-low IS NOT INITIAL ) AND ( p_cont_acct-high IS INITIAL ) ).
          vari_contents-option = 'EQ'.
          vari_contents-low = p_cont_acct-low.
        ENDIF.
        IF ( ( p_cont_acct-low IS NOT INITIAL ) AND ( p_cont_acct-high IS NOT INITIAL ) ).
          vari_contents-option = 'BT'.
          vari_contents-low = p_cont_acct-low.
          vari_contents-high = p_cont_acct-high.
        ENDIF.
        APPEND vari_contents.
      ENDIF.
    ***Contract Object
      IF ( p_cont_obj-low IS NOT INITIAL ).
        vari_contents-selname = 'CO_OBJ'.
        vari_contents-kind    = 'S'.
        vari_contents-sign    = 'I'.
        IF ( ( p_cont_obj-low IS NOT INITIAL ) AND ( p_cont_obj-high IS INITIAL ) ).
          vari_contents-option = 'EQ'.
          vari_contents-low = p_cont_obj-low.
        ENDIF.
        IF ( ( p_cont_obj-low IS NOT INITIAL ) AND ( p_cont_obj-high IS NOT INITIAL ) ).
          vari_contents-option = 'BT'.
          vari_contents-low = p_cont_obj-low.
          vari_contents-high = p_cont_obj-high.
        ENDIF.
        APPEND vari_contents.
      ENDIF.
    ***Account Category
      IF ( p_ctra_acc_category  IS NOT INITIAL ).
        vari_contents-selname = 'P_CAT'.
        vari_contents-kind    = 'P'.
        vari_contents-low    = p_ctra_acc_category.
        APPEND vari_contents.
      ENDIF.
    ***filed_freq_to_change_from
      IF ( p_filed_freq_to_change_from  IS NOT INITIAL ).
        vari_contents-selname = 'P_TO_CH'.
        vari_contents-kind    = 'P'.
        vari_contents-low    = p_filed_freq_to_change_from.
        APPEND vari_contents.
      ENDIF.
    ***req_filed_freq_change
      IF ( p_req_filed_freq_change  IS NOT INITIAL ).
        vari_contents-selname = 'P_CHANGE'.
        vari_contents-kind    = 'P'.
        vari_contents-low    = p_req_filed_freq_change.
        APPEND vari_contents.
      ENDIF.
    ***Test Run p_tstrun
      vari_contents-selname = 'P_TSTRUN'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_test_run.
      APPEND vari_contents.
    ***Update Filing Frequency Checkbox
      vari_contents-selname = 'P_FIL_FR'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_update_filing_frequency.
      APPEND vari_contents.
    ***Update Incoming Payment Channel Checkbox
      vari_contents-selname = 'P_PAY_CH'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_update_payment_channel.
      APPEND vari_contents.
    ***Update Filing Channel Checkbox
      vari_contents-selname = 'P_FIL_CH'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_update_filing_channel.
      APPEND vari_contents.
    ***Use Current Filing Period Checkbox
      vari_contents-selname = 'P_CU_PER'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = use_curr_per.
      APPEND vari_contents.
    ****Create Variant thru Function Module
      CALL FUNCTION 'RS_CREATE_VARIANT'
        EXPORTING
          curr_report   = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'
          curr_variant  = variant_name
          vari_desc     = vari_desc
        TABLES
          vari_contents = vari_contents
          vari_text     = vari_text.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ****Prepare all the date for scheduling job
    ***Get the print parameters
      DATA: params LIKE pri_params.
      CLEAR params.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          mode           = 'CURRENT'
          no_dialog      = 'X'
        IMPORTING
          out_parameters = params.
      params-paart = 'X_65_255'."'X_PAPER'.
    ***Open The scheduling job
      DATA: job LIKE tbtcjob-jobname,
            jobcount LIKE tbtcjob-jobcount.
      CLEAR: job,jobcount.
      job = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname  = job
        IMPORTING
          jobcount = jobcount
        EXCEPTIONS
          OTHERS   = 4.
    ***Job Submit
      DATA: authcknam LIKE tbtcjob-authcknam.
      CLEAR: authcknam.
      authcknam = sy-uname.
      params-primm = space.
      CALL FUNCTION 'JOB_SUBMIT'
        EXPORTING
          authcknam = authcknam
          jobcount  = jobcount
          jobname   = job
          priparams = params
          report    = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'
          variant   = variant_name.
    ***JOB_CLOSE
      DATA: sdlstrttm TYPE tbtcjob-sdlstrttm,
            released LIKE btch0000-char1.
      sdlstrttm = p_job_start_time + 30.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          sdlstrtdt        = p_job_start_date
          sdlstrttm        = sdlstrttm
          jobcount         = jobcount
          jobname          = job
        IMPORTING
          job_was_released = released.
    Regs
    Manas

  • How to Schedule SAP background job at OS Level

    Hi All,
    Can Anyone tell me how to Schedule SAP background job at OS Level (unix).
    Regards,
    Anil

    Hi Anil,
    I donu2019t know your requirements, anyway itu2019s possible to setup your SAP job in order to start after an event, and after that you can get the event triggered from the Operating System in the following way:
    - log into you Operating System with the SIDadm user id (at the Operating System level) and go to directory /usr/sap/SID/SYS/exe/run
    - Run the SAPEVT executable as follows:
    sapevt YOUR_EVENT -t pf=/usr/sap/SID/SYS/profile/DEV_DVEBMGS00_server001 nr=01
    This will raise the event, and cause the job scheduled within SAP to execute.
    You can periodically execute this job with crontab.
    Thanks,
    Federico Biavati

Maybe you are looking for

  • HT4818 i install mac os x but my boot camp partition didnot show

    i install mac os x but my bootcamp partition didnot show and i dont know how can i recover my files

  • Problem Web Dynpro Java applications using JasperReports

    Hello all, We have followed the footsteps of these blogs but we can not make it work. Part I --> Part-I: Print Web Dynpro Java applications using JasperReports Part II --> Part-II: Print Web Dynpro Java applications using JasperReports Part III --> P

  • Downloading of iTunes freezes ALL THE TIME.

    Hi, I just got an iphone 4 and i need the new itunes 10 so i try to download it but it always freezes. I looked on the support thing and it told me to uninstall my old one - which i did - but that took away all my music. It's been a week and ITS STIL

  • Dynamic Label Prnting -Smartforms

    Hello all , I have to print more than N number of labels, 10 on each page. In these 10 labels, first 5 lables should come on left side and remaining on right side of the page. Again this should repeat in the next page. Please note that the content in

  • HP Pavilion a1123c - will not power on after being unplugged while in use

    So bit of panic: I've been using the above computer since 2007 with the expected wear and tear, slowing down. Today it was put through its paces and while on a multimedia-hwavy web page it became unresponsive to the point I could not even bring up th