Application Development 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: 

Problem with spool request after submit

Former Member
0 Kudos

Hi experts,

Iam generating a pdf on spoof request,everything is going fine but iam getting my spool id as zero,iam posting part of my code

below please identify what might the problem......

CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'

   EXPORTING

     CURR_REPORT           = SY-REPID

   TABLES

     SELECTION_TABLE       = RSPARAMS

  CALL FUNCTION 'GET_PRINT_PARAMETERS'

    EXPORTING

      COVER_PAGE                     = ''

    DATA_SET                       = DATASET

*   DEPARTMENT                     = C_CHAR_UNKNOWN

      DESTINATION                    'LOCL'

      EXPIRATION                     = '1'

      IMMEDIATELY                    ' '

      LINE_COUNT                     = '65'

      LINE_SIZE                      = '255'

      NO_DIALOG                      = 'X'

    IMPORTING

*   OUT_ARCHIVE_PARAMETERS         =

      OUT_PARAMETERS                 = PRI_PARAMS

    VALID                          = VALID.

*   VALID_FOR_SPOOL_CREATION       =

* EXCEPTIONS

*   ARCHIVE_INFO_NOT_FOUND         = 1

*   INVALID_PRINT_PARAMS           = 2

*   INVALID_ARCHIVE_PARAMS         = 3

*   OTHERS                         = 4

CLEAR l_acttime.

   CONVERT DATE sy-datum TIME sy-uzeit

   INTO TIME STAMP l_timestamp TIME ZONE sy-zonlo.

   l_acttime(14) = l_timestamp.

   CONCATENATE l_acttime '00' INTO l_acttime.

   l_range_acttime-sign   = 'I'.

   l_range_acttime-option = 'BT'.

   l_range_acttime-low    = l_acttime.

   SUBMIT ZPAYROLL1 WITH SELECTION-TABLE RSPARAMS with p_par = 'x' TO SAP-SPOOL SPOOL PARAMETERS PRI_PARAMS WITHOUT SPOOL DYNPRO AND RETURN.

*  *Create System Log Time Right after spool

   CLEAR l_acttime.

   CONVERT DATE sy-datum TIME sy-uzeit

   INTO TIME STAMP l_timestamp TIME ZONE sy-zonlo.

   l_acttime(14) = l_timestamp.

   CONCATENATE l_acttime '00' INTO l_acttime.

   l_range_acttime-high    = l_acttime.

   APPEND l_range_acttime.

   SELECT MAX( RQIDENT ) FROM TSP01 INTO LV_SPOOL WHERE RQOWNER = SY-UNAME AND RQCLIENT = SY-MANDT   AND   rq0name   = pri_params-prdsn

          AND   rq1name   = pri_params-pdest

          AND   rq2name   = pri_params-plist

          AND   rqcretime IN  l_range_acttime.

.

2 REPLIES 2

Former Member
0 Kudos

Hello Hemanth,

Although I have not executed the code that you have pasted above, can you check if the table TSP01 has a new entry created by you from SE16 tcode. Also check the structure PRI_PARAMS for the field PRREL = ' '.

regards,

Rohan

Former Member
0 Kudos

You might want to refer the 3rd step in this SAP Community Network Wiki - ABAP Development - PDF Download By Creating Spool Request.

Let me know if it does not work.