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 buttons not functioning

Former Member
0 Likes
1,161

Hi,

I created a user-defined screen in an alv report.

MODULE status_9001 OUTPUT.

"SET PF-STATUS 'ZMAIN'

ENDMODULE.

When I run the report, the alv defined buttons are not getting activated. I activated them in the interface but still they are unfunctional. Kindly suggest what to do.

Thanks in advance.

Regards,

Puja

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,114

Hi Puja,

Declare PF_status.

use this program name and pf status name in tcode se41.

there copy status of standard alv and change status as per your requirement.

then activate it.

I hope it will work.

Regards,

Vijay

8 REPLIES 8
Read only

Former Member
0 Likes
1,114

Hi.

Just give SET PF status ' '.

Regards

Ansari

Read only

Former Member
0 Likes
1,114

Hi Puja,

You have to create a PF status for your report and then set the same on ALV.

You can copy standard GUI-STATUS for Standard full screen

display or Pop-up display from standard

Function Group 'SALV_METADATA_STATUS'

use this

CALL METHOD go_table->set_screen_status

EXPORTING

report =

pfstatus =

set_functions =

Hope it helps you.

Read only

0 Likes
1,114

Hi,

It says that the go_table->set_screen_status method doesnot exist.

Regards,

Puja

Read only

Former Member
0 Likes
1,115

Hi Puja,

Declare PF_status.

use this program name and pf status name in tcode se41.

there copy status of standard alv and change status as per your requirement.

then activate it.

I hope it will work.

Regards,

Vijay

Read only

0 Likes
1,114

Hi Vijay,

I have done exactly the sam ething. The buttons are appearing but when I click on them they are not functioning.

Regards,

Puja

Read only

0 Likes
1,114

Hi,

You need to capture the sy-ucomm in the PAI and then write the code for the buttons.

Regards

Ansari

Read only

0 Likes
1,114

Hi Puja again,

I hope you declare at user command perform.

and in that

you should use case end case.

let me give code example for this.

e.g.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

i_callback_pf_status_set = 'GI'

i_callback_user_command = 'USER_COMMAND'

FORM user_command USING lv_ucomm TYPE sy-ucomm ls_selfield TYPE slis_selfield.

CASE lv_ucomm.

WHEN '&IC1'.

IF ls_selfield-fieldname = 'MATNR'.

READ TABLE gt_gi INTO gs_gi INDEX ls_selfield-tabindex.

IF sy-subrc = 0.

ENDIF.

ENDIF.

WHEN 'COPY'.

WHEN 'POST'.

WHEN OTHERS.

ENDCASE.

ENDFORM. " USER_COMMAND

I hope this will help you.

Regards,

Vijay

Read only

awin_prabhu
Active Contributor
0 Likes
1,114

Hi,

Since yours is user-defined screen for ALV u have to maintain PF status manually.

Step 1:

In FM 'REUSE_ALV_GRID_DISPLAY'

pass exporting parameter 'i_callback_pf_status_set' additionally for setting your PF status.

Step 2:

In se41 for your status use following names for buttons,

Back button -> BACK

Cancel button -> RW

Exit button -> %EX

Code:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_pf_status_set = 'SET_PF_STATUS' " Form name

TABLES

t_outtab = g_t_output.

FORM set_pf_status USING rt_extab TYPE slis_t_extab.

CLEAR: rt_extab[].

DATA: wa TYPE slis_extab.

wa-fcode = 'BACK'. " Excluding ' Back' button

APPEND wa TO rt_extab.

SET PF-STATUS 'MAIN1' EXCLUDING rt_extab.

ENDFORM.

Thanks,

Edited by: Sap Fan on Sep 9, 2009 12:10 PM

Edited by: Sap Fan on Sep 9, 2009 12:12 PM