on 04-21-2008 10:44 AM
Hi All,
How to print different text in different copies?
How to code or settings for the above requirement?
Thanks & Regards
SEK
Hi,
The requirement which I understand is that, you want different copies of the same smartform with different texts.
For this,
1. Create a window of type 'Copies Window'.
2. Enter code lines as:
IF sfsy-copycount = 001.
text = ABC'.
ELSEIF sfsy-copycount = 002.
text = 'XYZ'.
ELSEIF sfsy-copycount = 003.
text = 'DEF'.
ENDIF.
give count = as many copies as you want.
3. Print this text.
When printing this form, give number of copies = as many copies as you want.
Hope this helps.
Thanks,
Dawood.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this,
Data: wa_options type ITCPO.
wa_options-TDCOPIES = '3'. (no. of copies you want)
Then call the function module.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZSCRIPT'
LANGUAGE = SY-LANGU
OPTIONS = wa_options.
With this you will get the required number of copies, but, how to get the texts on those is to be explored.
Thanks,
Dawood.
For SAP Scripts.
do not use tdcopies if you want different texts on each copy.
You will have to call the script in a loop.
The number of times the loop is called shud be equal to the number of copies
You can then change the data accordingly in each loop so different data prints
loop at copycount
if count = 1.
texte = 'original'.
else.
text = 'Copy text'
endif.
OPEN_FORM....
endloop
well..
suppose u want to display Orginal copy in the first page and duplicate copy in the second page.
then put this text field in a window and make it a "COPIES WINDOW" in the attributes.
then create 2 text fields under it for the original copy and the dupluicate copy text.
and then in the conditions tab of these text fields type this
SFSY-COPYCOUNT = '001'
SFSY-COPYCOUNT = '002'
respectively.
after that while giving print preview, in the number of copies option give '2'.
then u can see the same output in 2 diff pages, with the only diff being the "original copy" and "duplicate copy" text.
revert back if u have any doubts,
as always
pk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.