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: 

Menu problem in ALV.....have ur ponts...

Former Member
0 Kudos

Hi all,

I copied standard SAP menu in Se41 then i used that in my ALV grid, Now i want to put my own function code on the exit button(red one), and in user command i m trapping that function code, but no action is going to be done...evern break-point is also not working in the user command...i mean control is not going on..

Pleas assist me..

Regards,

pradeep phogat

4 REPLIES 4

Former Member
0 Kudos

put break point in usercommand.

and chk it.

else.

chk case sensitive. upper case or lower case.

Former Member
0 Kudos

Hi,

Check whether in your EVENTCAT, u have done this or not

call function 'REUSE_ALV_EVENTS_GET'

exporting

i_list_type = 0

importing

et_events = p_i_eventcat

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 p_i_eventcat with key name = slis_ev_pf_status_set into i_event.

if sy-subrc = 0.

<b>move 'SET_PF_STATUS' to i_event-form.</b> append i_event to p_i_eventcat.

endif.

and in the REUSE_ALV_GRID_DISPLAY,

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = v_progname

<b> i_callback_pf_status_set = 'SET_PF_STATUS'</b> i_callback_user_command = 'USER_COMMAND'

i_callback_top_of_page = 'TOP_OF_PAGE'

i_grid_title = v_gridtitle

i_save = 'A'

is_layout = i_layout

it_fieldcat = i_fieldcat[]

it_sort = i_sortinfo

it_events = i_eventcat

*MENU SETTINGS.

form set_pf_status using rt_extab type slis_t_extab.

set pf-status 'ALV_MENU'.

endform. "SET_PF_STATUS

hope this helps.

regards,

Pritha.

Message was edited by:

Pritha Agrawal

Former Member
0 Kudos

Hello Pradeep,

you are setting your own PF-status in the report right.

create an user command

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = l_f_repid

is_layout = l_r_layout

it_fieldcat = g_t_fieldcat

i_callback_pf_status_set = 'PF_STATUS_SET'

i_callback_user_command = 'USER_COMMAND'

i_save = 'X'

TABLES

t_outtab = g_t_data

EXCEPTIONS

program_error = 1

OTHERS = 2.

create a form for the user command in that write the below code.

----


  • FORM secondarylist *

----


  • ........ *

----


  • --> RF_UCOMM *

  • --> RS *

----


FORM secondarylist USING rf_ucomm LIKE sy-ucomm

rs TYPE slis_selfield.

CLEAR sy-ucomm.

CASE r_ucomm.

WHEN 'EXIT' .

CLEAR r_ucomm.

SET SCREEN 0.

LEAVE SCREEN.

ENDCASE.

ENDFORM.

keep the break point in the line case r_ucomm and execute the report and when u press the exit button(red button) then ur code will stop at this place and u can execute it manually.

Reward if useful.

Regards,

Phani.

Former Member
0 Kudos

Hi, Post your code plz.