Get selected function in a context menu with cl_gui_alv_grid

Hi,
I'm trying to implement a context menu on a alv grid. I defined and implemented a method for the event CONTEXT_MENU_REQUEST to add function codes to context menu.  It works ok.
The problem is retrieving the function selected in context menu. I tried to define in the class definition a method for event CONTEXT_MENU_SELECTED (that seems to be the event to use) but  i can't implement it because is defined as protected event in CL_GUI_ALV_GRID.
How i can implement a method to catch this event and determine te function code defined in the context menu??
Thanks.
Edited by: Alfredo Pradas on Jan 4, 2008 5:35 PM
Edited by: Alfredo Pradas on Jan 4, 2008 5:36 PM
Edited by: Alfredo Pradas on Jan 4, 2008 5:37 PM

The tool bar isn't the best mechanism to use for selecting Rows etc but should ideally be used for discrete functions like SAVE, UPDATE, DOWNLOAD TO EXCEL etc.
For data manipulation look at ON DATA CHANGED, ON DATA CHANGED FINISHED and DOUBLE CLICK.
Probably the easiest way is to use the double click event
methods on_dubbelklik
    for event double_click of cl_gui_alv_grid
    importing
      !e_row
      !e_column
      !es_row_no .
methods dubbelklik
    importing
      !e_row type lvc_s_row
      !e_column type lvc_s_col
      !es_row_no type lvc_s_roid .
method constructor.
create object grid_container1
        exporting
           container_name = 'CCONTAINER1'.
    create object  grid1
       exporting
          i_parent = grid_container1.
    set handler z_object->on_user_command for grid1.
    set handler z_object->on_toolbar for grid1.
    set handler z_object->handle_data_changed for grid1.
    set handler z_object->handle_data_changed_finished for grid1.
    set handler z_object->on_dubbelklik for grid1.
    call method grid1->register_edit_event
        exporting
           i_event_id = cl_gui_alv_grid=>mc_evt_enter.
  endmethod.
method dubbelklik.
perform dubbelklik in program (caller)  if found
     using
      e_row
      e_column
      es_row_no.
endmethod.
Now in the application program
when a double click event is done the method calls routine dubbelklik in the calling program 
The row / column nr and field name will be passed to your subroutine.
(In my calling class for the grid I make the calling program one of the parameters);
form dubbelklik using
        e_row   type lvc_s_row
        e_column type lvc_s_col
        es_row_no type lvc_s_roid.
  read table <dyn_table> index e_row into wa_elements.
etc.
where <dyn_table> is my grid data table.
Any comparable method should work.
Cheers
jimbo

