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: 

TABLE_ENTRIES_GET_VIA_RFC

Former Member
0 Kudos

I am using this function to read DD02L in R/3 from BW. The table layout is returned in <b>nametab</b>. However, all the byte counts are doubled. For instance, TABNAME is the usual CHAR 30, but it is 60 bytes in nametab. And so it goes for each field. I am able to deal with it, of course, by dividing by 2 before I parse the returned data.

But does anyone know why things are doubled?

Both BW and R/3 are UNICODE and 2004S.

  CALL FUNCTION 'TABLE_ENTRIES_GET_VIA_RFC' DESTINATION 'R3CLNT100'
    EXPORTING
      langu               = sy-langu
      only                = ' '
      tabname             = 'DD02L'
    IMPORTING
      rc                  = l_subrc
    TABLES
      sel_tab             = l_t_sel_tab
      nametab             = l_t_nametab
      tabentry            = l_t_tabentry
    EXCEPTIONS
      internal_error      = 1
      table_has_no_fields = 2
      table_not_activ     = 3
      not_authorized      = 4
      OTHERS              = 5.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

1 REPLY 1

andrea_galluccio2
Contributor
0 Kudos

Hi,

i had the same think of u, but i used another FM (and it worked very well form me ).

'RFC_READ_TABLE'.

Example :

CALL FUNCTION 'RFC_READ_TABLE'

DESTINATION 'X51400'

EXPORTING

query_table = 'YT301'

  • NO_DATA = ' '

TABLES

  • fields =

data = tdata

EXCEPTIONS

table_not_available = 1

table_without_data = 2

option_not_valid = 3

field_not_valid = 4

not_authorized = 5

data_buffer_exceeded = 6

OTHERS = 7.

To access to a record of tdata

READ TABLE tdata WITH KEY wa+3(3) = ifile-ist.

Hope it helps

Bye

Andrea

Pls reward if it helps