‎2008 Jul 16 7:10 AM
Hi
I want to concatenate text into String data type but problem is that String data type is also having some maximum length limit. Then what of data type i can use.
my text length is approx 500 characters
Regards
Aditya
‎2008 Jul 16 7:11 AM
‎2008 Jul 16 7:12 AM
‎2008 Jul 16 7:12 AM
hi aditya,
use this
t_text(1024) type c .
concatenate into this.
regards,
sandeep
‎2008 Jul 16 7:13 AM
Hi
In SE11 declare a domain with CHAR with size 1000 characters and then declare it in your program
use this domain type
CHAR1024_WAO its length is 1024 and also output
Try out i hope it works
Regards
Pavan
Edited by: Pavan Bhamidipati on Jul 16, 2008 8:16 AM
‎2008 Jul 16 7:13 AM
Hi,
If this the issue then its better you Declare the Variable Character with length 500.
Like
Data: variable(500) type c.
Now concatenate the Text into Variable.
Regards,
Sujit
‎2008 Jul 16 7:13 AM
Hi
You can use string to concatenate the variables .
It will be more flexible than use of any data element of length. Because it maximum length
is around 1500. BUt if you use string it can capture 5000 characters.
Plzz see the example
DATA: l_char TYPE /DVSREPRO/ZFILBUFT500,
l_string TYPE string,
l_char1 TYPE /DVSREPRO/ZFILBUFT500,
l_char2 TYPE /DVSREPRO/ZFILBUFT500.
l_char = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'.
l_char1 = 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
& 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'
& 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'.
l_char2 = 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'
& 'ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'
& 'c1c1c1c1c1c1c1cc1c1c1c1c1c1c1c1c1c1c1c1c1c1c1c1c1c1c1c1c1cc1c1c1c1c'.
CONCATENATE l_char l_char1 l_char2 INTO l_string.
WRITE: l_string.
Edited by: Subhankar Garani on Jul 16, 2008 8:22 AM
‎2008 Jul 16 7:15 AM
hiii
you can use type C here as its having maximum length as 65535..but i think if it will be string then also it should work..because for a long line mostly we are using string as data type.
regards
twinkal
‎2008 Jul 16 7:16 AM
Hi Adithya,
The variable TEXT which is of type string can have length of more than 500 characters also. I checked . its working fine.
Regards,
Swapna.
‎2008 Jul 16 7:18 AM
Hi Aditya,
There should not be any problem. Because i used a string variable to concatenate data having lenth of around 2500 characters+.
Paste ur concatenate statement.
Check this piece of code which transfers 1500 characters at once into application server(This is limit with transfer but not with string)
l_len = strlen( p_data ).
DO.
IF l_len LT 1500.
TRANSFER p_data+l_offset(l_len) TO p_file.
MOVE 0 TO l_len.
ELSE.
TRANSFER p_data+l_offset(1500) TO p_file.
SUBTRACT 1500 FROM l_len.
ADD 1500 TO l_offset.
ENDIF.
CHECK l_len EQ 0.
EXIT.
ENDDO.
If u still have problem then declare one character variable of sufficient length.
DATA: l_data(2000) TYPE c.
Thanks,
Vinod.
‎2008 Jul 16 7:29 AM
Hi,
you can declate a data element with a domain of required size...
and then use it....
reward if useful
preet
‎2008 Jul 22 9:38 AM
‎2009 Dec 21 9:11 PM
Dear Aditya,
I am also having the same issue.
I tried by defining the variable as Char(500) and Char(1024). But of no use.
I am concatenating the text1 and text2 of more than 255 characters (After concatenation) into a variable which is type String.
But it is taking only 255 characters.
Could you please share with me how you resolved it?
Regards,
Chaitanya A