Application Development 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: 

Error- 'TABLES parameters are obsolete' while Creating itab in function module

Former Member
0 Kudos

I tried to pass value Using Internal table . but I could't Enter the value there.. 

I tried with,

Parameter Name --> it

Typing                --> type standard table of  

                         (or)

                         --> type

                         --> like

Associated Type--> MARA.

But here i got the error message " TABLES parameters are obsolete" i tried with all 1.type standard table of, 2.type, 3. like.   i didn't work . What to give in Typing field ? can anyone help me ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Thank You Friends. Thanks for your Information .. So instead of using 'table' i can use import option to invoke 'ITAB' right?

10 REPLIES 10

aferngas
Active Participant
0 Kudos

Hi Karthi,

This message is pretty clear, no? Still, if you want to use this type of parameters, it should be typified using "LIKE".

I recommend you use types IMPORTING, EXPORTING and CHANGING.

Regards,

Alex

PS: The message is an warning. Press return again and continue.

sandroramos
Active Participant
0 Kudos

Hi,

Try passing a CHANGING parameter of type MARA_TAB.

At,

Sandro Ramos

bernat_loscos
Explorer
0 Kudos

Hi Karthi,

You can go to se11 transaction and create a table of type mara and using it in your import tab.

Then write in function module import Parameter name:z_t_mara and typing: TYPE.

Regards,

0 Kudos

Don't need to create a new table type, use standard MARA_TAB instead.

Regards,

Sandro

0 Kudos

hi Sandro,

i know SAP recommend using import, export. bacasue tables have high memory consumption and lower performance.

Could you explain me why?

if using import, it will be, 'itab type standard table of tableType',  low memory consumption?

if using tables, it will be, 'itab like standard table of table', high memory consumption?

thanks very much.

Archer

Former Member
0 Kudos

When creating a function module (se37) SAP would like developers to begin passing table information in the IMPORT, EXPORT, and/or CHANGING tabs instead of using the TABLES tab.  This means that we must use table types instead of statements like...gt_itab TYPE STANDARD TABLE OF mara in se37.

Sandro has a good suggestion of using MARA_TAB.  If you look at MARA_TAB in se11 you'll see that it is a table type instead of a structure.  You can use any table type for your IMPORTING, EXPORTING, and CHANGING parameters of your new function module,and they will behave just as if you added a parameter to the TABLES tab.

I hope this additional insight is helpful.

Former Member
0 Kudos

Hi,

SAP Release 7.0 EP2, the Tables parameter is not required anymore; we can define internal tables in the IMPORTING & EXPORTING tabs.

Regards,

Tanmoy

Former Member
0 Kudos

Thank You Friends. Thanks for your Information .. So instead of using 'table' i can use import option to invoke 'ITAB' right?

0 Kudos

Hi Karthi,

Just read the documentation below and explains the reason for obsolete statement.

TABLES parameters are obsolete!

TABLES parameters are table parameters. Table parameters are obsolete CHANGING parameters that are typed as internal standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to such a formal parameter, an empty header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. In the case of formal parameters defined with TABLES, no value transmission is possible.

Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created in the function module  for the internal table using the addition LIKE LINE OF itab of the DATA statement in the function module.

So better to use the changing parameter by using SAP defined table type TT_MARA( just like referring to standard internal table ). declare your FM as mentioned below screen shot.

0 Kudos

Hi Karthi,

Note that TABLE type parameters pass your variable by reference and allows to modify the value of these. If you are using a IMPORTING type parameter can only read this value. If you want change the value of your variable, you should use a CHANGING parameter or one IMPORTING and one EXPORTING.

In all cases (except TABLE type paramters) the type of your varible must be an table type. Not an structure.

Best Regards,

Alex