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

Cannot use a Table Type in Custom BAPI parameters?

Former Member
0 Likes
929

Dear All,

I created a Custom BAPI in which one of the import parameters references a Table Type BAPITESTTAB.

I did not want to use 'Tables' parameter as it is obsolete.

Now when I try to add this BAPI as an API method to my Custom object ZPLAYER I get an error message "Data type ZBAPITESTTAB cannot be used for methods".

I looked up SAP Help and noticed that "Only data elements and structures are allowed as reference types for parameters in the BOR".

Q. Does this mean that no BAPI can contain import/ export parameters referencing Table Types?

Must we only use the tables parameter to pass tables?

Thanks and Regards,

Ashwin

3 REPLIES 3
Read only

Former Member
0 Likes
584

Hi,

Yes, Import and Export does not allow Table types, should declare these in CHANGAING tab.

Regards,

Sunil

Read only

0 Likes
584

Hi Sunil,

Function modules that implement BAPIs must not use changing parameters. They can only use import, export and table parameters.

BTW all FM can use Table Types in import and Export Parameters. Why else would SAP make Tables parameters obsolete.

Regards,

Ashwin

Read only

0 Likes
584

Spoke to a cpl of ABAP Consultants in office.

We cannot use a table type in BAPI parameters. We can use the Table parameter itself.

Since the FM will be RFC enabled we will not get a warning to not use table parameters.