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

Concatenate large text into string gives syntax error in compiler

frank_stdle
Participant
0 Likes
765

Hi

I am trying to concatenate a large amount of HTML code into a string in order to build a Web page in a HTTP handler. The HTML code will be pushed to the browser with the statement below:

 

data: lv_html type string.
CALL METHOD server->response->set_cdata( data = lv_html ).

The HTML text is 1870 lines long and 250 columns wide. When I try to concatenate this text into a string, I get the syntax error in the compiler "The last statement is not complete (period missing)" with reference to the concatenate statement. If I try to concatenate only 140 of the lines, I do no get a syntax error on syntax check.

Is there a limit to the amount of text that can be concatenated into a string? If so, is there a better way for me to get the HTML code into the string?

thanks!

Edited by: Frank Stødle on Feb 5, 2010 9:59 AM

1 ACCEPTED SOLUTION
Read only

former_member206377
Active Contributor
0 Likes
623

Hi Frank,

STring does not have a limit on the number of characters. I haved used it to store a HTML code even more than what you have mentioned.In my case I had this requirement in BSP, so I assigned the value to the string from the client side( Javascript) using Forms. That may not be relevant in your case, but what I am trying to highlight here is that there is no limit on teh numebr of characters a string can hold.

Hi

I am trying to concatenate a large amount of HTML code into a string in order to build a Web page in a HTTP handler. The HTML code will be pushed to the browser with the statement below:

 

data: lv_html type string.
CALL METHOD server->response->set_cdata( data = lv_html ).

The HTML text is 1870 lines long and 250 columns wide. When I try to concatenate this text into a string, I get the syntax error in the compiler "The last statement is not complete (period missing)" with reference to the concatenate statement. If I try to concatenate only 140 of the lines, I do no get a syntax error on syntax check.

Is there a limit to the amount of text that can be concatenated into a string? If so, is there a better way for me to get the HTML code into the string?

thanks!

Edited by: Frank Stødle on Feb 5, 2010 9:59 AM

3 REPLIES 3
Read only

former_member206377
Active Contributor
0 Likes
624

Hi Frank,

STring does not have a limit on the number of characters. I haved used it to store a HTML code even more than what you have mentioned.In my case I had this requirement in BSP, so I assigned the value to the string from the client side( Javascript) using Forms. That may not be relevant in your case, but what I am trying to highlight here is that there is no limit on teh numebr of characters a string can hold.

Read only

0 Likes
623

Ok, but is there then some limit on the concatenate statement? I will try to append all my text to a table of strings instead and then convert the table to a plain string using CL_IAC_HELPER_CONVERSIONS.

Any other suggestions?

Read only

0 Likes
623

I appended all the text to a table of strings and converted the table to a string using CL_IAC_HELPER_CONVERSIONS, problem solved.