Skip to Content
0
Former Member
Mar 03, 2008 at 05:51 PM

Call Methods using FIELD-SYMBOLS

309 Views

Good afternoon, i have this problem:

First, i used a field Symbol to call an object that has been initialized in another program. Then, i want to use this field symbol to call a method of this object, but i have the following message:

"<FS> is not a reference variable".

This is the code that have the error in the last line:

DATA ls_object(30) TYPE C.

FIELD-SYMBOLS: <fs> TYPE ANY.

ls_object = '(SAPLTB4E)g_oref_ftr_appl_ctrl'.

ASSIGN (ls_object) TO <fs>.

CALL METHOD <fs>->action_pbo_before.

The assign returns a sy-subrc = 0. In the program SAPLTB4E, the variable 'g_oref_ftr_appl_ctrl' is define like this:

g_oref_ftr_appl_ctrl TYPE REF TO cl_ftr_appl_ctrl.

Thanks in advance for your help.