Background Processing Option in Report

Hi Fellow Abapers,
I need to edit a report whereby there is an option to display further fields. Now if they select this option, the report NEEDS to run in the background and output to the file. This will later be retrieved byt the SAP Output Controller (Which there is already a program). It is a must.
Does anybody have any links, codes, tips? Helpful posters will be awarded.

Hi You can do that programatically, no need to say execute it in background from se38. Make sure you are not using file download but use open dataset. here is the sample program. Just copy and paste this in test program and check it. hope this will be helpfull. this report reads only materials for plant and there is an option on the selection screen to print or email or you can write it to spool. ofcourse it does automatically and then you can retrieve or print from SP01 but in your case you have to write to application server.
REPORT  ysam_test5 MESSAGE-ID zsummit.
DATA: marc TYPE marc.
TYPES: BEGIN OF t_marc,
       matnr TYPE matnr,
       werks TYPE werks_d,
       mmsta TYPE mmsta,
       maabc TYPE maabc,
       END OF t_marc.
DATA: it_marc TYPE TABLE OF t_marc,
      wa_marc TYPE t_marc.
DATA  : gr_table   TYPE REF TO cl_salv_table.
DATA  : gr_functions TYPE REF TO cl_salv_functions_list.
*fields used for variant create
DATA: wa_var_desc         TYPE varid,
      it_var_contents     TYPE TABLE OF rsparams,
      it_var_text         TYPE TABLE OF varit,
      wa_var_text         TYPE varit,
      w_var_varname       TYPE variant.
*printer information
DATA: wa_print_options TYPE fpm_parcon,
      wa_arc_options   TYPE fpm_parcon,
      w_print_options  TYPE pri_params.
*email information
INCLUDE <cntn01>.
DATA: w_recipient     TYPE swc_object,
      w_recipient_obj TYPE swotobjid.
*container macro
swc_container      w_swc_container.
*batch job information
INCLUDE lbtchdef.
DATA: w_job       TYPE tbtcjob.
*constants
CONSTANTS: c_on VALUE 'X',
           c_off VALUE space,
           c_int(11) VALUE ' 0123456789'.
SELECTION-SCREEN BEGIN OF BLOCK main with frame.
SELECT-OPTIONS: s_matnr FOR marc-matnr,
                s_werks FOR marc-werks.
SELECTION-SCREEN BEGIN OF BLOCK back WITH FRAME TITLE text-ss2.
PARAMETERS: p_fore RADIOBUTTON GROUP proc DEFAULT 'X', "foreground
            p_ball radiobutton group proc,
            p_berr radiobutton group proc.
SELECTION-SCREEN END OF BLOCK back.
SELECTION-SCREEN BEGIN OF BLOCK mail WITH FRAME TITLE text-ss3.
PARAMETERS: p_print RADIOBUTTON GROUP mail DEFAULT 'X',
            p_email RADIOBUTTON GROUP mail.
SELECTION-SCREEN END OF BLOCK mail.
SELECTION-SCREEN END OF BLOCK main.
START-OF-SELECTION.
  IF sy-batch = c_off AND p_fore = c_off.
    PERFORM create_variant.
    PERFORM build_print_parameters.
    IF p_email = c_on.
      PERFORM build_email_container.
    ENDIF.
    PERFORM open_job.
    PERFORM submit_job.
    PERFORM close_job.
    MESSAGE i000 WITH 'Job' w_job-jobname
                      'has been submitted'.
    perform delete_variant.
    EXIT.
  ENDIF.
perform select_data.
END-OF-SELECTION.
  PERFORM salv_grid.
*&      Form  salv_grid
      text
FORM salv_grid .
  DATA:      lref TYPE REF TO cx_root .
  DATA:      lr_layout TYPE REF TO cl_salv_layout,
             ls_key    TYPE salv_s_layout_key.
  TRY.
      cl_salv_table=>factory(
        IMPORTING
          r_salv_table   = gr_table
        CHANGING
          t_table        = it_marc ).
    CATCH cx_salv_msg INTO lref.
  ENDTRY.
***Sub Total
PERFORM sub_total.
***Layout
  lr_layout = gr_table->get_layout( ).
  ls_key-report = sy-cprog.
  lr_layout->set_key( ls_key ).
  lr_layout->set_default( 'X' ).
  lr_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
***toolbar
  gr_functions = gr_table->get_functions( ).
  gr_functions->set_all( 'X' ).
*final display
  gr_table->display( ).
