Creation of Spool for a Report Output in background.

Hi Gurus,
I am working on a Report and my requirement is that a Spool should be Generated for the Report Output in background. Instead of generating the spool manually, I need it to be generated in background.
Please let me know ASAP.
Regards,
Amit.

Get print parameters using 'GET_PRINT_PARAMETERS'.
  DATA : rep LIKE pri_params-plist,
w_title TYPE tsp01-rqtitle,
mstr_print_parms LIKE pri_params.
  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING destination           = 'LP01'
              copies                = 1
              list_name             = rep
              list_text             = w_title
              immediately           = 'X'
              release               = 'X'
              new_list_id           = 'X'
              expiration            = 1
              line_size             = 132
              line_count            = 65
              layout                = 'X_65_132'
              sap_cover_page        = 'X'
              cover_page            = ' '
              receiver              = sy-uname
              department            = 'System'
              no_dialog             = 'X'
    IMPORTING out_parameters        =  mstr_print_parms
  valid = mc_valid.
and then use submit statement-
  SUBMIT
  zp1012_ar_rep_vendstat
  TO SAP-SPOOL
  WITHOUT SPOOL DYNPRO
          SPOOL PARAMETERS mstr_print_parms
  WITH s_lifnr IN s_lifnr
  WITH p_bukrs eq p_bukrs
  WITH s_gjahr eq p_gjahr SIGN 'I'
  WITH s_monat BETWEEN p_per-low AND p_per-high SIGN 'I'
                   AND RETURN.
  COMMIT WORK.
Regards,
Aparna Gaikwad

