cancel
Showing results for 
Search instead for 
Did you mean: 

Smart form to be printed 4 times

Former Member
0 Kudos

Hi,

when samrtfrom is excuted it should print 4 copies,

I have the same data in all the windows except in footer window,

In footer window for first copy 1. Bank copy

second copy 2 .bankcopy

third copy 3. co ordinator copy

fourth copy 4 . company copy

I', m setting w_OUTPUT_OPTIONS-tdcopies = '4'.

and passing this to function module

and in footer window put a condition on sy-page = '1' and sy-page = 2 and

sy-page =3 and sy-page = 4

but it's printing 1. bank copy in all the 4 pages

please help me how to do it ?

here is the code which i wrote in my program

CALL FUNCTION w_fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = w_OUTPUT_OPTIONS

USER_SETTINGS = ''

w_bukrs = w_bukrs

w_payinslip_no = w_payinslip_no

total = w_total

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

i_final = i_final

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi naveen,

if you want to print diffent footer for each copy,,... you have to chek <b>SFSY-COPYCOUNT not sy-page</b>(in smartform u have to use SFSY-PAGE form page number)

YOU R PROBLEM WILL BE SOLVED

Please Close this thread.. when u r problem is solved

Reward if Helpful

Regards

Naresh Reddy K

Former Member
0 Kudos

Hi,

I' am passing TDCOPIES = 4 to the smart form and in Footer window for the text element I put a condition on SFSY-COPYCOUNT = 1 ....SFSY-COPYCOUNT = 4

based on SFSY-COPYCOUNT I'm changing the Footer text.

Still the footer is not changing.

Please advise me on this

Thanks

Naveen

Former Member
0 Kudos

hi Naveen,

got the solution.......

<b>do as i said in the above post.... do some extra work as below</b>

<b>create window --- type Copies window</b>...

keep all the thinig as it is.

<b>wht u have to do is just select the window u r using...

window type is Copies window</b> don't change anything

<b>already i hve tryied this....it is perfect</b>

Now iam leaving... if u r facing the problem

call me at 09903101949

Message was edited by:

Naresh Reddy

Message was edited by:

Naresh Reddy

Former Member
0 Kudos

hi naveen,

have u completed as said, it's working fine. implement that

Former Member
0 Kudos

It's working fine.

Thanks a lot !!!

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I hope one of the following two approaches will solve your problem.

Maintain number of copies (tdcoipes) to 1. Create First Page. Then, Copy Paste First Page 3 times so that you will have total four pages. Then Change the Footer for each page. Now, you will have four pages with differnet footers. Therefore, every time you print a smartform, you will get 4 pages with different footers.

OR

Maintain number of copies (tdcopies) as 4. Create Program Lines before Footer. Check for the page number. Based on the page number, assign different texts to a variable and print this variable in your footer.

Reward points if the answer is helpful.

Regards,

Mukul

Former Member
0 Kudos

Hi,

Before your print the text &SFSY-PAGE& of &SFSY-FORMPAGES& at the bottom,

add program lines.

there write:

if sfsy-page = 1.

ws_text = 'Bank Copy'.

elseif sfsy-page = 2.

elseif sfsy-page = 3.

endif.

In the output parameters, enter WS_TEXT. [ declare ws_text in the global definitions].

In the footer part print this &WS_TEXT& in your text field.

Regards

Subramanian