Doble Click utilizando REUSE_ALV_GRID_DISPLAY

Al momento de llamar la función... Agregar i_callback_user_command = 'DOUBLE_CLIK'

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

i_callback_user_command = 'DOUBLE_CLIK'

i_callback_top_of_page = 'F0020_TOP_OF_PAGE'

i_save = 'A'

is_variant = w_var

is_layout = wa_layout

it_sort = i_sort

it_fieldcat = i_fieldcat

TABLES

t_outtab = i_output

EXCEPTIONS

program_error = 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.


Luego agregar el metodo.
FORM double_clik USING command LIKE sy-ucomm
                      selfield TYPE slis_selfield.
  CASE command.
    WHEN '&IC1'.
      READ TABLE i_output INTO wa_output INDEX selfield-tabindex.
 
      CASE selfield-fieldname.
        WHEN 'MATNR'.
          IF wa_output-matnr IS NOT INITIAL.
            SET PARAMETER ID 'MAT' FIELD wa_output-matnr.
            CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
          ELSE.
            MESSAGE s000(zm) WITH text-054.
          ENDIF.
        endcase.
    endcase.
endform.

Comentarios

Entradas populares de este blog

Direcciones en SAP

Funcion MD_CONVERT_MATERIAL_UNIT