Skip to Content
0
Former Member
Jul 18, 2008 at 05:42 AM

adding pushbutton in alv grid list

20 Views

hai friends,

i have developed an alv grid list and i place a pushbutton called 'GETEXCEL'.when i click on 'GETEXCEL' it should generate an excel sheet and it should get placed in application server.

for the reference plz check my code also.

the issue is when i debug, the transfer statement is getting executed then it is going to the standard program(moduel pool) and then it is not going to application server.of course excel sheet is also getting generated.can anybody find the solution for this.

&----


*& Form events_get

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM events_get .

*DATA t_event TYPE slis_t_event.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = tab_events

EXCEPTIONS

LIST_TYPE_WRONG = 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 TABLE tab_events INTO wa_events WITH KEY name = 'USER_COMMAND'.

wa_events-form = 'USER_COMMAND'.

MODIFY tab_events FROM wa_events TRANSPORTING form WHERE name =

wa_events-name.

READ TABLE tab_events INTO wa_events WITH KEY name = 'PF_STATUS_SET'.

wa_events-form = 'PF_STATUS_SET'.

MODIFY tab_events FROM wa_events TRANSPORTING form WHERE name =

wa_events-name.

ENDFORM. " events_get

*&----


**& Form pf_status_set

*&----


FORM pf_status_set USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'STATUS'.

ENDFORM. " pf_status_set

**----


**& Form user_command

**----


FORM user_command

USING u_comm TYPE sy-ucomm

r_selfield TYPE slis_selfield.

CASE u_comm.

WHEN 'GETEXCEL'.

PERFORM f400_column_headings.

PERFORM f500_generate_excel_file.

PERFORM f600_transfer_excel_file.

ENDCASE.

ENDFORM. "user_command

then i am passing the parameters in grid fm also for user command and set pf status.