Application Development 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: 

ALV output problem : No MENU Bar & No STATUS Bar !

Former Member
0 Kudos

Hi ,

I am not getting any buttons in Menu bar and Status bar

in my ALV output !

I have done the following in my code :

******

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 0

IMPORTING

et_events = gt_events

EXCEPTIONS

list_type_wrong = 1

OTHERS = 2.

  • read for getting the PF_STATUS_SET event

READ TABLE gt_events

WITH KEY name = slis_ev_pf_status_set INTO x_event.

  • provide the form name for PF_STATUS_SET event

  • in the events table

IF sy-subrc = 0.

MOVE c_pf_set_status TO x_event-form.

MODIFY gt_events FROM x_event INDEX sy-tabix.

ENDIF.

  • read for getting the USER_COMMAND event

READ TABLE gt_events

WITH KEY name = slis_ev_user_command INTO x_event.

  • provide the form name for USER_COMMAND event

  • in the events table

IF sy-subrc = 0.

MOVE 'USER_COMMAND' TO x_event-form.

MODIFY gt_events FROM x_event INDEX sy-tabix.

ENDIF.

******

*--Display report in ALV

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

it_fieldcat = lt_fieldcat

it_event = gt_events[]

i_grid_title = ld_title

i_callback_pf_status_set = 'PF_STATUS_SET'

i_callback_user_command = 'USER_COMMAND'

TABLES

t_outtab = gt_tab.

******

FORM pf_status_set USING rt_extab TYPE slis_t_extab.

DATA: rv_extab TYPE slis_extab.

CLEAR rt_extab.

MOVE 'DISPLAY' TO rv_extab-fcode.

APPEND rv_extab TO rt_extab.

SET PF-STATUS 'DISPLAY_LOG' EXCLUDING rt_extab.

ENDFORM.

******

Any comments ?

Thanks in advance,

Sandip.

3 REPLIES 3

former_member181962
Active Contributor
0 Kudos

FORM pf_status_set USING rt_extab TYPE slis_t_extab.

DATA: rv_extab TYPE slis_extab.

CLEAR rt_extab.

MOVE 'DISPLAY' TO rv_extab-fcode.

APPEND rv_extab TO rt_extab.

SET PF-STATUS 'DISPLAY_LOG' EXCLUDING rt_extab.

ENDFORM.

in the pf-status 'DISPLAY_LOG', what are the buttons and menus you have?

YOu should create ;DISPLAY_LOG' BY COPYING IT FROM THE PF STATUS OF PROGRAM SAPLKKBL AND STATUS STANDARD_FULLSCREEN.

Regards,

Ravi

Former Member
0 Kudos

You should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.

Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.

Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.

Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality such as sorting/subtotaling etc...

When you call 'REUSE_ALV_GRID_DISPLAY' make sure you pass it the new status name.

an example of one of mine:

call function 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = 'ZSDBOLST_REPORT'

i_callback_pf_status_set = 'STANDARD' <----


i_callback_user_command = 'USER_COMMAND'

i_structure_name = 'I_BOLACT'

i_grid_title = 'BOL Action Report'(031)

is_layout = gs_layout

it_fieldcat = gt_fieldcat[]

i_save = 'A'

is_variant = v_variant

TABLES

t_outtab = i_bolact

EXCEPTIONS

program_error = 1

others = 2.

  • Form Set_pf_status

  • Notes: Called by FM REUSE_ALV_GRID_DISPLAY

FORM set_pf_status USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'ZSTANDARD'.

ENDFORM. "Set_pf_status

Best Regards,

Vibha

*Please mark all the helpful answers

0 Kudos

I have already copied the 'STANDARD' layout.

But the problem was occuring as I had missed the i_callback_program parameter.

Thanks for responding.