‎2008 Mar 27 8:33 AM
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.
‎2008 Mar 27 8:36 AM
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.
‎2008 Mar 27 8:36 AM
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.
‎2008 Mar 27 8:37 AM
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
‎2008 Mar 27 8:41 AM
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.
‎2008 Mar 27 8:49 AM
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!
‎2008 Mar 27 9:00 AM