Skip to Content
author's profile photo Former Member
Former Member

Rotate/rotating text in SmartForms

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 10, 2009 at 11:58 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Posted on Jun 06, 2014 at 09:18 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 06, 2014 at 10:02 AM

    hi norman,

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

    hope it solves....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.