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: 

Problem in appending xstring to internal table.

vipulsood
Explorer
0 Kudos

Hello Everyone,

I'm facing a strange problem . I try to append a line of type xstring to an internal table, But some chacaters are getting truncated.

This is needed to create file output for a set of data.

I created a sample z program to find the issue.

DATA: unicode_string TYPE xstring,

unicode_string1 TYPE xstring,

unicode_string2 TYPE xstring,

dtab like TABLE OF unicode_string.

unicode_string1 =

'3731303138313136343036BBE7BEF7C0E5204250303120202020202020202020202020202020202020C7D1C0BA2020202020202020202020BCADBFEF20B0ADB3B2B1B820BCADC3CAB5BF204250303120202020202020202020202020202020202020202020BCADBAF1BDBA20202020202020202020'.

unicode_string2 = '20BCD2C7C1C6AEBFFEBEEE2020202020202020202020202020203030303030303030303030303130303130362020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200D0A'.

CONCATENATE unicode_string1 unicode_string2 INTO unicode_string IN BYTE MODE .

Append unicode_string to dtab.

Here the variable unicode_string has 464 caharcters. But when we append it to dtab, al the characters after 255 get truncated, even though both are of same types.

Is it a limitation? How is it possible to have the internal table with each line having exact data as in unicode_string.

Please help.

Thanks & Best Regards,

Vipul.

2 REPLIES 2

former_member215781
Active Participant
0 Kudos

By default it will accept only 255 characters.

Instead of XSTRING can you try data types like char300 or similar which will allow you more than 255 char

0 Kudos

Hi Sim,

I tried with declaring with data type of type x of length 1000 also, But it simply doesn't work.

I behaves in the same way as earlier.