‎2013 Apr 12 12:31 PM
Hi @ All,
i have a requirement to convert the interactive alv report into a function module
i dont know how to do this so i simply pasted the code of report into function module source code
has any idea about how to do this?
Pls Reply soon
Thanks,
Manu
‎2013 Apr 12 12:44 PM
Transforming a report into a function module means that you will eliminate all the writes (or ALV call).
Your parameters and select-options will be the import variables and the result list will have to be a table.
All your work is around that more or less.
It depends who calls the module. If it is supposed to be called by external system then it has to be RFC and handle error messages by table (see BAPIRETURN) avoiding exceptions.
This is a start...
‎2013 Apr 12 1:29 PM
hi,
You can pass selection screen parameters as import parameters to FM.The o/p of report can be passed to table in tables parameter.The interactive content can be store in another table.
You will finally have 2 tables one with actual O/P and other with interactive one.
‎2013 Apr 12 1:40 PM
Hi,
Firstly determine the scope of the report whether it will be used by a driver program.
Determine what will be the importing parameters for the function module from your report.
If a driver program wants to call this FM then what are the parameters that the driver program will input to FM so that FM will display ALV data.
If you have to display ALV report then you dont have exporting parameters.
In table tab you have to enter the internal tables that you have formed in your report.
thank you.
Best Regards,
Varun D.
‎2013 Apr 12 1:54 PM
Do you know what a function module is? Do you know how to program? If not - best hand the job over to someone who's been trained.
‎2013 Apr 12 2:11 PM
‎2013 Apr 12 3:04 PM
Moderator message
Please note that use of phrases like "urgent" is against the Rules of Engagement.
These discussion spaces are not meant to be a substitute for training
Questions that are general in nature are not particularly encouraged
In answer to your question, you need to analyse the program and decide what its inputs and outputs are. Then modify the program so that instead of taking input from a selection screen or the like, and displaying it in an ALV, rather does this through the function module parameters. Which is effectively what everyone else has said.
I fail to see how anyone can assist you further in this task, as it is a basic programming task, requiring only a basic understanding of ABAP.
If you do know how to program and do know what a function module is then I do not understand why you posted the question.