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: 

More than 3 long string fields in a "Z" table

valter_oliveira
Active Contributor
0 Kudos

Hi folks,

I'm receiving XML messages using XI, storing de data in a "Z" table and i must keep the original form of the data that comes in the messages (including trailling spaces in the fields).

The only solution i can remember to do this is having long string fields (STRING) in the "Z" table, instead of text fields (CHAR). I tryied SSTRING and it doesn't work.

The problem is that a table only suports 3 fields of this kind and i have to keep almost 50 fields.

Do i have to create 17 "Z" tabels?

Best regards.

Valter Oliveira.

1 ACCEPTED SOLUTION

athavanraja
Active Contributor
0 Kudos

its a restriction, you cannot have more than 3 string/xstring fields.

what you could do is say is string field 1 conateante 16 strings sepearated by some special characters

Raja

3 REPLIES 3

Former Member
0 Kudos

hello

If you want to keep long text, for example 2000 chars as a string you must use FM CREATE_TEXT like this

DATA: wa_lines TYPE tline,

flanguage LIKE thead-tdspras,

fname LIKE thead-tdname.

DATA : flines TYPE tline OCCURS 0 WITH HEADER LINE.

flanguage = 'EN'.

fname = 'Z005-1'.

  • you have to divide your 2000 chars string into the long of tdline

wa_lines-tdformat = '*'.

wa_lines-tdline =

'your 2000 chars string'.

APPEND wa_lines TO flines.

CALL FUNCTION 'CREATE_TEXT'

EXPORTING

fid = 'ST'

flanguage = flanguage

fname = fname

fobject = 'TEXT'

TABLES

flines = flines

Hope you rewards if this was helpful.

Gabriel

athavanraja
Active Contributor
0 Kudos

its a restriction, you cannot have more than 3 string/xstring fields.

what you could do is say is string field 1 conateante 16 strings sepearated by some special characters

Raja

0 Kudos

Gabriel,

Thank you very much for your ideia. It's a nice way to keep long text data without having the field restriction. However, the table used in the function module has CHAR type field which doesn't support the trailling spaces.

Raja,

Thank you for the solution!

Best regards.

Valter Olveira.