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

Script text getting truncated

Former Member
0 Likes
2,733

Dear All,

Variable value in script is getting truncated at 80 characters even though the length of field is 100 characters and window has enough space to accomodate it

Please find my code below and suggest me. I want to print more than 80 characters.(max 100 Chars)

L_add(100) Type c.

Form form1 tables P_input structure itcsy

                            p_output structure itcsy.

           Move l_add to P_output table-value. 

Endform.

7 REPLIES 7
Read only

Clemenss
Active Contributor
0 Likes
1,987

As a quick search in SCN revealed and as you are able to see by double-clicking on the structure ITCSY:

Note that the system  passes the  values as character string to the subroutine, since the field Feld...

VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80).

So you may try CHANGIN two variables, i.a. &L_ADD_1& and &L_ADD_2& and output them as &L_ADD_1&&L_ADD_2&.

In the subroutine value for L_ADD_1 is L_ADD_1, for L_ADD_2 is L_ADD_1+80.

Regards

Clemens

Read only

Former Member
0 Likes
1,987

Thanks for ur reply. But domain TDSYMVALUE has length 255 and not 80. Can you please let me know where you have seen 80.

Read only

Former Member
0 Likes
1,987

Any luck ? i too face same issue -- itcsy-value fields  is returning with max 80 chars only instead of 255.

Read only

Clemenss
Active Contributor
0 Likes
1,987

Hi Kiran and Maheshkumar and and to whom it might be good to know:

In SAP standard INCLUDE RSTXDAT2 line 9 you can find the definition

c_ts_maxval  type i value 80,                  " max text symbol value


This is used in a table that is used for symbol value transfer for external sapscript commands


begin of itcvl occurs 0,
   name(c_ts_len),       
   active(1),            
   val(c_ts_maxval),     
   len like integer,     
end of itcvl.


I would'n try to modify SAP standard and SAP will do the hell to touch SAPSCRIPT code.


But why not put your long value into more than one text symbol and output them together like

&longval1&&longval2&?.


Works like a charm for me.


Regards


Clemens

Read only

Former Member
0 Likes
1,987

I am already using around 20 variables for each characteristics i will get text it can go any long.

so i got negotiated with my functional guy i will display max 255 chars for each characteristics text.

But now the problem is it is not even giving me 255 it is giving my only 80 chars that is bad.

Thanks,

Mahesh

Read only

Clemenss
Active Contributor
0 Likes
1,987

Hi Maheshkumar gattu,

if you want to output 255 characters then split it up into 4 partial variables:

out1 = out(80).

out2 = out+80(80).

out3 = out+160(80.)

out4 = out+240.

So now you will need 80 Variables.

Probably it's time to switch to smartforms and use tables.

Regards,

Clemens

Read only

Former Member
0 Likes
1,987

I just did it by calling /: INCLUDING command as standard text pass the tdname.. etc


INCLUDE &V_TEXT2& OBJECT &LV_TDOBJECT& ID &LV_TDID& LANGUAGE &LV_TDLANG& PARAGRAPH K1.

it worked great !!!

No more to worry about 255 chars restriction...