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

Similar Messages

  • Printer spooler is not generated while output command

    Dear All,
    I am facing problem in  where the printer is installed in that system .when the user is giving print the
    Printer spooler is not generated while output command successfully  coming in sap
    Please suggest how to sol
    Regard
    Kumar

    Hello,
    Not very strong with Linux, but i think that, maybe you need to set a graphic emulator to compile ?
    Francois

  • Spool request not generated in smartforms printing

    Hii all,
            I have smartform, which was printing properly in QA server and few days back when i tried to get print from Production Server, it is not generating spool request. and in QA also it is not having same as on date.
    is there anythng to check from ABAP side or there is a problem of Basis.?
    kindly give soln for points .
    - Maharshi

    hi Maharshi,
    Gimme some what clear picture abt ur problem.
    What exactly the problem in QA server.
    I mean when it is working properly and when it is not?
    and what Function Modules u have used ..?
    and i wanna know is there any other print forms are working or not. if the other are working, it is not BASIS problem.
    Regards,
    Naveen

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

  • Spool not generated when creating the TO from TR

    Hello,
    I am facing a issue while creating Transfer order. My scenario is like below:
    1) Create Goods issue MB1A with two items
    2) Create Transfer order from Material document
    3) TO is created with 2 items
    4) But spool is generated only for one item.
    As per my analysis, the TO line item with storage unit which starts with 3* gives a spool while the second item with storage unit which starts 9* does not generate a spool.
    But when I print the TO manually  in LT31, I am able to see the spool for both items.
    Please help me if you have any idea.
    Thanks & Regards,
    Sainath

    Hello,
    Please see the attached spool output when TO is printed manually LT31.
    However, when the TO is printed automatically, one spool will be displayed in SP02.
    Please let me know if you need any more clarifications.
    Thanks,
    Sainath

  • 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

    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

  • 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 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 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 in VL02n though output type is processed

    Hello All,
    I passed control parameters in function module WFMC_PREPARE_SMART_FORM.
    So when i goto VL02n and process my output type , in further data if i give option 3 - send with application own transaction , the preview of the smartform is fine.
    In further data if i give option 4, send when immediately saving application, and save my delivery document, spool should be generated. But if i check my spool requests, no spool is generated.. But the output type is processed(GREEN).
    Please let me know your suggestions.
    Regards,
    Kausthub

    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

  • Calday not generated while generating universe on mdx query

    Dear All,
      Issue:   Iam  Creating  a universe on  Bex Query , issue is  calday which is in free characteristics in not  generated in  
                  universe.Please suggest   .
    Thanks
    suresh.p

    Which version of BO and SAP BW do you use?
    Regards,
    Stratos

  • File not creating in AL11 wen executing in Background

    Hi,
    I have written code to upload some data to Appln server(AL11). When i execute in foreground, file is creating. But wen i execute in background, i couldnt find that file in the path which i have given.
    Since we cant debug the program in Background, i dont know whether OPEN DATASET returns SUBRC = 0 or not. I even checked with the Path thr AL11. The same path is accessible too..
    Plz help me out for this.
    Thanks,
    Ramesh

    Ramesh,
    You can debug a background job.
    go to sm37 and select the job and type /JDBG in the command prompt.
    search in sdn on how to debug a background job
    Thanks
    Bala Duvvuri

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

Maybe you are looking for