Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

vertical text in Sapcript

Former Member
0 Kudos

How can I put a variable vertical text in Sapscript?

5 REPLIES 5

Former Member
0 Kudos

NO SE PUEDE.

VXLozano
Active Contributor
0 Kudos

Two options:

1st: seek for a verticalized font and make a window 1ch width n chars height and assign that font (you will need to install that font in all the computers of your customer.

2nd: make 10 mini-bitmaps with the numbers 0-9 90 degree rotated, put n windows in your form and dinamically load the interested bitmaps in each window.

I think I read in this forum how to assign dinamically a bitmap to a window... if not, maybe was in sap-genie or in help.sap.com

Good luck,

Vicenç

VXLozano
Active Contributor
0 Kudos

Made some tests by myself, and it works pretty well...

I will to put the sample thinking in number, but you can make it more general changing some things (like the IF ELSEIF clauses, and of course, the bitmaps to upload)

1) Make (or seek for) bitmaps with numbers rotated 90º (let's suppose you use bitmaps named bmpzero, bmpone... and monochrome)

2) Put in your form n new windows (where n means the lenght your number must have)

3) Put in each of your windows the next statements (changing the DECLARE statement in function of the position of each figure in your number:

you must have declared mynumber in the report where you call the form, or you must change the sentence below 😛

/: DECLARE &myfigure& = &mynumber+n(1)& <-- n is the position of your figure

/: CASE &myfigure&.

/: WHEN '0'.

/: BITMAP bmpzero OBJECT GRAPHICS ID BMAP TYPE BMON.

/: WHEN '1'.

/: BITMAP bmpone OBJECT GRAPHICS ID BMAP TYPE BMON.

...

/: ENDCASE.

I wish be useful for you this piece of code. Regards,

Vicenç

johan_geraedts
Explorer
0 Kudos

sapscript isn't able to print text vertically but you can

inform your printer to do this.

To rotate the window during the printing you'll need 2 print controls.

E.G.:

Print-control Y1

... Text to print vertical

Print-control Y2

Y1 informs the printer to print the following text vertically and Y2

informs the printer to return to horizontal printing.

You'll have to look for the specific print sequences in the documentation

of your printer type.

Regards

0 Kudos

Yes, I knew about the print-controls... but the parameters are printer and/or driver dependent, and (as I could see) a bit hard to work with for a newbie ABAP programmer (like me).

My "solution" works around the trouble. It's not clean, but it works

But thanks anyway for your information.