cancel
Showing results for 
Search instead for 
Did you mean: 

How to Call general ABAP Report in WDA?

Former Member
0 Kudos

Hi All,

Is it possible to run our general ABAP report in our WDA.

If yes how can i move....

Thanks & regards,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

You can call your report using the SUBMIT command to call it like a job. Follow an example on how to do this (from ABAP Help).


DATA: number           TYPE tbtcjob-jobcount, 
      name             TYPE tbtcjob-jobname VALUE 'JOB_TEST', 
      print_parameters TYPE pri_params. 

... 

CALL FUNCTION 'JOB_OPEN' 
  EXPORTING 
    jobname          = name 
  IMPORTING 
    jobcount         = number 
  EXCEPTIONS 
    cant_create_job  = 1 
    invalid_job_data = 2 
    jobname_missing  = 3 
    OTHERS           = 4. 
IF sy-subrc = 0. 
  SUBMIT submitable TO SAP-SPOOL 
                    SPOOL PARAMETERS print_parameters 
                    WITHOUT SPOOL DYNPRO 
                    VIA JOB name NUMBER number 
                    AND RETURN. 
  IF sy-subrc = 0. 
    CALL FUNCTION 'JOB_CLOSE' 
      EXPORTING 
        jobcount             = number 
        jobname              = name 
        strtimmed            = 'X' 
      EXCEPTIONS 
        cant_start_immediate = 1 
        invalid_startdate    = 2 
        jobname_missing      = 3 
        job_close_failed     = 4 
        job_nosteps          = 5 
        job_notex            = 6 
        lock_failed          = 7 
        OTHERS               = 8. 
    IF sy-subrc <> 0. 
      ... 
    ENDIF. 
  ENDIF. 
ENDIF. 

But this is only usefull if this report only process data and don't show data on screen, because this data can´t be showed in the web dynpro via write commands like described in the threads before.

Regards.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

> Hello,

>

> You can call your report using the SUBMIT command to call it like a job. Follow an example on how to do this (from ABAP Help).

> But this is only usefull if this report only process data and don't show data on screen, because this data can´t be showed in the web dynpro via write commands like described in the threads before.

>

> Regards.

Actually with a few changes you are close to a solution here. There is way to get the output of the report and convert it to HTML. You will need to have a little wrapper application around your report. You will have to run this wrapper as a background job or via RFC (pointing to destination NONE). Here is a sample:

*----------------------------------------------------------------------*
* SELECTION SCREEN LAYOUT                                              *
*----------------------------------------------------------------------*
selection-screen begin of block two with frame title text-002.
parameter: prog like sy-repid.
parameter: vari1 like raldb-variant.
selection-screen end of block two.

.....Other Processing....

 submit (prog) and return
           exporting list to memory
           using selection-set vari1.

  call function 'LIST_FROM_MEMORY'
       tables
            listobject = itab
       exceptions
            not_found  = 1.
  if sy-subrc ne 0.
    leave program.
  endif.

  call function 'WWW_HTML_FROM_LISTOBJECT'
   exporting
*    REPORT_NAME         =
     template_name       = 'WEBREPORTING_REPORT'
    tables
      html                = html_tab
      listobject          = itab.

Once the data is converted into HTML it is more usable from WD. You can't really display it directly within WD, but you could push it out as a file attachment from WD using cl_wd_runtime_services=>attach_file_to_response.

This is a lot of work and I still think it might be easier to fire a linkToURL or Exit Plug and navigate to the ITS/WebGUI.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

its not possible to directly call ABAP report from webdynpro

check the follwoing thread

[Thread1|]

[Thread2|;