Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

spool number

Former Member
0 Likes
323

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

2 REPLIES 2
Read only

Former Member
0 Likes
296

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

Read only

Former Member
0 Likes
296

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.