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

transfer internal table in function

Former Member
0 Likes
773

hii ev one,

this is internal tabel.

data: BEGIN OF ITAB OCCURS 0,

F1(3) TYPE C,

F2(3) TYPE N,

F3(3) TYPE C,

END OF ITAB.

i want to transfer this internal table to functions and append the records in that functions.

pls tell me how is this possible.

5 REPLIES 5
Read only

rodrigo_paisante3
Active Contributor
0 Likes
654

Hi,

but what functions do you want to use?

Some functions, you just send the internal table to the data/itab parameter.

Other functions, you need to sendo the itab[].

Explain more

Regards.

Read only

Former Member
0 Likes
654

hi,

you pass internal table ITAB to TABLES type parameter of Function module.

call function '<name-of-function>'

EXPORTING

IMPORTING

TABLES

<formal parameter> = ITAB.

regards,

Ashokreddy

Read only

Former Member
0 Likes
654

Hi,

If you want to pass the internal table to the function module, we need to create a internal table in function module in 'Tables' tab, when you declare the internal table in FM we need to give the reference of the data dictionary. So internal table structure should be created in DD.

With the same sturcture both internal tables {1 in FM and other in program} should be created.

regards,

  • Dj

reward for all useful answers.

Read only

Former Member
0 Likes
654

i wanted to transfer this to some function.

say call function 'ZFUN_ITAB'.

is it possible to transfer int table w/o any DD object reference. and apend or edit it in that function.

Read only

Former Member
0 Likes
654

yes it is possible and best way to make any changes in the table in fn module is passing the int table as table parameter. In se37 just declare one table parameter and pass your int table from your program in table parameter.

suppose ttab is the table parameter of your fn module.

in fn module sourcecode

ttab-f1 = 'ABC'.

append ttab.

in abap

call function 'ZFUN'

tables

ttab = itab <your itab which you declare in abap code>

.

loop at itab.

write : / itab-f1.

endloop.

it will display ABC.

regards

shiba dutta