cancel
Showing results for 
Search instead for 
Did you mean: 

Rotate/rotating text in SmartForms

Former Member
0 Kudos

Need to rotate text 90 degrees in a SmartForm.

The printers are all PCL based.

New print-controls cannot be created.

In PCL, the following command sets rotation:

<ESC>&a#P

where # is the number of degrees

To rotate 90 degrees, the PCL command would be:

<ESC>&a90P

In SAPscript, I can use the print-control for <ESC>.

/:  PRINT-CONTROL SESCP
=  &a90P

Another method that works involves standard texts.

Define standard texts named ZPCLROTATE90 and ZPCLROTATE0.

They willl set the rotation to 90 and reset to 0 degrees.

/: PRINT-CONTROL SESCP
( &a90P

/: PRINT-CONTROL SESCP
( &a0P

The SAPscript uses the new standard text objects:

AS  horizontal text
/:  INCLUDE ZZPCLROTATE90 OBJECT TEXT ID ST
AS  rotated text
/:  INCLUDE ZZPCLROTATE0 OBJECT TEXT ID ST
AS  horizontal again

This also works in SAPscript.

None of this seems to work in SmartForms. I thought the INCLUDE text would work the same in SmartForms. It does not.

Tried the first method shown; SmartForms converts the "=" or "(" paragraph symbol to "*". This separates the escape sequence and it becomes invalid.

Any ideas? They do not want to use SAPscript. Cannot create a Z print-control.

Thanks,

Norm

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member206650
Active Participant
0 Kudos

hi norman,

try with  ^FWR and ^FWN print command in transaction SPAD:

hope it solves....

Former Member
0 Kudos

If the text is not fix you can do the following and you want to display text rotated by 90° try the following:

1. Upload bitmaps for every letter of the alphabet and name it accordingly a.bmp, b.bmp, etc.

2. Add some coding to split the text you want to display into a table

3. loop the table and display the images

Not nice, but works 😉

Cheers

Uli

Florian
Active Contributor
0 Kudos

I think his question is solved already, if not another guy is sitting at his desk

Former Member
0 Kudos

Hi,

Try to follow the steps givenbelow in your SMARTFORM.

1. Create a template and keep the text alone inside that you wanted to rotate.

2. Above and Below your text, In the text element that you wanted to rotate give the Print control.

Ex PRINT CONTROL 'SF201'

&variable text&

PRINT CONTROL'SF202'

2. Create a command inside the window and enter the attribute name and the attribute value.

Ex. Use Attribute name as S_LZPL_HR1

Attribute value as 'BC_CD39'

3 Create another command above the template and enter the value "SF200" in Include Printer control.

4.Create another command above the template and enter the value "SF202" in Include Printer control.

I followed the above procedure for rotation of texts, and it worked.

Thanks

Narasingam

Former Member
0 Kudos

Thank you for the reply Narasingam. Unfortunately I do not understand.

You gave examples of print controls SF200 through SF202. These are standard print controls to select the Letter Gothic font. How do these relate to rotating text?

Thank you,

Norm