‎2008 Jul 24 7:40 AM
Hi all,
actully i have to pass dynamic internal table from function module.
for that i use syntax
move <dyn_table> to data_tab.
but now my question is that in fm parameters what is the type spec & associated type for data_tab in fm parameters.
regards,
anuj
‎2008 Jul 24 7:42 AM
‎2008 Jul 24 7:43 AM
Hi Anuj,
In se11 create a structure which is same as of your internal table...Then in the FM parameters u can use the same.
‎2008 Jul 24 7:44 AM
‎2008 Jul 24 7:47 AM
Hi
Good
Here is a simple example of passing an internal table "itab" to a function module "REUSE_ALV_LIST_DISPALY".
It displays the internal table data into a list format.
data : itab like ztest213 occurs 0 with header line.
tables : ztest213 .
select * from ztest213 into table itab.
loop at itab.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
i_structure_name = 'ztest213'
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IR_SALV_LIST_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = itab
exceptions
program_error = 1
others = 2
.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endloop.
Thanks
mrutyun^
‎2008 Jul 24 7:53 AM
Thanks all,
But in dynamic internal table there is no any spcified structure, it's created at runtime ,it's may be 3 field structure or may be 10 field structure ,it's depend on input table then what should be parameters?
‎2008 Aug 06 12:41 PM
‎2009 Nov 19 7:38 AM
HI Anuj,
Can you please share the solution for this scenario.
How did you acheive the result, Im also facing the same problem right now.
Keshav