REPORT CREATION_OF_ACTIVE_ICON.
INITIALIZATION.
IMPORT mytab-activetab FROM MEMORY ID 'TABSTRIP'.
CASE mytab-activetab.
WHEN 'UCOMM1'. mytab-dynnr = 100.
WHEN 'UCOMM2'. mytab-dynnr = 200.
WHEN 'UCOMM3'. mytab-dynnr = 300.
WHEN OTHERS.
tabb1-dynnr = 100.
ENDCASE.
START-OF-SELECTION.
EXPORT: tabb1-activetab TO MEMORY ID 'TABSTRIP'.
SHORT VERSION.
INITIALIZATION.
IMPORT mytab FROM MEMORY ID 'TABSTRIP'.
START-OF-SELECTION.
EXPORT: mytab TO MEMORY ID 'TABSTRIP'.
SYNTAX FOR CREATING THE EXISTING CONTEXT MENU.::
FORM on_ctmenu_text USING menu TYPE REF TO cl_ctmenu.
CALL METHOD menu->load_gui_status
EXPORTING program = prog
status = 'CON_MENU'
menu = menu .
CALL METHOD menu->set_default_function
EXPORTING fcode = 'list'.
ENDFORM.
CREATING A NEW CONTEXT MENU::
FORM on_ctmenu_text USING menu TYPE REF TO cl_ctmenu.
DATA new_menu TYPE REF TO cl_ctmenu.
CREATE OBJECT new_menu.
CALL METHOD new_menu->add_function
EXPORTING fcode = 'list'
text = text-001.
CALL METHOD new_menu->add_function
EXPORTING fcode = 'add'
text = text-002. CALL METHOD
new_menu->add_function
EXPORTING fcode = 'delete'
text = text-003.
CALL METHOD new_menu->add_submenu
EXPORTING menu = new_menu
text = text-005.
ENDFORM
SYNTAX FOR STATUS ICON:
CALL FUNCTION 'ICON_CREATE'
EXPORTING
NAME = 'icon name'
TEXT = 'text to be displayed'
INFO = 'tooltip text'•
No comments:
Post a Comment