cancel
Showing results for 
Search instead for 
Did you mean: 

Print Original/copy in Invoice

former_member1021627
Participant
0 Kudos

Hello,

I would like to differentiate the invoice form during the printing.

When I print the invoice for the first time, I would like to display ORIGINAL in the invoice, et for the other print COPY.

The ORGINAL form must print just one time, and the other must be forms with the tile of COPY.

Somebody can help me to solve this pb?

Who know which requirement of the output type I could use?

Thank a lot

Regards

Kari

Accepted Solutions (1)

Accepted Solutions (1)

former_member193284
Active Participant
0 Kudos

Hi

Use the below code to identify if the printout is an original or a copy.

  • Check if original or facsimile

SELECT vstat INTO TABLE t_vstat FROM nast

WHERE kappl = nast-kappl

AND objky = nast-objky "Invoice no

AND kschl = nast-kschl

AND spras = nast-spras

AND parnr = nast-parnr

AND parvw = nast-parvw

AND nacha BETWEEN '1' AND '4'

AND vstat = '1'.

IF sy-subrc EQ 0.

w_repeat = c_facsimile.

ELSE.

w_repeat = c_original.

ENDIF.

Hope this helps.

Thanks

Edited by: Sumit Naik on Feb 20, 2011 10:54 AM

Answers (3)

Answers (3)

former_member196280
Active Contributor
0 Kudos

Below field will tell you whether the invoice has been printed or not.

IF NAST-ANZAL = '1'.

-


> ORIGINAL

ELSE.

---> Duplicate

ENDIF.

Regards,

SaiRam

Former Member
0 Kudos

check the NAST table , in this table every print you will find one entry,.

if more than one entry found that is COPY , if you only one entry that iss ORIGINAL...

asik_shameem
Active Contributor
0 Kudos

Hi,

create a copies window (Original & Copies - Copy differ) in your smartform where you need the text (Original/Copy/..).

Inside the window, create 2 text elements, one for Original with condition SFSY-COPYCOUNT = 1 and other for Copy with condition SFSY-COPYCOUNT > 1.

In the print Dialog (OUTPUT_OPTIONS-TDCOPIES), set the number of copies.

former_member1021627
Participant
0 Kudos

Thank you for your answer, but what does it means SFSY? (SFSY-COPYCOUNT )

Where I find it?

Thank in advance

Kari

Former Member
0 Kudos

hii,

1. create a window with window type as copy window.

2. create a text elements under that window.

3. In text feild under condition tab specify sfsy-copycount = 1(similarly for many copies you need)oroginal

sfsy-copycount = 2 (copy)

4. specify how many copies u need in print preview.

regards,

Sri.

Former Member
0 Kudos

Hi kari,

SFSY is the standrad structure and will be always avilable in smartform.

so you can use this as condition for copies window.

Hope this will help

Dhiraj