Difference in runtime of a program when run in background vs foreground

Hi,
Is running the program in background would result to better performance in terms of speed compared to foreground? If yes, what's the reason behind.
Thanks!

Hi Advait,
>
Advait Gode wrote:
> Yes, program does run faster in background process than running in foreground.
sorry... an ABAP program will NOT run faster in background.
As could be seen from your link:
- a program in background does not have a timout limit
- a program in background can use a different memory allocation sequence (depends on configuration)
  and may be able to allocate more memory than a foreground program (depends on configuration as well)
but it will not run faster... .
Kind regards,
Hermann

Similar Messages

  • Report program when run in background job getting cancelled immediately

    Hi
    When i run a program in foreground i am able to see the output. But when run in background not able to run the job successfully. The job is getting cancelled immediately.
    I am using the below function module for output display. Should i need to pass any parameters in the below function module so that i can run the program in background  successfully.
      CALL METHOD DETAIL_GRID->SET_TABLE_FOR_FIRST_DISPLAY     
          EXPORTING                                            
            IS_LAYOUT         = IS_LAYOUT                    
            I_SAVE            = 'A'                        
            IS_VARIANT        = GS_VARIANT                   
          CHANGING                                           
            IT_FIELDCATALOG   = IT_FIELDCATALOG               
            IT_OUTTAB         = BLOCKED_STOCK_TAB_ALV[].     
    Please suggest.
    Thanks and regards
    Rajani Yeluri

    Hi Rajani.
      ALV require the DRYPOR(screen) for display but incase you run in back ground which have to write to spool but in spool we can only write in format of LIST REPORT not inter-active report like ALV. That why
    system cancelled your process immediately.
    Hope it helps.
    Sayan.

  • Wrapper program when run in background not generating SPOOL

    I have created Program A which calls internally Program B or C based on the condition. When I run the program B or C independently in Background it generates the spool on completion. But When I run the program A in Background, Spool is not getting generated.
    My requirement is that Spool should be generated when Program A is executed in Background.
    Below is the code of program A:
    PROGRAM A.
        IF p_cons = 'X'.
    *-->Detailed Details of Interim or Final Settlement
          SUBMIT B               WITH  p_vtnr   EQ p_vtnr
                                 WITH  p_setqty EQ p_setqty
                                 WITH  p_test   EQ p_test
                                 WITH  s_abrdat IN s_abrdat
                                 WITH  r2       EQ r2
                                 WITH  r1       EQ r1
                                 AND RETURN.
        ELSE.
    *-->Summary Details of Interim or Final Settlement
          SUBMIT C                   WITH  p_vtnr   EQ p_vtnr
                                     WITH  p_setqty EQ p_setqty
                                     WITH  p_test   EQ p_test
                                     WITH  s_abrdat IN s_abrdat
                                     WITH  r2       EQ r2
                                     WITH  r1       EQ r1
                                     AND RETURN.
        ENDIF.
    Please guide me on this.
    Regards,
    Naveen

    Hi Naveen,
    Check this
    Submit report to job
    submit ztest via job l_jobname
                                   number l_jobcount
                                  to sap-spool without spool dynpro
                                 spool parameters ls_params
                              and return.

  • How to Identify program is running in background or Foreground mode?

    Hello Experts,
    I have developed on Z report and from this report BDC for Transaction CO11 is runnning using CALL TRANSACTION statement.
    On Selection screen there is a option for selecting the BDC mode either in  Background or Forground or Error mode.
    My question is:- how do I recognize this selected BDC mode in the function exit ZXMBCU02.
    This exit triggers when transaction CO11 runs.
    Because based on the selected BDC mode i have to apply some logic in this exit.
    Please suggest.
    Regards,
    Jagesh

    Hi Jagesh...
    You can do the following..
    1. Export the Batch Input Mode in to ABAP memory using the EXPORT statement.
    2. Import that value in the user exit.
    3. To execute your code only if its batch input mode, use the field SY-BINPT.
    You can also check if this structure "BDCRUN" is used in that program, b'cas this is contained in the VA01 an VA02 transacation, this would contain all the data.
      CALL FUNCTION 'BDC_RUNNING'
           IMPORTING
                bi_info = bi_info
           EXCEPTIONS
                OTHERS  = 1.
      bi_info will contain all the data.
      GET PARAMETER ID 'SD_BACKGROUND_DEBUG' FIELD background_debug.
    Best Regards,
    Pradeep.

  • Getting the variant name when the report program is run in background

    Hi All,
    How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
    Any pointers to this will be highly appreciated.
    Thanks and regards,
    Nilesh.

    Hello Nilesh,
    Please find the algo:
    1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
    2. Select data from TBTCP using these details:
    DATA:
    FP_EVENTID   TYPE BTCEVENTID
    FP_EVTPARM   TYPE BTCEVTPARM
    FP_ACTIVE    TYPE BTCXPGFLAG
    FP_JOBCNT    TYPE BTCJOBCNT
    FP_JOBNM     TYPE BTCJOB
    FP_STEPCNT   TYPE BTCSTEPCNT.
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
        IMPORTING
          EVENTID                 = FP_EVENTID
          EVENTPARM               = FP_EVTPARM
          EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
          JOBCOUNT                = FP_JOBCNT
          JOBNAME                 = FP_JOBNM
          STEPCOUNT               = FP_STEPCNT
        EXCEPTIONS
          NO_RUNTIME_INFO         = 1
          OTHERS                  = 2.
      IF SY-SUBRC <> 0.
    *   Error calling FM: GET_JOB_RUNTIME_INFO
      ENDIF.
    DATA: FP_VARIANT TYPE BTCVARIANT.
      SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
      FROM   TBTCP
      INTO TABLE L_IT_TBTCP
      WHERE  JOBNAME   = FP_JOBNM
      AND    JOBCOUNT  = FP_JOBCNT
      AND    STEPCOUNT = FP_STEPCNT.
      IF SY-SUBRC = 0.
        SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
        READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
        IF SY-SUBRC = 0.
          FP_VARIANT = L_WA_TBTCP-VARIANT.
        ENDIF.
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • System is showing time out when run in background

    Dear all,
    We have two systems: One R/3 and EBP. We have made one report where the remote function module will be called from R/3 to EBP. There are 4 lakhs data in SAP. We are sending 10000 data as package in internal table and getting the corresponding output. But the system is showing time out when the report has run in background. Can you please suggest how the process can be improved so that the timeout can be avoided.
    Thanks and regards,
    Atanu

    Hi,
    Try to fetch records in smaller chunks and process them.  For example, if you are trying to fetch records for one year, instead of single query, try to fetch in 12 sets for each month.  Fetch first month and process the records and put them in the output internal table.  Then go for next month and so on.  Anyway your program is running in background.  There will not be any user complaint also.  The solution might sound bit funny.  But it works.
    Regards,
    Hema

  • RMMR1MRS-When run in background cause update failure errors looking

    hi,
          RMMR1MRS report when run in background cause update failure errors .
    There are few  below reason for the error log.
    1.  for the PO invoice already generated -  (its right if already invoice generated. should not happen again)
    2.  In  MIGO,  entire  quantity has been reversed  and also invoice generated with zero value - ( its right , should not happen invoice again )
    3. Particular PO line item deleted -  (its right if the PO line item deleted. ERS settlement not require)
    For the all above reason, the update error occurs.  But the mean time  the program  "RMMR1MRS"  should not through the update error log. 
    Note: The job was not terminated due to this update error and also no harm because of the error log
    can you please help on this update failure why it occurs.

    Have you found a solution already? If so, please, share it with the community and close this thread.

  • Amount field getting rounded up when run in background

    Hello All,
      when i run a report in foreground the amount value(KBETR) is displaying properly with the value 12.78.But when the same report is run in background it is displaying 13.what should be done?
    Thanks,
    Rakesh.

    Hi,
    Try to fetch records in smaller chunks and process them.  For example, if you are trying to fetch records for one year, instead of single query, try to fetch in 12 sets for each month.  Fetch first month and process the records and put them in the output internal table.  Then go for next month and so on.  Anyway your program is running in background.  There will not be any user complaint also.  The solution might sound bit funny.  But it works.
    Regards,
    Hema

  • The number of rows per page is greyed out when running in background?

    Hi,
    For a customized transaction the number of rows per page cannot be set when running in background.
    While a background job is created in SM36 after entering the report name and the selection variant name in the properties of Format the rows and columns field is greyed out.It was not editable.
    Is there any settings to be done or in the custom program any code change needs to be done?
    Thanks in advance.
    Regards,
    Sharon.

    Hi Gabriel,
    After double clicking the format only the rows field is not set to edit.It was greyed out.Is it anything related to the printer settings that will be maintained for a user?
    Regards,
    Sharon.

  • Error in BIM when running in background mode

    Hi,
    I am facing an error when running a BIM in sm35.
    The BIM runs fine with my userid in all three modes( foreground,display error mode, background mode)....but fails when the functional person is testing in background mode. The BIM runs fine in all other modes.
    It gives the message when running in background mode
    "No batch input data for screen SAPLMGMW 4008"
    What should I check or do to correct it.
    Please help.
    Regards
    Rashi

    The BIM runs fine in Foreground mode and in Display error mode even for the functional..It is giving error only for Background mode.
    I also did the following
    1.   Created the BIM in my id and tried running( in background) it using the other id ...it was successful
    2.   Created the BIM in other id and ran ( in background) using my id....it failed.
    I will check again for authorisations also.
    Regards,
    Rashi

  • How can I read the EXCEL file while Program is running in background.

    Hi all Expert,
    How can I read the EXCEL file while Program is running in background.
    Thanks

    you need to place ur excel file on application server and follow this thread: Reading an Excel file from the application server?
    loots of information if you can search forum.. thanks

  • In which way i can know that a job is running In background or foreground?

    Hi,
       In which way i can know that a job is running In background or foreground? please tell me...
    or a report is in background or foreground..
    Thanks ,
    Arya

    check tranx sm37 to know all background job details
    refer link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a8009505211d189550000e829fbbd/frameset.htm

  • Download Excel when program is run in background

    Hi all,
    I need help urgently in downloading my report into an excel file automatically when my report is has completed its run in background.
    Appreciate if help can be provided.
    Many thanks in advance.

    Check out the sample program of the provided link ..
    http://www.sap-img.com/abap/download-in-background-in-excel-format.htm

  • Error in ALV display when run in background

    Hi All,
    My program gives ALV Block Display . I am getting an extra ALV block displayed before display of each of my ALV block . However , while in normal execution (F8) , the program is running fine.
    Can I debug a background job ? Please help.

    Hi,
    My program runs for few seconds (2-4) . when I switch from program to SM37 tcode , program execution is already complete . Is there any other way of debugging ?

  • Will SUBMIT report EXPORTING LIST TO MEMORY work, when Run in Background?

    You can use SUBMIT <report> EXPORTING LIST TO MEMORY, and then Call the FM LIST_FROM_MEMORY to get the Data.
    This works fine, when the Program is Run in Foreground. My question is, will it work when I Run the Program in Background? i.e. When I Run the Program in Background, will the SUBMIT Statement, Export the List to Memory? Because only then the FM LIST_FROM_MEMORY will get the Data.
    Any alternate solution to meet the same requirement will be appreciated.

    It works for me... my spool output looked like:
    11.01.2008          JC: Calling program - test list to memory                  1                                                                               
    ZLOCAL_JC_SDN_CALLING_PROGRAM                started at 12:54:29                        
    ZLOCAL_JC_SDN_CALLING_PROGRAM                call complete 12:54:30                     
    ZLOCAL_JC_SDN_CALLING_PROGRAM                started at 12:54:30                                                                               
    11.01.2008           JC: Called program - testing list to memory                                                                               
    ZLOCAL_JC_SDN_CALLED_PROGRAM                 was called at: 12:54:29                    
    for the following code:
    report zlocal_jc_sdn_calling_program.
    parameters:
      p_start(1)            type c.
    start-of-selection.
      perform testcase.
    *&      Form  testcase
    form testcase.
      data:
       lt_list              type table of abaplist.
      write: / sy-repid, 'started at', sy-uzeit.
      submit zlocal_jc_sdn_called_program
        exporting list to memory
        and return.
      write: / sy-repid, 'call complete', sy-uzeit.
      call function 'LIST_FROM_MEMORY'
        tables
          listobject = lt_list.
      write: / sy-repid, 'started at', sy-uzeit.
      call function 'WRITE_LIST'
        tables
          listobject = lt_list.
    endform.                    "testcase
    and
    report zlocal_jc_sdn_called_program.
    start-of-selection.
      write: / sy-repid, 'was called at:', sy-uzeit.

