cancel
Showing results for 
Search instead for 
Did you mean: 

Formatted SAP Text/Rich text in Adobe form

Former Member
0 Kudos

We have a requirement where we need to grab formatted SAP text or rich text into an Adobe form. The challenge is that the text (which is mostly legal) could be formatted and could contain different styles, bold, italic, underline, paragraph spacing and more.

The question is how do we retain the exact formatting in case we wish to pull the formatted Text into the Adobe form dynamically at the time of downloading.

To add a twist what if we need embedded graphics in the middle of the text?

Accepted Solutions (0)

Answers (2)

Answers (2)

ChrisSolomon
Active Contributor
0 Kudos

Thanks, Kaylan for sharing that info. I was still looking but going a different route (ie. RTF control). It's interesting that it has to be done that way. So my question....how do you handle it if/when the text you are retrieving comes back in various styles?

Former Member
0 Kudos

Chris, I am not sure what you meant by text coming in various styles. Perhaps you meant various formatting?

1. If you meant the same text in the same control having various formatting such as Heading, Bold, Italic, Underline and Paragraph properties within that text, all you need is one style where you define the font, size and font perties for each of those properties.

When you create SO10 text, the SAP system uses the default system style. For example when you type plain body text "Hello World" in the courier font, SAP does not store the courier font information with the text. Internally it simply stores it something like

<Body Text>Hello World<Body Text>

When you then open the text again, SAP looks at the default system style and sees that the Courier font is defined as the font to be used for Body Text and renders using the Courier font.

You should create a copy of this system style and then modify the font and other properties for your forms. For example you can define Helvetica 10 point for the body text. This in done in transaction smartstyles.

2. If you mean that the same text has to be displayed in different controls (or even different forms) with different formatting in each control/form, simply create multiple styles and multiple text nodes with those individual styles.

ChrisSolomon
Active Contributor
0 Kudos

When you say "grab" do you mean to say that the user will be "typing" onto the form in RTF? For example, you are saying that your form might have a "comments" section in which you want to allow the user to type/paste in RTF information....and possibly images?

Personally, I would think this is approaching the wrong tool for the job. You are trying to use a hammer to pound in a screw. Why not simply have the user attach their RTF document to your form?

Former Member
0 Kudos

Chris, Thank you for your prompt response. The richtext/formatted text will be maintained in SAP and we need to bring that text into the form when the form is downloaded. This text then needs to be displayed in the form with the same formatting.

In case the text is later changed in SAP (such as copyright dates), that changed formatted text should be brought in all the forms that are downloaded after the change.

In other words, there is to be no hardcoding or typing that text in the form.

We know how to do this with SAP standard text. The question is about how we can preserve formatting/embedding when we bring in the formatted text to the form.

Edited by: Kalyan Raman on Sep 28, 2010 4:58 PM

Former Member
0 Kudos

HI,

Use the Font as Courier in Adobe Form for your Text.

This may Solve Your Problem.

Thanks.

UmaS.

Former Member
0 Kudos

Thank you for your prompt response Uma. However it is not always possible to have a Courier font in all forms. The fonts are decided by Business. I have however found the solution myself. The solution is to use styles.

First create the text with formatting in SO10 and then create the style in transaction "smartstyles". Then in the Adobe form context (ABAP), right click->create a text node and choose the text type as "Include text". The text name will be the name of the text you created in SO10 and the style will be the name of the style that you created.

In the Adobe form designer, simply drag and drop the text node onto the form. This creates a field of data type Rich text and data format XHTML and will display the text as per the style information. I hope this helps everyone else.