cancel
Showing results for 
Search instead for 
Did you mean: 

Running R/3 reports from ABAp webdynpro

former_member186783
Participant
0 Kudos

Hi experts,

I have a theoretical question:

There is normal ABAP report (not webdynpro) in the R/3 system.

Is it possible to run this report form an ABAP webdynpro application?

In my understanding this means, I have to create the Selection screen of the report in Webdynpro, then call the report from the R/3 system like:


  SUBMIT Z_REPORT
      WITH PNPPERNR = PERNR-PERNR
      AND RETURN
      EXPORTING LIST TO MEMORY.

then retrieve the values


    IMP_KEY-PERNR = PERNR-PERNR.
    IMP_KEY-SEQNR = '99999'.
    IMPORT it_result FROM MEMORY ID IMP_KEY.

Of course when I have the results I have to create another view, with a table to display it.

My questions are:

-Is my way of thinking correct?

-Is there any other way to do this?

Thanks

N.G.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>-Is my way of thinking correct?

Pretty much so. I guess best design long term might be to rebuild the report as native Web Dynpro - perhaps separating the data selection and logic out into a class. However this is good way to reuse existing development.

I notice that you have an explict IMPORT FROM MEMORY. I assume this report is doing some custom export to memory. If you just want the list output without needing anything special within the report being called, then you should use the function module LIST_FROM_MEMORY and LIST_TO_ASCI. However if you place an export int the inner report the returned contents are probably easier to process than the list format. I guess its really your choice.

-Is there any other way to do this?

This way is pretty direct. You could redesign the report, but I'm assuming you are asking for other ways to reuse the existing report. Your main concern might be if the report takes to long to run. You might have to submit the report to the background. This will likely require changes to the report to write the results into a database table instead of exporting to memory. However this has the added benefit of freeing the dialog work process of the WDA while the report runs.

former_member186783
Participant
0 Kudos

Hi Thomas,

Thank you for your answer. I think the question is answered, so I'm closing this message right now.

Bye

N.

Answers (0)