cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a string with more than 255 characters to Smart form

Former Member
0 Kudos

Hi,

I need to pass a string with more than 255 characters to smart form. This string will be displayed in a table with a certain column size (say 80 characters) in the smart form. Smart form will automatically truncate and append to the next row if the length of the string exceeds the column size.

However, smart form seems to only accept strings equal or shorter than 255 characters. Any strings longer than 255 characters will have the extra characters removed in smart form.

An option I could take is to first break the string (eg 300 characters) into smaller lengths (80 characters, equal to column size) and pass these new strings to the smart form. I use the word wrap function module to break up the string. But, I faced quite a bit of issues with the way smart form calculates how many characters a column of size 80 can accommodate. A column of size 80 characters does not mean it can display 80 characters. It depends on the font type and font size. I am unable to get a precise measurement.

I discover that if I pass in a string longer than the column size to smart form, smart form is able to word wrap the string nicely. Therefore, I would like to let smart form handle the word wrapping. But my problem is how can I pass in a string of more than 255 characters?

I apologize for my long-winded story. Any advice is appreciated. Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Use include text.

Former Member
0 Kudos

Hi I am also facing the same problem with string in smartforms.

I am trying to concatenate values into string and display in smartforms, but its truncating the value from string in output.

Can you please help me to fix this, its really really urgengt

Thanks

Ramya

Former Member
0 Kudos

Hi Ramya,

My string is actually a long text. So instead of passing the string to smart form, I created an 'include text' in smart form to read the long text directly and let smartform do the wrapping.

You might want to consider the use of FM save_text and read_text. See if it helps.

former_member196280
Active Contributor
0 Kudos

split it into two variables and pass it to smartform. or write your code using program lines.

regards,

Sairam

Former Member
0 Kudos

Hi,

To split the original string into 2 or more variables, I need to define the number of characters for each variable. But I am unable to calculate how many characters smart form can display in a row. Even if I set the row size to 80, it does not mean that the row will display 80 characters. Capitalized characters takes different amount of space in smart form. I can play safe by setting each variable to contain only a small number of characters, but there will be a lot of empty spaces in the print out.

May I know what you mean by writing my code using program lines?