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

Function Modules using tables

Former Member
0 Likes
6,475

Sir,

I have created function group and function module. I have open se37 and choose tables tab button. I have insert itab in parameter Name Like in Type Spec and Kna1 in Associated Type.

I have got error "Tables Parameters are Obsolete"..

With Regards,

Baskaran

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,405

Hi Baskaran,

Table parameters are obsolete for normal function modules but have been retained to ensure

compatibility for function modules with other execution modes hence when you declare tables parameter in Function Module it gives warning.

The alternate way for this is create custom type in global declaration for table and use this type in changing parameters.

e.g

types: t_lfa1 type standard table of lfa1.

This declaration will go in your Top Include then u can create required table in your changing parameters.

Thanks & Regards,

Vaibhav Pendse

13 REPLIES 13
Read only

Former Member
0 Likes
3,405

hi

use LIKE instead of type paramete

that is t_name like Kna1

with regards

anand kumar

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
3,405

hi that should be a warning. just enter and go

or

use table types and do it in import or export.

Read only

Former Member
0 Likes
3,405

Hi,

Instead of directly assigning the table KNA1 as the table type, create a structure in SE11 consisting of the fields you require and assign it in the tables parameter.

Else Try assigning it as a CHANGING parameter

Regards,

Vik

Read only

Former Member
3,405

hii baskaran,

Hello,

Just press enter several times it will be accepted. That is just a warning.

or

Goto SE80 and give your Function Group and then right click and Activate.

rgrds,

Shweta

Read only

Former Member
0 Likes
3,405

Hello,

You care correct TABLES parameters are obsolete. So you need to use CHANGING instead of TABLES parameter

for passing tables to function modules.

Though it is just warning it is always good practice to avoid using obsolete things in SAP. This will keep code maintenance minimum in future.

Thanks,

Augustin.

Read only

0 Likes
3,405

you can pass the table in import parameters too.

just as in reuse_alv_grid_display we pass field catalog table in import parameter. right?

Read only

Former Member
0 Likes
3,406

Hi Baskaran,

Table parameters are obsolete for normal function modules but have been retained to ensure

compatibility for function modules with other execution modes hence when you declare tables parameter in Function Module it gives warning.

The alternate way for this is create custom type in global declaration for table and use this type in changing parameters.

e.g

types: t_lfa1 type standard table of lfa1.

This declaration will go in your Top Include then u can create required table in your changing parameters.

Thanks & Regards,

Vaibhav Pendse

Read only

0 Likes
3,405

Hi guys, I have the same problem, I want to pass an internal table to my function, but i can't add it in tables, it says Obsolete, but when i Enter, nothing happens or I just press ESC, the system ask me to cancel the procedure.

Why i could do that before -1 hour ago- and now I can't do that? I mean, to add the table.

I would like to know what is the diference between adding the table in changing instead of being added in Tables TAB or IMPORT TAB, could you please explain me?

Thank you!

Gabriela

Read only

0 Likes
3,405

hi gpsoria,

In TABLES you can get the internal table as an output

where as in changing you use an internal table as an input as well output

with cheers

s.janagar

Read only

Former Member
0 Likes
3,405

hi all, i'm a newbie with sap, and practicing with functions and modules, i have the following:

seeing this topic, y put my itab in CHANGING section, (t_vuelos type sflight), and trying to activate it, i got the "ti_vuelos is not an internal table - the "occurs n" specification is missing". Why??

thanks in advance!

Read only

Clemenss
Active Contributor
0 Likes
3,405

Hi Baskaran,

although it's a warning only, you should follow it. Tables parameters are CHANGING parameters based on the old internal table with headerline concept. For IMPORTING and EXPORTING parameters you need TABLE TYPES, minimum TYPE TABLE.

Regards,

Clemens

Read only

Former Member
0 Likes
3,405

search for a table type of KNA1.. not infront of SAP, so cant find it for you.

lets say its T_KNA1.

then in any import/export parameter tab, add the table as:

GT_KNA1 TYPE T_KNA1.

work done

Read only

Former Member
0 Likes
3,405

Finished