08-08-2007 6:31 PM
hallow
i buield smart form and i wont that the in <b>first copy</b> of bill that i print write in header original and after that all copyes that i print the program automatic write in header copy/duplicate i do in in altrnative but i wont parmter(not page number) that bring me value that i can use if the user is printing the document in first time or mmore then once so from the seconed document that user printing in the header
write <b>copy</b>.
Regards
08-08-2007 6:45 PM
Hello,
Are you using the OUTPUT_OPTIONS and giving more than one copy or is it the case that user may run this program and print the smartfrom more than one time in a day or today one (Original) and from next time it should be Copy..
If so .. Create a Ztable.. when ever a document is printed.. store that document number in it.
in your program before calling the function module.. select the record for the current document from ztable if you find entry in that it means its a copy and if you dont find it then its a first copy..
pass a variable to ur smart form saying if its first time say X other wise its space.. and use the same logic that i have told you to do with the sy-pagno.
This is the only way that you can keep track of whether a document is already printed or not..
Thanks,
Mahesh
08-08-2007 6:45 PM
Hello,
Are you using the OUTPUT_OPTIONS and giving more than one copy or is it the case that user may run this program and print the smartfrom more than one time in a day or today one (Original) and from next time it should be Copy..
If so .. Create a Ztable.. when ever a document is printed.. store that document number in it.
in your program before calling the function module.. select the record for the current document from ztable if you find entry in that it means its a copy and if you dont find it then its a first copy..
pass a variable to ur smart form saying if its first time say X other wise its space.. and use the same logic that i have told you to do with the sy-pagno.
This is the only way that you can keep track of whether a document is already printed or not..
Thanks,
Mahesh
08-08-2007 7:51 PM
hi Mahesh
i have to this in sap smart form <b>lb_bill_invoice</b> that have a sap program that calling
so it is little problem to do that.
but i try it .
Thankes anyway
08-08-2007 8:38 PM
But that is how you can... copy the smartform into a new one and write the code in your smartform only dont distrub the driver program...
Thanks
Mahesh
08-08-2007 11:42 PM
Hi - Write code in your smartform to check for prcessed entries in table NAST - If entries already exist then you can print "Duplicate / Copy" in the form
08-08-2007 11:44 PM
Hi - Write code in your smartform to check for prcessed entries in table NAST - If entries already exist then you can print "Duplicate / Copy" in the form