09-23-2009 2:24 PM
Hi all,
Can we convert a SAP standard report to a function module ?
Thanks
John
09-23-2009 2:59 PM
yes you can,
but you need to do copy paste for the code part.
1st,
if you have selection screen you can use that as import parameter of that function module.
2nd,
if you want a table output from that FM, define a table parameter in that FM as the final table of the report.
3rd,
the logic and coding can be the same as it is,
the declaration part can be copied to the top include of the FM.
and other subroutines can be moved to the subroutine include.
but the main thing is to check the objective of yours from that FM.
can you please tell us which report are you talking about?
09-23-2009 2:30 PM
Hi,
I guess you could. Define the function module interface to be the same as the report selections and then use SUBMIT.... to run the report with the option EXPORTING LIST TO MEMORY to get the report output.
Regards,
Nick
09-23-2009 2:37 PM
yes , you can . but it depends how the report is executed .. i mean via selection parameters ?
09-23-2009 2:59 PM
yes you can,
but you need to do copy paste for the code part.
1st,
if you have selection screen you can use that as import parameter of that function module.
2nd,
if you want a table output from that FM, define a table parameter in that FM as the final table of the report.
3rd,
the logic and coding can be the same as it is,
the declaration part can be copied to the top include of the FM.
and other subroutines can be moved to the subroutine include.
but the main thing is to check the objective of yours from that FM.
can you please tell us which report are you talking about?
09-23-2009 3:38 PM
Hi Soumyaprakash
The transaction of the SAP report is S_ALR_87012284 and its corresponding program is RFBILA00
09-23-2009 3:47 PM
HI
let's know why u need to transform a report in a function module
Max
09-23-2009 3:53 PM
Hi ,
The requirement is something like this :
We need to build a dashboard using Xcelsius tool fetching the data from SAP R/3 system. The above mentioned report is run by the client in its R/3 system and now they also want to see that data in a dashboard.
Xcelsius cannot connect directly to a R/3 system though it can connect to a BW system. So, here we're using Crystal reports as the data source for our dashboard and Crystal reports can only understand SAP R/3 tables, clusters, function modules etc. but not the whole report.
We know that above mentioned report is a huge one and to replicate the same logic in Crystal reports is a mammoth task, and that's why we are planning to develop a function module using this report which in turn can be used by Crystal reports.......
Your valuable suggestions are appreciated !
Thanks
John
09-23-2009 4:01 PM
There are a number of remote enabled FMs that submit reports. Why don;t you have a look at them to see if any meet your requirements. If none do, they should at least give you an idea of how to proceed.
Rob
09-23-2009 4:21 PM
Hi
Rob is right, probably the problem can be the report retunrs an ALV list, so u can create a rfc returns a table arranged like the output structure for ALV, this RFC should have an interface just replaces the selection-screen of the report.
Probably u the easier solution ca be to create a copy of that report exports the output table to memory instead of generating an ALV list.
This Z-report can be submitted by the RFC imports the output table from memory and returns it as results.
Max
02-10-2015 6:24 AM
Hi all,
In selection screen if we are having select-options then we will make it as import parameter for function module.
But in logic if we are fetching the data from that select-options in program then while coming to function module what we use instead of that select-option
eg: select * from usr02 into itab where uname in <Import parameter>?.