ALV writing to spool

Hello All ,
  I am writing two internal table to SPOOL using alv list. I am using the following FM to do this
REUSE_ALV_BLOCK_LIST_APPEND
  This is writing the two internal tables to spool, but the problem is , in the spool it is also writing
two more tables, mentioning the statistics - the number of records in the alv table.
Is there any way to avoid these two extra table.
Thanks in advace
Best Regards,
Amarender Reddy B

Hi,
Yes this is possible.
Please follow the steps:
After scheduling the job.
1. Goto SM37.
2. If the job status is completed, then select that job and click SPOOL button in Toolbar.
3. Then click the ABAP List button in the Output Controller: List of Spool Request.
4. Click the settings button in the Toolbar.
5. In the dialog box: Settings for Spool request Display, Display area box, Change the From Page to 2. By default it will be 1. If you change this to 2 you can get the output. To column will have 10. You leave that as such.
Best Regards,
Suresh

Similar Messages

  • ALV grids to spool

    Hi All,
    I am working on ALV's .I have 3 ALV grids in one screen . I want to send these 3 alv grids to spool.
    I am running this in back ground.I am using classes to display the LAV grids.
    Is it possiable to display the 3 ALV grids to spool.
    Thanks,
    Swapna.

    Hi,
    In the structure to be passed to the parameter u201Cis_printu201D of the method u201Cset_table_for_first_displayu201D.
    The print output of the field u201CPRNTLSTINF-->  ALV control: Do not print list informationu201D is not visible in the print preview of the ALV Grid. If you create a spool request first, you can check the final list layout in transaction SP01.

  • Probelm of displaying alv fields in Spool display

    In report using alv grid,
    i am able to see all columns in normal output displauy
    but in spool display some last columns are not displaying,
    so what could be the problem?
    Edited by: samdup on Apr 9, 2010 1:51 PM

    In your print spool, check the spool no. you want to print.
    Then click on the small print button (Shift F1 - print with changed parameters). 
    At the bottom of the pop up screen, under spool request, you may need to adjust your Format to view more columns.  Mine is currently set to X_65_200 and it just depends on what print devices you have set up.  You can give this a try to see it helps or not.
    Good luck,
    Cindy

  • ALV grid in Spool screen limit

    Hi,
    I am displaying a report for bulk of order.
    So we will schedule it in background .
    Through the program, i am creating the output as file in appln server also i m dispklaying the report in ALV grid.
    now the report is working fine and its creating a file in appln server.
    Now my problem is if I see the spool in SM37,its showing the ALV grid. but some columns are missing in the right side.
    I hope this is because of the screen limitation.How should I solve this.
    I have to allow the user to see all the columns.

    Hi
    I too have the same issue....Where u able to find the solution...
    I have checked through this Thread, when I create a new Format 65_1000, I still get some pages missing
    Re: Spool  ALV LIST
    Your responses will be helpful.
    Thanks,
    Chaithanya k

  • ALV output to spool

    hi,
    i am having a issue when running ALV output to background. If user gives his email address i am able to send output as attachment to email.but incase he doesnt give then i have to send it to SPOOL.
    I am able to send the output to spool but when i execute the report in background i get a POPUP where i have to input device and then a other dialog box which gives formatting information I.E. X_65_132' and when i click OK then spool is getting generated.
    i tried ways to suppress this popup but couldnt find the way..can anyone suggest me a way to suppress this popup?
    i used get_print_parameters function module but the program doesn't go till that place and immediately before executing start-of-selection i am getting this popup.
    regards

    REPORT  ytest.
    INCLUDE yest_top.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM selectionscreen_modify.
      PERFORM validate_selscreen .
    START-OF-SELECTION.
    PERFORM fetch_data.
        PERFORM build_dyntable.
    Inside the build_dyntable perform i am calling alv_list_display to dislay output.
    when i debug the code after executing report from seleciton screen in background execution immediately after AT SLECTION SCREEN OUTPUT i get the popup.
    let me know incase anything to be done to suppress the popup.
    thanks

  • ALV - print - create spool request

    Hi all,
    We have made SAP Query (The majority and 'was written in ABAP code), a report using ALV grid (function 'REUSE_ALV_GRID_DISPLAY'). There is a 'Print' button on the grid. If the user presses this button the system will send a screen where the user can choose print parameters (name of printer, printing, direct or not, etc..) If the user presses 'Continue' a spool request is then created.
    But the users do not want to see the screen parameters.
    After pressing the button 'Print' on the grid, the spool request should be immediately created using the parameters seted in the ABAP program, the same program that creates ALV.
    Any idea how to do this?
    Thanks in advance

    Hi,
    Please refer to the link to add button in the ALV tool bar:
    [http://www.sapalv.net/2009/07/sap-alv-tutorial-4-%E2%80%93-add-button-to-toolbar/]
    For creating spool on click of this pushbutton you can use the following:
    * Set the Spool Parameters
      DATA: lwa_params TYPE pri_params,
            lv_valid TYPE c.
      CLEAR: lwa_params, lv_valid.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          in_parameters          = lwa_params
          layout                 = 'X_65_132'
          line_count             = 65
          line_size              = 132
          no_dialog              = 'X'
        IMPORTING
          out_parameters         = lwa_params
          valid                  = lv_valid
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
      IF sy-subrc EQ 0.
        NEW-PAGE PRINT ON PARAMETERS lwa_params NO DIALOG.
    *                  Write code for displaying the ALV here......
        NEW-PAGE PRINT OFF.
      ENDIF.
    Regards,
    Aparna Alashe.

  • ALV List to spool..

    Hello,
    I need to send the alv list to the spool . The device name is part of my selection screen. I know that i have to pass the value in the structure in the function module REUSE_LIST_DIPSLAY  but where would i pass on the device name and other print parameters?
    Thanks & Regards

    Hi subramaniam,
    My requirement is that the selection screen has the following options as radio buttons
    1) Send to Device
    2) Send to device
    Depending on the choice the report has to be printed.I don't think the user is going to agree to the method that you suggested .
    The selection screen has also an input field for the device name.
    Thanks and regards
    Avirop

  • Problems submitting ALV list to spool

    Hi!
    When sending the ALV list (function module REUSE_ALV_GRID_DISPLAY) to sap-spool, there seems to be a problem with the <b>"Total"</b> lines. When the <b>"Total"</b> line appears on a page break, it's not displayed at all - not at the end of the current page nor at the top of the next page. All the other <b>"Total"</b> lines are displayed correctly, as long as they don't appear on a page break.
    Does anyone know how to solve this problem?
    - Mari Virik

    I have not heard of this.  I would suggest that you search OSS notes for this issue.  Or report the problem directly to SAP through OSS.

  • ALV Grid Report spool problem with column with no data

    Hello All,
    I have created a simple alv grid report the report has a description field of 40 ch for which I have made the display length as 20 ch . This works fine in the foreground but when I run the report in background when there is no data in this column this being overwritten with the next column. Which is causing a mismatch between the header and the data below it.
    Also when I try to download the report in foreground into excel the columns are not matching with the headers this again happens for columns when there is no data.
    Kindly please suggest what is going wrong.
    Thanks,
    ranjan

    Hi,
    For checking the output from background job, check the job and enter JDBG in the command bar and execute.
    Check the field catalog and the table contents in debugging just before display.
    Edited by: Jayanthi Jayaraman on Dec 2, 2010 4:09 AM

  • ALV GRID WITH SPOOL REQUEST

    Hi All,
    My requirement is iam displaying one alv_grid format but at the same time i would like to sent it to spool(sp01).Whenever i need print i able to take it.Can anybody give brief details.

    Hi,
    go through the below code...
    Re: REUSE_ALV_GRID_DISPLAY
    Regards,
    Nagaraj

  • CFMAIL not writing to spool

    I am working on CFMX7 Enterprise Edition. The CFMAIL was
    working perfectly fine until sometime ago. Now, the CFMAIL doesn't
    work at all. Ran all customary checks and found that the .cfmail
    files are not written in the spool folder at all. When i physically
    place a .cfmail in the folder, the mail is being sent.
    The problem is CFMAIL ignores to deposit mail messages in the
    spool folder. I always use try/catch. No errors.
    Did someone encounter similar issues?
    Thanks
    sentill

    Forgot to mention. Spooling is ENABLED. While spooling is
    disabled the mails are not sent/received.
    Thanks

  • ALV method and spool method

    Hello
    We have created a report with financial data by using method   CL_GUI_ALV_GRID.
    We want to print it by include a separator between each new value of the Account.
    So I would like to print it in the same spool order but when there is a new value into the account to create a new spool using the last spool order.
    I do not find any method to do it and I don't want to use forms to do it. There is someone can help me ?
    thanks for your help.
    Philippe
    NB: is_print gives only information for the header of the document or page and it_special_group not permittes to do it.

    You can do this by filling the IT_SORT parameter in set_table_for_first_display function.
    data :
    wa_sort type LVC_S_SORT,
    it_sort type LVC_T_SORT
    wa_sort-FIELDNAME = <Account field name>.
    wa_sort-GROUP     = '*' "New page is triggered
    wa_sort-UP        = 'X'.
    append wa_sort to it_sort
    This will trigger a new page for each new value of the account.

  • Print alv report directly to spool  from a badi method

    Hallo !
    I am trying to save a log in spool on converting process
    I am doing on Idoc data in Method of Badi implementation
    (badi : HRALE00OUTBOUND_IDOC).
    The spool request is created but the list there contains
    no data.
    Here is the code I put in the badi method :
    DATA: LS_PRINT      TYPE  SLIS_PRINT_ALV,
          LV_REPID      LIKE SY-REPID,
          LS_LAYOUT     TYPE SLIS_LAYOUT_ALV,
          LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          LS_FIELDCAT LIKE LINE OF LT_FIELDCAT.
      LV_REPID  = SY-REPID.
    SET LS_LAYOUT :
      CLEAR LS_LAYOUT.
    SET LS_PRINT :
      CLEAR LS_PRINT.
      LS_PRINT-PRINT = 'N'.
    SET LT_FIELDCAT :
      REFRESH LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME = 'MESSAGE'.
      LS_FIELDCAT-SELTEXT_L = 'MES'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
    CREATE LOG IN SPOOL :
      SY-BATCH = 'X'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = LV_REPID
          IS_LAYOUT               = LS_LAYOUT
          IT_FIELDCAT            = LT_FIELDCAT[]
          I_DEFAULT                    = 'X'
          I_SAVE                       = 'X'
          IS_PRINT                = LS_PRINT
        TABLES
          T_OUTTAB                = PT_LOG[]
        EXCEPTIONS
          PROGRAM_ERROR           = 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.
    I have to remark that when I call this code in
    an ABAP-PI function the log is created successfully in spool.
    But here I call it from a method of IDOC Badi exit -
    and the list is empty ....
    The two cases are in processes that run in batch ...
    Maybe ALV function can't be called from a method ?
    Maybe I should use Object-Oriented ALV ?
    Or maybe I fill the ALV function parameters in a wrong way  ?
    I really appreciate your help ,
    Thanks in advance -
      Nitzan S.

    Hey,
    I am not sure if from the ALV list the SPOOL will be created properly. You said the spool is created but the spool is empty.
    A Work around could be create a classical report with WRITE statements and then SUBMIT that report exporting the list into memory or you can even read the spool then.
    Regards,
    Ravi
    Note :Please mark the helpful answers

  • Alv to spool to pdf to mail

    hi all,
         I am having a single alv report  which should run in background & generate spool and after data convert the spool to pdf and send to mail. I want all these in a single alv report & it should be schedule in background.
    First I copied the ALV report code then after I used the FM CONVERT_ABAPSPOOLJOB_2_PDF,
    SO_DOCUMENT_SEND_API1 subsequently.
    I have done so but the spool is not getting generated for my ALV.
    I want help

    Hi,
    I have output multiple ALV lists to spool using the following procedure. OO ALV is displayed during foreground, but not in background. I hope your standards permit that.
    Code: Select all
    form print_data.
      data: l_repid  like sy-repid,
            t_events type slis_alv_event occurs 0 with header line.
      if cb_srpls = '' and cb_cnsmt = ''.
        exit.
      endif.
      l_repid = sy-repid.
      g_usage_disp_var-report = l_repid.
      g_usage_disp_var-variant = p_usglyt.
      g_srpls_disp_var-report = l_repid.
      g_srpls_disp_var-variant = p_srplyt.
    When the report was run in background, we display the ALV list two
    times. One time for consumption and another time for surplus. In
    order to accomplish that, we display the second list during the
    END-OF-LIST event of the first list. Depending on which list the user
    want displayed, this logic becomes little tricky.
      if sy-batch = 'X'.
        if cb_srpls = 'X'.            "We want surplus to be displayed
          if cb_cnsmt = 'X'.          "We want the consumption also
            t_events-name = slis_ev_end_of_list.
            t_events-form = 'DISPLAY_SURPLUS_LIST'.
            append t_events.
          else.
            perform display_surplus_list.
          endif.
        endif.
        if cb_cnsmt = 'X'.
          call function 'REUSE_ALV_LIST_DISPLAY'
               exporting
                    i_callback_program = l_repid
                    i_structure_name   = 'ZSS_MAT_SURPLUS1'
                    i_save             = 'X'
                    is_variant         = g_usage_disp_var
                    it_events          = t_events[]
               tables
                    t_outtab           = t_usage_catg.
          if sy-subrc <> 0.
            exit.
          endif.
        endif.
      else.
        call screen '0100'.
      endif.
    endform.                    " print_data
          FORM display_surplus_list                                     *
    form display_surplus_list.
      data: l_layout type slis_layout_alv.
      l_layout-list_append    = 'X'.
      l_layout-colwidth_optimize = 'X'.
      call function 'REUSE_ALV_LIST_DISPLAY'
           exporting
                i_structure_name = 'ZTM_MAT_SURPLUS'
                i_save           = 'X'
                is_layout        = l_layout
                is_variant       = g_srpls_disp_var
           tables
                t_outtab         = t_surplus.
      if sy-subrc <> 0.
        exit.
      endif.
    endform.
    Regards,
    Jagadish

  • ALV to spool

    Hello,
    I am running in foreground a report that, in the end, displays an ALV grid.
    I would like to save data from ALV into a spool format when running the program in foreground , not only display it on screen.
    I know that this cand be done using a badi or bapi  FM but I don't know which it is...
    Any help?
    Thank you.

    Hi ,
    No need to go for any BADI .
    if you  schedule your program  in Background than it will automatically generate spool .
    For the please add below code into your program :
    tables : SSCRFIELDS .
    AT SELECTION-SCREEN .
      CASE sscrfields-ucomm .
        WHEN  'BAKGR' .                 PROGRAM HAS TO BE EXECUTE IN BACKGROUND
          SSCRFIELDS-UCOMM = 'SJOB'.
    Before this just create a button for execute program in Backgorund on selection screen . So when
    user click on that button this program will show you the screen to schudle prog in background .
    BAKGR :  is the user command of the button created on screen .
    Your  prob will solve definately .
    Regards ,
    Nilesh Jain .

Maybe you are looking for

  • Error in Background Job Processing.

    Dear All,          I am using a background job for processing the outbound delivery.          In the user exit in delivery program I am checking for the combination of          ship to party, Material & Batch of outbound delivery in a ztable. If the

  • Can a mac connect to a TV like a PC can?

    My tv has this PC mode, where you can connect your PC. But I don't have a PC, I have a Mac. Can you connect it somehow? By the way, I don't have an Apple TV, if that changes anything.

  • How Do I determine what version of Oracle I am running?

    Is there som sort of command that you can run in Oracle to determine what version you are running? I cannot find this anywhere!

  • How to create a view to perform the following

    I have a table as below: Name Date           Amount A     01.09.2011     100 B     01.08.2011     200 C     04.05.2011     300 I need to write a view in SQL to get the following: Name Upto 30days Upto 30-60days     Upto 60-90days A 100 B 200 C 300 Ed

  • Jdbc-swing

    Hi All, I would like to connect the database and retrieve and updates values from/into tables through swing components.I have tried that,but some socketexception is occured. please answer to my question. Regards, Aravind