Application Development 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: 

Input parameter for F.M or class to create dynamic internal table

Former Member
0 Kudos

Hi Experts,

I have to develop a class or a function module which should have a parameter to passing any kind of internal table data.

This class or F.M will be used in various programs which pass different internal tables.

I am thinking to create a dynamic internal table in my program but how to get data from calling prorgam in my F.M or class?

How should i define the parameter ?

Please let me know how to go about it

Thanks

Bhanu

3 REPLIES 3

bryan_cain
Contributor
0 Kudos

You can define the input parameter as type "any table." Where you went from there would depend on what the FM needed to do.

0 Kudos

Got it thanks Bryan

Former Member
0 Kudos

HI using this methods u can create dynamic internal tables,

CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE

EXPORTING

IT_FIELDCATALOG = FIELD_CATALOG

IMPORTING

EP_TABLE = GFINAL.

ASSIGN GFINAL->* TO <GFINAL>.

CREATE DATA WFINAL LIKE LINE OF <GFINAL>.

ASSIGN WFINAL->* TO <WFINAL>.

Please let me know once the requirement clearly , is the fm or Method importing parameter is internal table , corresponding to that

internal table you need to fetch data from data base.

In general , field symbols holds some memory in memory area , I think just like pointers in C language , this holds address only , there we dynamically assign some structure .

Let me know once if u not cleared ,

Regards

Siva