3
votes

As it commonly known, it is not recommended by SAP to use 255+ character fields in transparent tables. One should use several 255 fields instead, wrap text in LCHR, LRAW or STRING, or use SO10 text etc.

However, while maintaining legacy (and ugly) developments, such problem often arises: how to view what is stored in char500 or char1000 field in database? The real life scenario:

  1. we have a development where some structure written and read from char1000 field in transparent table
  2. we know field structure and parsing the field through CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C or SO_STRUCT_TO_CHAR goes fine, all fields are put wonderfully
  3. displaying the fields via SE11/SE16/SE16n gives nothing as the field is truncated to 255, and to 132 in debugger, AFAIR.

Is there any standard tool, transaction or FM we can use to display such long field?

2
I'm curious to know where it is mentioned that SAP does not recommend a field of more than 255 characters in transparent tables? It's more a matter of database systems, not SAP.Sandra Rossi
Yep, this info is a bit outdated. In older releases it was impossible to save 255+ char fields to DB, then the limit was increased to 1333. However, up to now there are limitations while using these fields in a primary key or displaying them in a smartform or ALV. Technically it is possible, but it is a pain to read/show them from DB.Suncatcher

2 Answers

1
votes

In the DBA cockpit (ST04), there is a SQL command line, where you can enter directly the "native" SQL commands and display the result as an ALV view. With a substring function, you can split a field into several sections (expl: select substr(sql_text,1,100) s1, substr(sql_text,101,100) s2, substr(sql_text,201,100) s3, substr(sql_text,301,100) s4 from dba_hist_sqltext where sql_id = '0cuyjatkcmjf0'). PS: every ALV cell is 128 characters maximum.

Not sure whether this tool is available for all supported database softwares.

There is also an equivalent program named RSDU_EXEC_SQL (in all ABAP-based systems?)

Unfortunately, they won't work for ersatz of tables by SAP (clustered tables and so on) as they can be queried only with ABAP "Open SQL".

0
votes

If you have an ERP system to you hand check transaction PP01 out with infotype 1002. Basically They store text in table HRP1002 and HRT1002 and create a special view with an text editor. It looks like this: http://www.sapfunctional.com/HCM/Positions/Page1.13.jpg

In debugger you can switch the view to e.g. HTML and you should see the whole string, but editing is limited as far as i know to a certain number of charachters.