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

create Function Module: export parameter is not an internal table ''OCCURS'' spercification is missing

Former Member
0 Likes
3,549

Hi,

I am creating a function module and encounter the error, saying that, the export parameter is not an internal table "OCCURS" specification is missing. At the Export tab of the function module, I declare a parameter whose type is an Database Table. Do I have to create a table data type at SE11 rather than using the Database Table?

I also wanna the difference between database table and a data type of table.

Regards,

ts

12 REPLIES 12
Read only

former_member209120
Active Contributor
0 Likes
2,241

Hi,

Please share screenshot of error.

Read only

Former Member
0 Likes
2,241

It should be TABLE TYPE in data dictionary if you want to export a table in tab EXPORTING in Function Builder.

Hope it helps.

Read only

0 Likes
2,241

Hi,

Can Transp. Table be used and why? I cannot find any detailed explanation on this.

Best regards,

ts

Read only

matt
Active Contributor
0 Likes
2,241

No, a transparent table definition cannot be used, as it defines only the structure of the records in the table - not the table itself.

Read only

0 Likes
2,241

That's what I got:

Associated Type of an Interface Parameter

ABAP associated type for an interface parameter. The associated type must be a global Dictionary type or exist in a type pool. In the latter case, the type pool must be declared in the function group.

Note that you cannot use types from type pools for RFC-enabled function modules.

When assigning a type using the LIKE typ method, you cannot use types from type pools either.

Additionally you can use the internal ABAP types C, I, N, X, P, D, T, F, and the TABLE type - to an extent in generic form.

You can find further information about this in the Function Builder manual and in the ABAP online documentation under the keyword "Types".

Thanks.

Read only

Former Member
0 Likes
2,241

Hi TS,

For Function Modules,

If you are declaring Internal Table as Importing/Exporting/Changing Parameter you need to use

Type - Table Type

Like - Table.

If you put the same in Tables Parameter, no issue will come.

BR.

Read only

bastinvinoth
Contributor
0 Likes
2,241

t s

There's a problem in your declaration part

Can you share you code

Read only

0 Likes
2,241

Hi Bastin,

I have only one exporting parameter, whose type is a customizing Transp. Table. But it seems I cannot use the database table in such a way and I have to create a table type. Would you mind telling me why? Please correct me, if I am wrong.

Best regards,

ts

Read only

matt
Active Contributor
0 Likes
2,241

It's very simple. If you use exporting/importing/changing parameters, you have to supply the type of the object being transferred. If you say the type is MARA, then that means the parameter will be a structure of type MARA, not a table.

Just like if you do: DATA: my_variable TYPE MARA. You have a variable with fields (my_variable-MATNR etc.), but not an internal table.

The TABLES parameter in a function module expect internal tables which are based on the structure supplied. However, TABLE parameter are marked as obsolete - though they are still necessary in some contexts.

A database table is a table containing records based on the structure defined in SE11.

Read only

venkateswaran_k
Active Contributor
0 Likes
2,241

Hi

When you want to export a Table type parameter, then you should use the TABLE and not the Export.

Export should always goes with Structure and not Table type...

Define the same in TABLE tab

REgards,

Venkat

Read only

0 Likes
2,241

Venkateswaran K wrote:

Export should always goes with Structure and not Table type...

Not so. Outside of RFC use, it is perfectly acceptable -even best practice - to use data dictionary defined table types in importing/exporting/changing parameters..

Read only

0 Likes
2,241

Hi

Yes,  You are correct.   🙂

Thanks,

Venkat