09-01-2015 11:06 AM
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
09-01-2015 11:47 AM
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.
09-01-2015 12:05 PM
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.
09-01-2015 12:53 PM
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.
09-02-2015 3:47 PM
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