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

URGENT: report output to spool

hi experts,

i have a program and i want it to have the output as a spool order. how will i do this? for example the output of the report is a list:

MATERIAL PLANT DESCRIPTION

XXXXXXXXX XXXX XXXXXXXXX

XXXXXXXXX XXXX XXXXXXXXX

once the program is executed, it should automatically create a spool depending on the material and plant entered in the selection screen. the list must be shown when checking the spool request in SP01. how will i do this?

please help me. thank you very much...

-march

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 28, 2008 at 05:40 PM

    You can try with NEW-PAGE PRINT ON to send it to spool.

    Try like :

    START-OF-SELECTION.
      DO 10 TIMES.
        WRITE: / SY-ABCDE.
      ENDDO.
    
      DATA: PRINT_PARAMETERS TYPE PRI_PARAMS,
            VALID_FLAG(1) TYPE C.
    
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        IMPORTING
          OUT_PARAMETERS       = PRINT_PARAMETERS
          VALID                = VALID_FLAG
        EXCEPTIONS
          INVALID_PRINT_PARAMS = 2
          OTHERS               = 4.
    
      NEW-PAGE PRINT ON PARAMETERS PRINT_PARAMETERS
                          NO DIALOG.
    * call the same write data perform again
      DO 10 TIMES.
        WRITE: SY-ABCDE.
      ENDDO.
    
      NEW-PAGE PRINT OFF.
    

    Regards,

    Naimesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      i would like to ask. why is the write data performed again after NEW-PAGE PRINT ON is called? Does this also apply to an ALV list or just for a plain report output using WRITE statement?

      thanks. 😊

      -march

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.