Spool not generated in background mode

Hi ,
I am fine tuning a report.
I am working on a program which is collecting data and exporting data into memory id. then two other reports, are importing data from memory and displaying in AlV/list.
When i execute this report in background the spool is not getting generated.
is there any way to generate the spool?
How to measure the execution time, as the program is taking much time and some times going to dump in case of time limit.
Thanks ,
Kiran

Hi Kiran,
For measuring runtime use SE30 transaction. When u run in back ground it wont go to Dump. It may happen only in  fore ground. If at all it happend in back ground, the reason might be different. Analyze that dump n see what is going wrong. Also i dont think there is any time limit in back ground as i executed jobs that ran for 11 days!!!!. U can alos debug the batch job.
put break point in ur program, Select that batch job in SE37, enter jdbg in command promt and press enter. Control will go to debug mode.
Which ALV u r using. I think through OOPS ALV batch job will not create spool i guess. Not sure on this.
Thanks,
Vinod.

Similar Messages

  • Spool not generated in BAckground Job

    Hi,
    I am trying to schedule RSNAST00 in a background job. My problem is that when the job gets finished i cannot see a spool for the output, any pointers to this issue will be appreciated.
    Regards,
    Sharadendu

    Go to transaction SM37 and check job log.
    It is possible that something is going wrong in your program. I would suggest you to debugg background job.
    To debugg just select job in SM37 and in command window(Where we type T codes) type JDBG and press enter. This will open debugger. Press F7 for approx 4-5 times. Now your program will be opened in debugg and you check why spool is not generated.
    let me know ig this helps.
    Regards,
    Jigar Thakkar.

  • Spool not generated for background job

    Hi all!
    I have a Zprogram that does some validation and submits the data to transaction ME59 using SUBMIT statement. The program is running fine in foreground.When it is scheduled for background, the spool is not getting generated. I know that if a program contains SUBMIT statement, the spool will not be generated when run in background. But is there a way to make it work? The client requires the exact output that we get in foreground.

    Hi,
      All spool requests will be stored in TSP01 table
    TSP01 - Spool Requests
    field name for Spool request number is RQIDENT
    Hi,
    Take a look at OSS Note 422136 which states:
    "2. You can only store one spool request even if a step generates several spool requests during processing. The application is responsible for a "spool overview" in this case. If a step generates several spool requests during processing, only one request can be stored. In this case, the application report should issue the number with a message when writing a spool request so that it is then displayed in the job log."
    Also take a look at OSS Note 519059 which further supports the case that you must capture the individual spool numbers as they are being created (i.e. within the job step's program). The note contains the following:
    8] Question: How are the spool requests assigned?
    Answer: The step information is stored in table TBTCP. This has space for exactly one spool request (field LISTIDENT). If a step generates several spool requests during the processing, only one can be stored. In this case the application is responsible for a "spool overview
    <b>Reward points</b>
    Regards

  • BDC not working in Background mode

    Hi All,
    I have created a BDC. It is working fine in forground mode but not woking in background mode. Please any one know what could be the problem.
    thanks,
    Shweta

    Hi,
    I think there is some field in your screen is disabled for input. As it will not through you error.
    Please run you BDC in foreground mode and check it and see if you get any message. it will be a sucess message.
    this thing happend to me also as my ship to party was disbled in one of screen of VA02.
    thanks,
    Sarbpreet

  • SPOOL not generated while smartform is executed in Background

    Hi
    I have issue while creating spool for smartform in background.Its works fine in foreground and i m able to view the outpt.
    But in background it should generate a spool but it is not generating?
    I have given the ouput options to supress the dialog but it still it is not generating the spool.
         control-preview = 'X'.
          control-no_dialog = 'X'.
          control-device = 'PRINTER'.
          control-no_dialog = 'X'.
          control-GETOTF = 'X'.
          OUTPUT_OPTIONS-TDDEST = 'LP01'.
          OUTPUT_OPTIONS-TDNOPRINT = 'X'.
    Any suggestions??
    Thanks & Regards
    Jyo

    Hi Jyotheswar,
    When the smartform is generated in background create a new spool by using following code
          output_options-no_dialog = 'X'.
          output_options-tdarmod = 1.
          output_options-tdcopies = 001.
          output_options-tddest = 'LP01'.
          output_options-tdprinter = 'SWIN'.
          output_options-tdlifetime = 1.
          output_options-tdnewid = 'X'.
    tdnewid is the field used to create a new spool request.  You can get the new spool request number in job_output_info-spoolids.
    Regards,
    Birendra

  • SPOOL Not generated in SUBMIT background job

    Hi All,
    I am submiting a report program using SUBMIT keyword. I required SPOOL. But its not generating. Can anyone kindly let me know whts wrong in my code?
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        LAYOUT                 = 'X_65_132'
        LINE_COUNT             = 65
        LINE_SIZE              = 132
      IMPORTING
        OUT_PARAMETERS         = print_parameters
        OUT_ARCHIVE_PARAMETERS = ARCPAR
        VALID                  = VAL
      EXCEPTIONS
        ARCHIVE_INFO_NOT_FOUND = 1
        INVALID_PRINT_PARAMS   = 2
        INVALID_ARCHIVE_PARAMS = 3
        OTHERS                 = 4.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname          = name
        IMPORTING
          jobcount         = number
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
      IF sy-subrc = 0.
          SUBMIT saprck60
                TO SAP-SPOOL                       
                SPOOL PARAMETERS print_parameters   
                WITHOUT SPOOL DYNPRO              
             WITH FREE SELECTIONS texpr
                 VIA SELECTION-SCREEN
                 WITH ck_matnr = 'Z*' SIGN 'E'
                 WITH ck_werks = p_werks
                 WITH kalaid  = wa_default-kalaid
                 WITH kaladat = sy-datum
                 WITH backgr = 'X'
           VIA JOB name NUMBER number
            AND RETURN .

    Hi,
    Try this code
    data : l_jobname   TYPE tbtcjob-jobname,
              l_jobcount  TYPE tbtcjob-jobcount,
              l_dest      TYPE pri_params-pdest VALUE 'LOCL',
              l_linsz     TYPE pri_params-linsz VALUE '999999',
              l_jobstatus TYPE tbtco-status,
              l_rqident   TYPE tsp01-rqident.
    CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname          = l_jobname
        IMPORTING
          jobcount         = l_jobcount
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
      IF sy-subrc EQ 0.
    * Set default print parameters for Spool
        CALL FUNCTION 'SET_PRINT_PARAMETERS'
          EXPORTING
            destination = l_dest
            line_size   = l_linsz.
        SUBMIT saprck60
               TO SAP-SPOOL  DESTINATION l_dest
                   LINE-SIZE   l_linsz
                   IMMEDIATELY 'X'
                   KEEP IN SPOOL 'X'
                   USER sy-uname VIA JOB l_jobname NUMBER l_jobcount
                    WITHOUT SPOOL DYNPRO
                    WITH SELECTION-TABLE p_sel_opts
                     AND RETURN.
        IF sy-subrc EQ 0.
          CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              jobcount             = l_jobcount
              jobname              = l_jobname
              strtimmed            = 'X'
            EXCEPTIONS
              cant_start_immediate = 1
              invalid_startdate    = 2
              jobname_missing      = 3
              job_close_failed     = 4
              job_nosteps          = 5
              job_notex            = 6
              lock_failed          = 7
              OTHERS               = 8.
        ENDIF.
      ENDIF.
    * Check the Job status
      DO.
        CALL FUNCTION 'BDL_READ_JOB_STATUS'
          EXPORTING
            jobname       = l_jobname
            jobnumber     = l_jobcount
          IMPORTING
            jobstatus     = l_jobstatus
          EXCEPTIONS
            job_not_found = 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 l_jobstatus EQ 'F'.
          EXIT.
        ENDIF.
      ENDDO.
    Regards,
    Nagaraj

  • Spool not generated in some condition

    Requirement :Developing a data transfer program. Approach used is Call Transaction in S mode.
    In some cases(if Receiving Storage Location is PKGX) I need to load only MB11 and other cases I need to load 3 transaction sequentially – MB11 creates Mat. Doc. No. which in turn passed to the LT06 to create TO(Transfer Order) and the TO passed to LT12 to confirm TO.
    Problem – When I run it in background(it generates report in foreground), job finished successfully, data is loaded into system and spool status shown as error ONLY IF ALL THE 3 TRANSACTIONS CALLED AND LOADED.
    I debugged the Batch Job(using t-code JDBG) line by line output,contents are writen to output but at the end spool goes into error and report is not visible.
    In all other cases like messages/outputs due to record not correct or/and only MB11 is to be processed, spool is generated with status Waiting and report is visible.
    Statement at top –
    REPORT ZL6C_LOAD_INVENTORY_WM_SLOC
    NO STANDARD PAGE HEADING
    MESSAGE-ID ZOLSC_AS
    LINE-COUNT 65
    LINE-SIZE 148.
    It works if I set line-size as 132 .
    To overcome this I used FM GET_PRINT_PARAMETER with various cominations of parameter passed but it doesn’t work –
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
    COPIES = L_C_ONE
    DEPARTMENT = L_C_SYSTEM
    DESTINATION = L_C_LOCL
    EXPIRATION = L_C_2
    LAYOUT = L_C_X_65_255
    LINE_COUNT = L_C_65
    LINE_SIZE = L_C_255
    LIST_NAME = L_LIST_NAME
    LIST_TEXT = L_LIST_TEXT
    MODE = 'BATCH'
    NEW_LIST_ID = G_C_X
    NO_DIALOG = G_C_X
    RECEIVER = L_C_SAP
    RELEASE = G_C_X
    SAP_COVER_PAGE = G_C_X
    REPORT = SY-REPID
    USER = SY-UNAME
    IMPORTING
    OUT_PARAMETERS = L_PARAMS
    EXCEPTIONS
    ARCHIVE_INFO_NOT_FOUND = 1
    INVALID_PRINT_PARAMS = 2
    INVALID_ARCHIVE_PARAMS = 3
    OTHERS = 4
    IF SY-SUBRC = 0 AND NOT L_PARAMS IS INITIAL.
    NEW-PAGE PRINT ON PARAMETERS L_PARAMS NO DIALOG NEW-SECTION.
    G_SPOOL = 'X'.
    ENDIF.
    Also when I use this FM under INITIALIZATION then it generates the spool but content written at TOP_OF_PAGE not displayed. When I use it under START-OF-SELECTION, problem still remain same.
    Please Suggest
    thanks
    Sonal

    Hello All,
    I checked in SM58. It showed an error.
    I checked my function module attributes. It was normal. Changed it to Remote enabled.
    Now spool is generated.
    Regards,
    Kausthub

  • Spool Not Generated Conditionally

    <b>Requirement :</b>Developing a data transfer program. Approach used is Call Transaction in S mode.
    In some cases(if Receiving Storage Location is PKGX) I need to load only MB11 and other cases I need to load 3 transaction sequentially – MB11 creates Mat. Doc. No. which in turn passed to the LT06 to create TO(Transfer Order) and the TO passed to LT12 to confirm TO.
    <b>Problem –</b> When I run it in background(it generates report in foreground), job finished successfully, data is loaded into system and spool status shown as error ONLY IF ALL THE 3 TRANSACTIONS CALLED AND LOADED.
    <u>I debugged the Batch Job(using t-code JDBG) line by line output,contents are writen to output but at the end spool goes into error and report is not visible</u>.
    In all other cases like messages/outputs due to record not correct or/and only MB11 is to be processed, spool is generated with status Waiting and report is visible.
    <b>Statement at top –</b> REPORT ZL6C_LOAD_INVENTORY_WM_SLOC
    NO STANDARD PAGE HEADING
    MESSAGE-ID ZOLSC_AS
    LINE-COUNT 65
    LINE-SIZE 148.
    <u><b>It works if I set line-size as 132 .</b></u>
    To overcome this I used FM GET_PRINT_PARAMETER with various cominations of parameter passed but it doesn’t work –
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
    COPIES = L_C_ONE
    DEPARTMENT = L_C_SYSTEM
    DESTINATION = L_C_LOCL
    EXPIRATION = L_C_2
    LAYOUT = L_C_X_65_255
    LINE_COUNT = L_C_65
    LINE_SIZE = L_C_255
    LIST_NAME = L_LIST_NAME
    LIST_TEXT = L_LIST_TEXT
    MODE = 'BATCH'
    NEW_LIST_ID = G_C_X
    NO_DIALOG = G_C_X
    RECEIVER = L_C_SAP
    RELEASE = G_C_X
    SAP_COVER_PAGE = G_C_X
    REPORT = SY-REPID
    USER = SY-UNAME
    IMPORTING
    OUT_PARAMETERS = L_PARAMS
    EXCEPTIONS
    ARCHIVE_INFO_NOT_FOUND = 1
    INVALID_PRINT_PARAMS = 2
    INVALID_ARCHIVE_PARAMS = 3
    OTHERS = 4
    IF SY-SUBRC = 0 AND NOT L_PARAMS IS INITIAL.
    NEW-PAGE PRINT ON PARAMETERS L_PARAMS NO DIALOG NEW-SECTION.
    G_SPOOL = 'X'.
    ENDIF.
    Also when I use this FM under INITIALIZATION then it generates the spool but content written at TOP_OF_PAGE not displayed. When I use it under START-OF-SELECTION, problem still remain same.
    Please Suggest
    thanks
    Sonal

    Use FM  : RSPO_OUTPUT_SPOOL_REQUEST
    Reward Points if it is helpful
    Thanks
    Seshu

  • Spool not generated for some conditions

    <b>Requirement :</b>Developing a data transfer program. Approach used is Call Transaction in S mode.
    In some cases(if Receiving Storage Location is PKGX) I need to load only MB11 and other cases I need to load 3 transaction sequentially – MB11 creates Mat. Doc. No.  which in turn passed to the LT06 to create TO(Transfer Order) and the TO passed to LT12 to confirm TO.
    <b>Problem –</b> When I run it in background(it generates report in foreground), job finished successfully, data is loaded into system and spool status shown as error ONLY IF ALL THE 3 TRANSACTIONS CALLED AND LOADED.
    <u>I debugged the Batch Job(using t-code JDBG) line by line output,contents are writen to output but at the end spool goes into error and report is not visible.</u>
    In all other cases like messages/outputs due to record not correct  or/and  only MB11 is to be processed, spool is generated with status Waiting and report is visible.
    <b>Statement at top –</b>
    REPORT  ZL6C_LOAD_INVENTORY_WM_SLOC
            NO STANDARD PAGE HEADING
            MESSAGE-ID ZOLSC_AS
            LINE-COUNT 65
            LINE-SIZE  148.
    <u>It works if I set line-size as 132 .</u>
    To overcome this I used FM GET_PRINT_PARAMETER with various cominations of parameter passed but it doesn’t work –
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
    COPIES                 = L_C_ONE
           DEPARTMENT             = L_C_SYSTEM
           DESTINATION            = L_C_LOCL
           EXPIRATION             = L_C_2
           LAYOUT                 = L_C_X_65_255
           LINE_COUNT             = L_C_65
           LINE_SIZE              = L_C_255
           LIST_NAME              = L_LIST_NAME
           LIST_TEXT              = L_LIST_TEXT
           MODE                   = 'BATCH'
           NEW_LIST_ID            = G_C_X
           NO_DIALOG              = G_C_X
           RECEIVER               = L_C_SAP
           RELEASE                = G_C_X
           SAP_COVER_PAGE         = G_C_X
           REPORT                 = SY-REPID
           USER                   = SY-UNAME
    IMPORTING
           OUT_PARAMETERS         = L_PARAMS
    EXCEPTIONS
           ARCHIVE_INFO_NOT_FOUND = 1
           INVALID_PRINT_PARAMS   = 2
           INVALID_ARCHIVE_PARAMS = 3
           OTHERS                 = 4
       IF SY-SUBRC = 0 AND NOT L_PARAMS IS INITIAL.
         NEW-PAGE PRINT ON PARAMETERS L_PARAMS  NO DIALOG NEW-SECTION.
         G_SPOOL = 'X'.
       ENDIF.
    Also when I use this FM under INITIALIZATION then it generates the spool but content written at TOP_OF_PAGE not displayed. When I use it under START-OF-SELECTION, problem still remain same.
    Please Suggest
    thanks
    Sonal

    Hi,
      All spool requests will be stored in TSP01 table
    TSP01 - Spool Requests
    field name for Spool request number is RQIDENT
    Hi,
    Take a look at OSS Note 422136 which states:
    "2. You can only store one spool request even if a step generates several spool requests during processing. The application is responsible for a "spool overview" in this case. If a step generates several spool requests during processing, only one request can be stored. In this case, the application report should issue the number with a message when writing a spool request so that it is then displayed in the job log."
    Also take a look at OSS Note 519059 which further supports the case that you must capture the individual spool numbers as they are being created (i.e. within the job step's program). The note contains the following:
    8] Question: How are the spool requests assigned?
    Answer: The step information is stored in table TBTCP. This has space for exactly one spool request (field LISTIDENT). If a step generates several spool requests during the processing, only one can be stored. In this case the application is responsible for a "spool overview
    <b>Reward points</b>
    Regards

  • Spool not generated

    Hi All,
    Spool not getting generated when running a report in background . That report contains submit statement to display values.
    But the same program is running in foreground perfectly and genarating output as required.
    What could be the problem.
    Appriciate any help in this regard.
    Thanks ,
    venkat

    HI Venkat,
    Are you scheduling the job immediately or after some time?
    Are you getting any error log in the job overview?
    Chcek if the report has any GRID Alvs being diplayed.
    GRID alvs will not work in background.
    Regards,
    Ravi
    Message was edited by:
            Ravi Kanth Talagana

  • Job finished successfully but Spool not generated(no spool icon)

    I am generating a report which . When the program in scheduled, the job completed successfully but spool icon is not available. Could any one suggest us the reason why spool has not generated. Thanks in advance!

    Hi,
    When executing report, Spool gets generated only when an Output is generated. Please check if output exits for the selection criteria.
    Also check any special mechanisms are used that diverse the ouput when executed in background.

  • Mails are not generated in background Jobs and not shown in SOST.

    Dear All,
    I have facing issue regarding to system mails. I want to send mails the various reports automatically from SAP System to different recipients. So I scheduled that reports at background and in their spool list recipient I have added distribution list.
    But that mails are not generated, it is not shown in transaction SOST also. When I send mails manually it goes successfully to only our company domain recipients. But not other domains. How should I resolve this problem?
    Please help me out.
    Thanks in advance.
    Amit

    Hi Srihari,
    I have checked the background jobs they showed it finished. Following logs are shown in job logs. Is problem is due to 3rd log??
    18.03.2012 14:23:34 Job started    00           516          S
    18.03.2012 14:23:34 Step 001 started (program RFITEMAP, variant PDC FARMAR, user ID DEVELOPER1)      00           550          S
    18.03.2012 14:23:37 No items selected (see long text)                                              MSITEM         033          I
    18.03.2012 14:23:42 Spool request (number 0000026302) created without immediate output               SY           355          S
    18.03.2012 14:23:46 Job finished                                                                     00           517          S
    When I saw further details of 3rd log it following message.
    No items selected (see long text)
        Message no. MSITEM033
    Diagnosis
        No line items meeting your selection criteria could
        be for the following reasons:
        1.) No corresponding items have been posted.
        2.) You are not authorized to display this data.
        3.) The items have already been archived.
    Please help me out.
    Thanks
    Amit

  • WHICH TABLE STORES SPOOL REQUEST GENERATED BY BACKGROUND JOB ?

    Background job is generating multiple request.
    i am not able to find the table which stores all the spool request for a particular background job.

    i know the table for spool request :  TSP01
    But how should i link it to background job name ?
    i want the link between background job name and spool request generated by it......
    TBTCPV is the view but it stores only one spool request.....rather than multiple spoolreq generated by background job..

  • BDC Program is not working in background mode

    Hi All,
             I hv one bdc program for tcode fb02 which is working fine in foreground mode and data is updated to each screen properly. While running the same program in Background mode data is not updated. Can u seggust the solution.
    Regards,
    Rahul S

    Hi ,
    Remove the break point in the BDC performs.
    put the break point once u complete the BDC.... otherwise execute the BDC in MODE 'E'.. error mode.
    regards,
    Rama Reddy
    Edited by: ram reddy on Nov 16, 2009 5:37 AM

  • BDC is not working in background mode and working fine in Foreground mode

    Hi Experts,
    I have created a BDC in SHDB for the transaction code:CWBQM for creating and deleting the record and converted the BDC recording into the program using call transaction. It is working fine in both foreground and background. When I given the same program for users testing one for the user was able to delete the records but Creation is not working in the same BDC. He is able to create the same records in another PC and the problem is only in that PC and only during the creation of the record. When I change the mode to 'A' mode for testing and request the user to execute and it is working fine the records created successfully. What could be the issue ?
    Thanks,
    Hema

    Hello,
    While recording BDC in SHDB try setting "Simulate background mode" flag and give a try.
    Cheers,
    Nag

Maybe you are looking for

  • Error while installing Oracle 11.5.9 on Windows NT

    Hi, Please help me out with this difficulty i m facing. The oracle applications installation is being completed successfully. The only problem is that i cannot log in. the html page for logging in is showing error. Following is the error it is showin

  • Connection Pooling in Tomcat with SQL Server

    Hey Guys, I have been banging my head against this all day :( so i now turn to you for some help :) I have a web app that uses a database now i want to start using this connection pooling that is supposed to be greatly more efficient than creating a

  • No "Add name" when attempting to share a calendar

    I want to share an iCloud calendar, but when I go into the Edit screen and tap that calendar, the Add Name bar does not appear. It does appear on several other of my calendars, but not the one I want to share.

  • Ledger Assignment to Company code

    Where do we assign Non-Leading ledgers to company code

  • Listener.ora file

    Hi, How do I update the listener.ora file to add my listener names hrms for my database with the same name. Current it is # listener.ora Network Configuration File: F:\oracle\product\10.2.0\db_1\network\admin\listener.ora # Generated by Oracle config