Multile spool output to one file

How can i pass output of multiple spool request into a single pdf file ?
Note : i know how to pass single spool request to pdf file.
Help!!!

Hi guru,
Use two start forms and pass your two different forms thorugh those two different start forms. suppose u developed two diferent forms like one is potrait and land scape and want to generate in single spool. Then u need to call two start froms one for potrait and one for land scape. Hope this helps you. Reply for queries.
Rewards for use ful points.
Regards,
Kumar.

Similar Messages

  • Redirecting spool output to a file on app. server

    I'm running a SAP report as a background job.
    I hve a requirement to send the spool output to a file on app. server. This needs to happen automatically in background.
    I'll appreciate any suggestion.

    Hi,
    use report from Re: output to pdf format and substitute pc-download with file transfer
    good luck
    Andreas

  • Spool output to .csv file - having issues with data display

    Hi,
    Need to deliver the output of a select query which has around 80000 records to a .csv file. A procedure is written for the select query and the procedure is being called in the spool script. But few of the columns have comma(,) in the values. For Example, there is a personal_name column in the select query which says the name as " James, Ed". Then output is displayed in different columns. Hence the data is being shifted to the right for the remaining columns.
    Could some one help fix this issue. I mainly used a procedure as the select query is about three pages and hence want the script to look clear.
    Script is,
    set AUTOPRINT ON ;
    set heading ON;
    set TRIMSPOOL ON ;
    set colsep ',' ;
    set linesize 1000 ;
    set PAGESIZE 80000 ;
    variable main_cursor refcursor;
    set escape /
    spool C:\documents\querys\personal_info.csv
    EXEC proc_personal_info(:main_cursor);
    spool off;

    Hi,
    set PAGESIZE 80000 ;is not valid and it will print header as default every 14 rows.
    You can avoid printing the header in this way:
    set AUTOPRINT ON ;
    set heading ON;
    set TRIMSPOOL ON ;
    set colsep ',' ;
    set linesize 1000 ;
    set PAGESIZE 0 ;
    set escape /
    set feedback off
    spool c:\temp\empspool.csv
      SELECT '"'||ename||'"', '"'||job||'"'
      FROM emp;
    spool offThe output will look like this in this case
    "SMITH"     ,"CLERK"
    "ALLEN"     ,"SALESMAN"
    "WARD"      ,"SALESMAN"
    "JONES"     ,"MANAGER"
    "MARTIN"    ,"SALESMAN"
    "BLAKE"     ,"MANAGER"
    "CLARK"     ,"MANAGER"
    "SCOTT"     ,"ANALYST"
    "KING"      ,"PRESIDENT"
    "TURNER"    ,"SALESMAN"
    "ADAMS"     ,"CLERK"
    "JAMES"     ,"CLERK"
    "FORD"      ,"ANALYST"
    "MILLER"    ,"CLERK"You can also consider creating a unique column by concatenating the columns in this way:
    spool c:\temp\empspool.csv
      SELECT '"'||ename||'","'||job||'"' In this case the output will look without spaces between columns:
    "SMITH","CLERK"
    "ALLEN","SALESMAN"
    "WARD","SALESMAN"
    "JONES","MANAGER"
    "MARTIN","SALESMAN"
    "BLAKE","MANAGER"
    "CLARK","MANAGER"
    "SCOTT","ANALYST"
    "KING","PRESIDENT"
    "TURNER","SALESMAN"
    "ADAMS","CLERK"
    "JAMES","CLERK"
    "FORD","ANALYST"
    "MILLER","CLERK"Regards.
    Al
    Edited by: Alberto Faenza on May 2, 2013 5:48 PM

  • Not able to convert spool output to PDF file properly

    Hi guys,
    i have got spool which contains russian characters which needs to be converted to PDF file.
    Note: ******Assuming user enters only one spool in S_Spool*******
    I am using following code to do this:
    **---- Get Spool ID Details from TSP01
    select * from tsp01 into table i_tsp01 where rqident eq s_spool.
    **---- Sort Table in Ascending order based on Spool Id
    sort i_tsp01 by rqident.
    **---- Get information about Multiple spools
    loop at i_tsp01.
    **---- Get Multiple Spool information
      call function 'RSPO_RETURN_SPOOLJOB'
        exporting
          rqident              = i_tsp01-rqident
        tables
          buffer               = i_spool_table
        exceptions
          no_such_job          = 1
          job_contains_no_data = 2
          selection_empty      = 3
          no_permission        = 4
          can_not_access       = 5
          read_error           = 6
          type_no_match        = 7
          others               = 8.
      if sy-subrc = 0.
      endif.
    **---- Get the Last line index (Number of Lines)
      describe table i_spool_table lines v_lines.
      i_otf[] = i_spool_table[].
    endloop.
    **---- Convert the OTF information to PDF.
    call function 'CONVERT_OTF_2_PDF'
      importing
        bin_filesize           = v_size
      tables
        otf                    = i_otf
        doctab_archive         = i_doc
        lines                  = i_pdf
      exceptions
        err_conv_not_possible  = 1
        err_otf_mc_noendmarker = 2
        others                 = 3.
    if sy-subrc <> 0.
      message i002(sy) with 'Cannot convert to PDF, exiting....'.
      leave program.
    endif.
    DATA: v_numbytes TYPE i.
    DATA : v_return1(128).
      CONCATENATE 'C:\' 'F_spool' '.pdf' INTO v_return1.
      CONDENSE v_return1.
      CALL FUNCTION 'WS_DOWNLOAD'
           EXPORTING
                bin_filesize = v_size
                filename     = v_return1
                filetype     = 'BIN'
             IMPORTING
                  filelength = v_numbytes
             TABLES
                data_tab     = i_pdf
         EXCEPTIONS
           file_open_error               = 1
           file_write_error              = 2
           invalid_filesize              = 3
           invalid_type                  = 4
           no_batch                      = 5
           unknown_error                 = 6
           invalid_table_width           = 7
           gui_refuse_filetransfer       = 8
           customer_error                = 9
           OTHERS                        = 10 .
      IF sy-subrc NE 0.
        EXIT.
      ENDIF.
    i have already tried standard pgm : RSTXPDFT4. But it does not work.
    Suitable answers will be rewarded.
    Thanks,
    GURU

    Hi Guru,
    Use FM 'CONVERT_ABAPSPOOLJOB_2_PDF'.
    Refer this code:
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Regards,
    Hemant

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

  • Spooling queries output to text file

    Hi All,
    I need help to spool the output to a text file for a sequence of queries that I need to execute.
    Lets say, the queries would in a sql file as follows:
    Select * from emp where empId = 1
    Select * from emp where empId = 2
    Select * from emp where empId = 3
    The output in txt file should have the details as
    Employee Id Employee Name Employee Designation
    1 Alex Manager
    2 Conrad Sr Manager
    3 Herman Technical architect.
    I am trying to execute this from sql developer.
    Any pointers in this regard would be highly helpful.

    Hi,
    Welcome to the forum!
    Why not use just one query
    SELECT       *
    FROM       enp
    WHERE       empid     IN (1, 2, 3)
    ORDER BY  empid
    You can use "SPOOL filename APPEND" to re-open and add to an existing spool file after it has been closed, but there's no need to in this case.

  • In RoboHelp 11 Responsive HTML5, is it possible to have 2 different language outputs in one generated output file?

    In RoboHelp 11 Responsive HTML5, is it possible to have 2 different language outputs in one generated output file, similar to WebHelp where the use can select the language from a drop-down list? In Webhelp output you could create multiple Content categories. Is there something similar with the responsive output, or am I forced to have a completely separate set of output files for each language (for example, English, Japanese, Chinese, Korean, and Arabic)?

    As Rick, mentions, there's no default way.
    Having said that, there's nothing stopping you from doing it yourself. You can add a kind of language selector to the layout and set that for every html5 output. With some JavaScript, you can have the user switch between your outputs. It would look like content categories, but you'll have build it yourself.

  • Is there a way to create multiple BQY output to one of the Job File ?

    Hello,
    I am using EPM11.1.2.3.501 version.
    BQY report due to the large amount of data, it is difficult to use a WebClient.
    So will share on a quarterly basis.
    However,
    If modifications are to occur,There are difficulties must modify each file.
    For example,
    Register 2014 1Q, 2014 2Q, 2014 3Q, 2014 4Q BQY Job file.
    When you run the job, the output of the job file is created.
    If the job file is changed, you must modify all four files.
    This will be only grow ations.
    Is there a way to create multiple BQY output to one of the Job File ??
    Please help me.
    Thanks

    It is not possible to have multiple BQY outpu into a job file.
    Thanks,
    KK

  • Background Job spool / output file in different app server

    We are working with 2 ECC app servers, A and B.
    I've defined in app server A a background job to run an abap report and this report creates and submit 4 other background jobs.
    Each of these 4 jobs is regarding an abap report which outputs a text file in the server.
    The question is, why are the jobs generating the files in different app servers randomically?
    The same file, in the 1st execution was generated in app server A, and without any change was generated in app server B, in the job 2nd execution?
    Thank you!

    Hi,
    You can specify server name whille creating a batch job , so that it gets executed to that server only.
    there is one field (in SM36 during creation or SM37 while modifying batch job) called "Exec Target " , where you can specify server name.
    Hence you can plan to run your some batch jobs on server A or B.
    Regards,
    Rupali

  • Spool output not appearing on one page

    Hello Experts,
    When program runs in foreground, I am getting correct output i.e. ALV blocks are displayed on one page only.
    But when running same program in background, I got output in spool and when looked at spool output that time I realized that the ALV blocks are getting printed on new page.
    So instead of displaying 4 pages it is displaying 8 pages in spool.
    I ran the same report on quality in FOreground as well as background and output appears to be correct.
    But not sure why it is giving distorted (printed on new pages) in SPOOL output.
    Appreciate your help.
    Thank you.
    Saurabh

    HI Saurabh,
    Check the Layout which you are passing which scheduling the job. It seems to be a different layout as compared to other system & hence the issue.
    Thanks,
    Best regards,
    Prashant

  • Hello, How do I tell sql+ to spool output file from windows to Unix server?

    Hello, How do I tell sql+ to spool output file from windows to Unix server?
    I am new to SQL+ and just learned how to spool the file. But file is saved in my local windows enviroment and since it's 2GB in size...I want to spool it directly to another remote unix server.
    Pls answer in detail... I have been to most of the thread and didn't see relevant answer to above question.
    Am I suppose to develope some script which FTP the spool file directly to the server I want to
    or
    i Have to use UTL_FILE Package ?
    Thanks for reply

    You may not be able to...
    SQL*Plus can only spool to the local machine. If you have mapped a directory on the Unix server from your Windows machine, you can specify that directory in your SPOOL command.
    You could telnet to the Unix server, run SQL*Plus there, and spool the file to a local (Unix) directory.
    If the Unix server is also the Oracle database server, you could use the UTL_FILE package rather than using SQL*Plus to spool a file.
    If the Unix server is also an FTP server, you could also FTP the file from your local machine to the server.
    Of course, I would tend to re-examine a requirement to regularly generate a 2 GB text file. It seems likely that there is a better way...
    Justin

  • Need Spool output file in Excel format

    Hi,
    We have background job , which creates a spool output in Internet Explorer format. Customer needs this in Excel format.
    Wondering, if any authorizations to be changed for file type? or this is a set in program level?
    Thanks,
    Sam

    Hi Sam,
                     This need to be fixed at the program level only,so you need an ABAPer to make the changes in out put. There is nothing to do with authorizations.
    Regards,
    Hari.
    PS: Award points if helpful.

  • Allform outputs under one spool request?

    hai,
    iam executing the smart form for 10 customers(for sales orders).
    how can i get all these 10 outputs under one spool request?
    and if i execute the smart form ,i should not get the PRINT dailog screen.Directly , it should go to spool....how?
    regards,
    vrlreddy

    Hi,
    When calling your smartform FM, pass value 'X' for parameter user_settings as below.
    CALL FUNCTION lf_fm_name
               EXPORTING
                          archive_index        = toa_dara
                          archive_parameters   = arc_params
                          control_parameters   = ls_control_param
                          mail_recipient       = ls_recipient
                          mail_sender          = ls_sender
                          output_options       = ls_composer_param
                          user_settings        = 'X'
    This means standard user setting is used instead of asking for print parameter through PRINT dailog screen.
    Regards,
    Teddy

  • Using Spool to output data to file

    I am trying to write some sql scripts to do spooling of data to files automatically on the 1st day of each month. I use the spool command to output to text file but have problems setting the filename to tag with the date stamp.
    Script 1 : to get current year and month and then call script 2 to output to file
    ==================================================================================
    set linesize 800
    set pagesize 999
    set heading off
    Remark Get current year and month from database
    Remark
    variable v_yyyymm number;
    declare
    begin
    Select to_number(to_char(to_date(to_char(sysdate,'DD/MM/YYYY'))-1,'YYYYMM')) INTO :v_yyyymm From dual;
    end;
    print v_yyyymm
    @script2.sql :v_yyyymm
    exit
    script2.sql : spool to file
    ============================
    spool Monthly\Audit_Trail_&1..txt
    SELECT * FROM AUDIT_TRAIL WHERE TO_NUMBER(TO_CHAR(DATESTAMP,'YYYYMM')) = &1;
    spool off
    Upon execution in Windows environment, it says that unable to create spool file. It seem
    that i can't use a bind variable in the Spool Command. Any alternative ways of achieving that ??? I need the file name to be taged with the date stamp ?

    Yet another example:
    I usually create a ".cmd" file to run a sql script such as the following:
    spool j:\DailyMetrics.sql
    select 'spool j:\Daily_Metrics_'||to_char(sysdate,'mmddyy')||'.txt' from dual;
    select '@j:\DAILY_METRICS;' from dual;
    select 'spool off' from dual;
    spool off
    This, of course, allows me to then run the "j:\DailyMetrics.sql" script which now spools to a file with today's date as part of its filename and calls the reporting script to generate the data, and then spools off.
    Obviously, you can put everything in the ".cmd" file and just schedule it to be run each day.
    Good luck :)

  • 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

