Hello,
My requirement is user is able to create a PDF from a SAP spool job with a proper defined filename .
User launches the application i.e ME23N , CV04n etc...
Application provides the list of recent print jobs with proper name.
In the coding , I had select the spool number from TSP01 now i am looking for the link table between a spool request and the corresponding
abap program .
following things done in the coding
1> get spool number from TSP01
2> Pass the spool number to TBTCP-LISTIDENT
but here i am not getting any result .
Please suggest me some table or FM which gives me the program name for print spool number.
Thanks and Regards,
Prakash Kolhe
Hi,
Use the TSP01, TBTCO and TBTCP table to get the Program name and other characteristics based on the spool no.
Regards.
Praveer.
I do not think there is such stored information (i'm checking a bit in my system without success).
You can still work a tricky work around.
In each print program you can fill the spool parameters
RQ0NAME
RQ1NAME
RQ2NAME
with TCODE/sy-repid and the recover them reading TSP01 table.
Hello Prakash,
unfortunately the R/3 spooler does not use a dedicated table/field to store the value which program has created the spool.
The nearest solution is to use the Spool Name: if the application does not override this data, the creating program can be seen in TSP01-RQ0NAME, TSP01-RQ1NAME, TSP01-RQ2NAME.
For example, if you print the demo program SHOWCOLO and you don't change the Spool Name, the default Spool Name will be:
LIST1S LOCL SHOWCOLO_
Where "SHOWCOLO" is the report name.
Since this value can be easily overritten by the application, the better solution would be to check the spools from the application. For example: as far as I know the applications which use table NAST contain the spool data in fields NAST-LDEST, NAST-DSNAM, NAST-DSUF1, NAST-DSUF2 (as well as a few other fields), where DSNAM, DSUF1 and DSUF2 are the same as the previously mentioend RQ0NAME, RQ1NAME and RQ2NAME.
Best regards,
Laszlo
Add a comment