cancel
Showing results for 
Search instead for 
Did you mean: 

Error:Unable to interpret "TABLE".

former_member1262147
Participant
0 Kudos
124

When I use BTE, There is an error in FM Z_WRITE_TO_QUEUE in R/3.

FUNCTION Z_WRITE_TO_QUEUE.

*"----


""Local interface:

*" IMPORTING

*" REFERENCE(I_DATASOURCE) TYPE ROOSOURCE-OLTPSOURCE

*" TABLES

*" I_T_DATA OPTIONAL

*"----


TYPE-POOLS:

sbiwa.

DATA:

l_exstruct TYPE roosource-exstruct,

l_initflag TYPE roosprmsc-initstate,

l_subrc TYPE sy-subrc,

lr_is_data TYPE REF TO data,

lr_es_data TYPE REF TO data,

lr_et_data TYPE REF TO data,

l_t_fields TYPE sbiwa_t_fields,

l_t_select TYPE sbiwa_t_select.

FIELD-SYMBOLS:

<i_s_data> TYPE ANY,

<e_s_data> TYPE ANY,

<e_t_data> TYPE STANDARD TABLE.

  • Check to see if Delta initialization has been performed.

SELECT SINGLE initstate FROM roosprmsc INTO l_initflag

WHERE oltpsource = i_datasource

AND rlogsys NE space

AND slogsys NE space

AND initrnr NE space.

  • If initialization has taken place continue

IF sy-subrc EQ 0 AND l_initflag EQ 'X'.

  • grab the extraction structure from roosource based on the

  • datasource parameter input.

SELECT SINGLE exstruct FROM roosource INTO l_exstruct

WHERE oltpsource = i_datasource

AND objvers = 'A'.

CHECK sy-subrc = 0.

CREATE DATA lr_is_data LIKE LINE OF i_t_data.

ASSIGN lr_is_data->* TO <i_s_data>.

CREATE DATA lr_es_data TYPE (l_exstruct).

ASSIGN lr_es_data->* TO <e_s_data>.

CREATE DATA lret_data TYPE STANDARD TABLE OF (l_exstruct)._

ASSIGN lr_et_data->* TO <e_t_data>.

LOOP AT i_t_data ASSIGNING <i_s_data>.

CLEAR <e_s_data>.

MOVE <i_s_data> TO <e_s_data>.

  • MOVE-CORRESPONDING <i_s_data> TO <e_s_data>.

INSERT <e_s_data> INTO TABLE <e_t_data>.

ENDLOOP.

CALL FUNCTION 'EXIT_SAPLRSAP_001'

EXPORTING

i_datasource = i_datasource

i_isource = ''

i_updmode = ''

TABLES

i_t_select = l_t_select

i_t_fields = l_t_fields

c_t_data = <e_t_data>

EXCEPTIONS

rsap_customer_exit_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

CALL FUNCTION 'RSC1_TRFC_QUEUE_WRITE'

EXPORTING

i_isource = i_datasource

i_no_flush = 'X'

IMPORTING

e_subrc = l_subrc

TABLES

i_t_data = <e_t_data>

EXCEPTIONS

name_too_long = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDIF.

ENDFUNCTION.

----


  • FORM abs_type_to_rel_type *

----


  • The purpose of this subroutine is to convert an absolute type *

  • name into a relative type name. *

  • *

----


  • --> TYPE_NAME *

----


form abs_type_to_rel_type changing type_name.

data junk(100) type c.

split type_name at '\TYPE=' into junk type_name.

endform.

"CREATE DATA lr_et_data TYPE STANDARD TABLE OF (l_exstruct)" makes an Error "Unable to interpret "TABLE"."

I don't why!

So anbody can help me?

Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Use this statement.

data:begin of lr_et_data occurs 0,

include l_exstruct.

end of lr_et_data.

Ravi

former_member1262147
Participant
0 Kudos

I don't think it can work.

You want to redefine?It has been defined before,"lr_et_data TYPE REF TO data"

Thank you!