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

Similar Messages

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

  • 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

  • Problem in background processing

    Hi all,
       following Program is working fine in foreground, when i am scheduling it is not working, plz find if there is any problem in coding.
    DATA: PATH(256)  TYPE C.
    DATA: DIR_SEC    LIKE EPSF-EPSDIRNAM,
          DIR_PROCESS LIKE EPSF-EPSDIRNAM,
          DIR_INBOUND LIKE EPSF-EPSDIRNAM,
          DIR_ERROR LIKE EPSF-EPSDIRNAM.
    DATA: FILE_MASK  LIKE EPSF-EPSFILNAM VALUE 'TEMP_.'.
    DATA: FILE_INBOUND  LIKE EPSFILI OCCURS 0 WITH HEADER LINE,
          FILE_BACKUP  LIKE EPSFILI OCCURS 0 WITH HEADER LINE.
    DATA: LOC LIKE SXPGCOLIST-PARAMETERS,
          RET_CODE LIKE EXTCMDEXEX-STATUS.
    DATA: BEGIN OF PROT_TAB OCCURS 10.
    INCLUDE STRUCTURE BTCXPM.
    DATA: END OF PROT_TAB.
    *DIR_SEC = '
    172.19.2.249\pos\inbound'.
    read directory
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
      EXPORTING
       DIR_NAME                     = DIR_SEC
         DIR_NAME                     =  '
    172.19.2.249\pos\inbound_pos'
       FILE_MASK                    = FILE_MASK
    IMPORTING
      DIR_NAME                     =
      FILE_COUNTER                 =
      ERROR_COUNTER                =
      TABLES
        DIR_LIST                     = FILE_INBOUND
      EXCEPTIONS
        INVALID_EPS_SUBDIR           = 1
        SAPGPARAM_FAILED             = 2
        BUILD_DIRECTORY_FAILED       = 3
        NO_AUTHORIZATION             = 4
        READ_DIRECTORY_FAILED        = 5
        TOO_MANY_READ_ERRORS         = 6
        EMPTY_DIRECTORY_LIST         = 7
        OTHERS                       = 8.
    IF SY-SUBRC <> 0.
      IF SY-SUBRC = 7.
        MESSAGE S083(TRUST).
        RETURN.
      ELSE.
        MESSAGE E081(TRUST) WITH DIR_SEC.
      ENDIF.
    ENDIF.
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
      EXPORTING
       DIR_NAME                     = DIR_SEC
         DIR_NAME                     =  '
    172.19.2.249\pos\inbound_archive'
       FILE_MASK                    = FILE_MASK
    IMPORTING
      DIR_NAME                     =
      FILE_COUNTER                 =
      ERROR_COUNTER                =
      TABLES
        DIR_LIST                     = FILE_BACKUP
        EXCEPTIONS
        INVALID_EPS_SUBDIR           = 1
        SAPGPARAM_FAILED             = 2
        BUILD_DIRECTORY_FAILED       = 3
        NO_AUTHORIZATION             = 4
        READ_DIRECTORY_FAILED        = 5
        TOO_MANY_READ_ERRORS         = 6
        EMPTY_DIRECTORY_LIST         = 7
        OTHERS                       = 8.
    IF SY-SUBRC <> 0.
      IF SY-SUBRC = 7.
        MESSAGE S083(TRUST).
        RETURN.
      ELSE.
        MESSAGE E081(TRUST) WITH DIR_SEC.
      ENDIF.
    ENDIF.
      LOOP AT FILE_INBOUND.
      READ TABLE FILE_BACKUP WITH KEY NAME = FILE_INBOUND-NAME.
      IF SY-SUBRC <> 0.
         CONCATENATE '
    172.19.2.249\pos\inbound_process\' FILE_INBOUND-NAME INTO DIR_PROCESS.
         condense DIR_PROCESS.
         CONCATENATE '
    172.19.2.249\pos\inbound_pos\' FILE_INBOUND-NAME INTO DIR_INBOUND.
         condense DIR_INBOUND.
         CONCATENATE DIR_INBOUND DIR_PROCESS INTO LOC separated BY SPACE.
         condense LOC.
          CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
          EXPORTING
          COMMANDNAME = 'ZMOVE'
          OPERATINGSYSTEM = 'Windows NT'
          ADDITIONAL_PARAMETERS = LOC
          STDERR = 'X'
          STDOUT = 'X'
         TARGETSYSTEM = DB_HOST
         DESTINATION = XPG_DEST
          TERMINATIONWAIT = 'X'
          TRACE = ' '
          IMPORTING
          STATUS = RET_CODE
          TABLES
          EXEC_PROTOCOL = PROT_TAB
          EXCEPTIONS
          COMMAND_NOT_FOUND = 01
          NO_PERMISSION = 02
          PARAMETERS_TOO_LONG = 03
          PARAMETER_EXPECTED = 04
          PROGRAM_START_ERROR = 05
          PROGRAM_TERMINATION_ERROR = 06
          SECURITY_RISK = 07
          TOO_MANY_PARAMETERS = 08
          WRONG_CHECK_CALL_INTERFACE = 09
          X_ERROR = 10
          OTHERS = 11.
          write 'sai'.
          ELSE.
         CONCATENATE '
    172.19.2.249\pos\inbound_pos\' FILE_INBOUND-NAME INTO DIR_INBOUND.
         condense DIR_INBOUND.
         CONCATENATE '
    172.19.2.249\pos\inbound_errorfile\' FILE_INBOUND-NAME INTO DIR_ERROR.
         condense DIR_PROCESS.
         CONCATENATE DIR_INBOUND DIR_ERROR INTO LOC separated BY SPACE.
         condense LOC.
         CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
          EXPORTING
          COMMANDNAME = 'ZMOVE'
          OPERATINGSYSTEM = 'Windows NT'
          ADDITIONAL_PARAMETERS = LOC
          STDERR = 'X'
          STDOUT = 'X'
         TARGETSYSTEM = DB_HOST
         DESTINATION = XPG_DEST
          TERMINATIONWAIT = 'X'
          TRACE = ' '
          IMPORTING
          STATUS = RET_CODE
          TABLES
          EXEC_PROTOCOL = PROT_TAB
          EXCEPTIONS
          COMMAND_NOT_FOUND = 01
          NO_PERMISSION = 02
          PARAMETERS_TOO_LONG = 03
          PARAMETER_EXPECTED = 04
          PROGRAM_START_ERROR = 05
          PROGRAM_TERMINATION_ERROR = 06
          SECURITY_RISK = 07
          TOO_MANY_PARAMETERS = 08
          WRONG_CHECK_CALL_INTERFACE = 09
          X_ERROR = 10
          OTHERS = 11.
          ENDIF.
          WRITE 'SAI'.
         endloop.

    the only thing I can think of is that your function modules don't work in the Background ? Have you checked them ? Lot of FM's like GUI_DOWNLOAD etc don't work in the background. Perhaps your FM's function similarly ?

  • Do anyone have problem with background process APSDeamon.exe, do anyone have problem with background process APSDeamon.exe

    Hi All,
    I have a problem with APSDeamon.exe. It do not close properly. If I open iTunes and then close it and try to re-open it again. I must end the process in the task manager to be able to open the software. Has anyone got this kind of issues??

    Please look clayclay's and my answers -  https://discussions.apple.com/message/17002335#17002335

  • Regarding background processing of the session

    Hi Gurus
       I have some records in my flat file.
    While i am doing uploading the file using tc, in foreground it is processing correctly and no issues.
    While in Background some of the records are not processing properly and in sm35 for those records I am getting the message :"InCorrect".
    What may be the reasons I am not getting.
    Can you please suggest me where may be the wrong exactly.
    Your suggestions are highly encouragable.
    Regards,
    kumar

    Hi Sree Ram,
    This is a very common problem faced in Mass upload of data. This mainly happens if the current transaction is dependent on the previous transaction. For e.g. transaction 2 has a dependency on sucessfull processing of transaction 1.This is due to the time taken by the transaction to update the database table.
    Put a commit statement after every transaction in your recording and this will ensure that the records are updated and you will not face any problem in background processing.
    Regards,
    Guru

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

  • 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

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

  • 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

  • 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

  • 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

  • Using ServletContextListener for background process in tomcat, problems?

    Hi, I am building a web app using mojarra 1.2, hibernate 3.2, mysql 5 and tomcat 6. Currently, there's a need to run a background process every hour to:
    1) query the database
    2) process information
    3) send emails to (big) list of individuals when matched
    4) update database
    5) must happen during business hour
    For now, my approach to this problem is to hook a Timer object inside a class implements ServletContextListener. So that every hour during business hour will process the steps above when Tomcat started until someone shut down shut down Tomcat or when it crash (hopefully that won't happen).
    I read a few articles, they claimed this is not a good approach because in a managed environment, background thread like this won't be in the scope of the container.
    Due to certain reasons, we can't deploy this part as a separate daemon (e.g: jsvc) yet. We'll need to wait for few other things to occur before can we deploy a full daemon services.
    The question for this post is: What are some of the potential problems we will be dealing with when running background thread like this in tomcat? What are some of the things we'll need to watch out for before real problems arise (e.g size of db connection, # of concurrent process, etc) what are some other pitfalls other experienced when deploying background thread in tomcat?
    We hope this solution will be able to handle what needs to be done until our daemon service is ready.
    Thank you for your opinions

    You can try this.. Which gives more grip... in making threads etc..
    Here is a class with a method that sets up a ScheduledExecutorService to beep every ten seconds for an hour:
    import static java.util.concurrent.TimeUnit.*;
    class BeeperControl {
    private final ScheduledExecutorService scheduler =
    Executors.newScheduledThreadPool(1);
    public void beepForAnHour() {
    final Runnable beeper = new Runnable() {
    public void run() { System.out.println("beep"); }
    final ScheduledFuture<?> beeperHandle =
    scheduler.scheduleAtFixedRate(beeper, 10, 10, SECONDS);
    scheduler.schedule(new Runnable() {
    public void run() { beeperHandle.cancel(true); }
    }, 60 * 60, SECONDS);
    }

Maybe you are looking for

  • Need to update a record on page load. How? (ASP/VBScript)

    The standard Update Record behavior requires a form on the page, plus a recordset to identify the value to be updated. In my scenario, the value for the record to be updated is already in the URL as the ID. I just don't know how to write it myself an

  • Mac keeps losing wireless network

    This has been happening on and off now for a few weeks but has got much worse recently. My mac suddenly doesn't recognise my BT broadband network name. It often takes up to half an hour before it suddenly comes back on again. Any suggestions? I'd be

  • Connecting my hp 5520e to a network on a HG533

    My new printer has connected to the network but i can not discover the printer on my Mac and Ipad can anyone assist me with this please

  • [SOLVED] "Copy to Clipboard" console command - Parcellite

    I'm trying to make a python script that will take a screenshot using scrot, upload it to imageshack.us and then copy the image link to the clipboard (parcellite). The problem lies in the "copy to the clipboard" part. The documentation states that the

  • How to add a DNS entry

    Hi all, I would like to know if there exists any API method to add a DNS entry from an authorized client on a DNS server in the network. The DNs server supports dynamic updation. thanks in advance Sudheesh