on 11-22-2006 1:34 PM
Hi all,
I need to print a watermark on a check wich will be composed of the recipient and the amount. I want this to print continuously in a window. Because of the automatic wrapping function of the Sapscript's window, the text is cut between space and doesn't give me the effect I want. Is there a way to turn off that wrapping and make the window clip the extra text?
OR I tried to make a BIG string in a ABAP routine and put back the string on one line in the window, that works except that the strings pass to a ABAP routine is maximum 255 characters, so my string is cut and I don't get the full text in the window. So if there's no way to turn off wrapping, is there a way to pass longer string between a sapscript and a ABAP routine??
Thanks
Hello,
Nop you can only pass strings of that size, try to do it with several static strings, that is the onlu way to do it, or try to do it in a structure but i dont think it would work.
Cheers,
Gabriel P.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You try to place a new window, having the same size, in the same position of the main, i.e. the MAIN should overwrite this new window.
In this window place your watermark.
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thats what I've done, I don't have problems printing the watermark, I have problems with the contents of it. If the check recipient is Mike B and the amount is 10.99 I want the watermark to be like that:
_______________________
MIKEB10.99MIKEB10.99M |
IKEB10.99MIKEB10.99MIK |
EB10.99MIKEB10.99MIKE |
-
|
What I get is something like that:
________________________
MIKEB10.99MIKEB10.99 |
MIKEB10.99MIKEB10.99 |
MIKEB10.99MIKEB10.99 |
-
|
Even if in the sapscript I put my variables in the same line like that:
&waterm&&waterm&&waterm&&waterm&&waterm&
Hi
U can manage it write the text in an internal table and then transfering the data from this table to the window:
WINDOW
/: &LINE1&
/: &LINE2&
/: &LINE3&
................
/: &LINEN&
The program:
DATA: OFFSET TYPE I,
OFFSET1 TYPE I,
LEN TYPE I,
LEN1 TYPE I,
LEN_LINE TYPE I.
DATA: MAX TYPE I VALUE 72.
DATA: N TYPE I,
MAX_LINE TYPE I VALUE " Max Number of lines can be printed
LEN = STRLEN( WATERM ).
DO.
LEN_LINE = OFFSET + LEN.
IF LEN_LINE < MAX.
LEN1 = LEN.
ELSE.
LEN1 = MAX - LEN.
ENDIF.
WRITE WATERM(LEN1) TO LINE+OFFSET.
OFFSET = OFFSET + LEN1.
IF OFFSET = MAX.
APPEND LINE TO T_LINE.
N = N + 1.
IF N = MAX_LINE.
EXIT.
ENDIF.
ENDIF.
* New line
IF LEN1 < LEN.
CLEAR LINE.
WRITE WATERM+LEN1 TO LINE.
ENDIF.
ENDDO.
FIELD-SYMBOLS: <LINE> TYPE ANY,
FIELDNAME(20) VALUE 'LINE'.
DATA: COUNT(2) TYPE N.
LOOP AT T_LINE.
COUNT = COUNT + 1.
CONCATENATE 'LINE' COUNT INTO FIELDNAME.
ASSIGN T_LINE TO (FIELDNAME).
* Call the window
ENDLOOP.
Max
So
U can try to insert a code as mine in a form called by sapscript and transfer the line to the changing parameter (out_tab table).
The only problem can be the number of parameters can be used in this form, I believe it can't be greater than certain number (but I don't remember which one).
Max
It's never the same number of characters since the font is proportional. Depending of what is in the string, the number of characters change.
For example if I have a 80 characters line consisting of 80 "i", it will fit on the window but 80 'w' won't, since the W take's more space than i and that's why I can't calculate the number of characters.
User | Count |
---|---|
73 | |
11 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.