04-16-2009 9:33 AM
Hi Gurus,
Is it possible to store the output of a function module into a custom table.How can this be done?Is it complex?
04-16-2009 9:39 AM
hi,
After u execute the FM and get values in the internal table ITAB_RESULT. Create a custom table having structure same as ITAB_RESULT call it ZRESULT.
data :wa type ITAB_RESULT.
call FM and get result it ITAB_RESULT
loop at itab_result.
move-corresponding itab_result to wa.
insert wa to ZRESULT.
endloop.
Regards,
Mansi.
04-16-2009 9:43 AM
Define your table with the same structure that the table in the function parameter TABLES
04-16-2009 9:50 AM
Hi It is not complex. Create one internal table with the same structure of your ztable. Pass it in Changing or Table parameters of your FM. Fill it up inside your FM. Once the call returns from FM, use insert or update statement to pass the data from internal table to ztable. Then call commit work so that database commit occurs.
02-04-2010 6:57 AM