Line is breaking in Spool output - KSB1

Hi All,
I am running the transaction KSB1 which is calling report RKAEP000 to display the output. The output format is fine while displaying it in ALV but in Spool the format is not correct. It is dispaying two line for a single line i.e. line is getting broken after 3 columns and rest two columns are coming in next line.
Can any one please suggest me what can be the issue.
Thanks,
Nilanjana

Hi,
If you are getting and using the Print parameters using the Function Module 'GET_PRINT_PARAMETERS',
check the exporting parameters line_size, line_count and layout, as in example below:
CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
            destination    = '    '
            copies         = '1'
            list_name      = 'LISTNAME'
            list_text      = 'LISTTEXT'
            immediately    = ' '
            release        = 'X'
            new_list_id    = 'X'
            line_size      = 132
            line_count     = 65
            layout         = 'X_65_132'
            sap_cover_page = ' '
            cover_page     = ' '
            receiver       = sy-uname
            no_dialog      = 'X'
       IMPORTING
            out_parameters = params
            valid          = valid.
Let me know if it works.
Regards,
RV

Similar Messages

  • Spool Output Error - last 2 lines of the list were dropped on spool output

    Hi,
    I am having problem of printing a report in ALV format. The last 2 lines were dropped on the spool output.  It was actually dropping the last 2 lines on every row break.
    This problem occurs ever since we did a support pack upgrade to SAPKH47030 and SAPKB62064.
    Please help.
    Thanks
    Giana

    Apply OSS note 1100728 which was corrected in SAPKB62065.
    Problem was caused by support pack SAPKB62063 and SAPKB62064.

  • Page breaks appear in the spool output of report when run in the background

    Hi All,
    Report is using fm 'REUSE_ALV_GRID_DISPLAY' to display the report. parameters passed to this fm for display are :it_fieldcat,is_layout,it_events,t_outtab.
    Page breaks appear in the spool output when report is run in the background.These page breaks needs to be removed. When executed in the background, the excel extract should be the same as if pulling directly from the report itself.
    How to remove the page breaks in background?
    Thanks & Regards,
    Abhishek Singh

    Hi
    You can use the below code , which the reprt run in background. If you run the report in background thenyou need to use  'REUSE_ALV_LIST_DISPLAY'
    if sy-batch = ' '.
    call 'REUSE_ALV_GRID_DISPLAY'.
    else.
    call 'REUSE_ALV_LIST_DISPLAY'.
    endif.
    if you are using OO alv then write this code..
    CALL METHOD cl_gui_alv_grid=>offline
    RECEIVING e_offline = off.
    IF off IS INITIAL.
    CREATE OBJECT g_custom_container
    EXPORTING container_name = g_container.
    ENDIF.
    Regards

  • How to suppress line #s fr. rows in SPOOL output file when I use GET

    I'm having difficulty suppressing line #s which show up in my SPOOL output. That is, when I run the following
    SPOOL MySpoolOutputFile.txt
    GET SpoolHeader.txt LIST
    where MySpoolOutputFile is my spool output destination and SpoolHeader is what I'm getting and displaying in the console.
    I get a result like the following:
    1 This is my first row
    2 This is my second row
    3 This is my third row
    4 This is my fourth row
    5 This is my fifth row
    I have my environmental variables set to the following:
    SET FEEDBACK OFF
    SET TRIMSPOOL ON
    SET LINESIZE 100
    SET SQLNUMBER OFF
    SET SQLPROMPT ''
    I'd like to suppress the line numbers but can't find any other SQL*PLUS environment variable that seems to let me do this....
    Thanks, in advance, for any advice!
    Chris
    null

    1. Is the first column in the select clause "rownum"?
    --Stephen
    null

  • Prevent Occurence of list header and page breaks in spool file of ALV Grid

    Prevent Occurence of list header and page breaks in spool file of ALV Grid  Display.
    When we run the ALV in background and create spool request then:
    Spool file output is coming like this.
    Column1 Column2 Column3 Column4
    data        data        data       data
    data        data        data       data
    data        data        data       data
    Column1 Column2 Column3 Column4
    data        data        data       data
    data        data        data       data
    data        data        data       data
    But the required is like this
    Column1 Column2 Column3 Column4
    data        data        data       data
    data        data        data       data
    data        data        data       data
    data        data        data       data
    data        data        data       data
    data        data        data       data
    Please suggest a posible answer

    Hello all,
    if you have not yet solved this on your own, here is my solution: use a format type that has 60000 lines per page for your spool output device.
    It all depends on the format type that was used for creating the spool output.
    By default (in our system), we have 65 lines per page. And after each page the column headings of the ALV will appear.
    What i did:
    create a new format type via transaction SPAD->full administration->device types->format types (copy an existing one)
    change"Number of Rows" to 60000 or something applicable
    edit the device type of your output device (e.g. LOCL) to contain the newly created format type (via SPAD; Button "Formats" in device type maintenance).
    That's it! Be sure to use this format type for your output device in the "Background Print Parameters" window (-> Button "Properties").
    Regards
    Daniel Klein
    All other parameters you discussed before didn't do it. All ALV-Settings will be overwritten by the output device settings and its print properties.

  • How to insert Page Break in SPOOL file

    How to insert Page Break in SPOOL file.

    How to insert Page Break in SPOOL file.
    SET NEWP[AGE] {1|n|NONE}
    SET NEWPAGE is not supported in iSQL*Plus
    Sets the number of blank lines to be printed from the top of each page to the top
    title. A value of zero places a formfeed at the beginning of each page (including
    the first page) and clears the screen on most terminals. If you set NEWPAGE to
    NONE, SQL*Plus does not print a blank line or formfeed between the report pages.
    http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a90842/ch13.htm
    SQL> SET PAGESIZE 5
    SQL> SET NEWPAGE 0 --a form feed between your pages
    SQL> SPOOL C:\output.doc
    SQL> SELECT * FROM emp;
         EMPNO ENAME      JOB             MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800          0         20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
         EMPNO ENAME      JOB             MGR HIREDATE         SAL       COMM     DEPTNO
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850          0         30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450          0         10
         EMPNO ENAME      JOB             MGR HIREDATE         SAL       COMM     DEPTNO
          7788 SCOTT      ANALYST         7566 09-DEC-82       3000          0         20
          7839 KING       PRESIDENT            17-NOV-81       5000          0         10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
         EMPNO ENAME      JOB             MGR HIREDATE         SAL       COMM     DEPTNO
          7876 ADAMS      CLERK           7788 12-JAN-83       1100          0         20
          7900 JAMES      CLERK           7698 03-DEC-81        950          0         30
          7902 FORD       ANALYST         7566 03-DEC-81       3000          0         20
         EMPNO ENAME      JOB             MGR HIREDATE         SAL       COMM     DEPTNO
          7934 MILLER     CLERK           7782 23-JAN-82       1300          0         10
    13 rows selected.
    SQL> SPOOL OFFKhurram

  • Spool output not as per the requirement.

    I am using REUSE_ALV_GRID_DISPLAY with  31 columns in the foreground report . The report executes fine in the foreground. Even the spool is created fine when run on the background. Spool output is breaking to the second row after 25th column. But the client needs the spool output for all 31 columns in the same line. Can anyone help me that how can we do the same?
    I am using  X_65_255 format while running in background. My report has line-size of 260. I tried extending the line-size too. But there is no difference in the output. Even changing the setting to different page format was not helpful.
    Thanking you all in advance and hoping for quick solution.
    Ranjan

    1.What type of printer being used?
    2.Any reserve statement used in ur program?
    3.Try with X_65_132
    4. Is this happning only for this report print out?

  • ALV list display in a Background job - Spool output

    Hi,
    We are currently working on a report scheduled to be run in the background job, and the ALV list is displayed in the spool output.
    ALV list in the spool does not look the same as front run job, the column headers are all crowded together, and there is no grid in-between different columns or rows. It's hard to read.
    Is there a way to add grid for this kind of output?
    Thanks!

    Hi Deepak:
    I expanded your report into two rows display, and the grid in the spool display simply gone!
    report zzscratch line-size 120 no standard page heading.
    type-pools slis.
    tables pa0001.
    data : li_field type standard table of slis_fieldcat_alv,
    gi_events type standard table of slis_alv_event,
    gr_layout_bck type slis_layout_alv,
    gr_save like disvariant,
    gr_events type slis_alv_event.
    types : begin of gtt_emp,
    pernr type persno,
    ename  like pa0001-ename,
    uname  like pa0001-UNAME,
    end of gtt_emp.
    data : lr_field type slis_fieldcat_alv.
    data : lc_rep like syst-repid.
    data : li_emp type standard table of gtt_emp,
    lr_emp type gtt_emp.
    data : gv_ref_table type lvc_rtname.
    gv_ref_table = 'CATSDB'.
    lr_field-fieldname = 'PERNR'.
    lr_field-ref_tabname = gv_ref_table.
    lr_field-inttype = 'N'.
    lr_field-outputlen = 8.
    lr_field-seltext_l = 'EMPLOYEE Number'.
    append lr_field to li_field.
    lr_field-fieldname = 'ENAME'.
    lr_field-ref_tabname = 'PA0001'.
    lr_field-inttype = 'C'.
    lr_field-outputlen = 40.
    lr_field-seltext_l = 'EMPLOYEE Name'.
    append lr_field to li_field.
    lr_field-fieldname = 'UNAME'.
    lr_field-ref_tabname = 'PA0001'.
    lr_field-inttype = 'C'.
    lr_field-outputlen = 12.
    lr_field-seltext_l = 'User Name'.
    lr_field-row_pos = 2.
    lr_field-col_pos = 1.
    append lr_field to li_field.
    lc_rep = sy-repid.
    gr_layout_bck-edit_mode = 'D'.
    gr_save-report = sy-repid.
    lr_emp-pernr = '00000001'.
    lr_emp-ename = 'abc'.
    lr_emp-uname = 'testus'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000002'.
    lr_emp-ename = 'def'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000003'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000004'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000005'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000006'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000007'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000008'.
    append lr_emp to li_emp.
    end-of-selection.
    Function module for ALV grid display
      call function 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_buffer_active    = 'X'
                i_callback_program = lc_rep
                is_layout          = gr_layout_bck
                it_fieldcat        = li_field
                i_save             = 'A'
                is_variant         = gr_save
                it_events          = gi_events
           TABLES
                t_outtab           = li_emp[]
           EXCEPTIONS
                program_error      = 1
                others             = 2.
      if sy-subrc <> 0.
    clear gr_messages.
    message e023 into gr_messages.
    append gr_messages to gi_messages.
      endif.

  • Background job - Spool output screwed up.

    Hi Friends,
    i am running a report in background and i have 40 to 50 columns as a result the output of the back ground job spool output does not show in one lone but as soon as it reaches to the certain point it splits the line and shows one line as as two...
    what could be the problem?
    thank you,
    pasala.

    Check
    In your report
    -  [REPORT - list_options|http://help.sap.com/abapdocu_70/de/ABAPREPORT_LIST_OPTIONS.htm] [LINE-SIZE width|http://help.sap.com/abapdocu_70/de/ABAPREPORT_LIST_OPTIONS.htm#&ABAP_ADDITION_2@2@]
    - [NEW-PAGE|http://help.sap.com/abapdocu_70/en/ABAPNEW-PAGE.htm] [LINE-SIZE width |http://help.sap.com/abapdocu_70/en/ABAPNEW-PAGE_OPTIONS.htm#&ABAP_ADDITION_4@4@]
    In print parameter of the step/job
    - [SUBMIT - spool_options |http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_PRINT_PARAMETERS.htm] [SPOOL PARAMETERS pri_params|http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_PRINT_PARAMETERS.htm#&ABAP_ADDITION_1@1@] or [LINE-SIZE width |http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_LIST_OPTIONS.htm#&ABAP_ADDITION_1@1@]
    Also read [Printing Lists |http://help.sap.com/abapdocu_70/en/ABENPRINT.htm] and [SET_PRINT_PARAMETER|http://www.sdn.sap.com/irj/scn/advancedsearch?query=set_print_parameters] for LAYOUT and LINE_SIZE parameters.
    Regards,
    Raymond

  • Convert spool output of ABAP list into excel and send email

    Hello All,
      I have a requirement where we need to
    1. schedule a background job programtically
    2. moniter backround job (if complete or not)
    3. once its complete take spool output ,convert into excel and email.
    I have following difficulties.
      1. i have reached upto stage 3. However, i am not getting proper ouput of excel via mail. it contains junk characters. I searched SDN and tried various option but not successful.
    2. AT last i have submited report and collected output in memory rather than submiting back ground job. Now excel out put is coming somewhat as required but while sending mail , i am getting limitation of 255 chars . My excel row has more than 255 line size.
    Please suggest.
    Thanks in advance,
    jigs.
    <<text removed>>
    Edited by: Matt on Jul 1, 2009 3:52 PM - removed point offer

    I've edited your post.  Please take the time to read the Rules of Engagement of these forums.  Offering points is not permitted for reasons outline in the Rules of Engagement.
    matt

  • Spool Output in Batch Job

    Hi Team,
    I have ran a batch job and in the o/p spool i was able to see only 15 columns. But the width is upto 40 cloumns. I tried in settings of batch jobs but it was only for no. of pages. please let me know how to view the other 25 columns.
    Note: Even when i downloaded in excel format i was able to see only those 15 columns.
    Looking forward for your answers.
    Carthee

    Hi,
    Is your job related to ALV output?
    If yes, I suggest to check on SPAD settings, see also links below:
    Display spool output i.e a single row in a single line
    Re: Spool  ALV LIST
    Regards,
    Dominik Modrzejewski

  • Spool output

    Hi experts,
    can any one of you help me out in resolving the issue regarding the spool output, right now iam generating a file in spool which has output for more than one page and the output has a blank line between the pages.
    now my requirement is to avoid the blank line between the pages in the file, can any one send me a sample code for this.
    many thanks in advance,
    regards,
    madan

    hi,
      Check your report any reserved line specified for each page. If it is there remove.
    Thanks
    Venkat

  • SM37 spool output not matched with the mail received

    Hi All
    I have a background job which run on daily basis. After the job is finished successfully the spool is sent to client in the form of the html page.
    The mail received by client and the actual spool in R3 are not matching.
    Some of the text is missing at the end of the lines. Say like a row having 300 characters in the actual spool R3, 280 characters are only showing in the received mail of client, last 20 characters are missing.
    How to check the settings of Page width in SAP R3.
    Should i check the settings in the Mail configuration.
    Please advise
    Regards

    Hi
    Thank you for all the replies.
    The issue is related to the width of the output missing.
    The spool output is fine. Once this output is generated this wil be send to the spool recipient.
    spool output is different in the spool recipient and actual spool output produced in SM37. i.e  The width of the spool received in the spool receipient is missed. length is ok but widh is missing.
    Should i check in mail settings. Please help me
    Regards,

  • Spool output format issue

    Hi all,
    I am facing an issue when I run one of my custom ALV reports in the background.
    There is a one line gap between each line of the output when we check the spool content.
    I tried to change the number of columns in the existing printer format to 1023
    and also set the SAP spool system settings check box which is
    '' SP01:Number of columns from list display from format"
    Request your suggesions.
    Murthy

    Hi,
    What I was able to understand is that spool output cannot accomidate beyond 1023 characters.
    I created a work writing the content on to Application server files.
    Then created a new custom program which will download the application file content to Excel.
    Regards,
    Murthy

  • Not generating a spool output in the background job

    Hi Team,
    I have an alv report and If I schedule the program using SM36 transaction it is not generating the spool ouput.
    If I run the same program in background mode when we use se38 and select execute in background in program menu and it works successfully and generates alv grid list in the spool output.
    But, user wants to schedule the job in sm36 and check the same output in spool. Please advise why it is not generating.
    Note:I am using the cl_salv_table=>factory method to generate the output.
    Thanks in advance,
    Sunil Kumar.

    This is not really an ABAP question and you might want to ask your Basis admin for assistance. But I believe that spool will not be generated if you don't specify print parameters for a step. When you define the step in SM36, make sure to specify the print parameters.

Maybe you are looking for

  • How to find out where a value is stored

    Hi, i entered something in HR Area infotyp 0031, i expected to find those entries in table pa0031, but this table remains empty. How can i find out where sap stores those values?

  • How to get CATALINA_HOME in a servlet?

    hello I want to dynamically make some html files available to users, so I think I should first get the value of CATALINA_HOME, then copy these files to proper directories. How can I get this environment variable then? Thanks for any reply!

  • Dynamic Text with external .txt files

    I need help getting dynamic text to display. I've used the following tutorials (among others). http://www.kirupa.com/developer/mx/dynamic_scroller.htm http://www.kirupa.com/developer/mx/multiple_dynamictext.htm In Flash 8 on last frame of maintimelin

  • Photoshop Elements 4.0 & Masking

    I am doing something wrong concerning masking. I am trying to emulate the example found here: http://www.worth1000.com/tutorial.asp?sid=161107&print=1 On Step 3, it says, Let's start with Geri's abdomen and the skulls artwork, just drag the image ove

  • Alternative for CF_TwoSelectsCombo

    I am using CF_TwoSelectsCombo in my page.... Content is moved from left listbox to right listbox very slow. Is there any other custom tag or solution for the same process? Please let me know.