Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 12, 2007 at 07:07 AM

    put break point in usercommand.

    and chk it.

    else.

    chk case sensitive. upper case or lower case.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 12, 2007 at 07:11 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 12, 2007 at 08:28 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 12, 2007 at 08:31 AM

    Hi, Post your code plz.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.