cancel
Showing results for 
Search instead for 
Did you mean: 

How can i call a zreport from my bsp page.

Former Member
0 Kudos
56

Hi friends,

How can i call a zreport from my bsp page.

Moosa

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Friend,

Your requirement can be achieved using Submit and Return command.

The following is the syntax where zreport is the name of the report name and the table name is seltab which holds the values to be passed to report.

submit zreport with selection-table seltab and return
          exporting list to memory.

In case you need to take the result from the report back to BSP page add the following coding in Report.

EXPORT int_result TO MEMORY  ID 'Zid'.

.

int_result is the final internal table holding all the values to be passed to the BSP page.

Now to import the obtained vaues values back to the BSP page add the following coding inaddition to the first coding in BSP page

import int_result to it_bsp from memory id 'Zid'.

With Regards,

SHARMILA BRINDHA.M

Former Member
0 Kudos

Hi sharmila,

Thanks for ur reply.

Its showing the following DUMP error

Exception condition "CNTL_ERROR" raised.

moosa

Former Member
0 Kudos

Hi Friend,

Any of the values exporting or importing may be null.Can you explain your requirement in brief.

With Regards,

SHARMILA BRINDHA.M

Former Member
0 Kudos

Hi sharmila,

Thanks for immediate reply.

I am calling a zreport from BSP having 2 input fields material ,plant by following code.

SUBMIT ZQCPC_REPORT

WITH MATERIAL = 'TEST_TMOS'

WITH plant = 'HOS'

and return exporting list to memory.

This z report will display smartforms output.

Moosa

Former Member
0 Kudos

Hi Friend,

These are the codings to be wirtten in BSP for transferring values to the REPORT


DATA:wf_date TYPE ztable-ID.
      data:seltab type standard table of rsparams,
       wa_seltab like line of seltab,
     event TYPE REF TO if_htmlb_data.

DATA:p_value TYPE REF TO CL_HTMLB_INPUTFIELD.
event = cl_htmlb_manager=>get_event( runtime->server->request ).
p_requ ?= CL_HTMLB_MANAGER=>GET_DATA(
                                        request  = runtime->server->request
                                        name     = 'inputField'
                                        id       = 'i1'
                                        ).
if p_requ is not initial.
  wf_date = p_requ->value.
endif.
clear wa_seltab.
if wf_date is not initial.
  wa_seltab-selname = 'P_REQU'.
  wa_seltab-kind = 'P'.
  wa_seltab-option = 'EQ'.
  wa_seltab-low = wf_date.
  append wa_seltab to seltab.
endif.
submit *ZSAMPLEAP1* with selection-table seltab AND RETURN  .(ZSAMPLEAP1 refers to the report name and AND RETURN for coming back to the BSP page after the completion of its operation in Report )
IMPORT int_name TO int_name FROM MEMORY ID '*zid*'.(For importing the obtained value from Report)

In Report


REPORT  ZSAMPLEAP1.
SELECT-OPTIONS: p_requ FOR ztable-id  NO INTERVALS.
SELECT SINGLE name from ztable into int_name WHERE id = p_requ-low.
WRITE:int_name.
    EXPORT int_name TO MEMORY  ID 'zsharmila'.

With Regards,

SHARMILA BRINDHA.M

Answers (0)