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

Printing string type variable in SAP Script

Former Member
0 Likes
1,835

Hi Experts,

I am working on SAP Script and i have an issue which is, i am passing a string type variable to the script from program but in output i only see 255 characters but my variable is of 349 characters long. If i am declaring that variable in program string type then it throws dump. Kindly help me to solve the issue.

Can you also tell me how to see complete value of a variable in debug running mode of SAP script.

Thanks

Ashutosh Katara

2 REPLIES 2
Read only

Private_Member_7726
Active Contributor
0 Likes
919

Hi,


Do you want to output that string as text? If yes, string can be converted to SAPScrip" or so called ITF Text using FM CONVERT_STREAM_TO_ITF_TEXT, which takes string table as input when LF = 'X'. It should then be possible to output that text using FM WRITE_FORM_LINES.


BTW, the length of output value of a variable (or program symbol in SAPScript-speak) can not exceed 255. The same restriction has also been inherited by SmartForm.


cheers

Jānis



Message was edited by: Jānis B

Read only

former_member156446
Active Contributor
0 Likes
919

If its is important and if you want to write some more code you can se SO10 standard text concept. Try to update the standard text from program using function SAVE_TEXT ( SAVE_TEXT - To save Long Text into Text Objects.)  (READ_TEXT - To retrieve Long Text from Text Objects)


Long Texts - ABAP Development - SCN Wiki