Application Development and Automation 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: 
Read only

Error in ASSIGN syntax...

aris_hidalgo
Contributor
0 Likes
1,811

Hello Experts,

I am having an ABAP dump with my code below:


CONSTANTS: lv_table TYPE c LENGTH 30 VALUE '(SAPMV45A)VBAK'.
FIELD-SYMBOLS: <fs_table> TYPE table.

ASSIGN (lv_table) TO <fs_table>.

The code above is inside a user-exit and I want to assign the table from one of

the include programs to a field-symbol. The error says that the two are not type

compatible.

Hope you can help me guys.Thank you and take care!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,351

declare the field symboll as type any

FIELD-SYMBOLS: <fs_table> TYPE any.

useful Reward pioints.

sas

7 REPLIES 7
Read only

Former Member
0 Likes
1,351

either define field symbol of type any

of define it as type of itab

Read only

0 Likes
1,351

Thank you guys for your replies.However, instead of a table, is is being passed to the

field-symbol as a structure. I want to the whole VBAK table and not a structure.

Read only

0 Likes
1,351

do this way then ..


CONSTANTS: lv_table TYPE c LENGTH 30 VALUE '(SAPMV45A)VBAK[]'.
FIELD-SYMBOLS: <fs_table> TYPE table any. 

Read only

0 Likes
1,351

keep the field symbol as type any...

it is usefull when the assigned structure is not fixed... type any will give liberty to assign any structure to the field-symbol

Read only

Former Member
0 Likes
1,352

declare the field symboll as type any

FIELD-SYMBOLS: <fs_table> TYPE any.

useful Reward pioints.

sas

Read only

Former Member
0 Likes
1,351

hi,

do this way .. declare the field symbols as type any ...


CONSTANTS: lv_table TYPE c LENGTH 30 VALUE '(SAPMV45A)VBAK'.
FIELD-SYMBOLS: <fs_table> TYPE any.
 
ASSIGN (lv_table) TO <fs_table>. 

Read only

Former Member
0 Likes
1,351

do like

CONSTANTS: lv_table TYPE c LENGTH 30 VALUE '(SAPMV45A)VBAK'.

FIELD-SYMBOLS: <fs_table> TYPE any.

ASSIGN (lv_table) TO <fs_table>.

do reward if helpful