2011 Dec 20 6:15 PM
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
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
2011 Dec 20 6:20 PM
You can define the input parameter as type "any table." Where you went from there would depend on what the FM needed to do.
2011 Dec 20 6:31 PM
2011 Dec 20 6:35 PM
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