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

How to read data from type any import parameter in a method.

Former Member
0 Likes
1,628

HI Folks,

I had created a method with import parameter type any , here i'll be exporting internal table with different structures when i call this method. can any body explain how to read the data from this internal table which is dynamically passed while calling the method.

Thanks

Sindu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,044

Hi,

Your ideal logic in this case would be to pass another internal table (parameter) to the method which would contain the type.

Eg:

Int Table A

VBELN

POSNR

Int Table B

1000000001 000010

Based on this you should have the logic in the method. You can do this entirely with dnamic fields and field symbols. If required you can also pass table names /FM/BAPI and call them dynamically from your method.

Cheers

Arnab

3 REPLIES 3
Read only

Former Member
0 Likes
1,045

Hi,

Your ideal logic in this case would be to pass another internal table (parameter) to the method which would contain the type.

Eg:

Int Table A

VBELN

POSNR

Int Table B

1000000001 000010

Based on this you should have the logic in the method. You can do this entirely with dnamic fields and field symbols. If required you can also pass table names /FM/BAPI and call them dynamically from your method.

Cheers

Arnab

Read only

0 Likes
1,044

Hi Arnab,

Thanks for your reply.

I understod what you said and i'm able to build the internal table of type the intrnal table that i got through import parameter, the problem is how to get read the data from Table B (table which contains data). for example if say ITABB[] = ITABC[](internal table which is built in the method) it is throughing an erorr saying ITABB is not table. can you please be more specific hoe to read the data from ITABB

Thanks

Sindu

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,044

Hello Sindu,

Instead of TYPE ANY, you've to use TYPE ANY TABLE.

I prefer to use more specific types: TYPE STANDARD/SORTED/HASHED TABLE (use the one as required).

BR,

Suhas