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: 

smartforms special formatting

Former Member
0 Kudos

Hi there,

at one of our customers we created an invoice form using smartforms. They used to have a sapscript form for the invoice. There they used to include the character format in the material text - e.g. <H>Water pump</> - which led to a specially formatted output - in this case in bold print. They had nothing to do but to print this text in the form using an ordinary variable &VBDPR-ARKTX&.

Now they want me to achieve the same using smartforms.

Using these format characters in a long text (like VBBP 0001) results in a correct output - but in a short text it won't work.

Has anyone of you a clue on how to do it?

Best regards from Germany,

Ingolf Dresp

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I'm under the assumption that you can do the same in Smartforms, You need to create a character format, you do this in the SMARTFORMS transaction, first create a style, Now under character formats, create one. Now you can use this character format in the SMartform code just like in the SAPscript.

Regards,

Rich Heilman

12 REPLIES 12

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I'm under the assumption that you can do the same in Smartforms, You need to create a character format, you do this in the SMARTFORMS transaction, first create a style, Now under character formats, create one. Now you can use this character format in the SMartform code just like in the SAPscript.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

I have this style and the corresponding format - but the smartforms just prints "<H>Water pump</>" - so it takes the formatting commands as text.

But thanks for trying!!!

Best regards, Ingolf

0 Kudos

You dont type the formatting commands with the text.

Create a smartstyle and use it in your smartform.

Then you simply have to highlight the text and select the format from the character formats-drop down!

0 Kudos

right, but our customer wants to be able to have the text formatted dynamically - THEY want to insert the formatting commands in the text so that they can determine the look of it in every single sales document position.

Former Member
0 Kudos

Hi

Write the content in text , Mark the text and select the reqruied format from the character formats.

Apart from this you have styles to which you can create using tcode SMARTSTYLES.

Regards

Kalpana

Message was edited by: Kalpana Tyagi

0 Kudos

How would you do it in the transaction VA02 - there you can add a CHAR30 text to each sales document position.

The problem ist that they don't just want to have the whole text in one format, but to have e.g. 1 word in bold and 1 word not bold - both inside the same char30 field.

Regards, Ingolf

0 Kudos

You have do it in your form's text element!

Former Member
0 Kudos

Hi Igolf,

If you want to try-out all the various formats for your text, then you need to create those character formats in your 'styles'.

Select the text, and choose the character format you want to apply.i.e similar to having as <B>&VBDPR-ARKTX&</>.

In you case, check if you declared H as Character format BOLD?

Hey, its possible to have the formatting in the text itself, only when, you define the same character formats(same name and format) e.g: H-Bold, I-Italic etc

so, your text will be 'Material <H>Office clips</> are used <I>extensively</> in ofice.'.

Regards,

Raj

Message was edited by: Rajasekhar Dinavahi

Former Member
0 Kudos

Hi Ingolf,

1. define ur style in Output options tab.

2.when u use character format <H>Water pump</> also specify paragraph format which is created in style.

It's working fine.

If it solve ur problem,Plz rewards point.

Regards,

Digesh Panchal

0 Kudos

Hi there,

Thanks a lot for the answers!!

So I have a style with the character format H where the font is printed in bold.

In the smartform there I have the following element in a text element: &WA_FLEX-TDLINE&

The style is assigned to the text element.

The contents of &WA_FLEX-TDLINE& is e.g.

"<H>Description</> of <B>Work</>"

The problem is that this is exactly what is printed out

"<H>Description</> of <B>Work</>"

I have no clue what to do ... I even created a paragraph format H - it's always the same "<H>Description</> of <B>Work</>"

Any more ideas?

0 Kudos

Hi Ingolf,

Select the style from the drop down in the window,dont write down your self ie dont write <H>, <B> etc etc...

Former Member
0 Kudos

Hi,

In smartforms you have to just select the Paragraph format and required Character format from the list box which you will see in the text editor of the text element.

By selecting the formats which you have created in the "smartstyle" and write the text which you want to display.

If its clear assign app. points.

Regards,

Suman