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: 

How to convert classical report program into ALV/ Interactive report

0 Kudos

Hello,

I have an requirement to convert classical report program into ALV/ interactive report i.e when click on radio button classical it should show output in Classical and then if clicked on alv button output should as ALV grid/ list . Is there anyway to write program in classical and convert into ALV/ Interactive.

Have attached my code. Please suggest and am new to SAP ABAP.

classical.txt

Thanks in Advance.

1 ACCEPTED SOLUTION

rajkumarnarasimman
Active Contributor

Hi Dinesh,

"when click on radio button classical it should show output in Classical and then if clicked on alv button output should as ALV grid/ list

Create two radio buttons, for instance R_CLASSIC and R_ALV.

  1. Map the old program for R_CLASSIC
  2. For R_ALV, use class CL_SALV_TABLE and display the ALV.
"Is there anyway to write program in classical and convert into ALV/ Interactive.

To show alv, the respective class or FM should be called like below.

DATA : lr_table TYPE REF TO cl_salv_table.  
cl_salv_table=>factory( IMPORTING r_salv_table =lr_table
                        CHANGING t_table = it_final )  .  
lr_table->display( ).

Regards

Rajkumar Narasimman

1 REPLY 1

rajkumarnarasimman
Active Contributor

Hi Dinesh,

"when click on radio button classical it should show output in Classical and then if clicked on alv button output should as ALV grid/ list

Create two radio buttons, for instance R_CLASSIC and R_ALV.

  1. Map the old program for R_CLASSIC
  2. For R_ALV, use class CL_SALV_TABLE and display the ALV.
"Is there anyway to write program in classical and convert into ALV/ Interactive.

To show alv, the respective class or FM should be called like below.

DATA : lr_table TYPE REF TO cl_salv_table.  
cl_salv_table=>factory( IMPORTING r_salv_table =lr_table
                        CHANGING t_table = it_final )  .  
lr_table->display( ).

Regards

Rajkumar Narasimman