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

Long text getting truncated in sapscript

0 Likes
2,952

Hi,

I am calling subroutine in script like below:

perform get_details in program zreport

using &var1&

using &var2&

changing &var3&

Program zreport fills var3 with 255 charcters. I checked in debugger that structure of type itcsy contains all the 255 char for var3 in program but when it comes to sapscript, var3 contains only 78 char.

This is the same problem faced by many people but it couldn't get any solution yet.

for your reference: https://scn.sap.com/thread/1533306

                           

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,461

Hi tusar,

You can display only 78 character from a variable in sapscript.I suggest you to split your text in to multiple variable and display them.

var3 = text+0(78).

var4 = text+79(78)

var5 = text+158(78)


using &var1&

using &var2&

changing &var3&

changing &var4&

changing &var5&


Regards,


Noufal P


Hi,

I am calling subroutine in script like below:

perform get_details in program zreport

using &var1&

using &var2&

changing &var3&

Program zreport fills var3 with 255 charcters. I checked in debugger that structure of type itcsy contains all the 255 char for var3 in program but when it comes to sapscript, var3 contains only 78 char.

This is the same problem faced by many people but it couldn't get any solution yet.

for your reference: https://scn.sap.com/thread/1533306

                           

7 REPLIES 7
Read only

FredericGirod
Active Contributor
0 Likes
2,461

Hi,

could you check the declaration of the variable VAR3 in the drivers program ? (not in program ZREPORT)

regards

Fred

Read only

0 Likes
2,461

Hi,

All the declarations looks fine. Same issue was already faced by people.

Regards,

Tushar

Read only

0 Likes
2,461

You know "'Saint Thomas"    he is someone that trust only things he could see.

So, could you please make a little screen shot ? 

Fred

Read only

ashish_suri29
Associate
Associate
0 Likes
2,461

2 possibilities :

a)Check the structure, if its same ...

b)Check the page size and block if you have maintained in the sap script.

Read only

Former Member
0 Likes
2,462

Hi tusar,

You can display only 78 character from a variable in sapscript.I suggest you to split your text in to multiple variable and display them.

var3 = text+0(78).

var4 = text+79(78)

var5 = text+158(78)


using &var1&

using &var2&

changing &var3&

changing &var4&

changing &var5&


Regards,


Noufal P


Read only

0 Likes
2,461

Hi Noufal,

Your approach is useful but why script can display only 78 char? is this SAP restriction?

Thanks,

Read only

navdeep_thakur12
Explorer
0 Likes
2,461

Hi Tushar,

yes its a SAP restriction. to display a long text you need to truncate that text in 2 or 3 variables then you can display combining these variables