Similar Messages

  • Open Flash Player context menu with keyboard?

    Is there a way to open the Flash Player (9 or 10) context menu with the keyboard?
    We are building applications that require full keyboard support, and it is desrable to add some custom items to the Flash Player context menu. However, if keyboard-only users cannot access the menu, we will have to find a different solution.
    thx

    Thanks. That's just what I needed to know.
    The Mouse Keys method worked fine. I couldn't get the VoiceOver approach to work, but I was just looking for one method.
    Too bad none of this is enabled by default. I find Apple's strong dependency on the mouse to be a pain, but I guess they're targeting a market of less experienced users.

  • How to Get List Item in Custom Context Menu?

    Hi,
    I got this code from the net.
    <CustomAction Id="SPTest.CustomMenuItem.ButtonClicked"
    RegistrationType="ContentType"
    RegistrationId="0x0101"
    Location="EditControlBlock"
    ImageUrl="/_layouts/IMAGES/DOCLINK.GIF"
    Sequence="600"
    Title="Click Me!"
    Description="Shows an alert message for this content type."
    >
    <UrlAction Url="javascript:alert('Hello World!');" />
    </CustomAction>
    It creates a custom context menu. How can i get the selected item using that code..
    Sorry for the tons of question. SharePoint newbie here (5 weeks in SP), Hehhehe!

    If you can redirect your request on context.....you can try this line of code
    <UrlActionUrl=”~site/_layouts/ItemAudit.aspx?ID={ItemId}&amp;List={ListId}”/>
    The Idea is to send in query string parameter and get the ItemID in the Pageload Event of the page you want to redirect to.
    Other tokens that are available
    Token
    Replaced By
    ~site/
    SPContext.Current.Web.ServerRelativeUrl
    ~sitecollection/
    SPContext.Current.Site.ServerRelativeUrl
    {ItemId}
    item.ID.ToString()
    {ItemUrl}
    item.Url
    {SiteUrl}
    web.Url
    {ListId}
    list.ID.ToString(“B”)
    {RecurrenceId}
    item.RecurrenceID
    Srikant N , MCPD SharePoint Developer 2010

  • Firefox doesn't let me copy the web address from the address bar using the context menu with second button in mouse or trackpad

    Hello!
    I write to report a problem I have with the new update v35 and v35.0.1 Firefox on address bar
    With the new version 35 of Firefox on Mac OSX Yosemite, clicking directly with the right mouse button in the address bar to copy the web address, context menu NOT allowed to copy the link, it shaded in gray, inactive ... you have to click on another browser free zone before returning to click a second time and be able to copy the link from the context menu
    I mean, with the first right click in the address bar context menu that appears don't allow me to copy the link directly, you have to click on another area and then clicking again with the right mouse button in the address bar to copy the web address (happens to all pages)
    I tried to open Firefox with inactive complements and plugins, and reset Firefox to first time use (like the first install) and the problem is here again... With or without complements and plugins the problem is here
    This happens before and then when I format my computer
    Here I put a screenshot that explains the problem better than my words
    http://i.imgur.com/QxKd8P1.gif
    I hope you can help me

    ''guigs2 [[#answer-685712|said]]''
    <blockquote>
    The icons that show up when you right click in that image do not look like the default version of Firefox, even with the Spanish Dictionary/Language pack.</blockquote>
    Hello
    The icons in the screenshot is from Linux OS, because I don't know how to capture screen, and somebody in Linux OS made it to show the problem that I was talking about
    I don't have any icon addons only have 2 plugins, quicktime (integrated in OS) and adobe Flash, updated both
    Before I format my Mac, I upgraded Firefox to v35 and here came this error
    Then I format my Mac after days, by subjects of hard disk space, etc... when I install Firefox 35 (new install) the problem was here again
    I tried to Open Firefox with disabled Add-ons, and Reset Firefox to an install version, but the problem is here always

  • How to add "select all" to explorer context menu

    In Windows 7 and  8 I was able to add "select all" to explorer right click context menu using a .vbs script file and a .reg file.  The same .vbs and  .reg files worked for both OS.  However, it does not work in Windows
    10.  Does anyone know how I can accomplish this in Windows 10?  Using Ctrl+A is awkward for me since I've used the context menu for so long.  Besides,  I guess I'm lazy.  Searching the net I've found other context menu adds but
    not this.

    Hi Glasskuter,
    Win 10 is preview version and the purpose is to collection feedback. We've not started to support it yet. I would recommend you use feedback tool in Win 10 desktop to submit issues about it. Thank you for using Win 10.
    Regards,
    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.

  • Set Firefox to open a new tab without selecting it from the context menu by two-finger tapping in Lion

    In Snow Leopard, I had somehow set the two finger tap to open a new tab either from a link on a page or from my bookmarks bar, without having to select "Open a new tab" from the context menu. I recently upgraded to Lion and I can't remember how I set this feature-- or is it just not available anymore?

    There is a plugin for this and you can configure it as shown in the attached screen to open all links from the web page in a new tab by just clicking on it and not having to follow the native steps
    Link: [https://addons.mozilla.org/en-US/firefox/addon/open-link-in-new-tab/ Open Link in New Tab]
    Regards,
    Shoeb Surya
    <i>[link removed by Moderator]</i>

  • Context menu with XML data

    Hello,
    I'm trying to create a context menu where you right click
    over a flash object and it will display links to external websites.
    The catch is I need to have the links stored in a XML doc for easy
    access. For some reason flash will only read the bottom url
    regardless of how many items are in the xml doc.
    Any ideas?
    contextmenu.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <menu>
    <item name1="Go to Google.com"/>
    <item link1="
    http://www.google.com"/>
    <item name2="Go to hotmail.com"/>
    <item link2="
    http://www.hotmail.com"/>
    </menu>
    AS/
    var contextXML = new XML();
    contextXML.ignoreWhite = true;
    contextXML.onLoad = buildContextMenu;
    contextXML.load("contextmenu.xml");
    function buildContextMenu()
    var theMenu:ContextMenu = new ContextMenu();
    var xmlLength:Object = this.firstChild.childNodes;
    for(var i=0; i<xmlLength.length;i++) {
    var ob = new Object();
    var xmlPath = this.firstChild.childNodes
    ob.name1 = xmlPath.attributes.name1;
    ob.link1 = xmlPath.attributes.link1;
    ob.name2 = xmlPath.attributes.name2;
    ob.link2 = xmlPath.attributes.link2;
    ob.item1 = new ContextMenuItem(ob.name1, itemHandler, false,
    true, true);
    ob.item2 = new ContextMenuItem(ob.name2, itemHandler, false,
    true, true);
    ob.item1.onSelect = function(){
    getURL(ob.link1, "_blank");
    ob.item2.onSelect = function(){
    getURL(ob.link2, "_blank");
    theMenu.customItems.push(ob.item1, ob.item2);
    theMenu.hideBuiltInItems();
    _root.menu = theMenu;

    I don't think it is possible for custom menu items.
    Cheers
    --Vikas

  • Get rid of that damn context menu!

    I'm using flex in an embedded browser within a win32
    application. I need to use my own context menu and the existing one
    that adobe provides has a settings option that darkens the client
    area and invalidates my transparency color (i.e. the mask color of
    custom shaped flex UI suddenly appears). How do I eliminate the
    adobe context menu? I tried the swRemote="swContextMenu='false'"
    option but it had no impact. My .swf files are used locally if that
    matters.

    Thanks for your replies. I have been able to get rid of alot
    of menu items via
    Application.application.contextMenu.hideBuiltInItems() and setting
    menu="false" in the html starter document. 'Settings' (the most
    problematic menu-item) remains. Really, any 'enforced' menu option
    should not changed the visual state of the UI... and that's whats
    killing me.
    Maybe Adobe can view and respond to this issue. The only
    other thing I can think of is introducing a Win32 hook to hijack
    all mouse messages before the flex hWnd gets them and handle
    right-mouse-clicks from there (and keep them from going to flex).
    It's a horrible solution and really complicates things.

  • Context menu with switcher

    Hi All,
    I need to use a switcher in context menu but it is not working. Switcher changes accoridng to a table row value.
    {code}
    <f:facet name="contextMenu" >
    <af:popup autoCancel="disabled" id="p1" contentDelivery="lazyUncached" childCreation="deferred">
    <af:switcher id="s3" facetName="#{bindings.XxntcSalesUnitsEOVO1.collectionModel.MenuSecimImg.inputValue}">
    <f:facet name="satista">
    <af:menu text="menu 1" id="m1">
    <af:commandMenuItem text="Düzenle" id="cmi1" action="editSalesUnit"/>
    <af:commandMenuItem text="Satışa Dönüştür" id="cmi3" action="addOrder">
    <af:setPropertyListener from="#{bindings.UnitId.inputValue}" to="#{viewScope.OrderViewBean.unitId}"
    type="action"/>
    <af:setPropertyListener from="#{bindings.ProjectId.inputValue}"
    to="#{viewScope.OrderViewBean.projectId}" type="action"/>
    <af:setPropertyListener from="#{bindings.StageId.inputValue}" to="#{viewScope.OrderViewBean.stageId}"
    type="action"/>
    <af:setPropertyListener from="#{bindings.BlockId.inputValue}" to="#{viewScope.OrderViewBean.blockId}"
    type="action"/>
    <af:setPropertyListener from="#{bindings.UnitTypeId.inputValue}"
    to="#{viewScope.OrderViewBean.unitTypeId}" type="action"/>
    <af:setPropertyListener from="#{bindings.Name.inputValue}" to="#{viewScope.OrderViewBean.unitName}"
    type="action"/>
    <af:setPropertyListener from="#{bindings.ProjectIdValue.inputValue}"
    to="#{viewScope.OrderViewBean.projectName}" type="action"/>
    </af:commandMenuItem>
    </af:menu>
    </f:facet>
    <f:facet name="satilmis">
    <af:menu text="menu 2" id="m2">
    <af:commandMenuItem text="Düzenle" id="cmi2" action="editSalesUnit"/>
    <af:commandMenuItem text="Satışı Görüntüle" id="cmi6"
    disabled="#{row.KonutStatusu.inputValue eq 'SATILMIŞ'  ? 'true' : 'false'}"/>
    </af:menu>
    </f:facet>
    </af:switcher>
    </af:popup>
    </f:facet>
    {code}
    Jdev Version: 11.1.2.2
    Regards,
    Anil

    What exactly is not working?
    Please describe this in more detail. The code you provided is not formatted and hard to read.
    Timo

  • Cannot see context menu for XML messages with Safari and Google Chrome

    Hi All,
    I am unable to see Context menu with the option of Create, Edit, Delete etc. for KM messages. This problem persists with Safari, Chrome and IE9 browsers. This thing works fine on IE7 and IE8 browesrs.
    On clicking  History and Options buttondoesn't perform any action i.e. we cannot see the list of options when clicking on those. This problem also persists with the above mentioned browsers.
    Also, with IE9 , I am unable to create New message when clicking on New button. The XML form doesnt open on the button click.
    The portal version I am using is EP 7.0.
    Can someone help me out with this?
    Thanks a lot in advance.
    Regards,
    Archana

    Hello Archana,
    You should check the PAM to see if your browser is supported with your current EP verison.
    http://service.sap.com/pam
    Regards,
    Lorcan.

  • 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.

  • [TUTORIAL] Context Menu to export EML files

    Hello there folks!
    I'm pretty new to the topic of C3PO, GW and all the Novell stuff and one of my tasks was to "code an export mechanism for GW8 thats lats us save e-mails to our storage system". Ok, that was a hammer. But wrapping my head around it and starting to error out the things got me pretty far and I guessed it was tutorial material. So here we go:
    @Moderators: This is the thread that has everything in it. the other one can be deleted.
    This tutorial is intendend for C# only. I don't like VB and I'm too dumb for C++ so if you need it for another dialect you need to work it out your self.
    Agenda:
    Needed packages
    C3PO wizard
    Loading to Visual Studio 2010
    Needed Imports/References
    Simple MessageBoxing
    Export Code
    Registering and caching the .DLL
    Testing (please help me with a better way here)
    1. Needed packages
    the novell-gwc3po-devel-2012.11.15.zip file (unzip this after downloading)
    an installed version of Visual Studio 2012 C# (or if you want to work with a different dialect choose another)
    cmd access to some of the registering tools:
    It may be the best thing to set tose paths up in you env variables. Allthough when running the cmd with administrator privileges you can't use regasm from env variables and need to cd to the directory.
    RegAsm (regasm.exe): C:\Windows\Microsoft.NET\Framework\v4.0.30319 (the version depends on the target)
    GACUtil (gacutil.exe): C:\Program Files(x86)\Micrsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\ (this path is also dependent on your target framework version, I chose .NET4)
    StrongName (sn.exe): C:\Program Files(x86)\Micrsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\ (this path is also dependent on your target framework version, I chose .NET4)
    a good beverage :D (you should obtain multiple of these :D)
    2. The C3PO wizard
    In my case I wanted to add the functionality via the context menu. So the code executes when right-clicking on one or multiple messages displays another menu item and is clickable.
    This is pretty easy to realize via the C3PO wizard. You'll find it in the downloaded and extracted novell-gwc3po-devel-2012.11.15.zip from above. Start it (it is located in extracted-zip-folder/gwc3po-FILES/C3POWizard/C3POWizard.exe) and setup your project:
    Setup the project in the wizard step 1
    I usually setup the Wizard inside my Visual Studio 2010 projects folder, create a new folder there with the name of the project and check the options i want to have.
    In the next step I chose which type of View should display my custom context menu. Since I was only interested in exporting and working with e-mails I chose "GW.MESSAGE.MAIL" and added it to the bottom list via, you guessed it, "Add".
    Setup theView that invokes the new context menu item
    In the next step you I had to setup a new entry for the context menu. You could make side-droppable menus here etc. But for me a simple "Add Menu" was enough. Give it a name of your choice (beware: I'm yet to find out where to change this setting in the source files).
    Creating a Menu Item in step 3
    Click through next and the wizard will sum up you choices. In the next dialog window you will be prompted to specify the language you want the code to be generated. I chose .NET C#.
    In the prompt after that you will be asked if the wizard should create a .DLL-project. You click yes.
    Quit the wizard with the "Done" button.
    3. Loading to Visual Studio 2010
    Open up your Visual Studio and go to File -> Open Project. Navigate to the folder where you just created the files with the C3PO-Wizard. and open up the .csproj file.
    All the files get loaded and it seems quite well. but now it's time for some other stuff: Signing, or better, providing a key for signing.
    Allthough the README.txt (also in your project folder) states this is not neccessarily needed I did not get it to work without a key file.
    Open up a terminal and tpye in sn /? to see if the environment variables work. If not you can yuse the abolute path to sn (see: 1: Needed packages). If everything works as expected you can generate your keyfile with sn -k <PathToYourProject>\Archive.snk.
    In Visual Studio, go to Project -> <ProjectName>-Properties -> Signing -> Sign assembly [x] -> Search and pick the .snk-file you just created.
    Good. A first compilation of the project with F6 should rumble through without problems. Go to <ProjectFolder>\bin\Release and copy the .dll files to <GroupWiseInstallPath>.
    After that you need to open a cmd windows as administrator and cd to the RegAsm.exe directory and execute the following: [I]regasm "<GroupWiseInstallPath>\<TheDllName>.dll". Then execute gacutil -i "<GroupWiseInstallPath>\<TheDllName>.dll".
    RegAsm will register the extension to the Windows registry and GACUtil will cache the .dll content to make it available to GroupWise.
    You need to re-cache the .dll everytime you compile in VS. So basically the workflow is Compile -> Copy dll to GroupWise directory -> re-cache with gacutil -i -> Start Groupwise
    I have not found a method to post-build execute a script that does that. Problem is the copying and the gacutil caching (both must be done as administrator).
    IIf everything worked you see a new entry in the context menu when right-clicking a mail in Groupwise. When you click it, there will appear a message box.
    The MessageBox is defined in GWCommand.cs L. ~125
    4. Needed Imports/References
    Since we got the skeleton to compile and function properly, it's time to get our own code in there. FOr rapid prototyping I do all the stuff in GWCommand.cs.
    Go to Project -> add Reference -> COM and select "C3POTypeLibrary", "GroupWareTypeLibrary, "GroupWiseCommander", "GroupWiseConnectorLibrary" and click OK. The selected entries now appear in the project explorer.
    5. Simple MessageBoxing
    A thing I like to do (because I'm not a very good programmer) is to get all sorts of infos to get displayed with
    Code:
    MessageBox.Show();
    Just fling it in the code and see what get's where etc. An important thing is allready in the comments of the file.
    It is this line:
    Code:
    C3POTypeLibrary.IGWClientState6 myCL = (C3POTypeLibrary.IGWClientState6)WIASSArchivButton.g_C3POManager.ClientState;
    . Uncomment it and play around with the myCL-object in your code.
    The myCL has some properties we will use later on such as myCL.SelectedMessages which is exactly what we need for our archive functionality.
    6. Export Code
    Now we get to the code:
    With the
    Code:
    ClientState
    dug up in the code we can pass the
    Code:
    SelectedMessages
    into a
    Code:
    MessageList
    . Over this MessageList we will iterate and save each
    Code:
    Message
    with the so called
    Code:
    GroupWiseCommander
    to our disk. well that sounds simple. And, well after digging through a lot of threads here on the forum and the documentation, it is.
    Here is the Execute() method from GWCommand.cs:
    It has comments that should serve as a documentation.
    Code:
    public void Execute()
    try
    switch (m_PersistentID)
    case WIASSArchivButton.vWIASS:
    //C3PO WIZARD Put execute command code here for WIASS Context menu.
    /* this was in the comments and is essential!
    * the myCL object provides us everything we need to interact with the messages */
    C3POTypeLibrary.IGWClientState6 myCL = (C3POTypeLibrary.IGWClientState6)WIASSArchivButton.g_C3POManager.ClientState;
    // get the selected messages
    object o = myCL.SelectedMessages;
    // and convert the SelectedMessages to a MessagesList
    MessageList ml = (MessageList)o;
    // iterate over all the selected Messages
    // this was tricky: the index of the MessageList starts by 1 and not at 0
    for (int i = 1; i <= ml.Count; i++)
    // the .Item() method expects either a string or a long
    // see http://www.novell.com/documentation/developer/groupwise_sdk/gwsdk_gwobjapi/data/h20s5bdo.html
    long index = (long)i;
    // instantiate a Message object to get access to the different properties like subject, sender etc
    GroupwareTypeLibrary.Message oMessage = (GroupwareTypeLibrary.Message)ml.Item(index);
    // instantiate a GroupWiseCommander
    // this is the interface to the TOKEN API
    // TOKENS: https://www.novell.com/developer/documentation/gwtoken/index.html
    GroupWiseCommander.GWCommander cmdr = new GroupWiseCommander.GWCommander();
    // the GWCommander has an Execute() method that is able to take certain tokens kind of like SQL
    // lets build the token (the complete list is huge and awesome) to save our Messages
    // ItemSaveMessage(): https://www.novell.com/developer/documentation/gwtoken/gwtokens/data/hbt0bd7x.html
    string tokenCommand = "ItemSaveMessage(\"" + oMessage.MessageID + "\"; \"C:\\archiv\\" + oMessage.MessageID + ".eml\"; 900)";
    /* what happens here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ is that we build us a TOKEN command that the
    * GWCommander is able to execute.
    * the actual command is ItemSaveMassge()
    * everything between the semi-colons are the parameters:
    * \"" + oMessage.MessageID + "\" : builds an ANSISTRING of the MessageID which we get from the oMessage onject
    * \"C:\\archiv\\" + oMessage.MessageID + ".eml\" : build an ANSISTRING of the output filename
    * 900 is the type we want to export. 900 stands for Mime
    * CAUTION:In this example I use C:\archive\ as the destination folder. It must exist and be writable to the program
    // now that we have setup our command we can get it executed by the commander
    // the result is sort of a callback variable
    string result ="";
    cmdr.Execute(tokenCommand, out result);
    /* here can the error handling be done with the result string
    break;
    default:
    MessageBox.Show("Unsupported Case", "Error", MessageBoxButtons.OK);
    break;
    //A way to get the GroupWise client state with newest interface
    //C3POTypeLibrary.IGWClientState6 myCL = (C3POTypeLibrary.IGWClientState6)WIASSArchivButton.g_C3POManager.ClientState;
    //uncomment the code below to unblock the base command
    //IGWCommand baseCmd = (IGWCommand)WIASSArchivButton.g_C3POManager.CreateGWCommand(m_objBaseCmd);
    //baseCmd.Execute();
    catch (Exception e)
    MessageBox.Show("Error Executing GWCommand: " + m_PersistentID.ToString() + " Error: " + e.Message);
    return;
    7. Registering and caching the .DLL
    After that you need to open a cmd windows as administrator and cd to the RegAsm.exe directory and execute the following: regasm "<GroupWiseInstallPath>\<TheDllName>.dll". Then execute gacutil -i "<GroupWiseInstallPath>\<TheDllName>.dll".
    RegAsm will register the extension to the Windows registry and GACUtil will cache the .dll content to make it available to GroupWise.
    You need to re-cache the .dll everytime you compile in VS. So basically the workflow is Compile -> Copy dll to GroupWise directory -> re-cache with gacutil -i -> Start Groupwise
    8. Testing (please help me with a better way here)
    Is there a good way to hook every thing up together to jsut stay in VS , compile, files get copied, registered, cached and GW starts?
    Thanks for reading!
    I wrote this up to have a documentation for myself and others. please let em know if you need help or anything is missing or not clear. It's certainly not a total noob guide and I expect a bit of knowledge to be honest.
    Regards
    Sebastian

    Originally Posted by Username951
    Multiple email selection should be possible, but only those emails that are fitting some requirements should be stored finally in database.
    One requirement is for example that a keyword like "ISSUE" appears in the email subject
    (followed by a ":", a "space" and some characters that can be converted to an integer value),
    multiple, leading "Fwd: " and/or "Re: " should be handled well,
    subject should be handled case-in-sensitive.
    This sounds like you should implement some sort of SelectedMessagesValidator class just to keep it clean.
    Originally Posted by Username951
    So here are my find outs, remarks, etc.:
    1.) Visual Studio should be started under admin. rights.
    Then you can write a post-build event (batch) that copies, "regasm"s and "gacutil"s everything.
    As said this works fine for me.
    But note that unfortunately the paths to "regasm" and "gacutil" changed
    (compared to the time where you wrote your tutorial).
    Definitely. That way, as you mentioned, the post build scripts integrate very well.
    Originally Posted by Username951
    2.) The "Novell C3PO" wizard was downloaded and worked out as described in our tutorial.
    One important step was to use "GW.MESSAGE.MAIL" and not "...BROWSER..." or something else.
    I can not figure out, where you have the GW.BROWSER thing from, but in my examples I allways used GW.MESSAGES.MAIL
    Originally Posted by Username951
    The wizard created finally the basic C# (.NET framework 2.0) project.
    This project was loaded in Visual Studio 2013, automatically converted to "newest version"
    and finally was a ".sln" made.
    Yes. You can leave it at 2.0. I just have the 4.5 installed so i will target this version
    Originally Posted by Username951
    "oracle.dataaccess"
    -> Note that the "Copy Local" property must be set to "true"!
    (This property will be reset to "false" after a successful (re)build.
    So check this and change it to "true" for the first build!
    This must be made only once because after a successful build is this .dll known;
    keywords: GAC -> cached
    But note that "successful" means also that the post-build event ran flawless!)
    This is quite specific to your case since my example on exports a flat EML file to the hard drive
    Originally Posted by Username951
    2.) regasm.exe needs strong names.
    So a "cmd" with admin. right was opened,
    a
    "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\sn.exe" -k "C:\Users\<username>\Documents\Visual Studio 2013\Projects\GWSaveToDatabase\GWSaveToDatabase.sn k"
    fired
    and the created "GWSaveToDatabase.snk" file added to the solution.
    I don't want to be picky, but it's gacutil that needs the strong names. ragasm is not complaining
    Originally Posted by Username951
    (Development) Remarks
    1.) While I used the "C3PO" wizard first time I used "Add Menu" item - as you said in your tutorial! :-(
    And that is definitely wrong!
    See:
    The result was a C# project that does not show any new context menu entry.
    So I tried at the next wizard run "Add Menu Item".
    The wizard created again a C# project but still no new context menu entry in the GroupWise client.
    (And that after all needed steps
    like
    copy to GroupWise installation path,
    regasm and gacutil over all .dlls
    etc.
    were successful be made).
    It took a complete day to get the idea to "merge" the two wizard created projects!
    Why merging?
    Because the second project contained a "const" which were used in the switch statement of the "Execute()" method
    (with the same meaning like your "WIASSArchivButton.vWIASS" - see your code snippet above!)
    and the "CustomizeContextMenu(...)" method in "CommandFactory.cs" looked also different
    while the first project does not contained something similar.
    ( For example:
    The "CustomizeContextMenu(...)" method had more statements.
    And that made more sense to me compared to the first wizeard created C# project.
    Since I uploaded a better example this is obsolete.
    Originally Posted by Username951
    So I ASSUME that the second project would work but it does not because of regasm / gacutil behaviour.
    Means I believe it would work when all
    with regasm registered
    and
    with gacutil to the cache added "things"
    would be "un-registerd" and "un-cached".
    This is, as I assume, due to the Interop.C3POTypeLibrary.dll. This must me cached every time the project is build. maybe you could use gacutil -i Interop.C3POTypeLibrary.dll -f to force the recaching
    Originally Posted by Username951
    So, finally I took the second, wizard created C# project and copied the "const", adjusted the "Execute()"
    and "CustomizeContextMenu(...)" methods, etc.
    After that the context menu were shown in the GroupWise client!
    Thats is correct. But I never had to do this. The thing is, that the "Add Menu Item" is giving you the opputunity to specify a command, which the "Add Menu" doesn't.
    Originally Posted by Username951
    2.) The next issue was that the context menu was added as often as many emails were selected.
    Means: For example: Three selected emails ends up in three time added context menu.
    Solution:
    Checking
    var existsAlready = menuItems.Item("...");
    if (existsAlready != null)
    return;
    in "CustomizeContextMenu(...)" method and leaving the method under shown circumstances.
    I added a fix for this in the second post, but it isn't working in GW2012 anymore. I have a very ubly fix for that in my new code.
    Originally Posted by Username951
    3.) The by the wizard created registry path contained the version number "5.0".
    This may confuse but it is finally ok. No need to change here anything!
    On the other side:
    It will NOT work when the registry entry
    "SOFTWARE\\Novell\\GroupWise\\5.0\\C3PO\\DataTypes \\...."
    will be changed/"adjusted to that GroupWise client version you are currently using"!
    This is all part of the official documentation and wasn't touched by Novell since quite a long time.
    I think i will make a github repository in the futer as a proof of concept and kind of a accessable documentation for everyone.

  • 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

  • Customer defined Context Menu in WD ALV (ABAP)

    Hello,
    is it possible programming a customer defined context menu for a Web Dynpro ALV (in ABAP)?
    The functionality should be as following:
    Open Context menu with right mouse click, select something like "display details" and then detail data shall be displayed under the ALV.
    Exists a documentation for that?
    Thanks and regards,
    Josephine

    When you are defining your content attribute at the controller do not try to bring all the value attributes rather  provide the dictionary structure and make sure that cordinality is 0...n.
    Then as and when you change the dictionary structure you would be able to view the columns corresponding to that.
    Make sure that your select stmt is modified accordingly when you are binding it to the context.
    Cheers
    ~ Kumar

  • Package Decomposition context menu

    I am on v1215 and I love the package decomposition (especially jumping to the selected item on double-click), but I have just noticed the context menu on the procedures and functions in the decomposition.
    The only item that appears in the context menu on procedures and functions is "New ..." which is the same as the New button on the main toolbar. Variables displayed in the decomposition do not get a context menu.
    However, if I have a stored procedure or function open in the Connection pane, select it (opens the procedure/function) display the context menu for it (Open, Compile, Compile for Debug, Run, Debug, Execution Profile, Grant, Revoke, Drop, Compile Dependents) and then, without selecting the function/procedure in the Package decomposition, I right-click on it, the context menu is now New ..., Compile, Compile for Debug.
    If I reselect the stored procedure and then right click on a variable in the Package decomposition, I get Compile and Compile for Debug and the menu options.
    The same appears to happen for any object type - including views, tables, indexes, etc.
    If I then select the procedure in the Package decomposition, the context menu reverts to "New ..." and the Compile and Compile for Debug option disappear from the context menu for the stored procedure (so long as I don't select it before right-clicking on it).
    Two issues here:
    1) Shouldn't the package decomposition context menu for public procedures and functions allow the Run option (what I was hoping to find when I first tried)?
    2) The Compile and Compile for Debug options are not available consistently - they should always be available for objects that can be compiled (stored procedure, function, package, trigger, etc) and never available for objects that cannot be compiled (tables, views, indexes, items in the decomposition of packages, etc).

    Please take a look at this article by Carlos:
    HOWTO: Getting information about Visual Studio windows from an add-in
    It talks about how to get the window information, including a tool window's information. But as I tested, we can't access to the Modules window's object, it's always null:
    So I think the Visual Studio doesn't expose the ability for us to customize the Modules window.
    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.

Maybe you are looking for

  • Field add in abap-query

    Hai all, Kindly advise me how to add the new fields in report which has already created via ABAP-Query programming. Regards, Renuga.A

  • How to use nvl() function in SQL Loader

    I am trying to use nvl() funtion in my SQL Loader control file and I keep geting errors. Would someone please tell me where I can find the syntax reference to this? Thanks a lot!

  • Oracle preformance

    Hi, I have problem with perfomance of my program that import some data from binary file to oracle. When a set small db_block_buffers cca 40 (db_block_size = 16384) imprted time plus aroud operation is 5 min (file have about 14MB = cca 100000 rows) it

  • Flex 4 - Complex objects in a web service response are null

    I'm using a web service (imported by the data services tool) that returns an array of objects.  The service returns the array just fine, except the objects aren't being created correctly. The objects (we'll call them CPs for now) contain some strings

  • What is the best way to make a clickable grid

    What would be the best way to make a clickable area that can differentiate between discrete parts of the area when clicked on. In other words, instead a having multiple buttons in a row that the user can click on, is there a way to have an area that