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

Addition to ALV buttons

Hi

I want to add additional buttons next to ALV standard tool bar in my report.MMBE

These needs to take parameters from the displayed list or from the selection screen.

parameters should be matnr and plant.

how to do this?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2006 at 07:03 AM

    Hi.

    Create a GUI Status and

    use the Subroutine [F01_ALV_EVENT_PF_STATUS_SET].

    -


    FORM F01_ALV_EVENT_PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB.

    ......

    SET PF-STATUS 'ZD001'.

    ......

    ENDFORM.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 13, 2006 at 07:09 AM

    Push buttons in ALV

    1) Run your ALV program.

    2) Goto System option in the menu.

    3) select status.

    4) A screen will appear displaying the program name and gui menu name.

    viz. Program name = SAPLSLVC_FULLSCREEN

    Screen name = STANDARD_FULLSCREEN which is SAP standard toolbar for ALV

    5) now go to SE41.

    type the progname in the relevant field.

    type ur own menu name in the text box for status.

    6) Go to Status push button on the tool bar.

    type Program name = SAPLSLVC_FULLSCREEN

    Screen name = STANDARD_FULLSCREEN in the first two text boxes.

    This is the program name and the standard menu name for SAP.

    Now in the next two text boxes type ur program name and ur own menu name.

    and say copy.

    7) in the REUSE_ALV_GRID_DISPLAY function pass

    i_callback_pf_status_set = 'PF_STATUS_SET'

    and declare a form named

    ----


    • FORM PF_STATUS_SET *

    ----


    • *

    ----


    FORM pf_status_set USING extab TYPE slis_t_extab.

    Set pf-status ‘ZGUI_STATUS’.

    ENDFORM. " PF_STATUS_SET

    and set ur own function codes..

    Regards

    Pavan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 13, 2006 at 07:26 AM

    Hi,

    This might fulfil your requirement...

    Add User command functionality to ALVgrid report

    In order modify PF_STATUS of ALV grid report you need to perform the following steps:

    1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include:

    i_callback_pf_status_set = 'SET_PF_STATUS' statement.

    2. Create 'SET_PF_STATUS' FORM

    3. Create pf_status (i.e. 'ZNEWSTATUS').

    - It is recommend that you copy standard status'STANDARD' from function group SALV

    and modify it accordingly. ALV standard function codes always start with '&'.

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    i_callback_program = gd_repid

    i_callback_top_of_page = 'TOP-OF-PAGE'

    i_callback_pf_status_set = 'SET_PF_STATUS' "see FORM

    is_layout = gd_layout

    it_fieldcat = fieldcatalog[]

    i_save = 'X'

    tables

    t_outtab = it_ekko

    exceptions

    program_error = 1

    others = 2.

    ----


    • FORM SET_PF_STATUS *

    ----


    FORM set_pf_status USING rt_extab TYPE slis_t_extab.

    SET PF-STATUS 'ZNEWSTATUS'.

    "Copy of 'STANDARD' pf_status from fgroup SALV

    ENDFORM.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi.

      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

      EXPORTING

      I_CALLBACK_PROGRAM = SY-REPID

      I_CALLBACK_PF_STATUS_SET = 'Z6000_SET_STATUS'

      <i><b>I_CALLBACK_USER_COMMAND = 'Z1000_USER_COMMAND'</b></i>

      I_STRUCTURE_NAME = 'STRUCTURE_NAME'

      IS_LAYOUT = V_WA_LAYOUT

      IT_FIELDCAT = V_IT_FIELDCAT

      *IT_EXCLUDING = L_IT_EXTAB

      I_SAVE = 'A'

      IS_VARIANT = V_WA_VARIANT

      IT_EVENT_EXIT = L_IT_EVENT_EXIT

      TABLES

      T_OUTTAB = V_IT_ITAB

      EXCEPTIONS

      PROGRAM_ERROR = 1

      OTHERS = 2.

      FORM Z1000_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

      RS_SELFIELD TYPE SLIS_SELFIELD.

      "--- your process

      ENDFORM.

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.