A code sample on context menu

Context menu but I do not know how I can make it worked ...
FORM on_context_menu_request USING i_object TYPE REF TO cl_ctmenu .
*--Here you can add some logic to retrive what was clicked and
*--decide what to add to the context menu
CALL METHOD i_object->add_function
EXPORTING
fcode = 'UPDT'(200)
text = 'Update Record'(204) .
ENDFORM .
How will I use this fcode?
and where?
Thanks.

You can set the context menu fcode for a field in the screen painter. Look for property 'Context Menu form' in the properties.
In your example below, the fcode set was request, and hence the form is called on_context_menu_request.
As for the call_object function, a double click on the method name should take you to the method itself so you can figure out what is happening there?
Sudha
Message was edited by:
        Sudha Mohan

Similar Messages

  • Adding to MVC View Editor Context Menu

    Hi,
    Have written an add-in originally for visual studio 2005, which has been updated to work with VS2010, VS2012 and VS2013.
    I'm now at the point where I would like to add buttons to the MVC view editor context menu.
    I've enabled VSIPLogging, and the right click brings back the Name 'HTML Context'
    However it doesn't appear.
    Below is some example code, that works for the 'ASPX Context', but not for the 'HTML Context'
    object []contextGUIDS = new object[] { };
    Commands2 commands = (Commands2)_applicationObject.Commands;
    // Set the toolMenu to HTML Context and it doesn't work
    string toolsMenuName = "HTML Context";
    // Set the toolMenu to ASPX Context and it does work
    //string toolsMenuName = "ASPX Context";
    Microsoft.VisualStudio.CommandBars.CommandBar menuBarCommandBar = ((Microsoft.VisualStudio.CommandBars.CommandBars)_applicationObject.CommandBars)[toolsMenuName];
    try
     //Add a command to the Commands collection:
     Command command = commands.AddNamedCommand2(_addInInstance, "MyAddin1", "MyAddin1", "Executes the command for MyAddin1", true, 59,
      ref contextGUIDS, (int)vsCommandStatus.vsCommandStatusSupported+(int)vsCommandStatus.vsCommandStatusEnabled,
      (int)vsCommandStyle.vsCommandStylePictAndText, vsCommandControlType.vsCommandControlTypeButton);
     //Add a control for the command to the tools menu:
     if((command != null) && (menuBarCommandBar != null))
      menuBarCommandBar.Controls.Add(Microsoft.VisualStudio.CommandBars.MsoControlType.msoControlPopup, System.Type.Missing, System.Type.Missing, 1, true);
    catch(System.ArgumentException)
     //If we are here, then the exception is probably because a command with that name
     //  already exists. If so there is no need to recreate the command and we can
     //  safely ignore the exception.
    Many thanks for any help on this.
    Cheers
    James

    Hi James,
    I did a little change to your code and it works fine to add a command button to the .cshtml and .aspx code editor's context menu.
    public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
    _applicationObject = (DTE2)application;
    _addInInstance = (AddIn)addInInst;
    if(connectMode == ext_ConnectMode.ext_cm_UISetup)
    object[] contextGUIDS = new object[] { };
    Commands2 commands = (Commands2)_applicationObject.Commands;
    // Set the toolMenu to HTML Context and it doesn't work
    string toolsMenuName = "HTML Context";
    // Set the toolMenu to ASPX Context and it does work
    //string toolsMenuName = "ASPX Context";
    Microsoft.VisualStudio.CommandBars.CommandBar menuBarCommandBar = ((Microsoft.VisualStudio.CommandBars.CommandBars)_applicationObject.CommandBars)[toolsMenuName];
    try
    //Add a command to the Commands collection:
    Command command = commands.AddNamedCommand2(_addInInstance, "MyAddin1", "MyAddin1", "Executes the command for MyAddin1", true, 59,
    ref contextGUIDS, (int)vsCommandStatus.vsCommandStatusSupported + (int)vsCommandStatus.vsCommandStatusEnabled,
    (int)vsCommandStyle.vsCommandStylePictAndText, vsCommandControlType.vsCommandControlTypeMRUButton);
    //Add a control for the command to the tools menu:
    if ((command != null) && (menuBarCommandBar != null))
    {//msoControlPopup
    //menuBarCommandBar.Controls.Add(Microsoft.VisualStudio.CommandBars.MsoControlType.msoControlButton, System.Type.Missing, System.Type.Missing, 1, true);
    command.AddControl(menuBarCommandBar, 1);
    catch (System.ArgumentException)
    //If we are here, then the exception is probably because a command with that name
    // already exists. If so there is no need to recreate the command and we can
    // safely ignore the exception.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Missing " Create Sample Java Client" from the context menu when debugging

    Jdev 11.1.1.3 on Windows 7 x64
    I have created an EJB - Session Bean from the ADF components and have put some logic into it with one public method.
    I have exposed the method in the local interface.
    I start the integrated server in the debug mode
    When I right-click there is no option to do the sample client.
    Am I missing a plug-in - like JUnit or something?
    From the manual:
    The integrated Oracle WebLogic Server runs within JDeveloper. You can run and test EJBs quickly and easily using this server, and then deploy your EJBs with no changes to them. You do not need to create a deployment profile to use this server, nor do you have to initialize it.
    To run a sample client on the integrated Oracle WebLogic Server: In the Application Navigator, right-click on an EJB and choose Run.
    Notice in the Message pane that Oracle WebLogic Server has been launched. Right-click on an EJB and choose Create Sample Java Client from the context menu. The default choice is to create a client for the integrated Oracle WebLogic Server, so click OK.
    The client is created and opens in the code editor. If your session bean serves as a facade over JPA entities, code is generated to instantiate the query methods. If you exposed methods on your bean, the generated client contains methods that can be uncommented to call them.
    After your EJB has been successfully started from the Application Navigator, right-click on the sample client and choose Run.

    Shay,
    Pretty much what I did exactly - except - since my apps are all using the local interface - I did not create the remote.
    This may be an old habit - but generally it is not a good practice to do both - though this may have changed lately.
    I have this app working and the EJBs are executing fine.
    I used a testview and drug the method onto it - and was able to debug it that way - but still no create java client in the menu.
    Is there any other place to find this other than the context menu? Then I can check to see if it is available.
    I am using WLS 10.3 that ships with Jdev 11.1.1.3 (forgot that little bit) without any changes.

  • Define F-Code for ALV Button & context menu for ALV table

    Hi,
    I have some Buttons in ALV Toolbar like for example 'copy row'. Is it in browser environment possible to assign f-code to the button? Like by pushing e.g. F4 the method for 'copy row' action is fired?
    Or additionaly, is it possible to define a custom context menu in alv table?
    Thanks in advance,
    Tan

    Hi Tan,
    This Functionality is working on..Pelase check this...
    Re: How to improve Web accessibility with Function keys
    Re: Hot key(Ctrl+F1) for More field help not working
    Re: GUI Status?
    For help..
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/b951297a6d2d65e10000000a42189c/content.htm
    Cheers,
    Kris.
    Edited by: kissnas on Jun 21, 2011 11:46 AM

  • Limit context menu Items

    Hi Experts,
    I am accessing reports from portal.
    When I right click on my report I get a context menu with three BROADCASTING OPTIONS, namely:
    1. Broadcast to e-mail.
    2. Broadcast to Portal
    3. Broadcast to Printer.
    Now I want to remove the option 3. from the context menu itself.
    here is a sample code of XHTML
    <bi:CONTEXT_MENU_ITEM name="CONTEXT_MENU_ITEM_1" designheight="70" designwidth="300" >
                        <bi:MENU_BACK value="" />
                        <bi:MENU_BACK_TO_START value="" />
                        <bi:MENU_SORT value="" />
                        <bi:MENU_BROADCASTER value="X" />
                        <bi:MENU_FILTER value="" />
                        <bi:MENU_FILTER_ON_AXIS value="" />
                        <bi:MENU_SELECT_FILTER value="" />
    any Idea?
    kind Regards
    Frank

    Thank you everybody for your input and advice! I've deleted the virus software, but if I use any in the future I'll be sure to have only one installed. I initally downloaded multiple ones, but only ran one (VirusBarrier).
    I restored from a Time Machine backup with the help of Apple tech support to before I ran CCleaner (never running something like that again) and the problem fixed itself.
    I will have to be far more wary of running programs in the future. Thank you again for everybody's input and advice!
    (below is what it looked like, or kind of like, before.)

  • Java swing popupmenu / context menu does not appear in secondary monitor

    Main screen left
    second screen right
    swing portal application is visible on two screens.
    If you open a context menu (right mouse) on the right screen, the context menu open on the left (Main) screen instead of the right.

    Thank you very much for the replying.
    The below are my use cases :
    1. JDK 7 used.
    2. OS - Ubuntu/windows XP/2008
    3. Tested with extending more than 1 monitors, i.e. Laptop / primary monitors are attached with other secondary monitors attached and then running swing portal        application.
    4. This happens when you use "Extended Desktop" with two screens.
        Main screen left
        Second screen right
        Portal is visible on two screens.
        Open a context menu (right mouse) on the right screen, the context menu open on the left (Main) screen instead of the right
    The below is the sample of code of the file that actually open up the popups. The bold italics methods are the call hierarchy that are responsible to finally call the showPopupMenu().
    private synchronized void handleMouseEvent( final IDirNodeMouseEvent e ) {
            if ( e.getMEvent().isPopupTrigger() ) {
                Thread thread = new Thread(
                        new Runnable() {
                            public void run() {
                                JNDITreeNode node = (JNDITreeNode) e.getNodeAtEventLocation();
                                System.out.println(" --- handleMouseEvent ---");
                                createPopupMenu(e.getMEvent().getPoint(), e.getMEvent().getComponent(), node);
                thread.start();
    private synchronized void createPopupMenu(final Point point, final Component c, JNDITreeNode node) {
            contextMenuDN = node.getDn();
            CursorHelper cursorHelper = CursorHelper.showWaitCursor(c);
            com.marconi.platform.cvb.bcmp.security.AbstractDNPanel.registerJndiTreeNode(node);
            ContextMenuFactory contextMenuFactory = new ContextMenuFactory ( context );
            contextMenuFactory.setAttributeViewDisplayText(node.getDisplayText());
            TreeNodeDescriptor treeNodeDescriptor = new TreeNodeDescriptor(
                    node.getDn(),
                    node.getDirData()
            boolean searchContextAvailable = true;
            JNDIData data = node.getDirData();
            Attributes attrs = data.getAttributes();
            Attribute a = attrs.get("mSearchContextAvailable");
            try
              if (a != null)
                    String value = (String)a.get();
                    if (value.equalsIgnoreCase("FALSE"))
                        searchContextAvailable = false;
            catch (NamingException ne)
            jMenuItemSearch.setEnabled(searchContextAvailable);
            JPopupMenu menu = contextMenuFactory.getPopupContextMenu( treeNodeDescriptor );
            menu.addSeparator();
            menu.add( jMenuItemCollapseAll );
            menu.add( jMenuItemSearch );
            if ( contextMenuDN != null ) {
                menu.add(jMenuItemUpdate);
            MUtils.showPopupMenu(menu, point, c);
            cursorHelper.showDefaultCursor();
       * MUtils ensures that the whole popup menu is visible, performs a cleanup before showing.
       * @param popupMenu the menu to be shown
       * @param mouseClickPoint where the mouse has been clicked
       * @param c the component on which to show the popup menu
       * @see cleanupMenu
        public static void showPopupMenu( final JPopupMenu popupMenu, final Point mouseClickPoint, final Component c) {
        if ( popupMenu.getComponentCount() == 0 ) return;
        cleanupMenu( popupMenu );
        if ( autoAssigningMnemonics ) {
          assignMnemonics( popupMenu );
        final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        final Point result = new Point(mouseClickPoint);
        SwingUtilities.convertPointToScreen( result, c);
        Dimension popupSize = popupMenu.getPreferredSize();
        popupSize.height = popupSize.height + 30; // as Windows TaskBar is overlapping always
          if ( popupSize != null ) {
          if ( result.getX() + popupSize.getWidth() > screenSize.getWidth() ) {
            result.setLocation( screenSize.getWidth() - popupSize.getWidth() , result.getY() );
          if ( result.getY() + popupSize.getHeight() > screenSize.getHeight() ) {
            result.setLocation( result.getX(), screenSize.getHeight() - popupSize.getHeight() );
        result.x = Math.max( 0, result.x );
        result.y = Math.max( 0, result.y );
        SwingUtilities.convertPointFromScreen( result, c );
        javax.swing.SwingUtilities.invokeLater(
          new Runnable() {
            public void run() {
                popupMenu.show( c, (int) result.getX(), (int) result.getY());
    Please let me know your feedback. Need to confirm whether this issue is really exists or not.

  • ALV: Right Button Click and Context Menu

    Hi Experts,
    I have to implement an ALV which should act on a right button click and show a context menu.
    Is this possible? I found only events for "on_double_click" or "on_link_click" and is it possible to show a context menu?
    Thanks in advanced.
    Best regards,
    Markus

    Hello Markus
    The relevant events are:
    CONTEXT_MENU_REQUEST
    USER_COMMAND
    Have a look at my sample report ZUS_SDN_ALV_CONTEXT_MENU_1.
    *& Report  ZUS_SDN_ALV_CONTEXT_MENU_1
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="910750"></a>
    *& Thread: ALV: Right Button Click and Context Menu
    *& Flow logic of screen 100 (no screen elements; ok_code = GD_OKCODE)
    *&    PROCESS BEFORE OUTPUT.
    *&      MODULE STATUS_0100.
    *&    PROCESS AFTER INPUT.
    *&      MODULE USER_COMMAND_0100.
    REPORT  zus_sdn_alv_context_menu_1.
    DATA:
      gd_okcode        TYPE ui_func,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_cell_top      TYPE REF TO cl_gui_container,
      go_cell_bottom   TYPE REF TO cl_gui_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      gs_layout        TYPE lvc_s_layo.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_knvv          TYPE STANDARD TABLE OF knvv.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender,
          handle_context_menu_request FOR EVENT context_menu_request
                                                     OF cl_gui_alv_grid
            IMPORTING
              e_object
              sender,
          handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
            IMPORTING
              e_ucomm
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          ls_knb1      TYPE knb1.
        CHECK ( sender = go_grid1 ).
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
        CALL METHOD go_grid1->set_current_cell_via_id
          EXPORTING
    *        IS_ROW_ID    =
    *        IS_COLUMN_ID =
            is_row_no    = es_row_no.
    *   Triggers PAI of the dynpro with the specified ok-code
        CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
      ENDMETHOD.                    "handle_double_click
      METHOD handle_context_menu_request.
    *   define local data
        DATA: lt_fcodes    TYPE ui_funcattr,
              ls_fcode     TYPE uiattentry,
              ls_func      TYPE ui_func,
              lt_func      TYPE ui_functions.
        "   Inactivate all standard functions
        CALL METHOD e_object->get_functions
          IMPORTING
            fcodes = lt_fcodes.
        LOOP AT lt_fcodes INTO ls_fcode.
          ls_func = ls_fcode-fcode.
          APPEND ls_func TO lt_func.
        ENDLOOP.
        e_object->disable_functions( lt_func ).
    "   Add new functions
        e_object->add_separator( ).
        CALL METHOD e_object->add_function
          EXPORTING
            fcode = 'XD03'
            text  = 'Call Transaction'.
        CALL METHOD e_object->add_function
          EXPORTING
            fcode = 'DETAILS'
            text  = 'Display Details'.
      ENDMETHOD.                    "handle_context_menu_request
      METHOD handle_user_command.
    *   define local data
        DATA:
          ls_knb1   TYPE knb1,
          ls_row    TYPE lvc_s_row,
          ls_col    TYPE lvc_s_col.
        "   NOTE: in case of CL_GUI_ALV_GRID the functions of a context menu
        "         are handled in method USER_COMMAND.
        CHECK ( e_ucomm = 'XD03'      OR
                e_ucomm = 'DETAILS' ).
        CALL METHOD sender->get_current_cell
          IMPORTING
            es_row_id = ls_row
            es_col_id = ls_col.
        CASE e_ucomm.
          WHEN 'XD03'.
            READ TABLE gt_knb1 INTO ls_knb1 INDEX ls_row-index.
            SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
            SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
            CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
          WHEN 'DETAILS'.
      "       NOTE: only for the sake of simplicity the event handler method
            "             is called
            CALL METHOD lcl_eventhandler=>handle_double_click
              EXPORTING
                e_row  = ls_row
                sender = go_grid1.
          WHEN OTHERS.
        ENDCASE.
      ENDMETHOD.                    "handle_user_command
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = '1000'.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = 2
          columns           = 1
    *      NO_AUTODEF_PROGID_DYNNR =
    *      NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Get cell container
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_top.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = go_cell_bottom.
    * Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_cell_top
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Set event handler
      SET HANDLER:
        lcl_eventhandler=>handle_double_click         FOR go_grid1,
        lcl_eventhandler=>handle_context_menu_request FOR go_grid1,
        lcl_eventhandler=>handle_user_command         FOR go_grid1.
      CREATE OBJECT go_grid2
        EXPORTING
          i_parent          = go_cell_bottom
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Display data
      gs_layout-grid_title = 'Customers'.
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNB1'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knb1
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      gs_layout-grid_title = 'Customers Details (Sales Areas)'.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNVV'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knvv  " empty !!!
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    *  MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    *  MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    *  SET TITLEBAR 'xxx'.
    * Refresh display of detail ALV list
      CALL METHOD go_grid2->refresh_table_display
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
        EXCEPTIONS
          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.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
    *   User has pushed button "Display Details"
        WHEN 'DETAIL'.
          PERFORM entry_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  ENTRY_SHOW_DETAILS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM entry_show_details .
    * define local data
      DATA:
        ld_row      TYPE i,
        ls_knb1     TYPE knb1.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      SELECT        * FROM  knvv INTO TABLE gt_knvv
             WHERE  kunnr  = ls_knb1-kunnr.
    ENDFORM.                    " ENTRY_SHOW_DETAILS
    Regards
      Uwe

  • How to make visible context menu for nodes of the given level of treeTable?

    Hello
    I'm using JDeveloper 11g 10.1.1.4
    I have a TreeTable component with 4 different levels (Contry-Branch-Town-Object).
    I need to show custom elements of the context menu (right click of the muse) only for rows with "Object".
    Now, I'm doing it with the aid of property "visible":
                <af:commandMenuItem text="Open" id="cmi1" immediate="true"
                                    visible="#{backingBeanScope.mbMObjectsRegistry.MObjectNode}"
                                    actionListener="#{backingBeanScope.mbMObjectsRegistry.btOpenMObject}"/>
        public boolean isMObjectNode() {
            Object oldRowKey = treeTableMObjectsRegistry.getRowKey();
            try {
                AppViewRowImpl row =
                    BindingUtils.getSelectedRowTreeTable(treeTableMObjectsRegistry);
                if (row == null || !isMOBjectRow(row)) {
                    return false;
                return isMOBjectRow(row);
            } finally {
                treeTableMObjectsRegistry.setRowKey(oldRowKey);
        private boolean isMOBjectRow(AppViewRowImpl row) {
            return (row != null) && (row instanceof MObjectsRegisterMORowImpl);
        }That works, but the problem is that it works a little bit slow, particulary if I have 5 or more menu items.
    Each menu item calls the metod isMObjectNode() 3 times per one opening of the menu.
    The question is: maybe, there is a method to calculate level of the selected node? Or, there is other variant?
    Anatolii

    You can use the following sample to develop your usecase.
    Here, we would show menu items only for the nodes at level 3.
    You can also download the entire sample based on POJO at
    http://adfsampleapplications.googlecode.com/svn/trunk/TreeSampleApplication.zip
    The code is self explanatory.
    Let know, if you have any specific questions.
    <af:form id="f1">
    <af:treeTable value="#{bindings.continents.treeModel}" var="node"
    selectionListener="#{bindings.continents.treeModel.makeCurrent}"
    rowSelection="single" id="tt1" columnStretching="last">
    <f:facet name="nodeStamp">
    <af:column id="c1">
    <af:outputText value="#{node}" id="ot2"/>
    </af:column>
    </f:facet>
    <f:facet name="pathStamp">
    <af:outputText value="#{node}" id="ot1"/>
    </f:facet>
    *<f:facet name="contextMenu">*
    *<af:popup id="p1" contentDelivery="lazyUncached">*
    *<af:setPropertyListener from="#{bindings.continents.treeModel.depth}"*
    *to="#{pageFlowScope.CurrentDepth}"*
    *type="popupFetch"/>*
    *<af:menu text="menu 1" id="m2">*
    *<af:commandMenuItem text="View Districts" id="cmi1"*
    *visible="#{pageFlowScope.CurrentDepth == 2 ? true : false}"/>*
    *<af:commandMenuItem text="View Attractions" id="cmi2"*
    *visible="#{pageFlowScope.CurrentDepth == 2 ? true : false}"/>*
    *</af:menu>*
    *</af:popup>*
    *</f:facet>*
    </af:treeTable>
    </af:form>
    Thanks,
    Navaneeth

  • Laura, I need some code samples you mentioned...

    Laura,
    I posted a message a few days ago regarding calling Stored Procedures in my JDev 3.1 (JDK 1.2.2) BC4J application. I need to be able to call them two different ways. The first involves passing some parameters to the SP and recieving back the ResultSet. In the other instance I simply need to make a call to them to perform some tasks on the DB side. Nothing will be returned from these SP's. You discussed implementing the SQL as a VO and gave me some code showing me how I might do this. You also mentioned that it is possible to create a method on the AppMod and call this from the JSP client. I need to know which method should work best for me and to get the code samples for the second option.
    Thanks.
    Rob

    Hi,
    Here is the code I used for the custom method on my VO (same could be used from the app module rather than a specific VO). The stored procedure I am calling here performs some calculations and returns an integer value:
    public int getTotalHits(String mon, String year) {
    CallableStatement stmt = null;
    int total;
    String totalhits = "{? = call walkthru.total_hits(?,?)}";
    stmt = getDBTransaction().createCallableStatement(totalhits, 1);
    try
    // Bind the Statement Parameters and Execute this Statement
    stmt.registerOutParameter(1,Types.INTEGER);
    stmt.setString(2,mon);
    stmt.setString(3,year);
    stmt.execute();
    total = stmt.getInt(1);
    catch (Exception ex)
    throw new oracle.jbo.JboException(ex);
    finally
    try
    stmt.close();
    catch (Exception nex)
    return total;
    After adding the custom method to your appmoduleImpl.java file and rebuilt your BC4J project, do the following:
    1. Select the Application Module object and choose Edit from the context menu.
    2. Click on the Client Methods page. You should see the method you added in the Available list.
    3. Select the method and shuttle it to the Selected list.
    4. Click Finish. You should see a new file generated under the application module object node in the Navigator named appmodule.java that contains the client stubs for your method.
    5. Save and rebuild your BC4J project.
    I wrote a custom web bean to use from my JSP page to call the method on my VO:
    public class GetTotals extends oracle.jdeveloper.html.DataWebBeanImpl {
    public void render() {
    int totalhits;
    try
    Row[] rows;
    // Retrieve all records by default, the qView variable is defined in the base class
    qView.setRangeSize(-1);
    qView.first();
    rows = qView.getAllRowsInRange();
    // instantiate a view object for our exported method
    // and call the stored procedure to get the total
    ViewObject vo = qView.getViewObject();
    wtQueryView theView = (wtQueryView) vo;
    totalhits = theView.getTotalHits(session.getValue("m").toString(),session.getValue("y").toString());
    out.println(totalhits);
    } catch(Exception ex)
    throw new RuntimeException(ex.getMessage());
    I just call the render method on this custom web bean from the JSP. I am not passing parameters to the render method of the bean, but instead access the parameters I need from the session:
    session.getValue("m").toString()
    I set these session parameters from the JSP that is called when the user submits their query criteria form. For example:
    // get the view parameter from the form String month = request.getParameter("month");
    String year = request.getParameter("year");
    // store the information for reference later session.putValue("m", month); session.putValue("y", year);
    Hope this helps.

  • Is it possible to create a context menu, which is launched by right mouse button click event?

    The question is following: when you are pushing right button in the window of a working vi you see the build-in context menu of labview. Is it possible to customize it, or create the new one?
    www.xinstruments.com
    Custom Software for Industrial Automation
    www.hdrconverter.com
    Picture processing made easy

    There's no nuilt-in LabVIEW function or tool to do it, but Dave Ritter published an artical in the LabVIEW Technical Resource last year that described how to do this. It uses the Event Structure so you need to have at least LabVIEW 6.1.
    You can read a bit of the artical here. There's also a link on the bottom of the page where you can purchase that issue to get the entire artical and sample code.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • HtmlB tree context menu

    Hi guys,
    do you if it is possible to add a context menu on an htmlb tree?
    regards,
    Marc

    Hi Marc,
         You can use the hover menu which works as a context menu.
    The below code is just a sample.
    TreeNode name1 = new TreeNode(strid, strtext, name);
    //you to have build the hovermenu
    HoverMenu menu = new HoverMenu("test");
    name1.setHoverMenu(menu);

  • How do I create a context menu in the new CL_SALV

    I like a function xx in context menu. How do I create a context menu in the  CL_SALV ?
    thank you!
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        TYPES: t_proc TYPE zmp_c00_pr_d,
               tt_proc TYPE STANDARD TABLE OF t_proc,
               tt_proces_subpr TYPE TABLE OF ltyp_proces_subpr.
        CLASS-DATA: lr_context TYPE REF TO cl_gui_alv_grid,
        r_selections TYPE REF TO cl_salv_selections,
        lr_menu type ref to cl_ctmenu.
        CLASS-METHODS: main CHANGING ct_zmp_c00_pr_d TYPE tt_proc
                                     ct_proces_subpr TYPE tt_proces_subpr
                                     cv_screen TYPE i.
      PRIVATE SECTION.
        CLASS-DATA lt_zmp_c00_pr_d TYPE TABLE OF zmp_c00_pr_d.
        CLASS-DATA ls_process TYPE zmp_c00_pr_d.
        CLASS-METHODS: handle_double_click
                   FOR EVENT double_click  OF cl_salv_events_table
                   IMPORTING row column,
                   detail
                   IMPORTING l_objkey TYPE zmp_c00_pr_d-objkey.
    ENDCLASS.                    "lcl_events DEFINITION
    * CLASS lcl_event_handler IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD main.
        DATA: lr_alv TYPE REF TO cl_salv_table,
              lr_events TYPE REF TO cl_salv_events_table,
              lr_columns TYPE REF TO cl_salv_columns,
              lt_col_tab TYPE salv_t_column_ref.
        FIELD-SYMBOLS <column> LIKE LINE OF lt_col_tab.
        IF r_container IS INITIAL.
          CREATE OBJECT r_container
            EXPORTING
              container_name              = 'CONTAINER'
            EXCEPTIONS
              cntl_error                  = 1
              cntl_system_error           = 2
              create_error                = 3
              lifetime_error              = 4
              lifetime_dynpro_dynpro_link = 5
              OTHERS                      = 6.
          IF sy-subrc <> 0.
            MESSAGE i004(z_pm_tool).
          ENDIF.
    *Für Dynpro 1400
          IF cv_screen = '1400'.
            TRY.
                CALL METHOD cl_salv_table=>factory
                  EXPORTING
    *    list_display   = IF_SALV_C_BOOL_SAP=>FALSE
                    r_container    = r_container
                  IMPORTING
                    r_salv_table   = r_alv
                  CHANGING
                    t_table        = ct_proces_subpr.
              CATCH cx_salv_msg .
            ENDTRY.
            TRY.
    * zeige die Daten
                r_alv->display( ).
                IF sy-subrc NE 0.
                  MESSAGE i001(z_pm_tool).
                ENDIF.
              CATCH cx_salv_msg.
            ENDTRY.
          ENDIF.
    * Für Dynpro 1100
          TRY.
              CALL METHOD cl_salv_table=>factory
                EXPORTING
    *    list_display   = IF_SALV_C_BOOL_SAP=>FALSE
                  r_container    = r_container
                IMPORTING
                  r_salv_table   = r_alv
                CHANGING
                  t_table        = ct_zmp_c00_pr_d  .
            CATCH cx_salv_msg .
          ENDTRY.
          TRY.
    * zeige die Daten
              r_alv->display( ).
              IF sy-subrc NE 0.
                MESSAGE i001(z_pm_tool).
              ENDIF.
            CATCH cx_salv_msg.
          ENDTRY.
    *Ereignisobjekt holen
          lr_events = r_alv->get_event( ).
    ** get the SELECTIONS object
    *r_selections = r_alv->get_selections( ).
    * Interne-Tabelle füllen und an die Methode handle_double_click übergeben
          LOOP AT ct_zmp_c00_pr_d INTO ls_process.
            APPEND ls_process TO lt_zmp_c00_pr_d.
          ENDLOOP.
    * Zeiger auf Container für Kontexmenu
          CREATE OBJECT lr_context
            EXPORTING
              i_parent = r_container.
          DATA: lt_events TYPE cntl_simple_events.
          CALL METHOD lr_context->set_registered_events
            EXPORTING
              events                    = lt_events
            EXCEPTIONS
              cntl_error                = 1
              cntl_system_error         = 2
              illegal_event_combination = 3
              OTHERS                    = 4.
          IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    * Interne-Tabelle füllen und an die Methode handle_double_click übergeben
          LOOP AT ct_zmp_c00_pr_d INTO ls_process.
            APPEND ls_process TO lt_zmp_c00_pr_d.
          ENDLOOP.
    * Event: Add Function
          SET HANDLER: on_added_function FOR lr_events.
    * Event: Kontexmenu
    *      SET HANDLER: on_context_menu_request FOR lr_context.
    * Event: Doppelklick
          SET HANDLER handle_double_click FOR lr_events.
    * get the SELECTIONS object
          r_selections = r_alv->get_selections( ).
    * Einzelne Spalte holen
          lr_columns = r_alv->get_columns( ).
    * Doppelklick funktioniert nur auf das Feld OBJKEY
          LOOP AT lt_col_tab ASSIGNING <column>.
            <column>-r_column->set_output_length( 20 ).
            IF <column>-columnname = 'OBJKEY'.
              <column>-r_column->set_visible( 'X' ).
            ELSE.
              <column>-r_column->set_visible( ' ' ).
            ENDIF.
          ENDLOOP.
          IF lt_col_tab IS NOT INITIAL AND sy-subrc <> 0.
            MESSAGE i002(z_pm_tool).
          ENDIF.
        ENDIF.
      ENDMETHOD.                    "main
      METHOD handle_double_click.
        FIELD-SYMBOLS <fs_zmp_c00_pr_d> TYPE zmp_c00_pr_d.
        READ TABLE lt_zmp_c00_pr_d INDEX row ASSIGNING <fs_zmp_c00_pr_d>. " vor dem Changing Parameter der Klasse
    *    READ TABLE ct_zmp_c00_pr_d INDEX row ASSIGNING <fs_zmp_c00_pr_d>.
        IF sy-subrc <> 0.
          RETURN.
        ENDIF.
        IF column = 'OBJKEY'.
          lcl_event_handler=>detail( <fs_zmp_c00_pr_d>-zz_slotid_a ).
        ENDIF.
      ENDMETHOD.                    "handle_double_click
      METHOD detail.
        DATA: lr_alv TYPE REF TO cl_salv_table,
              lt_alv_tab TYPE TABLE OF zmp_p00_sp_d.
    * Subprozess holen
        SELECT * FROM zmp_p00_sp_d INTO TABLE lt_alv_tab
          WHERE objkey = l_objkey.
        IF sy-subrc <> 0.
          MESSAGE i003(z_pm_tool).
        ENDIF.
        TRY.
    * Neu erzeugte Instanz für ALV-Tabellenobjekt holen
            cl_salv_table=>factory( IMPORTING r_salv_table = lr_alv
                                     CHANGING t_table = lt_alv_tab ).
    * Ausgabe Fenster für SubScreens
            lr_alv->set_screen_popup( start_column = 1
                                   end_column = 130
                                   start_line = 1
                                   end_line = 10 ).
    * Anzeige der Daten
            lr_alv->display( ).
            IF sy-subrc <> 0.
              MESSAGE i001(z_pm_tool).
            ENDIF.
          CATCH cx_salv_msg.
        ENDTRY.
      ENDMETHOD.                    "detail
    ENDCLASS."lcl_event_handler IMPLEMENTATION
    Edited by: polaris1 on Dec 15, 2010 12:18 PM

    Can't read that jumble, but suggest you look at the excellent SALV tutorials by Rich Heilman by searching for SALV tutorial on SCN.  You'll find working code and how-to for adding your own functions to SALV.

  • How to create a context menu in ALV table cell editor(Webdynpro abap )

    Hello Experts,
    I am having a problem in creating a context menu in a table cell editor in the ALV table output.I have assigned a 'lta' as the cell editor.But befor assigning the lta as cell editor I have assigned the menu to the lta.But when the view is rendered I can see the lta with the actioned assigned to it.But I cannot see the context menu.
    The code snippet below:
      "Create menu for each coloumn
      create OBJECT lo_menu_actions type CL_SALV_WD_VE_MENU EXPORTING
          id = 'MITM_ACTIONS'.
      lo_menu_actions->set_visible( value = abap_true ). 
      lo_menu_actions->set_visible_fieldname( value = 'ACTIONS' ).
      "ADd menu items
      CREATE OBJECT lo_menu_item_create type CL_SALV_WD_VE_MENU
      exporting
        id = 'MITM_CREATE_EXPRESSION'.
      lo_menu_item_create->set_visible( value = abap_true ).
      lo_menu_item_create->set_visible_fieldname( value = 'Create' ).
      "Add item 1
      lo_menu_actions->ADD_ITEM( VALUE = lo_menu_item_create ). 
      "  Set the cell editor for each column cell(link to an action)
      LOOP AT lt_node_dec_tab_cols INTO ls_node_dec_tab_cols .
        lv_column_name = ls_node_dec_tab_cols-object_name.
        lr_column = lr_column_settings->get_column( lv_column_name ).
       "Create 'lta' Ui item
        CREATE OBJECT lo_lta TYPE cl_salv_wd_uie_link_to_action.
        lo_lta->set_menu( value = lo_menu_actions ).
        lo_lta->set_text_fieldname( lv_column_name ).
        lr_column->set_cell_editor( lo_lta ).
        IF ls_node_dec_tab_cols-is_result EQ abap_true.
          lr_column->set_cell_design( value =
                      cl_wd_table_column=>e_cell_design-key_medium ).
        ENDIF.
      ENDLOOP.

    Hi Prakash,
    I have not come across this requirement till now to have context menu in a cell editor of alv.
    Unfortunately  the implementation of method SET_MENU of alv ui elements ( ex: cl_salv_wd_uie_text_view ) is not updating alv configurable table, instead it just stores in a global attribute as string. Hence has no effect on context menu.
    If your user is very particular about this requirement of having context menu in cell editor, you can go for a normal table. Because, normal table's cell editor has the property to set the menuID as we do it for other ui elements.
    Regards,
    Rama

  • Deleting a row from matrix by context menu

    Hi all
    does anyone know how can i cause right click on mouse button. on a certain row within a matrix to show a context menu with the option to delete the row. and when pressing the menu item handling the event of deleting the row from the matrix?
    appreciate the help
    Yoav

    Hi Yoav,
    Simply, 'context menu' have to be handled with 'menu event' object.
    It can be done by 'flushToDataSource' method and some tricks.
    Basically, method delete the row without any clause of addon code.
    But it's only can be done in display side.
    If you're using DBDataSource, you have to flush to the datasource.
    I mean, you have to update datasource with the data displayed in the matrix.
    and then, delete the last row of the datasource.
    FlushToDataSource doesn't affect to the number of rows in the datasource.
    You have to delete a row with a method of DBDatasource.. I can't remember the name.
    If, the matrix uses userdatasource, you don't need to delete a row in datasource.
    Because userdatasource doesn't have a concept of 'row', actually.
    Hope this helpful for you.
    Regards,
    Hyunil Choi

  • Creation of Custom context menu in CL_GUI_TEXTEDIT

    Hello all,
    I need to develop a custom context menu in the Text Editor.
    I am using the <b>CONTEXT_MENU</b> event of the class
    <b>CL_GUI_TEXTEDIT </b>for the same.
    It is giving a short dump with an exception 'empty_obj' in the method
    <b>CL_CTXMNU_MGR=>CREATE_PROXY</b>.
    Please help.

    Hello Tejas
    The following sample report ZUS_SDN_TEXTEDIT_CTXMENU shows how to trigger context menus in text editor. Please note that the editor must be set <b>enabled</b>.
    If you inactivate subroutine <b>SET_REGISTERED_EVENTS</b> the new context menu function will no be displayed. Thus you need to <b>register</b> the event for context menu handling.
    *& Report  ZUS_SDN_TEXTEDIT_CTXMENU
    *& Flow logic of screen 100.
    *      PROCESS BEFORE OUTPUT.
    *       MODULE STATUS_0100.
    *      PROCESS AFTER INPUT.
    *       MODULE USER_COMMAND_0100.
    REPORT  ZUS_SDN_TEXTEDIT_CTXMENU.
    TYPE-POOLS: cntl.  " Types for Controls
    DATA:
      gd_okcode      TYPE ui_func,
      go_docking     TYPE REF TO cl_gui_docking_container,
      go_textedit    TYPE REF TO cl_gui_textedit,
      gd_name        TYPE thead-tdname,
      gs_header      TYPE thead,
      gd_langu       TYPE thead-tdspras,
      gt_lines       TYPE STANDARD TABLE OF tline.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_context_menu
            FOR EVENT context_menu OF cl_gui_textedit
              IMPORTING
                menu
                sender,
          handle_ctxmenu_selected
            FOR EVENT context_menu_selected OF cl_gui_textedit
              IMPORTING
                fcode
                sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_context_menu.
        CALL METHOD menu->add_function
          EXPORTING
            fcode       = 'MY_FUNC'
            text        = 'My Function'
    *        ICON        =
    *        FTYPE       =
    *        DISABLED    =
    *        HIDDEN      =
    *        CHECKED     =
    *        ACCELERATOR =
      ENDMETHOD.                    "handle_context_menu
      METHOD handle_ctxmenu_selected.
        CASE fcode.
          WHEN 'MY_FUNC'.
            MESSAGE 'My function selected from ctxmenu' TYPE 'I'.
          WHEN OTHERS.
        ENDCASE.
      ENDMETHOD.                    "handle_ctxmenu_selected
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    PARAMETERS:
      p_pspnr    TYPE prps-pspnr.
    START-OF-SELECTION.
    * Get the text object
      gs_header-tdid = 'LTXT'.  " long text
      gs_header-tdspras = syst-langu.
      CONCATENATE syst-langu p_pspnr
          INTO gs_header-tdname.
      gs_header-tdobject = 'PMS'.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
    *     CLIENT                        = SY-MANDT
          id                            = gs_header-tdid
          language                      = gs_header-tdspras
          name                          = gs_header-tdname
          object                        = gs_header-tdobject
    *     ARCHIVE_HANDLE                = 0
    *     LOCAL_CAT                     = ' '
    *   IMPORTING
    *     HEADER                        =
        TABLES
          lines                         = gt_lines
        EXCEPTIONS
          id                            = 1
          language                      = 2
          name                          = 3
          not_found                     = 4
          object                        = 5
          reference_check               = 6
          wrong_access_to_archive       = 7
          OTHERS                        = 8.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL SCREEN '0100'.
    END-OF-SELECTION.
    *&      Form  SET_REGISTERED_EVENTS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM
    set_registered_events .
    * define local data
      DATA:
        lt_events      TYPE cntl_simple_events,
        ls_event       TYPE cntl_simple_event.
      TYPES: BEGIN OF cntl_simple_event,
           eventid TYPE i,
           appl_event TYPE c,
         END OF cntl_simple_event.
      ls_event-eventid = cl_gui_textedit=>event_context_menu.
      APPEND ls_event TO lt_events.
      ls_event-eventid = cl_gui_textedit=>event_context_menu_selected.
      APPEND ls_event TO lt_events.
      CALL METHOD go_textedit->set_registered_events
        EXPORTING
          events                    = lt_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3
          OTHERS                    = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " SET_REGISTERED_EVENTS
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'MAIN_0100'.
    *  SET TITLEBAR 'xxx'.
      CLEAR: gd_okcode.
      IF ( go_textedit IS NOT BOUND ).
        CREATE OBJECT go_docking
           EXPORTING
             parent                      = cl_gui_container=>screen0
    *        REPID                       =
    *        DYNNR                       =
    *        SIDE                        = DOCK_AT_LEFT
    *        EXTENSION                   = 50
    *        STYLE                       =
    *        LIFETIME                    = lifetime_default
    *        CAPTION                     =
    *        METRIC                      = 0
            ratio                       = 90
    *        NO_AUTODEF_PROGID_DYNNR     =
    *        NAME                        =
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6.
        IF sy-subrc <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CREATE OBJECT go_textedit
          EXPORTING
    *        MAX_NUMBER_CHARS       =
    *        STYLE                  = 0
            wordwrap_mode          =
                c_textedit_control=>wordwrap_at_windowborder
    *        WORDWRAP_POSITION      =
            wordwrap_to_linebreak_mode =
               c_textedit_control=>true
    *        FILEDROP_MODE          = DROPFILE_EVENT_OFF
            parent                 = go_docking
    *        LIFETIME               =
    *        NAME                   =
          EXCEPTIONS
            error_cntl_create      = 1
            error_cntl_init        = 2
            error_cntl_link        = 3
            error_dp_create        = 4
            gui_type_not_supported = 5
            OTHERS                 = 6.
        IF sy-subrc <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL METHOD go_textedit->set_text_as_r3table
          EXPORTING
            table           = gt_lines
          EXCEPTIONS
            error_dp        = 1
            error_dp_create = 2
            OTHERS          = 3.
        IF sy-subrc <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL METHOD go_textedit->set_enable
          EXPORTING
            enable            = cl_gui_cfw=>true
          EXCEPTIONS
            cntl_error        = 1
            cntl_system_error = 2
            OTHERS            = 3.
        IF sy-subrc <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      PERFORM set_registered_events.
      SET HANDLER:
        lcl_eventhandler=>handle_context_menu     FOR go_textedit,
        lcl_eventhandler=>handle_ctxmenu_selected FOR go_textedit.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK'  OR
             'EXIT'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Regards
      Uwe

Maybe you are looking for

  • Logic randomly quitting

    This just started happening in the last couple of days... haven't changed anything. Updated to 9.1.8 to see if that's the problem but no luck. Logic will just randomly quit. Sometimes it will work for a few minutes sometimes it will quit the second I

  • Reading attachments

    I get emails from mutiple sources on PCs to my Yahoo program but I can't read the attachments on my new iMac. How do I do this?

  • Nokia Help

    I hope you guys have noticed that the "help feature " that comes with most nokia phones is changing in "quality". It used to be great in earlier models eg nokia 6260...even N95 help feature wasn't terrible...but you can easily see that the N97 help f

  • Privilege Problem With Schedule a Workbook

    Whenever I schedule a workbook, I get an invalid id/password logon denied error. The Invalid Id is for the database I am referencing (not the one Discoverer resides on). How can I do the report in desktop and see result, but not with the scheduler. I

  • OBIEE installation sharing iAS of R12

    hello, Any one installed OBIEE sharing Oracle iAS of R12? We are trying to install OBIEE on Linux which has already R12 installed and trying to use the iAS bundled with R12.