ENDFORM.                    " salv
*&      Form  sub_total
FORM sub_total .
  DATA: lr_aggregations TYPE REF TO cl_salv_aggregations.
  lr_aggregations = gr_table->get_aggregations( ).
  lr_aggregations->clear( ).
  TRY.
      lr_aggregations->add_aggregation( columnname = 'Z_BALANCE_REM' ).
    CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
  ENDTRY.
  TRY.
      lr_aggregations->add_aggregation( columnname = 'Z_PAY_AMT' ).
    CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
  ENDTRY.
ENDFORM.                    " sub_total
*&      Form  select_data
form select_data .
select matnr werks mmsta maabc into table it_marc
       from marc
       where matnr in s_matnr
         and werks in s_werks.
endform.                    " select_data
*&      Form  create_variant
form create_variant .
  CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    EXPORTING
      curr_report           = sy-cprog
    TABLES
      selection_table       = it_var_contents
   EXCEPTIONS
     not_found             = 1
     no_report             = 2
     OTHERS                = 3
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  CONCATENATE sy-datum sy-timlo INTO w_var_varname.
  wa_var_desc-mandt = sy-mandt.
  wa_var_desc-report = sy-cprog.
  wa_var_desc-variant = w_var_varname.
  wa_var_desc-transport = 'F'.
  wa_var_desc-environmnt = 'A'.
  wa_var_desc-version = '1'.
  wa_var_text-mandt = sy-mandt.
  wa_var_text-langu = sy-langu.
  wa_var_text-report = sy-cprog.
  wa_var_text-variant = w_var_varname.
  CONCATENATE 'Batch Job Variant -' sy-uname INTO wa_var_text-vtext.
  APPEND wa_var_text TO it_var_text.
  CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
      curr_report                     = sy-cprog
      curr_variant                    = w_var_varname
      vari_desc                       = wa_var_desc
    TABLES
      vari_contents                   = it_var_contents
      vari_text                       = it_var_text
   EXCEPTIONS
     illegal_report_or_variant       = 1
     illegal_variantname             = 2
     not_authorized                  = 3
     not_executed                    = 4
     report_not_existent             = 5
     report_not_supplied             = 6
     variant_exists                  = 7
     variant_locked                  = 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.
endform.                    " create_variant
*&      Form  build_print_parameters
form build_print_parameters .
  IF p_print = c_on.
    CALL FUNCTION 'MAINTAIN_PRINT_PARAMETERS'
      EXPORTING
        i_title_text         = 'Select your printer'
      CHANGING
        c_pri_params         = wa_print_options
        c_arc_params         = wa_arc_options
      EXCEPTIONS
        parameters_not_valid = 1
        OTHERS               = 2.
    IF sy-subrc <> 0.
      MESSAGE e000 WITH 'Print parameters could not be gathered'.
    ENDIF.
  ENDIF.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  CALL FUNCTION 'CHECK_PRINT_PARAMETERS'
    EXPORTING
      i_title_text               = 'Select your printer'
      i_pri_params               = wa_print_options
      i_arc_params               = wa_arc_options
   IMPORTING
     e_pri_params                = w_print_options
   EXCEPTIONS
     parameters_not_valid       = 1
     OTHERS                     = 2
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  IF sy-subrc <> 0.
    MESSAGE e000 WITH 'Print parameters could not be assigned'.
  ENDIF.
  IF p_print = c_on.
    w_print_options-primm = c_on.
  ELSE.
    w_print_options-primm = c_off.
  ENDIF.
endform.                    " build_print_parameters
*&      Form  build_email_container
form build_email_container .
  swc_create_object w_recipient 'RECIPIENT' space.
  swc_clear_container w_swc_container.
  swc_set_element w_swc_container 'AddressString' sy-uname.
  IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  swc_set_element w_swc_container 'TypeId' 'B'.
  IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  swc_call_method w_recipient 'CreateAddress' w_swc_container.
  IF sy-subrc <> 0.
    MESSAGE e000 WITH 'Could not determine email address'.
  ENDIF.
  swc_set_element w_swc_container 'SendExpress' 'X'.
  IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  swc_call_method w_recipient 'SetExpress' w_swc_container.
  swc_call_method w_recipient 'Save' w_swc_container.
  swc_object_to_persistent w_recipient w_recipient_obj.
