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

Similar Messages

  • How to schedule the background job if report have Presentation server files

    Hi All,
    I have searched the forums and found , the way for the scheduling the background job if report selection screen have the presentation server file input.
    1. Using the Open data set method.
    And my client is not OK with Open dataset way, it there any other way to do this, As we are using the EXCEL file.
    Thanks and Regards,
    Bharani

    Hi,
    As said above it is generally not possible. Since your client most obviously doesn't like graphical background I would recomend storing data as till now, but show it with your own report in more userfriendly way. For example:
    - as ALV Grid
    - in excel with use of OLE either as embedded in SAP or new window (check transaction OLE for example)
    - with use of webdynpro
    BR
    Marcin Cholewczuk

  • 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 schedule a background job using the Event concept..?

    Hi Folks,
    I have a requirement that, I need a schedule a background job.
    Once after the previous job successful only, new job should get triggered. How to go ahead with this..?
    For Eg, I am scheduling a job called ZTEST periodically for 1 minute. If the job is not get completing with in 1 minute, I dont want to start my new job. Only after the success of my old job, I want my new job to run.
    Waiting for ur replies.
    Regards,
    Savi.

    Hi,
    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,
    Raj.

  • How to cancel the background job?

    Hi,
        I have schedule the backgroud job.How to cancel the background the job.
    When i select the job and click on stop button, iam getting message "job is not active - cancellation not possiable".How to schedule the background job.
    Regards,
    T.suresh

    goto sm37
    SM36 Define Background Job
    SM37 Background Job Overview
    SM39 Job Analysis
    U can Moniter the background Jobs through T code SM37
    In the Simple Job Selection window enter the name of the Job and User of that Job and u can check the status of that Job like “JobName, Job CreatedBy, Status, Start date, Start time Duration(sec.) Delay (sec.).

  • 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 a background job in realtime

    Hi,
    Can you tell me how to schedule a background job in realtime.
    give some example scenerios in scheduling the background jobs in realtime.
    Thanks.
    sam.

    And also.....
    There are two ways for you to handle,
    one manually setting up the job through SM36 which is better and convinient,
    secondly through program using FM's JOB_OPEN, SUBMIT, JOB_CLOSE.
    Find below steps in doing both:
    Procedure 1:
    1. Goto Trans -> SM36
    2. Define a job with the program and variant if any
    3. Click on start condition in application tool bar
    4. In the pop-up window, click on Date/Time
    5. Below you can see a check box "Periodic Job"
    6. Next click on Period Values
    7. Select "Other Period"
    8. Now give '15' for Minutes
    9. Save the job
    Procedure 2 via Program:
    Below is a sample code for the same. Note the ZTEMP2 is the program i am scheduling with 15mins frequency.
    DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
    L_RELEASE(1) TYPE c.
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    JOBNAME = 'ZTEMP2'
    IMPORTING
    JOBCOUNT = P_JOBCNT
    EXCEPTIONS
    CANT_CREATE_JOB = 1
    INVALID_JOB_DATA = 2
    JOBNAME_MISSING = 3
    OTHERS = 4.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    SUBMIT ZTEMP2 VIA JOB 'ZTEMP2' NUMBER P_JOBCNT
    TO SAP-SPOOL WITHOUT SPOOL DYNPRO
    WITH DESTINATION = 'HPMISPRT'
    WITH IMMEDIATELY = SPACE
    WITH KEEP_IN_SPOOL = 'X' AND RETURN.
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    JOBCOUNT = P_JOBCNT
    JOBNAME = 'ZTEMP2'
    STRTIMMED = 'X'
    PRDMINS = 15
    IMPORTING
    JOB_WAS_RELEASED = L_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
    INVALID_TARGET = 8
    OTHERS = 9.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Hope the above helps you.
    ***********reward points,if found useful

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

  • How to schedule the back job scheduling

    how to schedule the back job for bdc , can we use it for both call transaction and session method . how to schedule the back job schedulinng for lsmw

    hi,
    Use t-code SM36 for scheduling.
    <b>Do reward.</b>

  • 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

  • How to stop the background job "Sap_collector_for_job_statistic"

    Dear All,
    Kindly let me know how to stop the Background job "Sap_collector_for_job_statistic" which is running everyday.
    We want to stop this background job.
    Kindly suggest.
    Regards,
    Mullairaja

    Select the Job using SM37 transaction. In the Menu Choose
    Job ---> Cancel Active Job.
    Before you do this it may be good idea to check the pid using SM50.
    It will be using a Background work process. Check the pid and the status.
    Select the same and in the Menu Choose Process --> Cancel with Core.
    Refresh and check in SM37 for the Active and Cancelled Jobs.

  • Live type files look grainy and do not fill the background when used for green screen backgrounds.

    live type files look grainy and do not fill the background when used for green screen backgrounds. Ideas?

    What I want to do is somehow make my entire iMovie project smaller by compressing it somehow but without losing any footage or audio or quality. At the moment the project is a 56GB iMovie project lasting approx 1hr. I have a mixture of miniDV footage, titles created in Live Type (they are better quality than anything available in iMovie) and audio.
    The miniDV footage is automatically compressed when it transfers from my camcorder to my Mac, no worries there.
    The LiveType titles contain a motion background (imported into LT) and then text which appears and disappears at set points. The titles vary in length but are about 5 seconds each.
    The file size for the LT titles is approx 180MB per clip, the movie requires about 20 or so of these clips, making a very large file size overall.
    Is there a way that I can save something in LT so that the file size is smaller yet still keep the quality and use the clip in my iMovie ?

  • How to populate f4 values to standard pnp selection screen fields

    Hi Experts,
    my question is how to populate f4 values to standard pnp selection screen field. i am using LDB PNP for a report , it displays several fields with f4 values, i need to remove all the stadard f4 values and want to place my  f4 values in the selection screen

    Hi Venkat,
    To put ur own values in the F4 help of any field...all u have to do is.
    1st fetch all the records that u need to display in F4 help list...in one internal table.
    and then use the function module  'F4IF_INT_TABLE_VALUE_REQUEST'
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
    retfield =
    value_org =
    tables
    value_tab =
    return_tab =
    exceptions
    parameter_error = 1
    no_values_found = 2
    others = 3.
    where retfield is the field for which u need to give the F4 help.
    and valu_tab is the internal table in which u have the list of records to be displayed.
    this would do the work...
    I dont have the system in front of me...as soon as i have...will try to send a piece of code, to make ur work easy.
    Till then hope this helps u...all the best
    Regards,
    Radhika

  • How to link a search help to a selection screen field

    Hi All,
    I am using field PKWRG from PA0017 table in selection screen. I need F4 help there as in Tcode PA30 . But this field does not have value table or check table. However, it has a search help attached 'TRV_PKWRG' .
    But, I donot know how to assign a search help to a selection screen field. Please help.
    Regards,
    Nibha

    Hello,
    Fetch all the data which from the table which you want to show in the search help and pass the value to the FM
    F4IF_INT_TABLE_VALUE_REQUEST and the selection-screen event must be
    at selection-screen on value request parameter or selection option variable.
    BCALV_TEST_FULLSCREEN
    BCALV_TEST_FULLSCREEN_CALLS
    BCALV_TEST_FULLSCREEN_PRINT
    BCALV_TEST_FULLSCREEN_STATUS
    BCALV_TEST_GRID
    BCALV_TEST_GRID_DRAG_DROP
    BCALV_TEST_GRID_EDITABLE
    BCALV_TEST_GRID_EVENTS
    BCALV_TEST_GRID_INDEX
    BCALV_TEST_GRID_TOOLBAR
    BCALV_TEST_HIERSEQ_LIST
    BCALV_TEST_LIST
    BCALV_TEST_LIST_PRINT
    BCALV_TEST_LIST_STATUS
    BCALV_VERIFY_DTYPES_D0100_F01
    BCSMENUF01
    BDLCOF10
    BDLDVI10
    BDLTREDF

  • 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

