Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata
Code Example
Error rendering macro 'code': Invalid value specified for parameter 'lang'
" class for registration of double click event
*----------------------------------------------------------------------*
*       CLASS lcl_double_click DEFINITION
*----------------------------------------------------------------------*
CLASS lcl_double_click DEFINITION.
  PUBLIC SECTION.
    METHODS constructor.
ENDCLASS.                    "lcl_double_click DEFINITION
*----------------------------------------------------------------------*
*       CLASS lcl_double_click IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS lcl_double_click IMPLEMENTATION.
*  public section.
  METHOD constructor.
    TYPE-POOLS sydb0.
    FIELD-SYMBOLS:
      <ft_tabs> TYPE sydb0_tabs_t,
      <fs_tabs> LIKE LINE OF <ft_tabs>.
    ASSIGN ('(RSDBRUNT)CURRENT_SCREEN-TABS[]') TO <ft_tabs>.
    APPEND INITIAL LINE TO <ft_tabs> ASSIGNING <fs_tabs>.
    " sy-ucomm of double click event
    <fs_tabs>-fcode = 'OPTI'.
    " part of forms name
    <fs_tabs>-name = 'DOUBLE_CLICK'.
    <fs_tabs>-dynnr = sy-dynnr.
    <fs_tabs>-program = sy-repid.
    SORT <ft_tabs>.
  ENDMETHOD.                    "constructor
ENDCLASS.                    "lcl_double_click IMPLEMENTATION

DATA go_double_click TYPE REF TO lcl_double_click.

TABLES mara.
PARAMETERS p_matnr TYPE matnr.
SELECT-OPTIONS s_matnr FOR mara-matnr.

INITIALIZATION.
  SELECT SINGLE matnr INTO p_matnr FROM mara.
  IF go_double_click IS INITIAL.
    CREATE OBJECT go_double_click.
  ENDIF.

  " form name is defined as '%_linkb_' + part of forms name
  " "part of forms name" is defined in constructor
  " of class lcl_double_click (<fs_tabs>-name = 'DOUBLE_CLICK'.)
*&---------------------------------------------------------------------*
*&      Form  %_linkb_double_click
*&---------------------------------------------------------------------*
FORM %_linkb_double_click USING uv_repid uv_form uv_subrc. "
  TABLES screen.
  DATA lv_field TYPE screen-name.
  GET CURSOR FIELD lv_field.
  CHECK lv_field = 'P_MATNR'.
  MESSAGE 'Double click on parameter ''P_MATNR''' TYPE 'I'.
  SET PARAMETER ID 'MAT' FIELD p_matnr.
  CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
ENDFORM.                    "%_linkb_double_click