Application Development and Automation 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: 
Read only

text truncating in smartform

sriram_ramesh
Participant
0 Likes
4,662

Hello Experts,

I'm passing 500 length character field from driver program to smartform.

But only around 300 characters(definitely more than 255) are getting printed.

All declarations are proper. I'm getting the text from read_text and appending to a variable in workarea, passing total workarea to smartform.

Debugged the SMARTFORM itself. the workarea-variable is filled properly. But only while displaying it gets truncated.

I've declared table to display the text as table line expands based on value length.

Thanks in advance.

Sriram

Hello Experts,

I'm passing 500 length character field from driver program to smartform.

But only around 300 characters(definitely more than 255) are getting printed.

All declarations are proper. I'm getting the text from read_text and appending to a variable in workarea, passing total workarea to smartform.

Debugged the SMARTFORM itself. the workarea-variable is filled properly. But only while displaying it gets truncated.

I've declared table to display the text as table line expands based on value length.

Thanks in advance.

Sriram

14 REPLIES 14
Read only

sriram_ramesh
Participant
0 Likes
3,700

Image for your reference

Read only

Juwin
Active Contributor
0 Likes
3,700

If you already have the text as a text object - which I understand you have, because you are using READ_TEXT - you should just include that text object in the Smartform directly, without doing the concatenation.

Thanks,

Juwin

Read only

0 Likes
3,700

I use read_text to get standard text into a variable and then passing it to smartform.

Read only

Juwin
Active Contributor
0 Likes
3,700

That's what I said, you don't have to do that. You can directly include the text object inside smartform.

Thanks.

Read only

0 Likes
3,700

You mean using "include *** object ID..." ?

Ok will try that

Read only

Juwin
Active Contributor
0 Likes
3,700
Read only

0 Likes
3,700

thanks,

But do you think we can pass object id name dynamically in this approach?

Read only

Juwin
Active Contributor
0 Likes
3,700

Absolutely yes, use & signs for passing the variable.

Thanks.

Read only

0 Likes
3,700

Thanks that's a good idea. But while displaying the text I'm doing lot of validations in text like, when text line contains word "comments" I wont be printing that line.

And if text has time format like XX:XX:XX, I wont display that line.

So how to handle these things in include text in smartform?

Read only

Juwin
Active Contributor
0 Likes
3,700

You can't do that with include text. In that case, instead of concatenating the text lines into a big string, keep it as an internal table itself and then create a loop inside the smartform to print the table line contents.

Thanks, Juwin

Read only

0 Likes
3,700

Yes that's one way. I'm now saving the altered text in one z-text object and use that as include text in smartform.

Thanks for your replies.

I just wanted to know why it is not printing all characters in my previous approach.

Read only

Juwin
Active Contributor
0 Likes
3,700

It has to be because of the limitation of Smartform to print long strings.

Thanks,

Juwin

Read only

Former Member
0 Likes
3,700

Hi,

please try like below with condense.

&WA_FINAL-REMOVAL_REASON(C)&

Regards.

Palaniyappan.S

Read only

0 Likes
3,700

Condense just reduce spaces in front. Anyway, it didn't work