Scheduling report in back ground after the previous report is executed

Hi,
There is one report which will be executed manually, once that is executed my report should be executed automatically in background.
Pls help me in how to do this.
Thanks,
Lucky

Hi,
In the first report, try this code:
  DATA l_jobcount TYPE tbtcjob-jobcount.
  CALL FUNCTION 'JOB_OPEN'
    EXPORTING
      jobname          = 'TEST_JOB'
    IMPORTING
      jobcount         = l_jobcount
    EXCEPTIONS
      cant_create_job  = 1
      invalid_job_data = 2
      jobname_missing  = 3
      OTHERS           = 4.
  IF sy-subrc <> 0.
    CASE sy-subrc.
      WHEN 1.
        MESSAGE e054(bl)
      WHEN 2.
        MESSAGE e008(mi_badi)
      WHEN 3.
        MESSAGE e009(mi_badi)
      WHEN 4.
        MESSAGE e703(fkjo)
    ENDCASE.
  ENDIF.
  SUBMIT z_second_program
    WITH p_param1 =  'TES'
    WITH s_select_option IN s_range
    VIA JOB 'TEST_JOB' NUMBER l_jobcount
    AND RETURN.
  IF sy-subrc EQ 0.
    p_submit = true.
  ENDIF.
  CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
      jobcount             = l_jobcount
      jobname              = 'TEST_JOB'
      strtimmed            = 'X'
    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.
    CASE sy-subrc.
      WHEN 1.
        MESSAGE e012(mi_badi)
      WHEN 2.
        MESSAGE e013(mi_badi)
      WHEN 3.
        MESSAGE e009(mi_badi)
      WHEN 4.
        MESSAGE e014(mi_badi)
      WHEN 5.
        MESSAGE e015(mi_badi)
      WHEN 6.
        MESSAGE e541(scpr)
      WHEN 7.
        MESSAGE e267(arch_ana)
      WHEN 8.
        MESSAGE e216(xm)
      WHEN 9.
        MESSAGE e727(fkjo)
    ENDCASE.
  ENDIF.