Similar Messages

  • HOW TO ASSIGN F4_VALUE_HELP FOR A REPORT OUTPUT FIELD???

    Hi Gurus,
      Can you please help me out in assigning F4_VALUE_HELP for a report output field where it is taking value as the input parameter....... If possible please help me out with some sample code ....
    Regards,
    Santosh
    Intelligroup

    I don't think that you are get the F4 functionality by pressing F4, but maybe if you use a hotspot you could achieve it.  Check this sample.  When you click on a company code in the list, it fires the F4 help defined by the program. 
    report zrich_0001 .
    tables: t001.
    data: begin of it001 occurs 0,
          bukrs type t001-bukrs,
          butxt type t001-butxt,
          ort01 type t001-ort01,
          land1 type t001-land1,
          end of it001.
    start-of-selection.
      select bukrs butxt ort01 land1 into table it001 from t001.
      loop at it001.
        format hotspot on.
        write:/ it001-bukrs.
        hide it001-bukrs.
        format hotspot off.
        write: it001-butxt.
      endloop.
    at line-selection.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'BUKRS'
                dynprofield = 'BUKRS'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = it001.
    Regards,
    Rich Heilman

  • Creating spool for ALV report in background

    Hi,
    Can we create a spool request if we run in background/forgorund? please help me..
    I am very much thankful for your quick responses.

    Yes we can create it. Execute the report in background using SM36 and then u can view the output using SM35 or the spool request number and tcode SP01.
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Options for ABAP report output in Dashboard type presentation

    Background
    Monash University environment is SAP ERP ECC6 - no BW. The University has undertaken considerable analysis of spend as part of developing a strategic approach to procurement. The data used to undertake this analysis was extracted from SAP MM and FI using a developed ABAP report which collates, categorizes and consolidates all spend information from MM (for our Purchase Order based commitment and expenditure) and FI (for direct invoices and Corporate Credit Card expenditure). This information is then currently exported to MS-Excel to produce a report containing graphs, pie charts etc.
    Requirement
    To present output from our Spend Analysis Report in a more readable dashboard type presentation. This facility should allow easy manipulation (slice and dice) and drill down of the data.. Our requirement is to have something operating within a very short time-frame, say within a month or two. Although you might suggest Web Dynpro Business Graphic or SEM /BW (as the optimal solution) we understand the set up time for either of these solutions is prohibitive. Visual Composer has been suggested as another option but we have no in-house expertise to determine if this is a viable solution.
    Some colleagues visited a conference a couple of weeks ago and saw a demonstration of a product call XenoCube http://www.inlogik.com/downloads/XenoCube_Brochure.pdf
    which was proposed as a quick way to present SAP 'raw' report output in a more readable form. Other solutions in this space that have been suggested include:-
    Zycus - Actionable Spend Analysis – Zycus.com
    Emptoris Spend Analysis - emptoris.com
    ONIQUA Enterprise Analytics– oniqua.com.au
    Ariba Buyer – ariba.com
    SAS Spend Analysis – sas.com
    Etesius – SpendGuardian etesius.com
    Can anyone provide advice as to their experience of SAP solution, integrated partner products or any of the about products to satisfy a similar requirement to that which I have outlined? The main selection criteria will include a product which is:
    a) quick & easy to implement,
    b) presentation and manipulation of ABAP extracted data
    c) is scalable and
    d) is reasonably priced.
    Grateful for any advice regarding a solution .
    Thank-you

    Hi,
      This development writes to mapped network drive in Unix. The concept will be similar.
    [http://wiki.sdn.sap.com/wiki/display/SCM/APOtoMappedNetworkDrive]
    cheers
    Aveek

  • Default Layout for a report running in background

    Dear Friends,
    I have created a layout for report ME2L and set as default layout  (for every user)....
    Foreground execution picked the DEFAULT layout but when am trying to execute the same report in background, default layout is not picked but the STANDARD layout is shown in the spool
    Could you please suggest me how can i use same report layout for foreground as well as background
    Thanks in Advance
    Ana

    Atanu dey,
    If you wnat to download excel in back ground
    You have to download in application server only.
    EX:
    DATA :  v_filepath(80)     VALUE '/data/sapdata/inc/error_log/pme_br/',
      c_coma     VALUE ',' .
    OPEN DATASET v_filepath FOR OUTPUT IN TEXT MODE.
        IF sy-subrc EQ 0.
         LOOP AT i_errors_bat.
         CONCATENATE i_errors_bat-plant c_coma
                                 i_errors_bat-zzvendor c_coma
                           INTO v_string.
            TRANSFER v_string TO v_filepath.
          ENDLOOP.
       CLOSE DATASET v_filepath.
    Note : you can download in presentation server also.
    but it requires lot of authorizations and have to use
    FTP commands.
    Reason is Apllication server in back ground has to
    recognize the from which system request came.
    Better go for OPEN DATA sets.
    Don't forget to reward if useful.....

  • Downloading Spool of a report scheduld in background on Appllication server

    Dear Experts,
    I have a requiremnt as below.
    1. A simple ABAP report is scheduled to run in the background daily.
    2. This report is simple classical report.
    3. Once the job is run successfully, the report output will be generated in the spool.
    Now the requirement is to transport the spool output to the application server (unix-AL11)
    awaiting your help and kind op-operation to meet this challenge.
    Regards,
    Nuri.

    Use the Function RSPO_RETURN_SPOOLJOB , for this pass the spool number, and get the report spooljob into a table BUFER, pass this table to application server using the Open dataset and Transfer .

  • Better user experience for slow reports (loading in background, progressbar

    Hi
    In our application, some reports take a long time till they are displayed. Therefore it would be nice, if i could provide the user with some feedback (example: progressbar). Is it possible to have this? Upon print, when a pdf file is being constructed (in web) we already have such functionality in place, is it possible to have it generally?
    Mayb,e it would also be possible to have the report load the first page quickly, so the user has already something to look at, and load all the other needed data in a background thread. (i dont think it is possible, however, somebody may have an idea)
    Does anybody have an idea how we could achieve a better user experience for our reports. Any help is appreciated. Thanks.
    Greetings
    I am using:
    Crystal Reports 2008 (in Asp.net, Windows Forms)
    Version .NET 3.5 (SP1)
    PS: of course a very fast report would be the finest solution. However, i guess this will not be possible with our reports and the volume of data they access

    Hi Daniel,
    Crystal Report 2008 we have a inbuilt functionality of progress bar .If you are not getting progress bar for every report that means those reports are not taking to much time.
    For more info regarding progressbar  this check this link:
    [https://boc.sdn.sap.com/node/8035]
    Look for processingIndicatorDelay and processingIndicatorText.
    If you want to improve performance of report then we need to keep in mind few thing while creating report in Crystal report designer:
    Here are a few points related to performance issue .
    The performance of a report is related to:
    External factors:
    1. The amount of time the database server takes to process the SQL query.
    ( Crystal Reports send the SQL query to the database, the database process it, and returns the data set to Crystal Reports. )
    2. Network traffics.
    3. Local computer processor speed.
    ( When Crystal Reports receives the data set, it generates a temp file to further filter the data when necessary, as well as to group, sort, process formulas, ... )
    4. The number of records returned
    ( If a SQL query returns a large number of records, it will take longer to format and display than if was returning a smaller data set.)
    Report design:
    1. Where is the Record Selection evaluated?
    Ensure your Record Selection Formula can be translated in SQL, so the data can be filter down on the server, otherwise the filtering will be done in a temp file on the local machine which will be much slower.
    They have many functions that cannot be translated in SQL because they may not have a standard SQL for it.
    For example, control structure like IF THEN ELSE cannot be translated into SQL. It will always be evaluated
    in Crystal Reports. But if you use an IF THEN ELSE on a parameter, it will convert the result of the condition to
    SQL, but as soon as uses database fileds in the conditions it will not be translated in SQL.
    2. How many subreports the report contains and in section section they are located.
    Minimise the number of subreports used, or avoid using subreports if possible because
    subreports are reports within a report, and if you have a subreport in a details section, and the report returns 100
    records, the subreport will be evaluated 100 times, so it will query the database 100 times. It is often the biggest
    factor why a report takes a long time to preview.
    3. How many records will be returned to the report.
    Large number of records will slow down the preview of the reports. Ensure you only returns the necessary data on the report, by creating a Record Selection Formula, or basing your report off a Stored Procedure, or a Command Object that only returns the desired data set.
    4. Do you use the special field "Page N of M", or "TotalPageCount"
    When the special field "Page N of M" or "TotalPageCount" is used on a report, it will have to generate each page
    of the report before it displays the first page, therfore it will take more time to display the first page of the report.
    If you want to improve the speed of a report, remove the special field "Page N of M" or "Total Page Count" or formula that uses the function "TotalPageCount". If those aren't use when you view a report it only format the page requested. It won't format the whole report.
    5. Link tables on indexed fields whenever possible.
    6. Remove unused tables, unused formulas, unused running totals from the report.
    7. Suppress unnecessary sections.
    8. For summaries, use conditional formulas instead of running totals when possible.
    9. Whenever possible, limit records through selection, not suppression.
    10. Use SQL expressions to convert fields to be used in record selection instead of using formula functions.
    For example, if you need to concatenate 2 fields together, instead of doing it in a formula, you can create a SQL Expression Field. It will concatenate the fields on the database server, instead of doing in Crystal Reports.
    SQL Expression Fields are added to the SELECT clause of the SQL Query send to the database.
    11. Using one command as the datasource can be faster if you returns only the desired data set. It can be faster if the SQL query written only return the desired data.
    12. Perform grouping on server
    This is only relevant if you only need to return the summary to your report but not the details. It will be faster as less data will be returned to the reports.
    Hope this helps!!
    Regards,
    Shweta

  • No output Spool for my Z-program in Background

    Hi All,
    The custom program which I developed giving the following Error message
    (The program getting executed successfully in Background but without the Output Spool ) :
    ' There is no list
    No. BT175 message
    diagnosis
    Spool No order has been found for the job or job step to choose. Possible causes:
    The job has not yet been executed.
    The job was terminated without transmitting the print spool system SAP.
    The order was created with spool "Delete when editing" and has already been removed.
    system activities
    No action.
    procedure
    If you think the job was interrupted before the creation of data editing, see the protocol job. If the job was completed abnormally, you will find a corresponding message in the system log ' .
    Please explain me what this Error is all about and also How to correct this error.
    Many thanks in Advance.

    Hi Burak,
    The program has been completely successfully (not Interrupted ),but the output spool is not appearing in the Transaction SM37 and as i said I have given all the Informations regarding that.
    I debugged the code and checked the Output file its generating. It has the Records (Entries) in Transaction AL11 which we are looking for.
    But the problem is its not generating the Spool Report in Background.
    Also, I couldn't debug the entire code ( it takes hours ) since we are fetching 4.5 million entries from DB tables.

  • Hwo to get the spool number from report output

    Hi,
    I am displaying some output in the report using write statements and within my program I need to collect the output written by write statements and send it as an email.So for that I need to generate the spool number and I am using the below code to do that
    CONSTANTS:
        l_linsz TYPE sy-linsz VALUE 201, " Line size
        l_paart TYPE sy-paart VALUE 'X_65_132'.  " Paper Format
      l_uname = sy-uname .
      l_repid = sy-repid .
    *-- Setup the Print Parmaters
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          authority              = space
          copies                 = '1'
          cover_page             = space
          data_set               = space
          department             = space
          destination            = space
          expiration             = '1'
          immediately            = space
          new_list_id            = k_x
          no_dialog              = k_x
          user                   = l_uname
        IMPORTING
          out_parameters         = l_mstr_print_parms
          valid                  = l_mc_valid
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
    *-- Make sure that a printer destination has been set up
    *-- If this is not done the PDF function module ABENDS
      IF l_mstr_print_parms-pdest = space.
        l_mstr_print_parms-pdest = k_lp01.
      ENDIF.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
      l_mstr_print_parms-linsz = l_linsz.
      l_mstr_print_parms-paart = l_paart.
      l_variante = sy-slset.
    * submitting the spool request
      *SUBMIT (l_repid) TO SAP-SPOOL*
                       *SPOOL PARAMETERS l_mstr_print_parms*
                       *WITHOUT SPOOL DYNPRO*
                       *AND RETURN.*
    *Calculating the lenth of report name
      lv_len = STRLEN( l_repid ) .
    *consutrucing the database variable  rq2name to search the spool
    *request
      IF lv_len >= 9 .
        CONCATENATE l_repid+0(9)
                    l_uname+0(3) INTO lc_rq2name .
      ELSE.
        lv_len = 9 - lv_len .
        DO lv_len TIMES .
          CONCATENATE lv_temp '_' INTO lv_temp .
        ENDDO.
        CONCATENATE l_repid lv_temp
                    l_uname INTO lc_rq2name .
      ENDIF.
    *selecting the spool request using the above consructed varibale
      SELECT   * FROM tsp01 INTO TABLE lt_tsp01
              WHERE rq2name = lc_rq2name .
    *sorting the interbla table
      SORT  lt_tsp01 BY rqcretime DESCENDING .
    *reading the first spool request
      READ TABLE lt_tsp01 INTO ls_tsp01 INDEX 1.
    but the problem with the above code is I am using variants to execute the report but when the above piece of code is getting executed it is clearing all the variant values on the selection screen and it is defaulting the values on the selection screen.
    Is there any way i can execute the above code without any problem in the selection screen.
    Thanks
    Bala Duvvuri

    Hello Bala,
    I wouldn't SUBMIT the same program to get the Spool number. You can achieve the same by [NEW-PAGE PRINT ON|http://help.sap.com/abapdocu_702/en/abapnew-page_print.htm#!ABAP_ADDITION_1@1@] command.
    Check the code snippet i've provided below:
    DATA: spfli_wa         TYPE spfli,
          print_parameters TYPE pri_params,
          valid_flag       TYPE c LENGTH 1.
    START-OF-SELECTION.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          no_dialog            = 'X'
        IMPORTING
          out_parameters       = print_parameters
          valid                = valid_flag
        EXCEPTIONS
          invalid_print_params = 2
          OTHERS               = 4.
      IF valid_flag = 'X' AND sy-subrc = 0.
    *   1. Write the output to the output list(no spool is generated)
        SELECT carrid connid
               FROM spfli
               INTO CORRESPONDING FIELDS OF spfli_wa.
          WRITE: / spfli_wa-carrid, spfli_wa-connid.
        ENDSELECT.
    *   2. Write the output to SAP spool(no list is displayed)
        NEW-PAGE PRINT ON PARAMETERS print_parameters NO DIALOG.
        SELECT carrid connid
               FROM spfli
               INTO CORRESPONDING FIELDS OF spfli_wa.
          WRITE: / spfli_wa-carrid, spfli_wa-connid.
        ENDSELECT.
        NEW-PAGE PRINT OFF.
        MESSAGE i000(zibi027) WITH 'Spool' sy-spono 'is generated!!!'.
        "You can use the spool number (SY-SPONO) to email the list output
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • Is there any way to generate table of contents in adobe for a report output

    Hi All,
    I need to display the output of a report in an PDF and layout needs to be developed in Adobe Print Forms. I want to know if there is a way to generate a table of contents for the output in adobe form on a particular page.
    Thanks...

    Hi,
    Thanks for the reply. I am new to the adobe and to the javascript.
    I would appreciate if you can guide me as to where can I get the online help on javascript related to Adobe Print and Interactive Forms.

  • Spool for Auto PO output job- download issue

    Hello All,
    This is the spool of a batchjob, where in each spool number there is one PO number , as can be seen in the screenshot below.
    This is the data in 1st line item of the spool.
    I want to download all the PO numbers, from all thee spool's.
    Is there any way to export all the PO numbers from the list of spools.
    Thanks & Regards
    Rohit

    Hi,
       You can get the list from NAST table. Enter application EF, message type and execute. Based on the document creation date and dispatch time (NAST - VSZTP) as 1 (Send with periodically scheduled job), you can take the report. NAST-OBJKY will give you the document number.
    Regards,
    AKPT

  • Generate Spool for a report

    Hi,
    I am asked to develop a program that will run a report with a variant and then return a spool number for the run.
    I'm assuming this can be done in background? The program however needs to wait for the spool number.
    Any ideas?
    Thanks
    Tyken

    HI ,
    Try this code, Hope it helps.
    Without archiving
    DATA: PARAMS LIKE PRI_PARAMS,
          DAYS(1)  TYPE N VALUE 2,
          COUNT(3) TYPE N VALUE 1,
          VALID    TYPE C.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
                DESTINATION           = 'LT50'
                COPIES                = COUNT
                LIST_NAME             = 'TEST'
                LIST_TEXT             = 'SUBMIT ... TO SAP-SPOOL'
                IMMEDIATELY           = space
                RELEASE               = 'X'
                NEW_LIST_ID           = 'X'
                EXPIRATION            = DAYS
                LINE_SIZE             = 79
                LINE_COUNT            = 23
                LAYOUT                = 'X_PAPER'
                SAP_COVER_PAGE        = 'X'
                COVER_PAGE            = 'X'
                RECEIVER              = 'SAP*'
                DEPARTMENT            = 'System'
                NO_DIALOG             = ' '
      IMPORTING OUT_PARAMETERS        = PARAMS
                VALID                 = VALID.
    IF VALID <> SPACE.
      SUBMIT RSTEST00 TO SAP-SPOOL
        SPOOL PARAMETERS PARAMS
        WITHOUT SPOOL DYNPRO.
    ENDIF.
    Thanks & Regards,
    Nagaraj Kalbavi

  • Pritn foramt for the report output in Landscape Format

    I have a question about how we can get a spool output switched to fit to a Landscape format - it is currently printing format 90x120 on a Letter size ( Portrait format ) - it's a report output

    Hi
    You can write the code during the PRINT COMMAND  to specify the Size of the Print  Layout(see the F1 help om NEW-PAGE PRINT ON )
    generally when the Size of the report is suitable to LANDSCAPE while printing while selecting the printer we select the printer properlies as LANDscape and print
    Regards
    Anji

  • Default name for saving report output

    Hi,
    I created an Oracle Report that is run via the rwservlet. Users will be prompted to view/save the output when destype=cache and desformat=pdf, spreadsheet, or delimiteddata. When they try to save the output, the default file name is rwservlet.pdf (or rwservlet.xls). Is there a way to specify a different default file name? Setting the desname and/or jobname parameter (e.g. desname=temp.pdf) doesn't have any effect. Has anyone found a solution to this?
    Thanks,
    Brian

    Hello,
    A solution may be to add a HTTP header "Content-disposition" to the answer sent by the Reports Servlet:
    Content-disposition: attachment; filename=fname.ext
    http://support.microsoft.com/kb/260519
    How To Raise a "File Download" Dialog Box for a Known MIME Type
    This HTTP header can be added with a "Servlet Filter" :
    Servlet Filter
    http://download-east.oracle.com/docs/cd/B25016_07//doc/dl/web/B14017_02/filters.htm#i1002889
    Regards

  • Re: Solution for Downloading Report Output  which contains about 370

    HI ,
       I need suggestion on the statements or functions to Download
      output of a report into  a txt file and download it to the local dir.
    Please note: This legnth of the filesize  is about 360.
    Rgds
    Perumal Srinivas
    91816500

    Hi..
    there is option..
    SUBMIT report  EXPORTING LIST TO MEMORY
    Effect
    This addition stores the basic list for the program accessed in the ABAP Memory. It can only be used together with the addition AND RETURN.
    The list is stored in the ABAP Memory as an internal table of the row type ABAPLIST, ABAPLIST being a structured data type in the ABAP Dictionary.
    The calling program can access the list stored once program access is completed, using function modules belonging to the function group SLST.
    The function module LIST_FROM_MEMORY loads the list from the ABAP Memory to an internal table of the row type ABAPLIST.
    The function module WRITE_LIST inserts the content of an internal table of the row type ABAPLIST in the current list.
    The function module DISPLAY_LIST displays the content of an internal table of the row type ABAPLIST in a separate list screen.
    Note
    The addition can only work provided the function key Enter is not linked to a function code in the GUI status last defined for the program accessed.
    Example
    Once the program report has been accessed, the list stored there in the ABAP Memory is read by means of function modules and inserted in the current list.
    DATA list_tab TYPE TABLE OF abaplist.
    SUBMIT report EXPORTING LIST TO MEMORY
                  AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    IF sy-subrc = 0.
      CALL FUNCTION 'WRITE_LIST'
        TABLES
          listobject = list_tab.
    ENDIF.
    Now...u have the itab list_tab which you is having the output. Now..using GUI_DOWNLOAD...download the contents to the txt file in your local direcctory..if any prob..come backk to me..
    Ram
    Message was edited by:
            Rammohan Nagam

Maybe you are looking for

  • Report tree issue

    I am trying to change the discription in the report tree that has been built. As of now the report tree shows the description which is linked to the reports. My issue is that i need to give some other description and not the one which is linked to th

  • HT4009 What if an In-App purchase never downloaded to begin with?

    I made an In-App purchase a few days ago and have been trying to contact the company to at least Talk to a representative and figure out what went wrong, but they have been in general, unhelpful, and haven't responded. The only email I've recieved si

  • In the menu bar when I hit bookmark my list of saved bookmarks is missing. when I bookmark a page I don't know where they go.

    my ISP sent me a fine tune disc after I ran it i could no longer find my lists of saved bookmarks. bookmark tab is there but when I click on it and the menu drops down it's gone How do I get it back. Also when I try to bookmark a page it goes through

  • Search engine preference is google, but when i search it switches to bing

    On my macbook pro which is using mountain lion, by safari search engine preferences is set to google, but when i enter a search term it defaults to bing.  Only noticed this problem after downloading adobe flash player for what it's worth.

  • Suscripción CC team caducada??

    Buenas tengo una suscripción team para 44 usuarios. El problema es que al iniciar cualquier aplicación muestra como que la suscripcion esta caducada, intentas iniciar sesion con el id que tiene activa la sucripcion  ( comprobado en el admin del team