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

Syntax Error with Table Parameter (type: ANY) when Creating Function Module

Former Member
0 Likes
2,282

Hello experts,

I want to create a function module with a table parameter and table type is ANY. But when I check (Ctrl+F7) this function module, syntax error occurs - "In this statement, the internal table "MSG_TABLE_ITEM" must have the type "STANDARD TABLE"."

Could anyone tell me what the wrong is? And how can I fix it?

Thanks,

Shelwin

7 REPLIES 7
Read only

Former Member
0 Likes
1,691

Hi,

It should be TYPE STANDARD TABLE

Regards,

Chandra

Read only

Former Member
0 Likes
1,691

Hi,

For table parameters, you can only pass

MSG_TABLE_ITM   TYPE STANDARD TABLE

or

MSG_TABLE_ITM  ( don't fill other columns TYPING ASSOCIATED TYPE  ).

For reference check FM 'GUI_UPLOAD' - Table parameters

Regards,

DPM

Read only

former_member187748
Active Contributor
0 Likes
1,691

Hi Shelwin,

your error message clearly indicates the error, so you have to use only standard table type in the associated type of   MSG_TABLE_ITEM.

Read only

Former Member
0 Likes
1,691

Hi all,

Thank you for your replies! And all of your opinions are correct in my case. Thanks again!

Regards,

Shelwin

Read only

Former Member
0 Likes
1,691

your first consideration should be not using the TABLES statement, as it is obsolete. Why not using CHANGING instead?

Read only

0 Likes
1,691

Hi Jozef,

I'm new to ABAP programming, and could we use CHANGING to transfer internal table parameters between function module and the program which calls this FM?

Regards,

Shelwin

Read only

0 Likes
1,691

You can. Whatever you send via TABLES can be sent via changing.