Similar Messages

  • How to Run a Custom Transaction in Back Ground after give the Input?

    Hi,
        I have problem that how to execute a Custom Transaction in Back Ground after end user will save a variant for input. In my Transaction there is no menu to save a Variant & to Execute in Back Ground.
    Please suggest me how to do this in my Custom Transaction.

    Hi Ramana,
    what kind of report you want to  execute? the report is Executable Report or Modulepool prog. ??
    if it is a executable program so when u execute (F8) from SE38 when u find the selection-screen in the menu bar ->Program ->Execute in Background( F9) option exits there u can schedule your report in Background or else use toce SM36 ( Define Background Job).
    Why you want to run it in background with transaction code if you have this options?
    Regards,
    Sunil kairam.

  • The scroll back gesture to the previous page, even after i sign out of my email account or Facebook anyone can still be able to see the content in the accounts just by scrolling back using the gesture.

    the scroll back gesture to the previous page, even after i sign out of my email account or Facebook anyone can still be able to see the content in the accounts just by scrolling back using the gesture. how can i stop safari from showing the content of my accounts?

    Try calling Tech Support, they should be able to check to see if theres a lock and try to help you reset it, I had to call and get my account unflagged, for something that I didn't even do.

  • Filter report by back ground color or by condition

    I'd like to filter my report by conditions like iif(Parameter is true, Fields.speed.value > 100 or Fields.speed.value > (speedlimit +15), nothing).  I tried using Dataset filter as following set up, but it won't return the order with speed
    over 100 or over speedlimit by 15 km/h.   
    FilterExpression: [Speed]
    >
    =iif((Parameter.Boolean.value = true, 100 or (fields.Speedlimit.value +15), 0).
    Then i filter all the cell that when speed is under the condition like
    iif(speed > 100 or speed > (speedlimit+15), "PINK", "White")
    but I don't know whether I could filter report by back ground color.
    Anyone please help me with any solution. 
    thanks.

    Thank you very much for the solution.!
    It works when i select "true' for the parameter. 
    But instead of showing all orders when "false", it shows orders under condition Fields!Speed.Value>(Fields!SpeedLimit.Value+15.
    Do you have any idea why?
    all order number is 1000
     number of orders with Field.Speed.Value > 100 is 13
     number of orders with Fields!Speed.Value>(Fields!SpeedLimit.Value+15
    is 340
     number of orders with Fields!Speed.Value>100
    or Fields!Speed.Value>(Fields!SpeedLimit.Value+15  is 353
    I'm getting 353 when "True" 340 when "False"(I do want 1000)

  • HT1430 My IPAD 3 [5.1.1 (9B206)] has a problem. - It restarts every three (3) minutes: it goes out then comes back but lost the previous page (auto lock is set to 15 minutes) - It can no longer connect to the mobile network orange except Wireless (WIFI)

    My IPAD 3 [5.1.1 (9B206)] has a problem.
    - It restarts every three (3) minutes: it goes out then comes back but lost the previous page (auto lock is set to 15 minutes)
    - It can no longer connect to the mobile network orange except Wireless (WIFI)

    Not normal. Take it to an Apple Store for evaluation.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

  • Alv report in back ground

    Hi All,
    Can we run alv report in back ground,if yes how?
    Thanks&Regards.
    Srikanth.V

    hi Ramu,
    Run in Background but make sure it is alv list, not alv Grid FM. if you are uisng alv list not problem , but if you are using alv grid then you can code like this..
    if sy-batch = ' '.
    call 'REUSE_ALV_GRID_DISPLAY'.
    else.
    call 'REUSE_ALV_LIST_DISPLAY'.
    endif.
    if you are using OO alv then write this code..
    CALL METHOD cl_gui_alv_grid=>offline
                    RECEIVING e_offline = off.
        IF off IS INITIAL.
          CREATE OBJECT g_custom_container
                 EXPORTING container_name = g_container.
        ENDIF.

  • After the previous appstore update i no longer have a games catagory or a whats hot tab. Any solutions?

    So after the previous appstore update i no longer have a games catagory in the catagorys tab, also on the fetured tab theres is no whats hot tab at the top. Any body can help me pls?

    Gotcha.
    Some possible solutions in this discussion:
    Missing "X" to close tabs
    charlie

  • Why does it take so long for the phone to turn back on after the battery dies?

    Is apple going to do anything about the length of time it takes for the phone to turn back on after the battery drains?

    Just a thought, but if the battery is not allowed to completely die then the amount of time it takes for the device to power back up is irrelevant.
    Charge the device regularly and often.  One of the worst things for a Lithium Ion battery like that in an iPhone is completely discharging it.

  • I was not warned that audiobooks are a one time download only for those using iCloud to backup. As a result I've lost my audiobook when switching to a new iPhone after the previous phone was damaged. Will Apple refund me for the audio book?

    I was not warned that audiobooks are a one time download only for those using iCloud to backup. As a result I've lost my audiobook when switching to a new iPhone after the previous phone was damaged.
    Will Apple refund me for the audio book?
    the irony of this is that the lost audio books is Steve Jobs biography!
    Starting to wonder about the benefits of Android :-/

    If you haven't been keeping a backup of your downloads (none of your iTunes downloads are included in an iCloud backup, apps, music etc are only redownloadable whilst they remain in your country's store) then you can try contacting iTunes support and see if they will grant you a redownload : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • My computer freezes when I try to log in to You Tube and is still "running" after I close it. How can I go back to my the previous version of Firefox?

    After downloading Firefox 4 Beta, my personal website does not display as it used to. The text is now aligned left when it was centered. Also, when I try to log in to You Tube, everything freezes. I have to use the computer task manager to close the browser. When I try to open Firefox again, I get a message stating it is still running and I must close it or re-start my computer to open Firefox again.
    I would like to return to the previous version of Firefox.

    You can get duplicate installation disks from Apple Customer Service.  You will have to provide them with the MBP serial number and there is a charge,
    Another option is to purchase the Snow Leopard retail disk from the Apple online store:
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    Either option should allow you to install an OSX.
    Ciao.

  • With the newest update; when cliking on a picture to view in a larger size, the back ground of the pictures are in black; not white like the previous version

    how can I get the back ground to be white again; with out "downgrading"

    It is a new feature in Firefox 11+ versions to display a single image centered with an almost black background.
    It is added by this stylesheet:
    * resource://gre/res/TopLevelImageDocument.css
    You can look at this extension to set your preferred background color and remove the centering.
    * Old Default Image Style: https://addons.mozilla.org/firefox/addon/old-default-image-style/
    See also these forum threads for other solutions (e.g. userContent.css):
    *[[/questions/923127]]
    *[[/questions/923431]]

  • Reporting agent - Back ground scheduling

    Hello Gurus,
    I am trying to schedule the reporting agent scheduling package in Background... Is it possible to schedule it in Background when executing via Process Chain.
    Thank you

    Thanks for the Info.
    But the situation that I am facing is.. I have a remote cube and the regular cube attached to a multiprovider which is used to reconcile BW report with that of R/3 tables.
    When I execute the report in BW ... the data that is read from R3 tables ... it is under DIA process.
    the time out is set to 20 minutes. and everytime the report is executed it is saying uncaught exceptiona and when I check in the log it says time exceeded.
    Is there anyway that I can schedule the R/3 side job to a Background job (so that there would be no timeout).
    I hope I am clear..
    Please help me on this issue.

  • Submiting report in back ground with values

    Hello all abapers,
      I m working on one application where one module pool program will take input from user for user id and password. After verification, one back ground report will be scheduled by this program to change user pw and add some role in user's profile.
    when i schedule the prg in background i need to pass some values like user id and password entered on module pool screen...
    how do i pass it to background job when scheduling and how bg job prg will read these values..
    please advise me as its needed asap...
    thanks in advance,
    jigs.
    any helpful suggestions will be rewarded.

    Hi,
    Put the following code in user command:
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname                = 'ZSUBMIT'
    IMPORTING
       jobcount               = jbcnt
    EXCEPTIONS
       cant_create_job        = 1
       invalid_job_data       = 2
       jobname_missing        = 3
       OTHERS                 = 4
    IF sy-subrc <> 0.
    ENDIF.
    SUBMIT <program to be submitted> WITH P_user_id = user id  VIA JOB 'ZSUBMIT' NUMBER jbcnt AND RETURN.
    CALL FUNCTION 'JOB_CLOSE'
      EXPORTING
        jobcount                          = jbcnt
        jobname                           = 'ZSUBMIT'
        strtimmed                         = 'X'
    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.
    ENDIF.
    A job called 'ZSUBMIT' will be released in background.
    Please try and award points if useful.
    Thanks and regards,
    S. Chandra Mouli.

  • Error in Back Ground processing of a report.

    Hi All,
    I have a report wherein I need to schedule it in background. Its an ALV report and it has got user defined GUI status. But for one of the selection options, only output is being displayed. Can this be scheduled in Back Ground?

    Hi all,
    Thanks for your reply.
    I  got the solution. When a program is scheduled in background, if it is written in classes and ALV grid display is used, we get this error. I am able to schedule when I change the function module to LIST_DISPLAY.

  • Problem when printing Alv Tree Report in back ground

    Hi,
    I am using SUBMIT ...TO SAP-SPOOL WITHOUT SPOOL DYNPRO with GET_PRINT_PARAMETERS FM.Its working fine.
    My problem is that my SUBMIT report have TREE STRUCTURE as output so when i am running my program one blank screen is coming with heading DISPLAY LOG TREE because of TREE STRUCTURE.when i click on back button then only further processing happens.
    How to avoid this TREE STRUCTURE SCREEN ???
    Is there any other way to pass your list o/p to SPOOL other than .....TO SAP-SPOOL..?
    Thanks in advance.

    in foreground when u run ALV report it holds maximum fields and displays in 1 single row, but the case is not in back ground...When any report is run in background, the default size for a line is 255 chars...So, if it more it gets splitted into 2 line item....This is how back ground job works for a report  though it is a normal report or alv report.

Maybe you are looking for