Maybe you are looking for

  • Make Windows 7 search function search file names only

    Hello, Is there a way to search for a file name (like in previous versions of Widows) rather than searching for anything containing that word? For example, I want to search a for files with the word 'Pension' in the title, but intead I receive thousa

  • Organizing Iphoto 09 - Originals/Modified/deleted pictures

    I 'd like to know a few things about Iphoto 09 1.) When I delete a picture, specifically, out of the events portion of iPhoto, it goes right to the trash, right? Now, to delete it completely, I would have to go to the trash, and right click the icon

  • Drag and drop multiple mail messages into a folder in finder

    Hello All, I want to archive emails into folders in the finder. I can do this by dragging and dropping individual emails but not bulk emails. Does anywone know the best way of doing this? The reason I want to do it is once we have compleated a contra

  • VF01 Exit BADI to Postpone or block items in billing plan.

    Hi Experts, The business requirement is where they are not suppose to bill the customer more than the Sales Order value. While positng a invoice with referenceto to an Sales order (VF01) for a perticular order type with a billing plan. I want block i

  • Sqlserver time out when use multiple leftjoin in searcing

    Can anyone explain what reason cause follow #2,#3,#4,#5, i'm confusing for this problem in whole afternoon . thank you very much. you can copy the follow small example to see the timeout issue , if your pc is too quick, haven't yet see timeout issue