Application Development 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: 

accessing report variable

sudhakara_reddy4
Participant
0 Kudos

Hi, i am creating one function module, i need to return one internal table IT_OUTPUT, that is ok, the total logic for filling of IT_OUTPUT is written in one report, this ALV report which is used internal table IT_OUTPUT for grid display, Now my issuse is using this report how to get the data of output internal table ie IT_OUTPUT from that report. There is no export of output table in the report to memory and i don't want to change this report at all. How can i access the variable IT_OUTPUT into my function module.

7 REPLIES 7

former_member194669
Active Contributor
0 Kudos

Cut & paste the report code into function module, and kept only the code that deriving the IT_OUTPUT table .

or

change the report code and export the IT_OUTPUT table into memory and import in the function module

or

use Implicit Enhancment spot in the report and export IT_OUTPUT to memory

0 Kudos

Yes, that is good idea, but sorry to say that when ever program changes we need to take care of FM also. This idea is not suitable for me at this time. Can please suggest any other way ?

Edited by: sudhakara reddy on Jul 21, 2009 9:19 PM

0 Kudos

Check for 3rd option i have mentioned in my previous reply. Check the possibility of its usage without changing the report.

0 Kudos

Yes, that is good idea, but sorry to say that client don't want touch or modify of report. There is not copy of logic also because whenever code change we need to change the FM also. by using this report is there any way to access that variable?

0 Kudos

Hi , Can you explain your third logic , i

don't know about this.

Edited by: sudhakara reddy on Jul 21, 2009 9:27 PM

0 Kudos

Please check this

(I hope you are working with version ECC)

https://wiki.sdn.sap.com/wiki/display/ABAP/HowToDoImplicitEnhancement

( This you can do in a custom report also and also you are not changing the report source code )

sreemsft
Contributor
0 Kudos

Hi,

I understood that you want to use IT_OUTPUT internal table in a function module, and the same table is there in some ALV report. And you do not want to pass any exporting parameters from the program to the function module.

When ever you want to get some data into the function module, you have to pass it as an importing parameter into the function module and export the same from some program. You can actually populate the table in function module itself with the logic that they are using at the report incase if you want to see how it works.