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

adding pushbutton in alv grid list

Former Member
0 Likes
709

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
689

Hi

Go through the link given below :

With Regards

Nikunj Shah

5 REPLIES 5
Read only

Former Member
0 Likes
689

Hi Mahesh,

1. No need to populate the EVENTS table in your case, just pass the Subroutine names for PF status and USER_COMMAND to GRId Display

I_CALLBACK_PFSTATUS = 'PF_STATUS_SET'.

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

2. make sure you pass SY-REPID/SY-CPROG to REUSE_ALV_GRID_DISPLAY FM

Read only

0 Likes
689

hi chandrashekar,

thanks for ur reply.i did the both things what u have told.still my file is not going to application server.if i dont use alv grid and directly if i am trying to put it in appln. server then the file is getting stored in appln server.so the problem is in user command only i guess.plz suggest anything for user command execution.

Read only

0 Likes
689

Hi ,

Have you checked if SY-SUBRC EQ 0 after OPEN DATASET..

Make sure you had given the correct file path/name

Read only

0 Likes
689

s sy-subrc value is 0 and the path si correct only.even i am able to generate the excel sheet on desktop but not in appln.server.

Read only

Former Member
0 Likes
690

Hi

Go through the link given below :

With Regards

Nikunj Shah