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: 

TSP02 , tsp02-pjstatus , Spool Status

Former Member
0 Kudos

In Table TSP02 , I have a spool status, tsp02-pjstatus

this is a number, when you look at spool history using sp01 you get text , such as

Waiting for output formatter

I am writing my own custom spool histort list using TSP02 , and I need to know , where to match tsp02-pjstatus to the text - I think the above is a value of 2,

it would be nice to know how you worked out the information as well.

Thanks

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

It would appear that this text is actually hardcoded in a function module. Use this to get the status text.

RSPO_RSTATUS_FOR_SPOOLREQ

Regard,

Rich HEilman

10 REPLIES 10

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

It would appear that this text is actually hardcoded in a function module. Use this to get the status text.

RSPO_RSTATUS_FOR_SPOOLREQ

Regard,

Rich HEilman

0 Kudos

Here is a sample program.



report zrich_0001.

data: xtsp01 type tsp01.
data: xtsp02 type tsp02.
data: xtsp01sys type tsp01sys.
data: xtext type tsp01_sp0r-rqstatus_v.

parameters: p_spool type tsp02-pjident.

select single * from tsp01 into xtsp01
            where rqident = p_spool.

select single * from tsp02 into xtsp02
            where pjident = p_spool.


move-corresponding xtsp01 to xtsp01sys.
move-corresponding xtsp02 to xtsp01sys.

call function 'RSPO_RSTATUS_FOR_SPOOLREQ'
     exporting
          spoolreq    = xtsp01sys
     importing
          status_text = xtext.

write:/ p_spool, xtext.

Regards,

Rich Heilman

0 Kudos

I was expecting it to be in a table somewhere, but it looks like it is hardcoded in this function module. Take note, this is rare!

Please remember to award points for helpful answers and mark your posts as solved when answered completely. Thanks.

Regards,

Rich Heilman

0 Kudos

Sorry Rich,

are you also saying if it is <F5> it gets hard coded to

"Waiting for output formatter"

Thanks

0 Kudos

Check the code in the function module..




          CASE TSP02SYS-PJSTATUS.
            when '1'.
              move ' Zeit  '<b>(012)</b> to status_text.
            WHEN '2'.
              IF TSP02SYS-PJINFO > 255.
                MOVE 'in Arb.'(002) TO STATUS_TEXT.
              ELSE.
                MOVE 'wartet'<b>(003)</b> TO STATUS_TEXT.
              ENDIF.

            WHEN '3'.
              MOVE 'wartet'<b>(003)</b> TO STATUS_TEXT.
              COLOR = 'x'.

            WHEN '4'.
              MOVE 'in Arb.'<b>(002)</b> TO STATUS_TEXT.

            WHEN '5'.
              MOVE 'in Arb.'<b>(002)</b> TO STATUS_TEXT.

            WHEN '6'.
              MOVE 'Problem'<b>(004)</b> TO STATUS_TEXT.
              COLOR = 'x'.

            WHEN '7'.
              MOVE 'druckt'<b>(005)</b> TO STATUS_TEXT.
              COLOR = 'd'.

            WHEN '8'.
              MOVE ' <F5> '<b>(006)</b> TO STATUS_TEXT.

            WHEN '9'.
              MOVE ' <F5> '<b>(006)</b> TO STATUS_TEXT.

          ENDCASE.

Double click on any of the values that have been BOLDED above. This will take you to the text symbols being used.

Regards,

Rich Heilman

0 Kudos

Hi,

I tried this , and 006 equates to <F5>

but when I look at the history of a selected spool in sp01 I get

Waiting for output formatter

Which is not in the symbols table

When I run the function mentioned I get <F5>

Thanks

0 Kudos

My reply was kind of late...

Anyways check the FM - RSPO_DESCRIBE_JOBSTATE where the text-symbols you are looking for is maintained

0 Kudos

Strangely enough, this gives "Wait"

when I run it for the spool I'm looking at , but in SP01 it gives me

Waiting for output formatter

Any ideas?

Former Member
0 Kudos

Hi Sims,

I debugged the SP01 program and found that the status texts come from text-symbols.

Check the FM RSPO_RSTATUS_FOR_SPOOLREQ, starting from line number 32.

Also check FM - RSPO_DESCRIBE_JOBSTATE.

Thanks & Regards,

Renjith.

Former Member
0 Kudos

hİ,

how can I manage waiting spools with a program?

Do u have any suggestion for scenario?

Actually ım thnkng about create one executable program and gonna setup job for it and ı dnt wanna check spools everytime

Any suggestion will be appreciate...

Best regards