‎2007 Mar 08 11:29 AM
hi all
could any one please help me out how to get the spool number dynamically in the selection screen where so that i need not give the spool number every time i execute the programme.
thanks & regards
‎2007 Mar 08 11:31 AM
Hello,
Check this:
CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
EXPORTING
* name = x_name
DEST = X_DEST
ROWS = X_ROWS
STARTROW = X_STARTROW
PAGES = X_PAGES
RQTITLE = X_RQTITLE
RQCOPIES = X_RQCOPIES
RQOWNER = X_RQOWNER
IMMEDIATELY = X_IMMEDIATE
IMPORTING
RQID = X_RQID
TABLES
TEXT_DATA = I_CONTENTS
EXCEPTIONS
NAME_MISSING = 1
NAME_TWICE = 2
NOT_FOUND = 3
ILLEGAL_LAYOUT = 4
INTERNAL_ERROR = 5
SIZE_MISMATCH = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.
ENDIF.
WRITE: X_RQID " SPool Number
REgards,
Vasanth
‎2007 Mar 08 11:32 AM
SY-SPONO can be used to retrieve latest spool created in the program.
Earlier this field was called SY-SPONR, but it is now obsolete.