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: 

Printing different page heading for duplicate copy

Former Member
0 Kudos

Hi

I am using a ztcode for printing Returnable Gate Pass for a document no ( using smartform for layout ).

My requirement is -

when the Gate Pass is printed for the first time page header should be GATE PASS, and when it printed any time after that it should be GATE PASS DUPLICATE.

How to acheive this?

As this is not std tcode/program we cannot use NAST structure to check for printer flag. Also the spool request which is generated after print does not contain doc no as key...

Pls provide me solution.

Thanks & Regards

Harshada

1 REPLY 1

Former Member
0 Kudos

Hi,

create a copy window where you want todisplay as Duplicate

copy and make use of SFSY_COPYCOUNT or TDCOPIES to get the desired output.

You can use the system fields SFSY-COPYCOUNT or SFSY-COPYCOUNT0 to query whether the current output is the original or, respectively, which number the copy has.

&SFSY-COPYCOUNT&

Queries whether the original is printed or which number the copy has. COPYCOUNT = 1 : orginal, COPYCOUNT = 2 : first copy; COPYCOUNT = 3: second copy, and so on.

&SFSY-COPYCOUNT0&

Queries whether the original is printed or which number the copy has. COPYCOUNT = 0 : orginal, COPYCOUNT = 1 : first copy; COPYCOUNT = 2 : second copy, and so on.

Also check the thread(useful for you not to Avoid)

https://forums.sdn.sap.com/click.jspa?searchID=12216871&messageID=2776943

Reward if useful.

Regards,

Raj.