endform.                    " build_email_container
*&      Form  open_job
form open_job .
  CONCATENATE sy-cprog '-' sy-uname INTO w_job-jobname.
  CALL FUNCTION 'JOB_OPEN'
    EXPORTING
      jobname          = w_job-jobname
      jobclass         = 'A'
    IMPORTING
      jobcount         = w_job-jobcount
    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.
endform.                    " open_job
*&      Form  submit_job
form submit_job .
  CALL FUNCTION 'JOB_SUBMIT'
    EXPORTING
      authcknam               = sy-uname
      jobcount                = w_job-jobcount
      jobname                 = w_job-jobname
      priparams               = w_print_options
      report                  = 'YSAM_TEST5'
      variant                 = w_var_varname
    EXCEPTIONS
      bad_priparams           = 1
      bad_xpgflags            = 2
      invalid_jobdata         = 3
      jobname_missing         = 4
      job_notex               = 5
      job_submit_failed       = 6
      lock_failed             = 7
      program_missing         = 8
      prog_abap_and_extpg_set = 9
      OTHERS                  = 10.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
endform.                    " submit_job
*&      Form  close_job
form close_job .
  CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
      jobcount             = w_job-jobcount
      jobname              = w_job-jobname
      strtimmed            = c_on
      recipient_obj        = w_recipient_obj
    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.
endform.                    " close_job
*&      Form  delete_variant
form delete_variant .
CALL FUNCTION 'RS_VARIANT_DELETE'
  EXPORTING
    report                     = sy-cprog
    variant                    = w_var_varname
   FLAG_CONFIRMSCREEN         = 'X'
   FLAG_DELALLCLIENT          = 'X'
IMPORTING
  VARIANT                    =
EXCEPTIONS
   NOT_AUTHORIZED             = 1
   NOT_EXECUTED               = 2
   NO_REPORT                  = 3
   REPORT_NOT_EXISTENT        = 4
   REPORT_NOT_SUPPLIED        = 5
   VARIANT_LOCKED             = 6
   VARIANT_NOT_EXISTENT       = 7
   NO_CORR_INSERT             = 8
   VARIANT_PROTECTED          = 9
   OTHERS                     = 10
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.                    " delete_variant

