Skip to Content

Changing Spool tiltle

Hello Experts,

Is it possible to create a spool with title ZXXXX_REPORT_sy-datum.

Program will schedule as a batch job and report output will be sent to a set of users.

I see no coding is done in the program to generate the spool

Thank you,

Vijay.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Feb 09, 2012 at 09:13 AM

    I think its the alv list getting generated in the background. Before calling the ALV function call GET_PRINT_PARAMETERS , it will give you the details of spool parameters. Now change the value in it by calling SET_PRINT_PARAMETERS.

    Add a comment
    10|10000 characters needed characters exceeded

    • Execute this code in background and check the spool title

      DATA:i_mara TYPE TABLE OF mara.
      DATA:repid TYPE sy-repid,
           params TYPE pri_params,
           title TYPE pri_params-prtxt,
           val.
      DATA:inc(3) TYPE n.
      DATA:dat(10) TYPE c.
      
      start-of-selection.
      
      repid = sy-repid.
      
      SELECT * FROM mara UP TO 20 ROWS INTO TABLE i_mara.
      
      inc = 001.
      dat = sy-datum.
      CONCATENATE 'Z' inc dat INTO title.
      
      CALL FUNCTION 'SET_PRINT_PARAMETERS'
           EXPORTING
                list_text = title.
      
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program = repid
                i_structure_name   = 'MARA'
           TABLES
                t_outtab           = i_mara.
      

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.