Application Development and Automation 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: 
Read only

Rotating text in SAP Script

Former Member
0 Likes
1,841


Hi,

  I want to print text vertically and horizontally in script.Not like A

                                                                                                   B

                                                                                                   C.

It should be totally rotated and printed vertically.I tried Print control commands.But not getting my desired result.Any suggestions please....It's actually a barcode label with some text vertically. PFB screenshot of a part of it.

Regards

Lavanya

4 REPLIES 4
Read only

learnsap
Active Participant
0 Likes
1,136

This message was moderated.

Read only

peng_wen
Product and Topic Expert
Product and Topic Expert
0 Likes
1,136

First of all you should check whether your printer is able to

change the print direction in the middle of the page and

which printer escape sequences are necessary to do that.

E.g. if you use a PCL device type like HPLJ5, the sequences are:

Turn print direction by 90ー: <ESC>&a90P

Turn print direction back:   <ESC>&a0P

So you may copy your device type into the customer name space and

add two print controls, which contain these printer escape

sequences. After that you can first call the first print control

in your Smartforms via a command node, which turns the print

direction by 90ー, then you can output the text and finally

you can call the second print control via another command node.

In sapscript: you can use the PRINT-CONTROL command.

For more information on how to use PRINT-CONTROL, please see the note

66478.

Read only

Former Member
0 Likes
1,136

It is possible to rotate a window using print control command .

In PCL, the following command sets rotation:

<ESC>&a#P         where # is the number of degrees

To rotate 90 degrees, <ESC>&a90P

In SAPscript, use the print-control command

/:  PRINT-CONTROL SESCP =  &a90P

If you want to rotate just the barcode, you can explicity do that in SE73. Select the barcode you need, and check the option - rotate by 90 degrees.

Also, check this thread.

Read only

Florian
SAP Champion
SAP Champion
0 Likes
1,136

If the printer can do that, you can develop it in a way.

If nothing above help you out, then create a new type in spad and add your pcl command into the sequences.

I do not explain it right here, because there are a lot of good documents out there.

For example this one:

Another idea out of my mind is, that you check the printer itself and set the option, so all output is rotated directly, that would be a very small solution without any developing in the form, if possible.

So just use the Searchoption

And this would be the better space for this question:

Regards

Florian