Similar Messages

  • Problem in background processing of a report

    Hey,
    I am facing a problem while executing a report in background. In foreground its running absolutely fine but in background the job get cancelled every time .
    can any body tell me how to find the cause of the problem and how can we debug the report  in background
    thanks
    bobby

    Hi Amole,
    following error is encountered  in background processing
    ABAP/4 processor: GETWA_NOT_ASSIGNED
    job cancelled
    thanks
    bobby

  • Background processing of S_ALR_87013558 report with output in txt file

    Dear Friend's,
    Here I have a requirement of, to execute standard report S_ALR_87013558 (Budget/Actual/Commitment/Rem Plan/Assigned) in background processing mode. Here we have to run this report in background on daily basis at a particular given time.
    Once this report gets executed in background, output of this report should get converted automatically into txt file and this converted txt file must be downloaded in a respective folder automatically by giving desired path.
    After completion of this process, downloaded txt file they have to use for internal MIS reporting purpose.
    Is this possible via standard PS or else I have to go for the development.Please suggest, what should be the approach?
    Regards,
    Sandeep

    Hi Sandeep,
    Check if you can create batch job to run for S_ALR_87013558 using SM36
    The Program name is GP8YTY7TBR1TYRPCIPKAC6X9GZG
    Please check with ABAP.
    Regards,
    Nitin

  • Background processing for ABAP report with selection screen

    Hi ABAP Gurus,
    I m facing a strange problem in scheduling a background job for my report with a selection screen. I have a variant for the report.
    I scheduled a job, but it seems to be not doing anything though all the system resources are available. The job overview shows "Acive" for the job. The job is neither stopping anything, it is just sitting there In SM50, the status shows "On Hold".
    Any ideas/comments on the problem and how this can be overcome?
    Qucik replies and solutions will be highly appreciated as this is a crucial part for a go-live project.
    Thanks in advance.
    Shivani.

    Yes. My report has a selection-screen which requires user input. But I have created  a variant for the report and trying to run it in background using this variant. But facing this problem.
    Strange thing is, instead of the usual SM36/SM37 option where we schedule and monitor background jobs, this option does not work for my report.
    But I tried through SE38, and from my selection screen I selected "Schedule background job" and "run immediately" option, and this works. Though I still use SM37 to monitor this background job.
    I have never faced such a situation before.
    Any hints/tips why this happens and how this can be overcome in the future?
    Thanks in advance.
    Shivani.

  • BDC background processing

    Hi all,
       I've written a batch input data transfer program, into the internal table of which i upload some data from the presentation server using the GUI_UPLOAD function module . I am trying both session method and call transaction. I am being successful in uploading the data into the SAP system i,e into the database tables when i follow foreground processing for session method and 'MODE A'  in call transaction. The problem arises when i try to use the background processing option , the data is not getting uploaded into the SAP system. When i use the  foreground option the same data gets uploaded without problem.
       For the case of call transaction i tried looking into the message internal table during successful uploads, it'll have success message type and for the PROBLEM case of mine the internal table will be empty.

    hi,
    Yes. You can't run it in background if you are using GUI_UPLOAD.
    If the data is in application server, you can read it using OPEN DATASET.. and upload it to internal table in background.
    regards,
    Beena

  • Crystal Reports VS 2008 "The request could not be submitted for background processing"

    Hi,
    I am going to try to explain this issue the best I can. Please let me know if you need any other information or have any ideas as I have exhausted my resources. We have an ASP.NET application that has highly formatted crystal reports in them that the users can export as PDFs. All reports export without a problem when the application is run off of our desktops. The reports use a sql server authenticated user, executing stored procedures, and each subreport is linked by the main parameter. We are using Visual Studio 2008 version 3.5 SP1 with Crystal Reports Basic for Visual Studio 2008 on Windows 7 Enterprise SP1. We have designed the reports in Crystal Reports XI Release 2 (11.5.12.1838) and imported them into the ASP.NET application. When trying to export the reports as PDFs from the development or production servers, we get the error message below for some, not all, reports:
    System.Runtime.InteropServices.COMException (0x800002AD):  Error in File C:\Windows\TEMP\KeyAccountProfile {9FA5C095-77A2-425D-AC6B-8BB66B435336}.rpt: The request could not be submitted for background processing.     at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)     at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
    We have cleared the temp directory on the servers before exporting and are still receiving the error. We have installed Crystal Reports Basic Runtime for Visual Studio (10.5.2.0) on both servers. I have identified the underlying issue to one stored procedure/subreport that is causing the report to fail. The weird thing is, when we change the connection to point to development, the stored procedure/subreport runs fine for the report that generates an error when run from production, and the data is the exact same. I have tried rebuilding the subreport but the error still appears even though it runs fine for other reports.
    I have been through the document below, and othe similar issues in the forums, but still have not found a resolution. I was trying to use the "modules" application put since this is an ASP.NET application I am unsure of which executable I should be looking at.
    http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/50a6f5e8-8164-2b10-7ca4-b5089df76b33?QuickLink=index&overridelayout=true&36837934524320
    Thanks in advance for your assistance,
    Brad Hood
    06-26-14
    OK.. I did some more investigating on this today. I have found out when I move the sub report that generates the error under another sub report, the sub report in question runs without issue. But when I try and move the sub report that produces the error above any other sub report, the error still generates. Can this get any weirder.... FYI.. there is a total of ten sub reports on this report.

    Hi Brad
    I'm not sure that Modules would show us anything in this case, so let's try a few other things:
    1) Make sure you are using SP 1 for Crystal Reports Basic Runtime for Visual Studio:
    Crystal Reports for VS 2005 and VS 2008 Updates & Runtime Downloads
    2) Seeing as this works on dev, this may be some db inconsistency so enabling the report option "Verify on 1st Print" will be a good idea.
    3) Double check the database client and make sure the same client is used on dev and deployed systems. Actually I take back my Modules negative as this is where it may prove useful. Once you have the Modules logs, look at who is loading the crpe32.dll, then look at that process and see the client dlls.
    4) Check the printer driver; see if there are any updates. Try a different printer driver.
    Ten subreports is not too bad, though not that good either as you are loading the report engine with at minimum 11 simultaneous reports (each subreport is considered to be a report). If a subreport is in a details section and the details section returns a 100 records, you are running 100 + 1 reports. This may lead to memory issues, which may lead to the error.
    If I was a betting man, I'd put most of my money on the printer driver (based on your last addition to your post). What ever money I had left would go to some database issue (be it actual data or client related).
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Data of alv report in  excel file in background processing using open datas

    Hi Experts,
    I have developed report for purchase register . if i execute this report in background process i am not able to get the downloaded file in excel and output is also not coming properly, columns are going to overlap.
    i used open dataset  read dataset and close dataset but still problem is not solved. so if anyone have code with this and also which will have concatenate statement in the code send it.
    Regards,
    Rahul

    Hi Rahul,
    Ur code shud be like below:
    DATA : l_filename2 TYPE string,
                v_extn.
        SPLIT p_filename AT '.xls' INTO l_filename2  v_extn.
        CONCATENATE l_filename2  'downloaded'  INTO l_filename2  SEPARATED BY '_'.
        CONCATENATE l_filename2  'txt'   INTO l_filename2 SEPARATED BY '.'.
        OPEN DATASET l_filename2 IN TEXT MODE FOR OUTPUT ENCODING DEFAULT.
        IF sy-subrc <> 0.
          MESSAGE e499(sy) WITH text-e02.
        ENDIF.
        LOOP AT it_order_number INTO wa_order_number.
          TRANSFER wa_order_number TO l_filename2.
        ENDLOOP.
        CLOSE DATASET l_filename2.
    Now, go to tcode AL11 and check it in the Application server itself.
    Hope this helps,
    Regards,
    Arnab.

  • Submit Report (Regarding Background Processing)

    Hi Guru's,
    I want help regarding Background Processing.
    I have developed a program which is running fine in forground but in Background mode no values are comming.
    All values are becomig Zero.
    Plz help.
    *--- Submit Report for 'COGI' (Postprocessing of Error Records from Automatic Goods Movements)
      SUBMIT coruaffw USING SELECTION-SCREEN '1000'
                      WITH  r_cumul = 'X'
                      EXPORTING LIST TO MEMORY
                    AND RETURN.
    *---- Get the List
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = it_list_tab
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      IF sy-subrc = 0.
    *--- Convert to Ascii
        CALL FUNCTION 'LIST_TO_ASCI'
          TABLES
            listobject         = it_list_tab
            listasci           = it_asci_tab
          EXCEPTIONS
            empty_list         = 1
            list_index_invalid = 2
            OTHERS             = 3.
        IF sy-subrc <> 0.
    *      MESSAGE i000 WITH 'Problem in converting LIST to ASCII'.
        ENDIF.
        DESCRIBE TABLE it_asci_tab LINES w_cogi.
        w_cogi = w_cogi - 5.
      CALL FUNCTION 'LIST_FREE_MEMORY'
        TABLES
          listobject = it_list_tab.

    Hi Arbind,
                  You have used return you need to add the addition with.Try this way hope it works
    SUBMIT zreport EXPORTING LIST TO MEMORY
                    AND RETURN
                    WITH P_1 = P_1
                    WITH P_2 = P_2
                    WITH P_3 = P_3
                    WITH S_4  IN S_4
                    WITH S_5 IN S_5
                    WITH S_6 IN S_6.

  • ABAP Custom Report (ALV Format) in Background Processing

    Hi
    I am not the hardcore ABAP Person. But want to know about the detail fact of the ABAP Custome Reports. The question is can we do the background processing for the ABAP Custome Report in ALV Format.
    If Yes ..do we require to have any additional Function/code to get the spool in ALV Format. I saw the comments that the output will look like the mess.
    Please share your comment or any useful documenation on this. We are in ECC 6.0
    Thanks in advance..and yes it will be rewared by points.
    Navin

    You can use alv's in background using docking containers, but the display wont be interactive. If you search the forum you will see tons of threads which talk about running ALV's in background.
    For the output to be interactive, you can run the report in foreground and do the data processing in background.
    Refer this link:
    Displaying ALV Grid in Background Job

  • BACKGROUND PROCESSING, REPORT NOT LOADING, "OBJECT NOT SET TO INSTANCE..."

    Post Author: thecoffeemachine
    CA Forum: .NET
    I already posted this message in other Web sites, but I am almost getting crazy here and I need help:
    HI:
    The Web application I am testing was having several issues related to loading Crystal Reports. It was fixed and I do not know which of the 1000 things I did to fix it; but now it began, again, to have the same behavior after I had a conflict with another Web site that was in the same server.
    The thing is that I had another virtual directory where resided a copy of the same Web app. for testing purposes/working with the Visual Studio. The reports were loading all fine, very fast, all perfect... And suddenly the assemblies of one Web site and the other began to "blend" together and..... well the same behaviors appeared again. I tried to copy the last stable backup and rebuild the Web app... but it did not work.
    At the very first time that one requests the report, it shows without problem. At the second time it shows an error message related to "cannot submit to background processing", and sometimes "object not set to an instance.." ... and on the third time it just never shows up and the app. becomes unresponsive. I have to close the window and request the Web site again in another browser window. If I wish to see the report again I have to wait for hours until it shows it.
    I am using Visual Studio 2003 and the Crystal Report version that was shipped with that Visual Studio version. I am working with Windows Server 2003 and SQL Server 2000. Below is the VB code:
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load             Me.SqlConnection1.Open()
           Me.SqlSelectCommand1.Parameters("@CourseCode").Value = Request.QueryString("CD")         Me.SqlSelectCommandReferences.Parameters("@CourseCode").Value = Request.QueryString("CD")         Me.SqlSelectCommandTextbook.Parameters("@CourseCode").Value = Request.QueryString("CD")         Me.SqlSelectCommandObjectives.Parameters("@CourseCode").Value = Request.QueryString("CD")         Me.SqlSelectCommandTopicData.Parameters("@CourseCode").Value = Request.QueryString("CD") Me.SqlSelectCommandCourseOutcomes.Parameters("@CourseCode").Value = Request.QueryString("CD")
            Me.SqlDataAdapterMainData.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseSyllabusData")         Me.SqlDataAdapterReferences.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseReferenceData")         Me.SqlDataAdapterTextBook.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseTextbookData")         Me.SqlDataAdapterObjectives.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseObjectivesData")         Me.SqlDataAdapterTopicData.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseTopicData")
    Me.SqlDataAdapterCourseOutcomes.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseOutcomes")
            Dim myExportOptions As CrystalDecisions.Shared.ExportOptions         Dim myDiskFileOptions As CrystalDecisions.Shared.DiskFileDestinationOptions         Dim myExportFile As String         Dim myReport As New ABETFormat         myReport.SetDataSource(Me.DtsSyllabusCompleteData1)
            myExportFile = "C:UNTempPDF" & Session.SessionID.ToString & ".pdf"         myDiskFileOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions         myDiskFileOptions.DiskFileName = myExportFile         myExportOptions = myReport.ExportOptions
            With myExportOptions             .DestinationOptions = myDiskFileOptions             .ExportDestinationType = .ExportDestinationType.DiskFile             .ExportFormatType = .ExportFormatType.PortableDocFormat         End With
            myReport.Export()
            Response.ClearContent()         Response.ClearHeaders()         Response.ContentType = "application/pdf"
            Response.WriteFile(myExportFile)         Response.Flush()         Response.Close()         System.IO.File.Delete(myExportFile)         Me.SqlConnection1.Close()
        End Sub
    I already have tried moving the Crystal Reports dll´s to the bin directory. ..... I have tried calling the Garbage Collector at page unload...I also have checked, inside the report, that the database is "up to date"... ... recycling the worker process of the IIS... etc...
    I see that, in debbuging mode inside the Visual Studio, when the page loads the debbuging window shows a message notifying that the symbols related to the Crystal Reports dll's could not be loaded.
    Should I need to modify the default properties of the database? I checked "database is case insensitive", "use indexes or server for speed".. I have tried checking and unchecking the box "performing grouping on server"
    Oh by the way, my report has about 4 subreports in it. Each report loaded shows 1 or 2 pages.
    ANY HELP WILL BE EXTREMELY APPRECIATED....
    MMS

    See  [Crystal Reports For Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23&overridelayout=true] article, page 107 and on for details on how to use Crystal reports in session.
    Ludek

  • Parallel Process Option for Optimization in Background.

    Hi,
    I am testing the SNP Optimizer with various settings this week on  demo version from SAP for a client.  I am looking for information that anyone might have on the SNP Parallel Processing Option in the execution of the Optimizer in the background.   The information that I could find is very thin.   I would be interested in any documentation or experience that you have.
    Sincerely,
    Michael M. Stahl
    [email protected]

    Hello,
    While running the transaction /SAPAPO/SNPOP - Supply Network Optimization  in the background, In the variant of it you can enter Parallel Processing profile in the field Paral. Proc. Profile.
    This profile you will require to define in the Customization(SPRO) before use it in the variant.
    Path to maintain it is as below Use transaction SPRO
    Advanced Planning and Optimization --> Supply Chain Planning -->Supply Network Planning (SNP) --> Profiles --> Define Parallel Processing Profile
    Here you will require to define your profile... e.g. as below
    Paral. Proc. Profile SNP_OPT
    Description          SNP OPTIMIZER PP PROFILE
    Appl. (Parallel Pr.) : Optimization
    Parallel Processes   2
    Logical system :
    Server Group :
    Block Size:
    You will require to take Basis team's help to enter value for Server Group and Block size.
    I hope, above information is helpful for you.
    Regards,
    Anjali

  • How run a report in background process ?

    Hi Experts,
    I wrote a code in which I am have multiple selection screens....means in first screen there will 3 radio buttons.
    So, depending upon the radio button selected, the other selction screen will be displayed...
    So, here i want to run a report in background process...But in menubar im not able to find 'program'.
    So, please help me this to run my report in background process.. with any simple code...
    Thanks,
    Rocky.

    Hi,
    Try to see this example and adapt it for your case:
    constants :   c_jobname  like tbtcjob-jobname  value 'ZRFC_CM_38',
                  c_jobclass like tbtcjob-jobclass value 'A',
                  c_x        type c                value 'X',
                  c_msgclass type arbgb            value 'ZXXXSD',
                  c_error    type bapi_mtype       value 'E',
                  c_status   type bapi_mtype       value 'S',
                  c_msg1     type msgnr            value '177',
                  c_msg2     type msgnr            value '178'.
    data : v_jobcount like tbtcjob-jobcount.
    ranges:
      r_auart    for vbak-auart,
      r_wbstk    for vbuk-wbstk,
      r_mtart    for mara-mtart,
      r_reswk    for ekko-reswk,
      r_vtweg    for vbak-vtweg.
      call function 'JOB_OPEN'
        exporting
          jobname          = c_jobname
        importing
          jobcount         = v_jobcount
        exceptions
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          others           = 4.
      if sy-subrc = 0.
      Assignment of Ranges
        append lines of:
           distribution_channel to r_vtweg,
           order_type_range     to r_auart,
           status_range         to r_wbstk,
           material_type_range  to r_mtart,
           plant_range          to r_reswk.
      Submit program in background
        submit z_beve_salesorder_list
          with p_spart   = division
          with p_file    = file_name
          with p_land1   = country
          with s_vtweg   in r_vtweg
          with s_auart   in r_auart
          with s_wbstk   in r_wbstk
          with s_mtart   in r_mtart
          with s_reswk   in r_reswk
           via job c_jobname
        number v_jobcount
           and return.
      Close the Job
        call function 'JOB_CLOSE'
          exporting
            jobcount             = v_jobcount
            jobname              = c_jobname
            strtimmed            = c_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.
        Status Message
          return-type  =  c_status.
          message id c_msgclass
             type c_status
           number c_msg1
             into return-message
             with c_jobname
                  sy-datum
                  sy-uzeit.
        else.
        Error Message
          return-type  =  c_error.
          message id c_msgclass
             type c_error
           number c_msg2
             into return-message
             with c_jobname.
        endif.
      endif.
    Regards.

  • Report Execution - Background Process

    Hi Friends,
    I have developed a report program.
    I have also created a transaction code for executing it.
    Now the user needs to execute this program as a background job.
    I have tried with SM36 and SM37 transactions. Here, you need to set the variants and time for execution.
    But the user has lots of selection criteria and setting the variants for this requirement is highly impossible.
    Kindly let me know whether I can add any additional statements in the program so that the program executes as a background process when initiated th' the selection screen / transaction code.
    Kindly provide your suggestions.
    Thanks in advance.

    Hi Karthik,
    Looks like a wrapper ABAP program is required to meet your requirement. This program can be called in the background and in turn can submit the report program that you have created to achieve the actual functionality.
    In this wrapper program, you need to create a dynamic variant using FMs (search RSVARIANT in SE37). Here you can populate the fields of the selection screen based on any complex criteria as you mentioned using ABAP statements. The dynamic variant is similar to the variants created on the selection screen.
    Once you have the variant (dynamic) ready you can create a background job and submit it within this wrapper program, for which you again have to use the FMs (search createjob*, and go to the function group).
    You have to release the submitted job and you can get the status of the job while it is running using the standard FMs provided for this.
    Finally, you can create a spool list for the wrapper program that can detail the status of the submitted job.
    It is a good idea to delete the dynamic variant once it ahs been used because if required again, it can be created again. If the dynamic variant is created daily or several times a day, it is definitely good to delete it after the use. The right place to do deletion is at the end of the wrapper program after confirming that the job submitted has completed. Or as an alternate strategy, all variants prior to a week can be deleted when the wrapper program runs today (we are using this strategy).
    I have used this successfully.
    Hope this helps.
    Thanks
    Sanjeev

  • Background Processing, Selection Screens and Variants

    Hi All,
    I am having a little trouble Background Processing with Selection Screens and Variants.
    When a user runs my report and selects the option of background processing, then they select a checkbox. Once this is checked, they should go and fill in details, press Execute and voila a background process is created. However what is happening is that when i execute it then it asks for a variant. I do not want this to happen. I want the values in the selection screens to be used as default. Here is my code for background processing
    FORM START_BACKGROUND_PROCESSING.
      CALL FUNCTION 'BP_JOBVARIANT_SCHEDULE'
        EXPORTING
          TITLE_NAME            = 'End Customer Report '
          JOB_NAME              = 'customer_report'
          PROG_NAME             = 'ZSE_SD_SALES'
      EXCEPTIONS
        NO_SUCH_PROGRAM       = 1
        OTHERS                = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "START_BACKGROUND_PROCESSING
    After the background process is started, all teh data is collated then written to the app server. this is the order
      ELSEIF R2 EQ 'X' AND SY-BATCH EQ 'X'.
        PERFORM INITIALIZE_DATA.
        PERFORM SELECT_DATA.
        PERFORM PROCESS_DATA.
        PERFORM GET_END_CUSTOMER_DATA.
        PERFORM WRITE_TO_APP_SERVER.
    Any ideas? Points given to those who are helpful

    done myeslf

  • The request could not be submitted for background processing.

    Post Author: Chriss
    CA Forum: Administration
    It's an BOE XI SR2, on Win2k3 server, with a print cluster with two print spools, handling 3000+ printers. I discovered this error to be intermittent and only on one of the spools. It turned out that the only common factor was an HP4250 print driver. I backed all the 4250s down to 4200 drivers and the intermitent error ("Error in File. The request could not be submitted for background processing.") went from about 100 a day to zero. The other spool had a different version of the HP4250 driver and would on rare occassion cause this error, "Error in File ... Page header or footer longer than a page." but never the background processing error.
    For reference, when I got this error in XI R1, this was the solution for 'the error with one name and many causes':The error "The request could not be submitted for background processing" can be related to a corrupt or wrong versioned crpe32.dll in the Crystal bin folder. Renaming to crpe32.dll_bak and using the repair command in the the "Add/Remove Programs" tool in the "Control Panel" will reinstall the correct dll. Then restart the Crystal services.

    Post Author: krishna.moorthi
    CA Forum: Administration
    For Crystal reports :
    Error : "The request could not be submitted for background processing"
    I think,this was not related to a corrupt or wrong versioned crpe32.dll.
    but the below mentioned is one of the reason for getting this error.
    I got the error when the main report(crystalreports10) having more than 2 subreports not assigned proper tables for the subreports.
    Example: (this code raise the abone mentioned error.)
    rpt.SetDataSource(Exdataset);
    rpt.Subreports&#91;"subreportname1"&#93;.SetDataSource(Exdataset); // Exdatatset.Tables&#91;1&#93;
    rpt.Subreports&#91;"subreportname2"&#93;.SetDataSource(Exdataset);// Exdatatset.Tables&#91;2&#93;

Maybe you are looking for

  • How do I get Word Styles to come over to PDF as Bookmarks?

    Using MS 2010 Word with Adobe X......When creating a PDF from Word, I use bookmarks and styles from the word document.  Only the Bookmarks (Headings) come over .....  NOT the styles (i.e., Figure and Table Titles, and all other pertinent styles that

  • Help!! i dont know what to do

    Hi, I have been having some difficulty with my ipod. Im not sure if something messed up on my ipod or if it is itunes. Anyway i was downloading some new songs and a box popped up saying that there wasnt enough space and that i needed to delete some f

  • [HP Photosmart D110a] Printer won't connect to network

    Printer: HP Photosmart D110a Operating system: Mac OSX 10.6.8 I'm living in a dorm room and trying to wirelessly connect my printer to my computer. I can't connect my printer to my university's network because it's protected. Instead I've been connec

  • F-04 CLEARING ACCT

    Hi Experts! Good day! When i'm using F-04 to clear acct 11200012, the error message below: Consolidated companies ' ' and A201 are different Message no. F5080 Diagnosis The number of the affiliated company must be clear for the selected document type

  • Ejb-jar.xml (Help)

    What is the difference between the <resource-ref> and <resource-env-ref> tags?