cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Count Issue In Smartform

Former Member
0 Kudos

Hi.

I am printing an Invoice using smartform.

I have to print the text 'ORIGINAL' when printing the invoice for the first time, and subsequently I have to print the text 'COPY' for further printing of the same invoice.,

I have used the COPIES-WINDOW and the system fields SFSY-COPYCOUNT, but its not working.

Please guide me how to accomplish this?

Points are assured !!!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi.

Thanks for your suggestions.

I found the solution.

There is a element IS_REPEAT , which we can pass in the exporting fields , when we call the smartform function module in the driver program.

Use this field in smartform interface in the Smartform.

If this field is 'X' then its a Repeat Copy and if field is blank , then its Original copy.

Regards

amit_khare
Active Contributor
0 Kudos

Instead check NAST table with KAPPL, KSCHL, OBJKY field.

If found print COPY else PRINT ORIGINAL.

Check this -

DATA: wl_mandt TYPE mandt.

SELECT mandt INTO wl_mandt UP TO 1 ROWS

FROM nast

WHERE kappl = w_kappl AND

objky = w_objky AND

kschl = w_kschl.

ENDSELECT.

IF sy-subrc <> 0.

e_version = c_doc_version_original.

ELSE.

e_version = c_doc_version_duplicate.

ENDIF.

Former Member
0 Kudos

Hi.

Thanks for your reply, but an entry will always be there in the NAST table, so every time it will print ORIGINAL only.

Regards

Former Member
0 Kudos

if you are printing data from custom table....

add one more field as Flag in the custom table...

when 1st print is successfull make this flag as 'X'.

while printing chk if this flag is not set then print 'ORIGINAL' otherwise 'COPY'.

if you are printing data from standard table make one custom table to store this information...