Skip to Content

Convert List to Spool

Hi

I have a requirement where i need to convert the list output( Generated through WRITE ) to Spool.

The requirement is that whenever the user is trying to exit the list using BACK button the report output should be sent to the spool / printer.

Please let me know how this can be achieved.

Thanks

Abdul Hakim

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2012 at 04:39 AM

    You can write down the below code against the "BACK" button in this way -

    DATA: print_parameters TYPE pri_params,

    archi_parameters TYPE arc_params,

    valid_flag(1) TYPE c.

    CALL FUNCTION 'GET_PRINT_PARAMETERS'

    EXPORTING

    archive_mode = '3'

    IMPORTING

    out_parameters = print_parameters

    out_archive_parameters = archi_parameters

    valid = valid_flag

    EXCEPTIONS

    invalid_print_params = 2

    OTHERS = 4.

    IF valid_flag = 'X' AND sy-subrc = 0.

    SUBMIT <submitable> TO SAP-SPOOL

    SPOOL PARAMETERS print_parameters

    ARCHIVE PARAMETERS archi_parameters

    WITHOUT SPOOL DYNPRO.

    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2012 at 04:45 AM

    Hello Abdul,

    You can use SUBMIT PROGRAM to send your output to spool as suggested above.

    Regards,

    Deepti

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2012 at 07:29 AM

    Take a look at FMs of function SLST.

    spoiler (select to display): start with a SAVE_LIST with sy-lsind to get the abaplist, then GET_PRINT_PARAMETERS and WRITE_LIST

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 03, 2013 at 06:24 PM

    Generally incase of reports - if the report is run in background the output list can be seen in spool (It is tested in can of re-use alv but not sure for WRITE ALV)

    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.