11-21-2005 10:53 AM
Hi,
I need to pass in an internal table of C (Max length 1024), bit confused about the best way of doing this.
What is the best way of doing this? Do I define it under imports , or tables? Do I have to define a new type in SE11?
Thanks
11-21-2005 10:57 AM
hi,
create a structure in SE11.
and using that same under parameter type tables create the FM.
regards,
Manohar
11-21-2005 10:56 AM
Hi Sims,
you should pass your table in TABLES section.
in the case of a table of C you can pass it with type "ANY TABLE" for example not structured table as:
data: xtab(1024) occurs 0.
in the case of a structured table you should create a type table in SE11 and declare your table as "TYPE Z_TAB_TYPE"
Example:
data: xtab type Z_TAB_TYPE.
or
data: begin of xtab occurs 0.
.......
data: end of xtab.
Regards, Manuel
11-21-2005 10:57 AM
hi,
create a structure in SE11.
and using that same under parameter type tables create the FM.
regards,
Manohar
11-21-2005 10:57 AM
Hi Sims,
If you want to pass the internal table in FMs, then use the Tables option. You don't need to crate any tables in SE11 .
Regards,
Ravi
11-21-2005 11:13 AM
Hi,
Here is the sample code.Kindly reward points by clicking the star on the left of reply,if it helps.
data itab type standard table of pa0001.
select * from pa0001 into table itab.
perform func <b>tables itab</b>.
form func tables p_itab <b>structure pa0001</b>.
data lw type pa0001.
loop at p_itab into lw.
write lw-pernr.
endloop.
endform. " func