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: 

Smartform : text justification not applied to variable in loop.

olivier_muff
Explorer
0 Kudos

I have a SMARTFORM with a LOOP over a table of text lines.

data :

it type TEXT_LINE_TAB

structure type TLINE

This is essentially :  Loop at it into structure.

Inside the loop I have a normal Text Element that holds one variable

&structure-TDLINE&

I have a smartstyle with a style defined as justified and this style is in the form and applied to this text element.

However, it seems that since the variable &structure-TDLINE& is so short that it would not need justification, then the text that is inserted at run-time is also not justified even though it is a full line length.

IS THERE A FIX FOR THIS?  IS THIS A SAP BUG?

As a check, when I type several lines of normal text into the text element, these lines are properly justified (right and left bound) on preview.

Thank you for any help in this problem.

Olivier

4 REPLIES 4

shadab_maldar
Active Participant
0 Kudos

Hi Oliver,

I think instead of looping, you can use include text function available in smartforms and apply this text justification for this.

Hope this works.

0 Kudos

Thanks Shadab.  I tried using the "include text function."

The Include Text is buffered and I have not found a way to bypass the buffering, so when the user makes a change to the text in the application, the change is not visible until the user quits the application and comes back in.  Not user friendly!  As a result I use READ_TEXT in the application to get the current text and then pass it to the loop.

0 Kudos

Hey Oliver,


I use Include Text and when ever user change it even not need to save the order and form display from buffer. And also ı use allignment with justified with style and not have problem like this.

Can you pls check in your style for create paragraph format with allignment justified (B1) and select standart paragraph (B1) on your Header Data.

0 Kudos

Hi Acar,

This may be true for Orders but it is not true for the standard texts I am using in my application.

That is why I changed to reading the text directly.

The problem of formatting not being applied to a variable in a loop is still a problem.

I will try your suggestion to use B1 although since I have a smartstyle myself, B1 may not apply.

Thanks for your input in any case!

All the best,

Olivier