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

passing dynamic table to function module

Former Member
0 Likes
1,737

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

7 REPLIES 7
Read only

Former Member
0 Likes
824

same as that of your dynamic table type

Read only

former_member195383
Active Contributor
0 Likes
824

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.

Read only

Former Member
0 Likes
824

Hi

Go through the link given below :

With Regards

Nikunj Shah

Read only

Former Member
0 Likes
824

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^

Read only

Former Member
0 Likes
824

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?

Read only

Former Member
0 Likes
824

thanx

Read only

0 Likes
824

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