Application Development 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: 

How to get more than 255 characters in variable

Former Member
0 Kudos

Dear All,

I have one requirement in smartform. I have declared variable in Global definition. I need to display 700-800 characters in variable. I am doing concatenate mutiple text in one variable. I have defined data type as STRING/CHAR and tried other std datatype like ORA_DBA_RESUMABLE_SQL_TEXT_ORG / Text1000 for above variable. But during concatenation when characters reach 255 then nothing will contenate.It seems only 255 charactes.

Now what is possibilities in above problem. Please help me.

Regards,

Shivam Pastagia.

5 REPLIES 5

raymond_giuseppi
Active Contributor

Did you actually see, while debugging, that the string or lchar field is empty or space from 256th characters on, or did you only get the first 255 characters of the field in the print/print preview ?

Regards,

Raymond

0 Kudos

Dear Raymond,

Actual code is.

loop at it_data into wa_data.

concatenate w_note wa_data-text

into w_note separated by space.

endloop.

Now in these case approx 10 to 15 records in iint.table and each line means wa_data-text has more than 100 characters.

Now when we debug and debug pont goes in second or third time data will not capture after around 255 char.

I have defined w_note variable in global data in global def in smartforms.

Regards,

Shivam Pastagia.

0 Kudos

Is your system Unicode, if yes add [IN CHARACTER MODE|http://help.sap.com/abapdocu_70/en/ABAPCONCATENATE.htm#&ABAP_ADDITION_1@1@] to [CONCATENATE|http://help.sap.com/abapdocu_70/en/ABAPCONCATENATE.htm] statement.

Even when you solve your problem, you wont be able to print such a field as a field inserted in a text node can no be longer than 255 character (ref [Using Fields in the Form|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/fa/0c1450d30111d3b568006094192fe3/frameset.htm])

You will have to split the string into character fields of less or equal than 255 characters or use sub-string fields of 255 characters in the text node like &v_ltext(v_length)&&v_ltext255(v_length)&&v_ltext510(v_length)& where v_length = 255.

Regards,

Raymond

0 Kudos

Try defining your field of type CUKN-KNBLK it has the data element which uses SYLCHR2886; LCHR 2886 characters.

0 Kudos

Dear Raymond,

Yes.It works.

Thanks a lot.

Regards,

Shivam Pastagia.