cancel
Showing results for 
Search instead for 
Did you mean: 

print should come only once per document number

Former Member
0 Kudos

Hi All,

I have done a script for the WC Document,

But now the client requires it to print it only once for a particular document number,

How can we do. Is there any such coding to restrict the print only once per document.

If anyone knows the solution please post it

Accepted Solutions (0)

Answers (4)

Answers (4)

Jelena
Active Contributor
0 Kudos

If you're using the standard output functionality, then this may be accomplished by a change in the output type (transaction NACE). There is a checkbox 'Multiple issuing'. If it's unchecked, the output will be issued only once.

Former Member
0 Kudos

hi

check the entry in nast table if you find more than 1 enrty that is repeated print .....

select objky

kschl

erdat

eruhr

vstat from nast into table gt_date

where objky eq gv_del_num. ---> document number

if sy-subrc eq 0.

sort gt_date by objky erdat descending .

describe table gt_date lines lv_n.

if lv_n gt 1.

gv_repeat = lc_x.

endif.

Former Member
0 Kudos

hi

to add on what kartik suggested just put check in that ztable once your document executed.

save document no. and with flag set 'X'.

and before printing the form . select the doc no. in the table if found then no need to print the form.

else go ahead.

this way you can skip the check field also.

Former Member
0 Kudos

hi,

what u can do is, create a ztable with entries of document number and a checkbox.

every time u execute the script check whether the particular doc number has already been executed or not. if yes then give error message or else process ur script and update the ztable with the current entry.

кu03B1ятu03B9к

Former Member
0 Kudos

Hi,

Thank you vey much.

Your answer helped me a lot.

But one more doubt , if i want make some changes in the document which is already printed ,

now can i take print , if yes how it can ?

Former Member
0 Kudos

How r u running ur script? is it configured thru NACE if yes then u can follow the method as suggested by chenna kesava its much more better approach.