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: 

Any relation between the following fields NAST-OBJKY and TSP01-RQIDENT ?

former_member699400
Active Participant
0 Kudos

Hello All,

I would be grateful for advice on the following:

how to find out the spool ID (field TSP01-RQIDENT) when I have, for example, printed object key (field NAST-OBJKY) ?

Any ideas?

Thank you,

Kind regards,

Mindaugas

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Question is, when do u need spool ID? If you need it right after a job has executed with a commit, then the best thing to do is select from the database tables. Use the Job name, program name and date/time to pin point. I did something like this and it involves selecting from three database tables. You can do it, only after commit has happened. Its a bit tricky code but it works. Also make sure that you are aware of the frequency with which this job would ideally run in production.

Also if you have a case of multiple spools generating from the same job, that needs to be handled as well in your code so that you can pin=point the right spool.

If you need my logic, drop a line.

Cheers !!!

Arnab

3 REPLIES 3

Former Member
0 Kudos

Hi,

Question is, when do u need spool ID? If you need it right after a job has executed with a commit, then the best thing to do is select from the database tables. Use the Job name, program name and date/time to pin point. I did something like this and it involves selecting from three database tables. You can do it, only after commit has happened. Its a bit tricky code but it works. Also make sure that you are aware of the frequency with which this job would ideally run in production.

Also if you have a case of multiple spools generating from the same job, that needs to be handled as well in your code so that you can pin=point the right spool.

If you need my logic, drop a line.

Cheers !!!

Arnab

0 Kudos

Hello Amab,

thanks for the message.

I would need spool IDs of documents which were printed long ago in past, all I have is, for example LIKP-VBELN which helps me to find NAST-OBJKY and then I need for find TSP01-RQIDENT in order to get these documents for reprinting.

Would be good if you could share the logic you have, maybe it helps.

Thank you,

BR,

Mindaugas

0 Kudos

Hi,

Try this logic. Get the CMFPNR (Error management number) from NAST & get the corresponding entries from table CMFP by passing error management = 'WFMC' and the error number (CMFPNR). You will get the spool number in MSGV1, provided there are no errors. Check the output processing log to make sure there are no errors (Though it shows green lights outside).

You can check the below links for more details.

http://sap.ittoolbox.com/groups/technical-functional/sap-dev/link-between-table-nast-and-spoolreques...

http://www.sapfans.com/forums/viewtopic.php?f=13&t=140990

http://wiki.sdn.sap.com/wiki/display/ABAP/GettingSpoolRequestNumberfortheOutput+type

Regards,

Gokul