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

ALV TAB CODE

Former Member
0 Likes
345

Hi i have created one tab in alv tool bar and i have to write code for that please tell me where i have to write code as i am using function module programing and i have to write code for exporting that alv report into

excel format please help me for that.

1 REPLY 1
Read only

MarcinPciak
Active Contributor
0 Likes
317

Hi,

How did you created tab, in alv toolbar? I don't think so.

If you want to export data from your ALV use your form to catch user events:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
     ...
     i_callback_user_command           = 'USER_COMMAND'

Now you write your subroutine where you write your code


FORM user_command USING f_ucomm TYPE sy-ucomm
                        ls_selfield TYPE slis_selfield.
  IF f_ucomm = fcode.  "your function code
      "here export your data to excel
  ENDIF.
ENDFORM.

Is that what you meant?

Regards

Marcin