Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Converting Report into Function Module

Former Member
0 Likes
2,445

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

6 REPLIES 6
Read only

Phillip_Morgan
Contributor
0 Likes
1,439

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...

Read only

Former Member
0 Likes
1,439

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.

Read only

Former Member
0 Likes
1,439

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.

Read only

matt
Active Contributor
0 Likes
1,439

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.

Read only

Former Member
0 Likes
1,439

if yes?

then please comment

<text removed by moderator>

Read only

matt
Active Contributor
0 Likes
1,439

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.