Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create multiple spool files

Former Member
0 Likes
1,364

Hi All,

Is it possible to create a mutiple spool files which contains different data from the abap program at once.

Please let me know your thoughts.

Thanks & Regards

Santhosh

7 REPLIES 7
Read only

former_member156446
Active Contributor
0 Likes
984

I doubt if its possible in one shot..

spool will carry the write statements.. when u excecute in background.. only One spool number will be generated.. by system automatically...so multiple spools is not possible with multiple data..

Read only

0 Likes
984

Hi Jay,

Can u provide me the FM names which can create a Spool file.

Thanks & Regards

Santhosh

Read only

0 Likes
984

if you just run ur program which gives output like write statements or ALV grid etc... that will automatically saved in a spool.. after ur job is completed in background you can view the spool in SP01 tr. to view the status of the background job sm35 tr.

Read only

0 Likes
984

If you execute the program in BACKGROUND, it will automatically create spool.

ONLINE EXECUTION: you need to write your statements to be taken to spool within NEW_PAGE PRINT ON & OFF.

CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
            COVER_PAGE          = WC_X
            DESTINATION            = <Printer Name>
            EXPIRATION              = 2
            IMMEDIATELY           = SPACE
            LAYOUT                   = 'X_65_255'
            LINE_COUNT             = 65
            LINE_SIZE                = 255
            LIST_NAME              = <LIST_NAME>
            LIST_TEXT              = <SPOOL_TITLE>
            *NEW_LIST_ID            = WC_X*    "New Spool 
            NO_DIALOG              = WC_X
            SAP_COVER_PAGE  = WC_X
       IMPORTING
            OUT_PARAMETERS    = WA_PRINT_PARA
            VALID                          = WS_VALID
       EXCEPTIONS
            ARCHIVE_INFO_NOT_FOUND = 1
            INVALID_PRINT_PARAMS   = 2
            INVALID_ARCHIVE_PARAMS = 3
            OTHERS                 = 4.

  IF WS_VALID <> SPACE AND SY-SUBRC EQ 0.

    NEW-PAGE PRINT ON PARAMETERS WA_PRINT_PARA NO DIALOG.
    PERFORM DISPLAY_REPORT. "Write Statements
    NEW-PAGE PRINT OFF.
endif.

Reward if useful.

Read only

Former Member
0 Likes
984

hi it is possible. we can create multiple spool files with different data with the different instances..

Read only

0 Likes
984

How???

Read only

former_member156446
Active Contributor
0 Likes
984

Hi Santosh after Venkat pointed it [I found the link..|http://help.sap.com/saphelp_nw04/helpdata/en/e3/31f03bb8e8ed0ce10000000a11402f/content.htm] plz check it it might be of any help