Skip to Content
avatar image
Former Member

Get spool number of smarftorm in submitted program

Hello Abapers,

Urgent Question :

How could i get the spool number of smartform used in a submitted program,

I have tried :

SUBMIT zwf27260 WITH p_tknum = nast-objky
WITH p_dest = lv_dest
WITH p_pdf = lv_send
WITH p_sub = w_sub
WITH p_to = ls_mails
TO SAP-SPOOL
* WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS wa_pri_params
AND RETURN.

GET PARAMETER ID 'SPI' FIELD l_spool_c.


However spool number is intial
PS : if i use Cover page 'X' in printing parameters i get the spool of the cover page

Thanks in advance, for your help

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jun 27, 2017 at 12:10 PM

    Hello,

    If you are in a hurry, may be you could try something like this :

    DATA o_rqident TYPE tsp01-rqident.
    DATA w_rq2name1 TYPE tsp01-rq2name.
    CONCATENATE 'ZWF27260_' sy-uname(3) INTO w_rq2name1.
    SELECT rqident FROM tsp01 INTO o_rqident
        UP TO 1 ROWS
     WHERE rq2name = w_rq2name1     
     ORDER BY rqcretime DESCENDING .
    ENDSELECT.
    
    

    Best regards

    Bertrand

    Add comment
    10|10000 characters needed characters exceeded