‎2009 Sep 09 9:57 AM
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
‎2009 Sep 09 10:33 AM
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
‎2009 Sep 09 10:00 AM
‎2009 Sep 09 10:06 AM
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.
‎2009 Sep 09 10:24 AM
Hi,
It says that the go_table->set_screen_status method doesnot exist.
Regards,
Puja
‎2009 Sep 09 10:33 AM
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
‎2009 Sep 09 10:47 AM
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
‎2009 Sep 09 10:51 AM
Hi,
You need to capture the sy-ucomm in the PAI and then write the code for the buttons.
Regards
Ansari
‎2009 Sep 09 11:05 AM
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
‎2009 Sep 09 11:10 AM
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