cancel
Showing results for 
Search instead for 
Did you mean: 

Report Not working on 2nd time ,back and execute on selection screen

0 Kudos
383

I have report like on selection screen 2 radio buttons are there 'Summary' & 'Report' and on 2nd radio button there are group of 11 radio buttons. On each of these 11 radio buttons, ALV report will be displayed.

My question is when I am executing report for the first time , it is getting executed properly. But when I click back button from report output and select another radio button and try to execute, it is not displaying any output.

What will be issue here and In which event I need to make changes ?

Code Snippet : I have written code for 11 radio buttons like below.

moshenaveh
Community Manager
Community Manager
0 Kudos
Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't already), as it provides tips for preparing questions that draw responses from our members.
Should you wish, you can revise your question by selecting Actions, then Edit.
Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS. By personalizing your profile with a photo of you, you encourage readers to respond.
Sandra_Rossi
Active Contributor

You didn't provide the code which concerns the part between execution request and ALV display, so you can understand that it's impossible to help.

Moreover, please debug a little bit, and tell us the result of your analysis.

0 Kudos

In this same report, I am facing another issue like when I am trying to execute Radio Button 1 : Report, It is not showing any ALV. In debug , I can see the internal table filled with values.

Here is the code snippet :

  REFRESH : it_report[].

  wa_report-name = 'Debtors'.
  wa_report-wrbtr = gv_deb.
  APPEND wa_report TO it_report.
  CLEAR wa_report.

  wa_report-name = 'Advance given to Creditors'.
  wa_report-wrbtr = gv_adc.
  APPEND wa_report TO it_report.
  CLEAR wa_report.

  wa_report-name = 'Advance given to special SPV'.
  wa_report-wrbtr = gv_spv.
  APPEND wa_report TO it_report.
  CLEAR wa_report.

  wa_report-name = 'Retention Money'.
  wa_report-wrbtr = gv_rm.
  APPEND wa_report TO it_report.
  CLEAR wa_report.

  wa_report-name = 'GST Receivable'.
  wa_report-wrbtr = gv_gst_rec.
  APPEND wa_report TO it_report.
  CLEAR wa_report.

  wa_report-name = 'Stocks at Site'.
  wa_report-wrbtr = gv_ss.
  APPEND wa_report TO it_report.
  CLEAR wa_report.

  wa_report-name = 'Work in Progress'.
  wa_report-wrbtr = gv_wip.
  APPEND wa_report TO it_report.
  CLEAR wa_report.

  wa_report-name = 'Creditors'.
  wa_report-wrbtr = gv_cre.
  APPEND wa_report TO it_report.
  CLEAR wa_report.

  wa_report-name = 'GR/I'.
  wa_report-wrbtr = gv_gr_ir.
  APPEND wa_report TO it_report.
  CLEAR wa_report.

  wa_report-name = 'provision'.
  wa_report-wrbtr = gv_pro.
  APPEND wa_report TO it_report.
  CLEAR wa_report.

  REFRESH : it_fieldcat[].
  wa_fieldcat-fieldname   = 'NAME'.
  wa_fieldcat-seltext_m   = 'Report Name'.
  wa_fieldcat-col_pos     = 1.
  wa_fieldcat-outputlen     = 25.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR  wa_fieldcat.

  wa_fieldcat-fieldname   = 'WRBTR'.
  wa_fieldcat-seltext_m   = 'Amount'.
  wa_fieldcat-col_pos     = 2.
  wa_fieldcat-just     = 'L'.
  wa_fieldcat-outputlen     = 20.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR  wa_fieldcat.

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program = sy-repid
      i_grid_title       = 'Summary of All Reports'
      it_fieldcat        = it_fieldcat
      i_save             = 'A'
    TABLES
      t_outtab           = it_report.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.<br>
0 Kudos

Issue got resolved , I added 'CALL SELECTION-SCREEN 1000.' at the end of each radio button code (perform).

So that selection screen got activated again after 1st execution and I am able to select and execute report with any other radio button.

MateuszAdamus
Active Contributor
0 Kudos

Please add the solution as answer and mark the question as solved. This may help others in the future.


Kind regards,
Mateusz

Accepted Solutions (0)

Answers (0)