Skip to Content
author's profile photo Former Member
Former Member

Can we combine multiple spools?

Hi All,

Can we combine multiple spools in one spool?

My custom program is calling a standard SAP program inside a loop using SUBMIT with 'parameter' and RETURN statement.

As a result, if it is submitted six times, six spools are generated.

Is there any way I can have a single spool which contains output of all six spools?

Please suggest.

Thanks in Advance,

Rekha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 26, 2009 at 10:18 AM

    Read data of all spools and take this data into a internal table and create a spool with this data.

    You can get the spool number from table tsp01.

    Exapmle

    Select spool number from tsp01 into g_t_data

    where............(specify ur condition)

    Take spools data into a internal table

    Loop at g_t_data.

    Call program to read spool as follows

    SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN

    WITH rqident = g_t_data-rqident (spool number)

    WITH first = '1'

    Read memory where spool data is stored

    CALL FUNCTION 'LIST_FROM_MEMORY'

    TABLES

    listobject = mem_tab

    Convert spool data to Ascii

    IF NOT mem_tab[] IS INITIAL.

    CALL FUNCTION 'LIST_TO_ASCI'

    EXPORTING

    list_index = -1

    TABLES

    listasci = g_t_text1 (table type c length 2000)

    listobject = mem_tab (LIKE TABLE OF abaplist)

    APPEND LINES OF g_t_text1 TO g_t_text.

    ENDIF.

    ENDLOOP.

    create spool with this internal table data

    NEW-PAGE PRINT ON

    KEEP IN SPOOL l_keep(variable type c default u2018Xu2019)

    LINE-SIZE 300

    LIST NAME l_list (variable(30) )

    NO DIALOG.

    LOOP AT g_t_text.

    WRITE: g_t_text-data.

    ENDLOOP.

    NEW-PAGE PRINT OFF.

    COMMIT WORK.

    Now you can get the final spool number from table TSP01

    Hope this will help you

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2009 at 07:00 AM

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2016 at 04:58 AM

    Hi Rekha sing,

    I have one requiremnt, please help me out.

    I have two spools

    one spool having pdf data and another spool having word document data.

    How can i combine these spool in one spool or

    How can i print thses spools seqentially local printer using one spool.

    Thanks & Regards,
    M Surendra Babu

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.