Spool report line width in background jobs

Hi All,
I wrote a report and specified the line size in the report header:
REPORT /sappssrm/option_handler
NO STANDARD PAGE HEADING
LINE-SIZE 185.
I want to run this report as background job and get a spool list with results of the report. I expected the width of the spool output to be well defined and it works in one system. However, in another systen, the line / page width is much smaller, and the system inserts line breaks in the output splitting my lines into two which causes very ugly results.
It seems that the LINE-SIZE specified in the report header doesn't affect the output width in every system.
Can anyone advice?
Regards
Wolfgang

Hi Siggi,
thanks for your reply. Actually I changed that already yesterday...
But I found out what it was:
It seems, the background job keeps old versions of the program, even if you import a new program version. I created a new job with the same program and it worked.
Thanks again and best regards
Wolfgang

Similar Messages

  • Line width in bachground job

    Hi All,
    I wrote a report and specified the line size in the report header:
    REPORT /sappssrm/option_handler
    NO STANDARD PAGE HEADING
    LINE-SIZE 185.
    I want to run this report as background job and get a spool list with results of the report. I expected the width of the spool output to be well defined and it works in one system. However, in another systen, the line / page width is much smaller, and the system inserts line breaks in the output splitting my lines into two which causes very ugly results.
    It seems that the LINE-SIZE specified in the report header doesn't affect the output width in every system.
    Can anyone advice?
    Regards
    Wolfgang

    Hi,
    I think you need to call the 'SET_PRINT_PARAMETERS' function module
      CALL FUNCTION 'SET_PRINT_PARAMETERS'
           EXPORTING
                ARCHIVE_MODE   = '3'
                COPIES         = '5'
                DEPARTMENT     = 'BASIS'
                DESTINATION    = 'LT50'
                EXPIRATION     = ' '
                IMMEDIATELY    = 'X'
                LAYOUT         = 'X_65_132'
                LINE_COUNT     = 54
                LINE_SIZE      = 20
                LIST_NAME      = 'Test'
                LIST_TEXT      = 'Test'
                NEW_LIST_ID    = 'X'
                RECEIVER       = ''
                RELEASE        = ' '
                SAP_COVER_PAGE = 'X'.

  • 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

  • Emailing the report to external email -  Background job

    HI
    We are creating background job for running the report in background...but i want the output(report) to send an email in Excel format after the job run successfully...
    Here the email is External email not SAP inbox..
    Do you have any idea how to achieve this? any user-exit or even handling will help this?
    Please let me know
    Thanks
    Govi

    Iam not using custom program to send the email...I know about the FM SO_DOCUMENT_SEND_API1...to send email.
    My requirement is to send email to user the report in Excel after the background job runs.
    we will define the job in SM36 with variant for the report with program name and variant.
    after the job runs the spool request will be created and we can also setup the output of the report to be sent to SAP inbox.
    my question is to how to send the output of this report in Excel format to external email i.e. Gmail, yahoo etc...
    I hope u r clear now...
    Please let me know if you know the answer.
    Thanks

  • Job failure ( report RFFDKU00 scheduled for background job)

    Hi Experts,
        When iam scheduling the report RFFDKU00 for background job. Job is getting cancelled with status "ABAP/4 processor: DBIF_RSQL_SQL_ERROR" . when iam obesrving this job it is going to dump at this select query
    "     select ausbk belnr gjahr bzkey buzei
    033370                  from vbsegs into table t_vbsegsfields
    033380            where bukrs in r_bukrs
    033390            and not ( fdlev = space
    033400                  and fdgrp = space
    033410                  and fdtag = init_date
    033420                  and fdwbt = 0 )
    033430            and not saknr in r_cm_sk   "
    Can anyone helpme to deal with this issues ,
    thanks in advance,
    Kranthi

    note 167301 might help.

  • Changing the file format of spool output when scheduling a background job.

    Hello Experts,
    I have an issue. It is related to Spool output format. I created a job for one report program for which the output is a list output. I have added one recipient in the 'Spool list recipient' while creating the job SM36. After the job is finished the spool output is sent to the recipient mail id as .htm format as an attachment. But the attachment should be excel sheet or text file. No coding in the program should be used to convert the file format. Only settings in the spool while creating job should be manipulated. Please help me in solving this issue.
    Regards.

    Hi Sunil,
    You can use the logic for converting spool to PDF using program : RSTXPDFT4 . Alternatively you can use FM: CONVERT_ABAPSPOOLJOB_2_PDF . In this FM you need to pass the Spool id .
    u can make use of these FM's SO_DOCUMENT_SEND_API1
    SO_NEW_DOCUMENT_SEND_API1
    Check out the following wiki:
    https://wiki.sdn.sap.com/wiki/display/Snippets/ConvertsspoolrequestintoPDFdocumentand+emails
    hope this will use full to you.
    Thanks!!

  • Report layout - ME2N - Automatic background job

    HI all
    We are using the above report for Pending PO-RElease ie., dynamic selection - release indicator "B"  thru automatic background programme schedueld thru SM36 (after setting the variant) for the relevant/concerned users.
    The issue is, the report layout be default standard sap layout is taking, actually i have saved layout as PO no & date, but always, whenever background job is run, default sap report is taken in HTML.
    request kindly help how i can ensure my our report layout for backgrounds jobs thru ME2N or is there any other report which can give the pending PO-Release report for my requirement.
    thanks in advance
    regards
    srihari

    I am doing same as suggested by you for all other reports, but i am not successful with ME2N, because after having your own default layout, but for background it is default taking sap report. even i have tried to delete the sap - std report format but not allowed.
    if any one knows how to change the sap-default std report layout then also it's okay for us, as default report as 15 columns whereas we need only max 5 columns in report layout
    thanx in advance
    regards
    srihari

  • Report to cancel released background jobs

    Hi Folks,
    Can anyone guide me whether there is any standard report/program where i can delete/cancel the background jobs already released/scheduled? We can cancel individual job using SM37, but i need to cancel "n" number of jobs at one slot.
    Thanks in advance.
    Regards,
    Shiva

    Siva,
    can plz tell me how to change or reschedule the time on background job ?
    Dilip

  • Converting spool of line width more than 850 char to PDF format in ECC 6.0.

    Hello Experts.
    I am facing problem while trying to convert a spool (generated from background scheduling of an ALV ) to PDF format in ECC 6.0.
    The ALV has 45 columns. Using SAP note no 1226758 I am able to increase the spool width but when I am converting the spool  to PDF using FM 'CONVERT_ABAPSPOOLJOB_2_PDF' the end caharacters are getting truncated .
    Please reply ASAP . Any suggestion/Hint will be appreciated.
    Thanks and Regards
    Arvind Kumar Yadav

    Hi Aravind,
    go to SPAD transaction --> and change the printer which supports more than 45 columnsand 256 cahracters..
    according to the printer setting the output is created.
    choose any below format TYPES...X_65_256/2
    ABAP list: At least 65 lines 2*128=256 double columns (SAPLPD only)
    see th following link for result..
    <a class="jive_macro jive_macro_message" href="" __jive_macro_name="message" modifiedtitle="true" __default_attr="7318557"></a>
    Regards,
    Prabhudas

  • BAP Log/Error Report in case of Background Job

    Hi Friends,
    I have to develop one program where I am creating purchase orders using BAPI. This Program would be scheduled in background
    hence the Error/log report can not be seen .I have been told to use SAP Application Log for getting the Error Report.
    How this can be achieved using SAP Application log functionality. Any Help would be appreciated.
    Thanks

    >
    TANGO18 wrote:
    > I have to develop one program where I am creating purchase orders using BAPI. This Program would be scheduled in
    > background hence the Error/log report can not be seen .
    Incorrect. How are you displaying your error / log report ?
    Even if you use simple WRITE statements to display the log, the details would be there in the corresponding spool generated.
    BR,
    Suhas

  • Record width in background

    Hi Freinds,
    can anyone help me this below problem.
    i am executing  a program in forgroung the records are displaying fine.
    but when displaying same program with Back ground with spool the record width
    displaying very less.
    i want record width same in foreground and background
    regards,

    Hello Vijay,
    It is spool problem ,so check the below links and it may help you.
    Spool List output display > 255 char when the rpt is run in Background
    background job , how we set report width
    Spool report line width in background jobs
    List problem when run in background
    Thanks
    Seshu

  • How to find Spool number for a 2 steps background job.

    Hi All,
    How to find spool number (and also the background job name ) for a 2 steps background job.
    in the table TBTCO i can see step numbers but i dont get the spool number. Is there any link between TBTCO and TSP01.
    Also after getting the spool number i need to drill down on ALV report. I hard coded the spool number and was able to drill down using BDC and call transaction but when i press back button it is not returning to the ALV report.
    Thanks,
    Shiva.

    Which one creates the spool? (first one I guess)
    What kind of spool? (WRITE, sapscript, smartform, pdf...)
    Do you use special statements like NEW-PAGE, or other things?
    Are you sure that the spools are generated by these jobs? (did you compare the spool generation times and job run dates to be sure...)

  • Is it possible to save a report to a file in background job?

    Hi,
    I want to save a report as a file every day, is it possible to do it by background job?
    Thanks.

    thanks all of you,
    I don't went to save the file manually.
    I only want to a function just like archiving function which can save file in background job.
    I can develop a program to save a report as file in background job,but I have to develop a program for every report,I want to know is there any standard function for it, just like throwing  the report to spool.

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

  • Background Job Scheduling

    Hi,
      I am scheduling a report to run in background.
    In this report it is creating background jobs automatically for different company codes.
    It submits the 1st background job and waits until it finishes.
    Then 2nd job starts in background and continues with other jobs.
    At end it finishes all the jobs and closes.
    Now my problem is.
    1.       Whether is it possible for us to submit all the jobs at 1 time. And execute at same time. Ie., 1st, 2nd job will start at same time.
    2.       If possible how can we do that.
    What I have written is
    loop at companycode.
    Create job name.
    call fun 'Job_Open'.
    submit xxxx user sy-uname via job job_name numer job_count
    to sap-spool
    spool parameters l_spool_parameter
    without spool dynpro
    with companycode
    with ......
    and return.
    endloop.
    Please help ASAP, urgent.

    hi praveen,
    Job Scheduling Explained
    Definition
    Before any background processing can actually begin, background jobs must be defined and scheduled. The scheduled time for when a job runs is one part of the job’s definition. There are several ways to schedule jobs:
    From Transaction SM36 (Define Background Job)
    With the "start program in the background" option of either Transaction SA38 (ABAP: Execute Program) or Transaction SE38 (the ABAP editor)
    Through the background processing system’s own programming interface. (Many SAP applications use the internal programming interface to schedule long-running reports for background processing.)
    Through an external interface.
    Scheduling Background Jobs   
    Use
    You can define and schedule background jobs in two ways from the Job Overview:
    ·         Directly from Transaction SM36. This is best for users already familiar with background job scheduling.
    ·         The Job Scheduling Wizard. This is best for users unfamiliar with SAP background job scheduling. To use the Job Wizard, start from Transaction SM36, and either select Goto ® Wizard version or simply use the Job Wizard button.
    Procedure
           1.      Call Transaction SM36 or choose CCMS ® Jobs ® Definition.
           2.      Assign a job name. Decide on a name for the job you are defining and enter it in the Job Name field.
           3.      Set the job’s priority, or “Job Class”:
    ·         High priority:      Class A
    ·         Medium priority: Class B
    ·         Low priority: Class C
           4.      In the Target server field, indicate whether to use system load balancing.
    ·         For the system to use system load balancing to automatically select the most efficient application server to use at the moment, leave this field empty.
    ·         To use a particular application server to run the job, enter a specific target server.
           5.      If spool requests generated by this job are to be sent to someone as email, specify the email address. Choose the Spool list recipient button.
           6.      Define when the job is to start by choosing Start Condition and completing the appropriate selections. If the job is to repeat, or be periodic, check the box at the bottom of this screen.
           7.      Define the job’s steps by choosing Step, then specify the ABAP program, external command, or external program to be used for each step.
           8.      Save the fully defined job to submit it to the background processing system.
           9.      When you need to modify, reschedule, or otherwise manipulate a job after you've scheduled it the first time, you'll manage jobs from the Job Overview.
    Note: Release the job so that it can run. No job, even those scheduled for immediate processing, can run without first being released.
    Specifying Job Start Conditions
    Use
    When scheduling a background job (either from Transaction SM36, Define Background Job or CCMS ® Jobs ® Definition), you must specify conditions that will trigger the job to start.
    Procedure
    Choose the Start condition button at the top of the Define Background Job screen.
    Choose the button at the top of the Start Time screen for the type of start condition you want to use (Immediate, Date/Time, After job, After event, or At operation mode) and complete the start time definition in the screen that appears.
    For the job to repeat, check the Periodic job box at the bottom of the Start Time screen and choose the Period values button below it to define the frequency of repetition (hourly, daily, weekly, monthly, or another specific time-related period). Then choose the Save button in the Period values screen to accept the periodicity and return to the Start Time screen.
    Once you’ve completed specifying the job start conditions, choose the Save button at the bottom of the Start Time screen to return to the Define Background Job screen.
    No job can be started until it is released, including jobs scheduled to start immediately. Since releasing jobs can be done only by a system administrator from the job management screen (Transaction SM37) or by other users who have been granted the appropriate Authorizations for Background Processing, no unauthorized user can start a job without explicit permission
    Managing Jobs from the Job Overview
    Use
    The Job Overview, or Job Maintenance, screen is the single, central area for completing a wide range of tasks related to monitoring and managing jobs, including defining jobs; scheduling, rescheduling, and copying existing jobs; rescheduling and editing jobs and job steps; repeating a job; debugging an active job; reviewing information about a job; canceling a job's release status; canceling and deleting jobs; comparing the specifications of several jobs; checking the status of jobs; reviewing job logs; and releasing a job so it can run.
    Procedures
    To display the Job Overview screen, choose CCMS ® Jobs ® Maintenance or call Transaction SM37. Before entering the Job Overview screen, the system first displays the Select Background Jobs screen. You'll need to complete this Job Selection screen to define the criteria for the jobs you want to manage. Once you've selected jobs to manage, you can choose from a wide range of management tasks:
    To copy a single existing job, choose Job ® Copy.
    To reschedule or edit job steps or attributes of a single job, choose Job ® Change. A job step is an independent unit of work within a background job. Each job step can execute an ABAP or external program. Other variants or authorizations may be used for each job step. The system allows you to display ABAP programs and variants. You can scan a program for syntax errors. You can also display the authorizations for an authorized user of an ABAP job step.
    To repeat a single job, choose Job ® Repeat scheduling.
    To debug an active job, choose Job ® Capture: active job. Only a single selection is allowed. If an active job seems to be running incorrectly (e.g., running for an excessively long time), you can interrupt and analyze it in debugging mode in a background process, and then either release it again or stop it altogether.
    You will be able to capture a background job only if you are logged on to the SAP server on which the job is running. To find server information in the Job Overview, select and mark the job, then choose Job ® Job details.
    To review information about a job, choose Job ® Job details. Details displayed can include:
    current job status
    periodicity, or the repetition interval
    other jobs linked to the current job, either as previous or subsequent jobs
    defined job steps
    spool requests generated by the current job
    To cancel a job's "Released" status, select the job or jobs from the Job Overview list and choose Job ® Release -> Scheduled.
    To cancel a job from running but keep the job definition available, select the job or jobs from the Job Overview list and choose Job ® Cancel active job.
    To delete a job entirely, select the job or jobs from the Job Overview list and choose Job ® Delete. Jobs with the status of Ready or Running cannot be deleted.
    To compare the specifications of more than one job, select the jobs from the Job Overview list and choose Job ® Compare jobs.
    To check the status of jobs, select the job or jobs from the Overview Job list and choose Job ® Check status. This allows you to either change the job status back to Planned or cancel the job altogether. This is especially useful when a job has malfunctioned.
    To review job logs, select a job or jobs with the status Completed or Canceled from the Job Overview list and
    regards
    karthik
    reward me points if helpfull

