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: 

help in smart form

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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