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

I_tabs in function module

Former Member
0 Likes
604

Hello,

Is it possible to use a table of a self-made structure in a function module? And how do you do it.

For example: My main program uses internal able datafields. Is it possible to pass this to the function module, and how do I do that?

DATA : BEGIN OF datafields_struc.

DATA: infotype(4),

index TYPE i,

field_name(30),

field_roll(20),

field_length TYPE i,

field_start TYPE i.

DATA : END OF datafields_struc.

DATA: datafields LIKE datafields_struc OCCURS 0 WITH HEADER LINE.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
591

U have to create a structure in se11 with the fields and then

give the structure in the TABLES Declaration in FM... in order

to use the structure ...

infotype(4),

index TYPE i,

field_name(30),

field_roll(20),

field_length TYPE i,

field_start TYPE i.

5 REPLIES 5
Read only

Former Member
0 Likes
592

U have to create a structure in se11 with the fields and then

give the structure in the TABLES Declaration in FM... in order

to use the structure ...

infotype(4),

index TYPE i,

field_name(30),

field_roll(20),

field_length TYPE i,

field_start TYPE i.

Read only

Former Member
0 Likes
591

Hi,

there are

import

export

changing

tables

exception

source code in any function module

so u can use ur internal table in the table block of the fmm

bt the types of both the tables means ur table and the table defined in the table block of fm must be the same

reward if helpful

Read only

rainer_hbenthal
Active Contributor
0 Likes
591

Hi,

declare youre structure in the data dictionary, in that way it is accessible object wide.

And avoid tables with header lines. They should be used no more. In OO context they are not allowed.

Read only

Former Member
0 Likes
591

Hi,

There is the possibilty that you can use i_tabs as the functionmodule ... wht u need to do is intially create a structure in se11 and declare all the fileds which u will be declaring in the internal table and declare that structure name in the tcode se37 there we can find the tab as tables and u declare in it..

Now u can declare the fileds in the inernal table or call the function module and use it .....

Try this hope u can solve it !

Regards,

Sana.

Reward with points if found helpful!

Read only

0 Likes
591

Thanks it works!

Greets