2013 Jun 19 9:19 AM
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
2013 Jun 19 9:37 AM
2013 Jun 19 9:38 AM
It should be TABLE TYPE in data dictionary if you want to export a table in tab EXPORTING in Function Builder.
Hope it helps.
2013 Jun 19 10:15 AM
Hi,
Can Transp. Table be used and why? I cannot find any detailed explanation on this.
Best regards,
ts
2013 Jun 19 10:59 AM
No, a transparent table definition cannot be used, as it defines only the structure of the records in the table - not the table itself.
2013 Jun 19 11:25 AM
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.
2013 Jun 19 9:44 AM
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.
2013 Jun 19 10:09 AM
2013 Jun 19 10:51 AM
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
2013 Jun 19 10:58 AM
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.
2013 Jun 19 11:07 AM
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
2013 Jun 19 12:50 PM
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..
2013 Jun 19 1:13 PM