Maybe you are looking for

  • Videos don't show up on iPod

    Please help me! I tried every single german iPod-Forum but nobody could possibly help me. My iPod worked out great until I updated the ipod itself and iTunes. I can see all my videos and podcasts in my i Tunes library. But they're not on my ipod! I d

  • Does Yosemite support DisplayPort 1.2 to daisy-chain 2 monitors from a single Thunderbolt port?

    Has anyone tried daisy-chaining two monitors from a single Thunderbolt port in Yosemite? DisplayPort 1.2 wasn't supported by Mavericks, but I'm hoping that might have been fixed with the new

  • How to fix the enter key not opening sites in the URL box?

    Ever since the update to 10.0.1 pressing enter to open a site in the URL entry box doesn't work. Anyone know why? I have to click the arrow key to the side of the URL pannel, and enter key works as normally everywhere. It is INCREDIBLY annoying.

  • Import a pdf into Output Designer

    Hey all.  I have been struggling with this for a while and I'm thinking there has to be a better or more effeicient way to do what i'm doing. Here it goes... I have files that originate from Microsoft Word files that I am converting to pdf's, I am th

  • Does the Griffin iTrip work with the 6th generation iPod?

    My car got broken into, and they took my nano and iTrip. I need to buy a new iPod, and I had everything set up in my cart and noticed that the iTrip info only goes up to the 5th generation nano. Does this product http://store.apple.com/us/product/H06