cancel
Showing results for 
Search instead for 
Did you mean: 

problem in print priview and print out

Former Member
0 Kudos

Hi,

In VF02/VF03 transaction,smartform to make original copy and duplicate copy i am refering IS_NAST-VSTAT this field i am printing Original when the field value is 0, when others i am printing Copy ....Now the problem is second time printout while print priview it showing copy text while printing its printing original text...

Any idea,

Regards,

Ramesh

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member193284
Active Participant
0 Kudos

Hello,

Use below logic should resolve your issue.

**-->Check if original or Copy

SELECT vstat INTO TABLE t_vstat FROM nast

WHERE kappl = nast-kappl

AND objky = nast-objky

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_copy.

ELSE.

w_repeat = c_original.

Thanks

ENDIF.

Former Member
0 Kudos

checking vstat is not the way to go tho it has its place in the solution.

You have to read table nast with OBJKY = your document number (when talking of a output type on header level) and VSTAT = 1, and KSCHL = your output type.

If you can find such an entry in NAST, then it has been processed sucessfully, and so all following printouts/previews are copies.

If you dont find such a record, thne you are printing an original.

For this solution the update of table NAST by your driver program must work correctly tho.

Former Member
0 Kudos

Hi

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 is the Copy counter where 1 = original, 2 = 1st copy, etc.

SFSY-COPYCOUNT0 is the Copy counter where 0 = original, 1 = 1st copy, etc.

[More Info |http://help.sap.com/saphelp_nw70/helpdata/en/b1/243fe0beee11d4b633006094192fe3/frameset.htm]

Shiva

Former Member
0 Kudos

Hi,

This is not related to copy count issue...In VF03 transaction when ur taking print out for perticular invoice on fisrt time and second time for the same invoice ther text should be different...............

thanks....

Former Member
0 Kudos

Hi

Please try any of the below options

1. check the field REPET in NAST than VSTAT.

*2. Select VSTAT field from the table NAST where VSTAT = 1 ( Successfully processed ). If it is already processed * successfully then it will have VSTAT = 1. If there is no entry or VSTAT = 0, then it is original copy.*

3. If you have copied the smartforms using the standard LB_BIL_INVOICE, thenthere is a field called IS_REPEAT, please check that

Shiva