Skip to Content
0
May 31, 2011 at 07:02 PM

Dynnamic Field Symbol returning short dump ASSIGN_TYPE_CONFLICT

362 Views

Hi everyone,

I have a RFC FM and make a dynamic access via SYMBOL FIELD, declared as ANY TABLE. The problem is that sometimes I can get a structure instead of a table and then the error occurs. How do I handle this error if the check IS ASSIGN not work? How do I capture and return an error message?

I tryed this:

FIELD-SYMBOLS: <fs_tabela> TYPE ANY TABLE.

TRY.

ASSIGN (st_b2b_text-tabname) TO <fs_tabela>. <<<<----


DUMP HERE!

CATCH cx_root INTO v_erro.

v_text = v_erro->get_text( ).

MOVE v_text TO st_return-message.

APPEND st_return TO t_return.

PERFORM f_return_error_pi USING event.

ENDTRY.

IF <fs_tabela> IS ASSIGNED.

CONCATENATE 'S' st_b2b_text-tabname INTO vl_wkarea.

CONDENSE vl_wkarea NO-GAPS.

ASSIGN (vl_wkarea) TO <fs_wkarea>.

IF <fs_wkarea> IS ASSIGNED.

LOOP AT <fs_tabela> ASSIGNING <fs_wkarea>.

ASSIGN COMPONENT c_posnr

OF STRUCTURE <fs_wkarea> TO <fs_posnr>.

...

Does anyone have any tips?

Tnks,

Marco Antonio

from Brazil