Maybe you are looking for

  • Problem in inserting record in Siebel on demand's object thru web service

    Hi All, We are working on ‘Siebel on Demand’ (software as a service) CRM. We are using web service to communicate. We have WSDL files and we generated the code using Axis framework that comes along with Eclipse. We are able to login and logoff to the

  • Image gallery with CSS menu

    I have a image gallery (slideshow) created with Flash and XML. My website uses a css/javasript dropdown menu for navigation. The dropdown menu is hiding behind the slideshow no matter what I set it's z-index to. Is there something in flash that lets

  • New 3g nano... will only show apple...

    I have an ipod classic that works fine. i just purchased an ipod 3g nano for my sister. we tried hooking it up to my mac to load songs on it, but all it will do is flash an apple on the screen (and it will only do that when it is plugged in to the co

  • License Probelm  Fail over node.

    Dear Gurus, I am reciving an error while applying the liscense to the fail over server. SAPLICENSE (Release 700) ERROR *** ERROR: Can not set DbSl trace function DETAILS: DbSlControl(DBSL_CMD_IMP_FUNS_SET) failed with return code 20 RC-INFO: error lo

  • Ejb deploy 6.1

    while deploying ejb thru 6.1 console .the left side frame does not get update ,neither does the right side frame display any error .the weblogic log file states -- <No components found in application: .\config\mydomain\applications\prav.jar> where pr