cancel
Showing results for 
Search instead for 
Did you mean: 

Printing four copies of output

Former Member
0 Kudos

Hi experts

my client needs 3 copies of invoice printout.but the problam is

1 in the first printout I want to display original for buyer

2 in the second printout I want to display duplicate for buyer

3 in the third printout I want to display extra copy

how to do this .Plz give a solution.

Thanks

vivek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

For that Easy way - create copies window

in that window create 3 text elements

1 - original - Put the Condition SFSY-COPYCOUNT = 1

2-duplicate - Put the Condition SFSY-COPYCOUNT = 2

3-triplicate - Put the Condition SFSY-COPYCOUNT = 3

Hope you resolve your issue

Let me know if any concerns.......

Former Member
0 Kudos

Hi

thanks for the replay,i tried with this but it is not working,here is my coding

if sfsy-copycount = 1.

txt = 'ORIGINAL FOR BUYER'.

elseif

sfsy-copycount = 2.

txt = 'duplicate for transporter'.

elseif

sfsy-copycount = 3.

txt = 'extra copy'.

else.

concatenate 'another copy' sfsy-copycount into txt.

endif.

Former Member
0 Kudos

Hi,

This is right , But at the time of printpreview or printout You have to give No of copies over there in the printer selection screen ..

Let me know If any concerns.............

Former Member
0 Kudos

hi

that i given as 3,I am geting the 3 output also but the problam, it is printing as ORIGINAL FOR BUYER' in all three pages

thanks

vivek

Former Member
0 Kudos

Hi,

As per my previous post below u try this

in that window(Final window ) create 3 text elements

1st text element text element data will be - Original for buyer - Put the Condition SFSY-COPYCOUNT = 1

2nd text element text element data will be - Duplicate copy - Put the Condition SFSY-COPYCOUNT = 2

3nd text element text element data will be - Triplicate copy - Put the Condition SFSY-COPYCOUNT = 3

Hope you resolve your issue

Let me know if any concerns.......

Former Member
0 Kudos

hi

I tried this ,then also not working,i understood that the SFSY-COPYCOUNT is not incrementing,always its value is 1,do i need to do any cusomaisation

thanks

vivek

Former Member
0 Kudos

Hi ,

In the Print Window (Outputdevice ; LOCL)

Give the Number (Ex: 3 ) in the number of copies tab

Let me know if any concerns...

Former Member
0 Kudos

hi

that also I have been given.i am geting 3 copy of output,but still the SFSY-COPYCOUNT value is 1 for each print,it is not incrementing

thanks

vivek

Former Member
0 Kudos

Hi ,

If possible can you send me the copies window designing screen shot

Let me know the reason for that ..

Former Member
0 Kudos

I have send the screenshot to your id.plz check

Answers (5)

Answers (5)

Former Member
0 Kudos

Vivekkv:

If I understood correctly, you have:

- One invoice SmartForm with 1 or more pages.

- When sending to print, on the printout screen, you select "3 copies" for the same layout.

- What you need is 3 diferent texts on each copy (from the same layout) depending of the current number of copy printed.

If that's the issue; what you need to do to get the text printed in a proper way, is:

Draw a new window on the page and give it a name (for example "WINDOW_TEXTINCOPIES") and it's very important that you make sure you select as window type "T - Copy Window" (you can see it on the 1st tab of the window's general properties) -if this option is not selected, the variable "sfsy-copycount" won't increment ever! -Finally, add 3 variable texts on the same window with the text you want to display and add a condition for each one on the "Conditioning tab":

Original for buyer : sfsy-copycount EQ 1

Duplicate for buyer : sfsy-copycount EQ 2

Extra copy : sfsy-copycount EQ 3

Then you got it, it should be working now, I've proved it myself, if you have any question don't hesitate on asking.

Greetings. Gibrán.

Former Member
0 Kudos

Hi,

Declare a Variable COPY TYPE COPY and in the Program lines place the code gicen below

IF SFSY-COPYCOUNT = '1'.
COPY  = 'ORIGINAL FOR BUYER'.
ELSEIF SFSY-COPYCOUNT = '2'.
COPY  = 'DUPLICATE FOR TRANSPORTER'.
ELSEIF SFSY-COPYCOUNT = '3'.
COPY  = 'TRIPLICATE FOR EXCISE'.
ELSEIF SFSY-COPYCOUNT = '4'.
COPY = 'QUADRAPLICATE FOR ASSESSEE'.
ELSEIF SFSY-COPYCOUNT = '5'.
COPY = 'EXTRA COPY NOT FOR CENVAT'.
ENDIF.

and in the text node wher u want to display the name of the copy place the Variable &COPY&

And u can call all the copies by giving it in the PrintPriview pop up No.Of.Copies. If u give it as two only the fist two copies will be taken if one specifide only the Original will be Priviewed.

Regards,

Vijaya Lakshmi.T

Former Member
0 Kudos

Hi,

In the print program just before the call to the smartforms you need to write the code to get the value of VSTAT from NAST and if there is no entry then store the value for the variable declared as '0' and if found then go on increasing the variable count by one each time.

And pass it to the smartform interface.

No matter if you are printing 3 or 4 or 5 times the call to the print program would happen and the smartform will be called each time it is going to print the document.

Now i think it is clear and also you can check in debug mode whether it is incrementing the variable or not.

Once the proper value is in smartform then use the logic as 'ORIGINAL' if value is '0' and so on....

This is the way we are using in invoice printing.

Regards,

Ram

Former Member
0 Kudos

Hi,

As Vamsi Krishna has mentioned you need to check for the entry in NAST table with the OBJKY ( as the document number ), so it is the way to get the current status of a document whether printed once, twice or thrice.

Take a variable and store that with the value from the NAST table VSTAT field by incrementing and pass this variable to the smartform interface.

In the smartform use a copies window and display the three texts based on the condition using the variables value.

If '1' then 'ORIGINAL' and so on.

Regards,

Ram

Former Member
0 Kudos

hi

I want to take the printout at a time ,not at different time,I am using copies window,but the still output is not getting

Former Member
0 Kudos

Hi,

you can try this.

If the print is given at different times.Then

1.Fetch the entries NAST table with OBJKEY = Invoice Number.

And store the sy-dbcnt value in a variable var_dbcnt.

Then create 3 different texts and for each text node put the condition in the condition tab like var_dbcnt = 1 etc....

Thanks & Regards,

Vamsi.

Former Member
0 Kudos

hi

I am taking the print out at a time,Not on different time

thanks

vivek