on 03-29-2011 5:25 AM
Hi Experts,
I have a issue in Printing Invoice. I have to make 2 copies of an invoice. One is Original and another is Duplicate. I have made that with copy windows. But the requirement is that when the original copy of a selected invoice has been printed then from the second time only the duplicate copy will be printed. How to do that in ABAP? How to get the information that the invoice has been printed or not?
Regards,
SURYA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ragunathan.R,
thanks for your reply.
NAST table cannot be used as I am using Z tcode and Z driver program to print the form.
I am using Z tcode and Z driver program to print the form. Suppose I am maintaining a Ztable for invoices which are printed. But how to update that z table when I click the print button in the output device window? I want to update the ztable when Print button is clicked but the table will not be updated when Print preview button will be clicked.
Thanks & Regards,
SURYA
Hi Surya,
You can do it as shown below, add the below code line in the smartform
IF job_output_options-tdpreview EQ 'X'.
do not update the z table
else.
update the ztable
endif.
select the entries from ztable.
if sy-subrc eq 0.
print copy.
else.
print original.
endif.
Regards,
Chen
Edited by: Chen K V on Mar 29, 2011 9:19 AM
Hi Surya,
Try the below approach, i think this is better than the previous approach and takes care of the print from "text menu" as well
select from z table.
if sy-subrc eq 0.
call "SMARTFORM_COPY"
else.
While calling the smartform, make sure you import the "JOB_OUTPUT_INFO" parameter,
and after you call the smartform,
call "SMARTFORM_ORIG"
exporting...
....
...
Importing...
....
job_output_info = w_job_output_info
...
exceptions...
....
.
If sy-subrc eq 0.
if w_job_output_info EQ 'X'.
update the Z table.
else.
do not update the z table
endif.
endif.
endif.
Regards,
Chen
Well i dont know how far they went away from standard in their Z-TCODE, Z-Driver program and Z-Form.
But i guess an invoice is still an invoice beeing stored in tables VBRK/VBRP.
Those invoices got document categories VBRK-FKART to which we have a customized output type scheme.
Anyway if you process an output type, normally the driver program gets triggered and struncture NAST is filled with all information needed for that print.
So why not wrting that NAST info back to nast when ready with form procession?
maybe i´m forgetting something, seeing not a certain problem. but still i dont see a reason NOT to update nast when processing ANY form.
check the requirement routine for invoice output type.
Check the NAST-VSTAT status in that routine..according to set sy-subrc. print program will print as it is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Surya,
I presume that you are using message control with an output type to do this, if so you can check for an entry in the NAST table.
Check for the status in the field NAST-VSTAT.
If you are not using message control, provide more info on the approach you are using.
Regards,
Chen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.