Application Development and Automation 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: 
Read only

Interactive ALV Report Using Function...?

Former Member
0 Likes
778

Dear All,

How to create Interactive ALV Report... when we are creating report using Function Modules...?

Please... with examples...

Regards,

Dharmesh

4 REPLIES 4
Read only

Former Member
0 Likes
606

Hi,

Look at the following link will helps you a lot.

http://www.geocities.com/mpioud/Abap_programs.html

Look at the following code ..........

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = i_repid

i_callback_user_command = 'USER_COMMAND_PERNR'

it_fieldcat = header

is_layout = gt_layout

i_callback_top_of_page = 'TOP-OF-PAGE1'

i_grid_title = text-t06

it_sort = gt_sort[]

i_default = 'X'

i_save = 'U'

is_variant = gt_variant

it_events = gt_events

TABLES

t_outtab = ITAB.

clear itab.

endif.

----


  • FORM USER_COMMAND_PERNR

----


FORM USER_COMMAND_PERNR USING u_ucomm LIKE sy-ucomm

us_selfield TYPE slis_selfield."#EC CALLED

CASE u_ucomm.

when '&IC1'.

if us_selfield-fieldname = 'PERNR'.

  • read table ITAB index us_selfield-tabindex.

  • set parameter id 'PER' field ITAB-PERNR.

set parameter id 'PER' field us_selfield-value.

call transaction 'ZDMR03' and skip first screen.

endif.

ENDCASE.

ENDFORM. " USER_COMMAND_PERNR

Thanks.

If this helps you reward with points.

Read only

Former Member
0 Likes
606
Read only

Former Member
0 Likes
606


<b>type-pools:slis.</b>

tables: vbak,vbap.

select-options : s_vbeln for VBAK-VBELN.

data: it_vbap like vbap occurs 0 with header line.


select *
       from vbap
       into table it_vbap
       where vbeln in s_vbeln.

CALL FUNCTION <b>'REUSE_ALV_GRID_DISPLAY'</b>
 EXPORTING
   I_CALLBACK_PROGRAM                = sy-repid
   I_STRUCTURE_NAME                  = 'VBAP'
  TABLES
    T_OUTTAB                          = it_vbap[]
 EXCEPTIONS
   PROGRAM_ERROR                     = 1
   OTHERS                            = 2
          .
IF SY-SUBRC <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Read only

Former Member
0 Likes
606

hi,,

this link contains example for interactive alv reports

http://www.sap-img.com/abap/an-interactive-alv-report.htm

regards,

padma