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: 

Get spool number without submit report.

Former Member
0 Kudos

Hi

I want to get spool number I am using this function module

   CALL FUNCTION 'GET_JOB_RUNTIME_INFO'

        IMPORTING

             eventid                 = w_eventid

             eventparm               = w_eventparm

             external_program_active = w_external_program_active

             jobcount                = w_jobcount

             jobname                 = w_jobname

             stepcount               = w_stepcount

        EXCEPTIONS

             no_runtime_info         = 1

             OTHERS                  = 2.

* Get Spool Number

   SELECT * FROM  tbtcp

                  INTO TABLE t_tbtcp

                  WHERE      jobname     = w_jobname

                  AND        jobcount    = w_jobcount

                  AND        stepcount   = w_stepcount

                  AND        listident   <> '0000000000'

                  ORDER BY   jobname

                             jobcount

                             stepcount.



but the function module is not fetching any thing .

3 REPLIES 3

Former Member
0 Kudos

Hi,

if you are looking for your current spool number you just need to check sy-spono after a WRITE statemet is done.

Marco

thanga_prakash
Active Contributor
0 Kudos

Hello Rohit,

As I understand I guess you are scheduling job in your program by using JOB_OPEN and JOB_CLOSE.

If means after the job close call the FM " BDL_READ_JOB_STATUS" to check whether the job finished.

Then call your FM "GET_JOB_RUNTIME_INFO" and SELECT query, after the JOB_CLOSE, because the spool will be created after the job is finished.

Regards,

Thanga

Former Member
0 Kudos

Solved  thanks for your response.