Spool empty when run in background

We are running a report in background which is emailed to various recipients.  Although this program run successfully in foreground it cancels in background.  On the selection screen the user has the option to display a standard report or an ALV report.  We have tested both and ALV works fine. The standard report fails. 
We have a spool number but it is empty for this scenario.  The result is the following code fails:
V_RQIDENT = P_SPONO.
  SUBMIT RSPOLST2 EXPORTING LIST TO MEMORY AND RETURN
                  WITH RQIDENT = V_RQIDENT.
  PERFORM GET_LIST_FROM_MEMORY.
FORM GET_LIST_FROM_MEMORY.
  CALL FUNCTION 'LIST_FROM_MEMORY'
       TABLES
            LISTOBJECT = LISTOBJECT.
ENDFORM.     
When I comment out the code which creates the recipient list for emailing then the spool is fine.  The spool contains ther required list if 1. ALV report and 2. Standard report with no mail recipient data created.
Any suggestions will be appreciated.
Thanks,
Jill

Vinod,
We eventually solved the problem as follows:
Adding the if logic since ALV worked, then for standard report call the function LIST_TO_MEMORY to write the list to memory.
If list = 'X'.   "ALV report - existing code works
  SUBMIT RSPOLST2   ...
else.
  call function 'LIST_TO_MEMORY'
      exporting
          list_index = sy-lsind.
endif.
call function 'LIST_FROM_MEMORY'
   tables
       listobject = listobject

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.

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

  • 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

  • GUI_GET_DESKTOP_INFO is not worked when run in background

    Dear all,
    I want to retrieve the computer name using this function module. It is working fine in foreground but it returns no result when I run in background. Is there any other method to get the computer name in background? Thanks in advance.

    Problem solved using the following method:
      DATA: BEGIN OF usr_tabl OCCURS 10.
              INCLUDE STRUCTURE uinfo.
      DATA: END OF usr_tabl.
      DATA  th_opcode(1)                    TYPE x.
      data: size type i.
      CONSTANTS: opcode_list LIKE th_opcode VALUE 2.
      CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_list
        ID 'TAB' FIELD usr_tabl-sys.
      describe table usr_tabl lines size.
      read table usr_tabl index size.
      write usr_tabl-term.
    while usr_tabl-term is the computer name. It works in background as well.
    Edited by: Chiew Ngee Ho on Mar 12, 2009 9:36 AM

  • 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

  • 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

  • Reading hierarchies when running in background.

    Currently we have an abap that captures the hierarchy information via the function K_HIERARCHY_TABLES_READ.  We then use the results to collect additional data.  The report works in the foreground but gets different results when running in the background.  We traced the issue back to the function read.  We checked with SAP and SAP's response is that the function K_HIERARCHY_TABLES_READ cannot be used in the background.  Does anyone run any reports in the background which reads hierarchies?  If so, how do you do it?
    thanks,
    Larry

    Paul,
    Starting new task will start a new LUW in dialog process and not in background. This is the reason you are having a problem. While technically STARTING NEW TASK is used for parallel processing, you need to consider whether the program will be run in foreground or background mode.
    In case of background, you need consider using multiple jobs via job open, submit, job close. This way you can initiate more than one process in your server group to do the work.
    You will need to consider the # of background WP available and the # of WPs you can use for this program.
    So if there are 100 WPs available and you can use only 10 at any give time, then you should schedule 10 jobs and then check the status of the 10 jobs before you can start scheduling the next jobs.
    You can use the FM SPBT_INITIALIZE to check the # of WPs that are currently available in the server group.
    Hope this helps.
    Thanks,
    Vikram.M

  • Error when running in background

    Hi,
      When i run the pgm in foreground its working fine but if i run in background the job is getting cancelled with the error message "Code page couldnt be determined".I checked in background the value in the o/p is coming but the job is getting cancelled.What is the reason for it?

    Hi,
    In your program are you using any cl_gui_frontend_services methods. That means
    any cl_gui_frontend_services=>gui_download
    cl_gui_frontend_services=>gui_upload
    If you are using frontend services background job. The job will not work
    Hope it will helps

  • List Format Different When Run In Background...

    Hi Guys,
    When I run a report in the Foreground my List displays normally.  It is worth knowing that this list has 36 Columns (36 added to the Field Catalog).
    But, when I run it in the background (F9), it seems to "wrap"/"split" the columns...  The last few colums are sent to the next line so my field catalog is actually displayed over 2 lines!!!
    When running the Report in the background (F9) I did choose the "Properties" button and I set the Rows to be 65 and the Colums to be 255 under the "Format" Parameter.  This does not change anything...
    We recently upgraded to ERP6.0. I wonder if it is some kind of SAP Standard that changed???
    Please advise - Point will be rewarded for usefull awnsers.
    Christiaan

    Tks, But it is still not working.
    I think it is SAP Standard not to go over the 255 limit when run in the background.  My list DEFINATELY has more than the 255 limit...
    Here is my statement:
    REPORT /bsa/rp_purchaseorder_analysis MESSAGE-ID /bsa/mm LINE-SIZE 400.
    This does not work.  When I use F9, it gives a message : "Formatting is set to X_65_255".  I run this WITHOUT overriding and it does not work.  I also ran this overriding the settings...  I made the columns 400 and it did not work.
    I dont think it is possible????
    tks
    Christiaan

  • Parallel Processing when running in background

    Hi
    We have implemented a parallel processing solution using the Call Function Starting New Task Destination in Group format to split a large number of updates across an RFC Server Group.
    This works well when running the ABAP in dialog, but when we schedule for background processing, the parallel processing does not seem to occur, we get a single background process.
    Does anyone have any ideas why this may be occuring ?
    Thanks
    Paul

    Paul,
    Starting new task will start a new LUW in dialog process and not in background. This is the reason you are having a problem. While technically STARTING NEW TASK is used for parallel processing, you need to consider whether the program will be run in foreground or background mode.
    In case of background, you need consider using multiple jobs via job open, submit, job close. This way you can initiate more than one process in your server group to do the work.
    You will need to consider the # of background WP available and the # of WPs you can use for this program.
    So if there are 100 WPs available and you can use only 10 at any give time, then you should schedule 10 jobs and then check the status of the 10 jobs before you can start scheduling the next jobs.
    You can use the FM SPBT_INITIALIZE to check the # of WPs that are currently available in the server group.
    Hope this helps.
    Thanks,
    Vikram.M

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

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

  • FM "TH_POPUP" Does not show popup in 4.7 server when run in background.

    Hi Experts,
        I am Using the Function Module TH_POPUP in my report to notify user when a background job is compleated. when I run my report in background the job gets canceled when the Function module is called only in our SAP 4.7 server.
    The report works without trouble in  our SAP 4.6c & ECC servers
    Can anybody give a solution?
    or
    provide another function module similar to TH_POPUP..
    Thanks in Advance...
    Anand C
    Edited by: Anand Cyril on Oct 5, 2009 8:35 PM

    Why do you want the pop-up to appear?  How exactly does it appear when you run it in the background?  I would have thought that it wouldn't as there's no GUI for it to pop-up on.
    Try adding this code to your program
    IF SY-BATCH NE 'X'. "program running in foreground
    *...show pop-up
    ENDIF.

Maybe you are looking for