cancel
Showing results for 
Search instead for 
Did you mean: 

How to specify the name for SPOOL file, which is creating from Z prog.?

Former Member
0 Kudos

Hi Experts,

Am creating a SPOOL file from my Z prog. below is the code, fine, its creating.

DATA param TYPE pri_params.

NEW-PAGE PRINT ON

PARAMETERS param

NO DIALOG.

LOOP AT it_errors.

WRITE:

/15(33) it_errors-matnr,

38(55) it_errors-menge,

75(132) it_errors-error_text.

ENDLOOP.

NEW-PAGE PRINT OFF.

Looking forward to assign a name to this created error file, say, my_error_spool_file.

So, when the Z prog. creates a file in the SPOOL, it shuld create with the name of my_error_spool_file, always, so, pls. suggest me.

thanq

Edited by: SAP ABAPer on Aug 5, 2008 8:38 PM

Edited by: SAP ABAPer on Aug 5, 2008 8:40 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

Please use the following function module..

This might help you..

CALL FUNCTION 'RSPO_SET_ATTRIBUTES_SPOOLJOB'

EXPORTING

rqident =

ADD =

IMPORTING

RQ =

tables

attributes =

EXCEPTIONS

NO_SUCH_JOB = 1

NO_PERMISSION = 2

JOB_FINAL = 3

INCOMPLETE = 4

OTHERS = 5

.

In the RSPOATTR try changing the name and passing it to the FM..

Spool name is stored as TSP01-RQ0NAME

Thank you

Answers (0)