Maybe you are looking for

  • Loading in each mclip one at a time

    Hi, I have a site that in which each section is in it's own mclip. I simply want each mclip to load in when it is navigated to rather than the whole swf loading in at the start. I have the following actionscript to make the whole swf load in but need

  • Permissions Issues after Transferring iTunes Library to new Mac.

    My intention is to move the library off my old iMac, and keep the iTunes library on the new one, while still keeping the old iMac around.  After the transfer i intend to delete the library off the old one, and use HomeSharing to utlize iTunes on both

  • MacBook Pro locked at log in screen

    I am unable to log back onto my computer after logging out.  The grey screen comes up with my user names, and my mouse seems to work, but I am unable to click on any icons on that screen.  I have tried a few things I have found on here, but so far no

  • IE7/Firefox keep looping in CS3 (ignores AS3 cmds)

    I created an index.html and index.swf and placed them with the AC_Runactivecontent.js on the server after they worked fine locally. Now they run fine on the latest Opera and IE6, but with Firefox (1.5 and 2) and IE7 (WinXp) the flash keeps looping fo

  • Oracle Functional specialist training

    I am Cost Accountant (AICWA) & MBA with more than 1 decade of experience in Costing function in Automobile industry, Sugar industry, leather industry & Bank. I would like to know the trainers available at Chennai to upgrade myself and find assignment