Skip to Content
0
Former Member
Jun 28, 2011 at 04:16 PM

"Deep data objects not supported" when writing into a file

575 Views

Hello everybody,

I am having some issues about a program that i made which puts the content of any table in a file that i created.

The problem is when my table (transparent table) has a deep data type in it (example : a string field, so with undefined length).

Here is my code :

  DATA : lt_gentable TYPE REF TO data.
  DATA : ls_gentable TYPE REF TO data.
  FIELD-SYMBOLS : <ft_lines> TYPE STANDARD TABLE.
  FIELD-SYMBOLS : <fs_line> TYPE ANY.

  CREATE DATA lt_gentable TYPE TABLE OF (p_tab).
  CREATE DATA ls_gentable TYPE (p_tab).

  "creation of links
  ASSIGN ls_gentable->* TO <fs_line>.
  ASSIGN lt_gentable->* TO <ft_lines>.



  DATA : l_fname     TYPE char80.

  CONCATENATE '\dir\dir2\' l_fname_log INTO l_fname.
  OPEN DATASET l_fname FOR OUTPUT IN BINARY MODE.

  OPEN CURSOR WITH HOLD l_c FOR SELECT * FROM (p_tab).
  DO.
    FETCH NEXT CURSOR l_c INTO TABLE <ft_lines> PACKAGE SIZE p_size.
    IF sy-subrc = 0.

      LOOP AT <ft_lines> INTO <fs_line>.
        TRANSFER <fs_line> TO l_fname.   <=====> GOES INTO DUMP BECAUSE MY TABLE (p_tab) has a string field
      ENDLOOP.

      CLEAR <ft_lines>.
    ELSE.
      CLOSE CURSOR l_c.
      EXIT.
    ENDIF.
  ENDDO.

  CLOSE DATASET l_fname.

Here is the message i am getting :

At the statement

"TRANSFER f TO ..."

no deep data objects are supported at the a

for strings.

Elementary deep data types are internal tabl

data object) references and strings (STRING,

General deep data objects are elementary dee

that contain deep data objects.

In this particular case, the operand "f" has

internal identification "v".

List of internal ABAP types:

C Text (Character)

N Numerical text

D Date (YYYYMMDD)

T Time (HHMMSS)

X Hexadecimal

I Integer

P Packed number

F Floating point number

h Internal table

r Object reference

l Data reference

g String of type C

y String of type X

s 2-byte integer with plus/minus sign

b 1-byte integer without plus/minus sig

u Structure (flat structure)

v Structure (deep structure)

Can you help me to go through this issue ?

Any kind of help would be appreciated.

Christian