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 - long text display at second line.

Former Member
0 Kudos

Hi Forms experts,

I am developing a form in SMARTFORMS. I managed to print, however I am not getting what is expecting to get.

Expecting result


Item             Description                Code        Quantity
1                ABCDEFGHIJKLMNOPQRSTUVWX   1000001     1320
                 YZ12334567890

Currect result (which is wrong).


Item             Description                 Code       Quantity
1                                            1000001    1320
                 ABCDEFGHIJKLMNOPQRSTUVWX    
                 YZ12334567890

If you see carefully, the Description ABCDE....dropped to second line. Can someone explain to me how to resolve this?

Thanks in advance.

29 REPLIES 29

Former Member
0 Kudos

Nothing wrong I guess.Just goto the text editor and delete extra spaces at the begining of the long text variable.

Regards,

Abhi

Former Member
0 Kudos

Check the positioning of the variable used for fetching description. Morever delete the extra spaces.

0 Kudos

Hi both,

There is extra no spaces in the text. Even I have trim the text, it still cannot work.

If I reduce the text to ABC, it works perfectly.

Please help.

0 Kudos

Please check the paragraph format used for this.Are there any tab specifications or indentations in the paragraph format used.

0 Kudos

I have tried Append, New line, and new paragraph. All are giving me the same result.

0 Kudos

If ABC works fine then obviously there is some spacing issue. Check the first and third variable spacing. Try increasing and decreasing the spaces after and before the variables. I'm sure you can get along.

0 Kudos

Hi Mishra,

Thanks for your advice. I have tried to trim all the first 3 variables (fields), with variable1(C), variable2(C) and variable3(C). However, the text is still displaying in the second line.

0 Kudos

Wong,

The issue is because on spacing of the variables , Nothing else as far as my knowledge is concerned.

Using keywords TRIM won't help either. Do check the cell where you have populated your variable..See if some trailing spaces are there.

0 Kudos

now I added xx before and after the variable, xx&VARIABLE(C)&xx.

and my result is

xx

ABCDEFGHIJKL....xx

how to resolve this?

0 Kudos

Why are you using xx. Instead you can adjust the spaces

0 Kudos

Hi Mishra,

The reason I put xx infront and end of the variable is to see how the variable is displayed.

It should display

xxABCDEFGHIJKL....xx

instead of

xx

ABCDEFGHIJKL....xx

How to adjust the space? how to check the cell trailing spaces?

0 Kudos

>

> It should display

> xxABCDEFGHIJKL....xx

>

> instead of

> xx

> ABCDEFGHIJKL....xx

How is this long text defined in SAP?

Can you do one more test, read this long text (with the XX stuff) using READ_TEXT & post the entries in the returning table LINES ? (Post both TDFORMAT & TDLINE)

0 Kudos

Lets try making the &VARIABLE(C)& left-justified. Go to change editor and delete all spaces in front.

0 Kudos

Hi Suhas,

Thanks for your reply. I do not understand why READ_TEXT is needed for my case. The data variable is getting from a customized table. The data could be long, and could be short either. Please correct me I have misunderstood your advice.

0 Kudos

Your post heading is misleading buddy That's why i thought you were dealing with LONG TEXTS !!

No if the text is coming from a custom table you don't need a READ_TEXT

0 Kudos

Hi Mishra,

Thanks for your suggestion. However there is no space to remove and the text (variable) is already left justified.

Any idea?

0 Kudos

Okay...

Any idea?

Space is the issue as far as my knowledge...Bcoz if you shorten the text it works perfectly fine. If its long its one line down.

Remove the 3rd field( testing purpose) and see it will work.

0 Kudos

There is only one text line, but the text is long. When the form prints, it breaks into few lines due to limited cell space.

0 Kudos

Hi,

can u condense that field with no gap and check.

With Regards,

Sumodh.P

0 Kudos

Hi Sumodh,

If you read my replies, I have mentioned many times I have condensed the &variable (C)&. But the result is the same.

If I shorted the text (variable) it displays perfectly, but if the text is long, then it will display from the second line onward.

0 Kudos

Wong,

When the form prints, it breaks into few lines due to limited cell space

Have you tried increasing the cell space for description?

0 Kudos

Hi,

Try to use template for this and make all 'Text' as left alligned ... and use this under Flow Logic --> Loop.

hope ur problem get resolved.

Regards

Neha

0 Kudos

Hi,

In the driver program loop that internal table in to a work area and then condense that particular field.

variable(c) means it will the compress the space right.

i think its causing the probs for u ..

With Regards,

Sumodh.P

0 Kudos

Resolved the problem myself.

Thanks to all.

0 Kudos

Curious to know the solution, mate !!

0 Kudos

The solution is simple. As I was doing testing for the form, I had hardcoded the variable into "ABCDFGHIJKL....".

Now, if I break it to "ABC DFGHIJK LMN...." with spaces in between, then it will work perfectly.

In fact there is no problem with the code and setting. It is just the data caused it.

0 Kudos

Thank you for conveying thanks for those who helped you.

Special Thanks for appreciating our efforts

former_member184551
Contributor
0 Kudos

Hey Myahsam

If this is a table that you have used in Smartforms then increase the width of this column

else if it is a variable that you are passing the value in, increase the length of this variable node.

Hope it solves your problem.

Sameer

satyajit_mohapatra
Active Contributor
0 Kudos

1. Are you printing the long text through a variable or using INCLUDE TEXT? If it's through variable try with CONDENSE.

eg. &FIELD(C)&

2. Try changing the START options in general attributes of the text.

3. Check the indent and spacing of the paragraph format used.