on 08-19-2008 4:01 AM
good day gurus...
i have develop a print program and a smartform which prints the official receipt. now, what i need this time, is to determine, if the smartform is already printed or not. so what i am thinking is, i have to create a z_table that will store the spool number and the document number once it is printed.
my problem now are the following:
1. what are the tables that are linked to the spool numbers and the document number(belnr).
2. how could i determine if the print button on the smartform is already pressed or not.
thanks a lot for your help.
i got it now. thanks .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spool numbers are stored in table TSP01
*To get spool Number
Example:
DATA: l_rqident like tsp01-rqident,
l_rq2name like tsp01-rq2name.
concatenate sy-repid0(9) sy-uname0(3)
into l_rq2name.
select * from tsp01 where rq2name = l_rq2name
order by rqcretime descending.
l_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear l_rqident.
endif.
Close thread once your question is answered.
Regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks sai ram for your reply.
but my problem here is not to get the spool number alone but how to determine that a certain document has that specific spool number.
For your information why I want to know which spool for a certain document is, I want to determine if a form is already printed or not. So I think, the spool is the best way to get as the determinant if a document is already printed. But my question now is, how could I pinpoint exactly that the a certain document belongs to that spool number?
Thanks again in advance...
hi,
In the Ztable you add another one field PRINT
wa_ztable-print = 'X'.
APPEND wa_ztable TO i_ztable.
clear wa_ztable.
MODIFY ztable FROM TABLE i_ztable.
once print the form, you will check it in ztable updated field PRINT with 'X' or not.
regards
bhupal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi bhupal,
thanks for your reply.
Actually, the code you have given is correct. But my question is, when do you execute this code? Isn't that when you click the print button? thats my problem actually.. How do I know, if the user had already click the print button. If I am correct, we can determine via the SPOOL numbers... (see thread)...
Do you have any idea further on my problem I mentioned above?
Thanks again.
Hi,
According to my knowledge there is no need to store any spool request what you do is, just add one more field in your ztable give name as CHECK.
Then whenever you press print, update that ztable field ZTABLE-CHECK = 'X' according to that perticular document.
So next time whenever you press print for the same document check tha ztable
if it is 'X'
then pass a message that 'Doc is already printed'.
else
And Update the field againt to 'X'.
endif.
Hope this will helpfull for you,
Regards,
KP
Edited by: krishna prasad on Aug 19, 2008 6:52 AM
Edited by: krishna prasad on Aug 19, 2008 6:52 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For spool numbers it is stored in TSP01 Table &
TSP02L Tables
Edited by: Bala Krishna on Aug 19, 2008 10:21 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks bala for the reply...
TSP01 have records on it while TSP02L has none at all.
In this tables, spool numbers are created once the document (example is smartform) is printed.
Now, how could I determine if the smartform was printed or not. Is there any field on the TSP01 that is related on the BSEG,BSAD,BSID tables which has the document numbers(BELNR)?
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.