ALV grid disable right click options
Hi experts,
Iam working on <b>normal</b> ALV grid.
In the output of the ALV, if we click right click,
we can see 'Cut', 'Copy text', 'Insert with Overwirte' options.
How can i disable(or remove) these 3 options?
Pls give me suggestions
Reward guaranteed,
thanks
kaki
Hello Kaki
You have to handle event <b>CONTEXT_MENU_REQUEST</b> (of class CL_GUI_ALV_GRID). The following sample report shows how to do that:
*& Report ZUS_SDN_ALV_CONTEXT_MENU_1
*& 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
Similar Messages
-
How to disable right click option re-size on table column header?
Hi All,
Please let us know how to disable right click option re-size on table column header.
The issue is that when I right click on the column header, the column is selected and the context menu with options like Sort, Columns, Resize Columns, etc.. is popping. we want to disable column re-size option.
We are binding the table values programatically (not using Bc4J) and the Jdeveloper version is 11.1.2.2
Thanks in advance,
- Vignesh S.Hi Gawish,
Thanks for the reply.
This will make the particular column frozen and only work for that particular column.
My use case is that to remove the resize columns option from the context menu or to disable the right click option.
Making column selection as none will disable the right click option but we need column selection for sorting.
Is there any other way to achieve this?
Thanks in advance,
-Vignesh S. -
How to disable the right click options in webdynpro applications
hi
i want to disble the right click options in the webdynpro applications.
kindly help me soon.
thanks,
gupta.Hi..
Do u got to know how to disable right click option in Webdynrpo application.
If so, then kindly help me.
Regards,
Yugesh A. -
How to make right click options disable on JTextArea.
Hi,
How would I make mouse right click options disable on JTextArea.
Can any one help me in this regard.
Thanks.Bussa wrote:
Hi,
I used JTextArea in my work. If I righy click on this area, a pop up menu is appearing with cut,copy,paste and select All options. I would like to disable all these options. Can u suggest me in this regard.
Thanks.Did you create this PopupMenu yourself? If you did, then you should have access to the JMenuItems used, so you can call setEnabled(false/true) on them to enable/disable them.
If you didn't create the Popup yourself, then you should check if you can obtain the PopupMenu by calling getComponentPopupMenu( ) or some other method to obtain the popup menu and subsequently its menu items and call setEnabled( ) on them.
If the popup menu uses Actions instead of JMenuItems, the same principle applies since Action objects also have a setEnabled( ) method
ICE -
How can I remove the default right click option of the text Area control?
How can I remove the default right click option of the text Area control?
Is there any way to disable this control in any of the text controls available?The iPhone does not store email addresses for received mail. The iPhone stores all email addressees for sent mail in a list of previous recipients. The list of previous recipients is not synced with Outlook or any address book, but the list of previous recipients is included with the iPhone's backup which is updated by iTunes as the first step during the iTunes sync process. The auto-addrss feature pulls from your contacts on the iPhone and from the list of previous recipients.
Different from the Mail.app on a Mac, there is no access to the list of previous recipients on the iPhone to remove a previous recipient from the list, or to add a previous recipient to contacts that is not already entered - not at the present time anyway.
The only way to purge the existing list at the present time is by restoring your iPhone with iTunes as a new iPhone or not from your iPhone's backup.
Hopefully access to the list of previous recipients will be included with the iOS 5 update. -
Disable right clicking for standard tabs in two level tabs
Hi Friends,
I am using two level tabs in my application. I want to disable the right clicking option for the second level
(standard tabs). Is there any way to accomplish this?. Please help,
Thanks,
JeevHi,
I think you can do it with javascript.
I did find various solutions from Google
http://www.google.com/search?btnG=1&pws=0&q=javascript+disable+context+menu
I have not test any of those , but quickly seems that there is differences between browser how to accomplish this.
Hope this help you to right direction
Br,Jari -
How to disable right-click in Flex app /w actionscript?
Anyone know of actionscript code within Flex for disabling
right-click. I've got an app that I don't want my users to have
access to the right-click menu."EvolvedDSM" <[email protected]> wrote in
message
news:gadm7g$fi6$[email protected]..
> Thanks hanchan, I did just want to disable the zoom
options and whatnot.
> After
> watching a few users, who have never worked with a flex
app before,
> accidentally right click here and there and zoom in or
zoom out, I was
> banging
> my head on the wall thinking "this could happen ALL THE
TIME with these
> people".
>
> Ahhh, Amy. You need to feel the love of "No Script", a
FireFox browser
> extension. It is truly the best tool on the net imo. NO
MORE ADS. You
> have
> to allow non-domain site ads to appear on the page, else
they never load
> and
> you don't have to deal with the ads. If you use FireFox,
get it!! And if
> you
> don't use FireFox, try it!!
But even then, the player itself isn't providing you with any
security. -
Disabled right click on certian sights
I am using rutorrent though firefox and the settings for the torrents also use right click when I do this I get the right click memu right on top of it is there any way of disabling right click for only certian sights.
No, you can only do that for all sites.
Tools > Options > Content : JavaScript > Advanced > Allow Scripts to: [] "Disable or replace context menus"
* http://kb.mozillazine.org/Prevent_websites_from_disabling_new_window_features
* http://kb.mozillazine.org/JavaScript#Advanced_JavaScript_settings -
Disable Right Click Pop-Up Menu on adobe reader activex control
Hi,
I am using adobe reader activex control on my vb.net window based application.May i know how can i disable right click pop-up menu on adobe reader activex control?I don't want search function from right click pop up menu.
Please help me.
Thanks and best regards,
Ko KoHi,
I would disable the right click.....
perhaps you can call a javascript function to display a table of options on your jsp with a layer:
function myOptions( )
var fullText = "<table width='278'>" +
"<tr bgcolor='#FF9900'>" +
"<td colspan='3'> <b><font color='#000000' face='MS Sans Serif' size='3'>Option1</font></b></td>" +
"</tr>" +
"<tr>" +
"<tr bgcolor='#FF9900'>" +
"<td colspan='3'> <b><font color='#000000' face='MS Sans Serif' size='3'>Option2</font></b></td>" +
"</tr>" +
"<tr>" +
" <td height='35'></td>" +
" <td colspan='2' height='35'>" +
" <div align='left'>" +
" <br>" +
" <p><font color='#FF0000'>Select option's from above.</font></p>" +
"</div>" +
"</td>" +
"</tr>" +
"</table>";
editLayer( fullText, lyr );
showLayer( lyr );
editLayer and showLayer will display table on JSP....remeber to call the layer "1yr"
// Show the visible layer that is passed into the function
function showLayer( _obj ){
if ( ns() ){
_obj.visibility = "show";
} else {
_obj.style.visibility = "visible";
// Write the layer with the text in the parameters
function editLayer( txt, obj ){
var doc;
if ( ns() ) {
doc = self.document._obj.document;
doc.write( _txt );
doc.close();
} else {
doc = _obj;
doc.innerHTML = _txt;
doc.document.close(); -
Acrobat Pro 7: right click option to Open in a New Window
Hello,
We are using Adobe Acrobat Pro v7, and we oftentimes like to view PDFs in separate windows. To do this, the first file can be openeb by double clicking thefile in Explorer, and for subsequent files, we just right click on the PDF and select Open in a New Window. This works perfectly fine; however, not everyone has the right click option to Open in a New Window. The DO have the same version of Acrobat, but just not this functionality. How do we go about getting this right click context added for the others? Thanks.
FrankiYes. Everyone is on Windows XP SP2.
Frank
x1855 -
Converting DWF to PDF using right click option cuts off right side.
I have 24x36 dwf files that I need to convert to PDF. (Printing Landscape)
When using the right click option in explorer, "Convert to Adobe PDF", the conversion cuts off about 6" on the right side of the page.
(I can "Print" inside my DWF viewer to Adobe and it works fine and I can set my default printer to Adobe PDF and select multiple at a time and it prints fine)
I currently have Windows 7 and Acrobat XI version 11.0.06.
How do I fix this?You might check the preferences in Acrobat and see if there are settings for DWF files.
-
My right-click option is not working on my click box
I created a button and applied the right-click option on it. My action is set to continue. When i publish to html my right-click does not work. it only works if you left click.
Could anyone help. thanksLilbiri
Im having the same issue Penelope C had 2 years ago with the right-click function. heres the forum thread. i dont know if it was ever solved.
http://forums.adobe.com/thread/753561?start=0&tstart=0
It just wont work for me some how. -
Combine PDF feature missing from right click option Acrobat Pro 9/Windows 7
I combine PDF's all day long and need this feature. I had it on my old computer and since moving over to the new computer I do not have the option to combine PDF's when right clicking on PDF documents. I have searched the forum and found other fixes, however none have worked, I have uninstalled and re-installed three times as well and no luck. Does anyone have any other ideas for fixes for this. I need this feature.....
Message was edited by: chesty21Found this it worked for me :
http://acrobatusers.com/forum/pdf-creation/right-click-option-combine-supported-files-miss ing a known issue caused by the context menu handler not being registered (tends to result from patches and installs when Windows UAC is active).
It's
From the Start menu, choose 'All Programs' > 'Accessories, and *right-click* on 'Command Prompt'Select 'Run as Administrator' and approve the UAC window (if one is displayed)
If you have 64-bit Windows, in the command window type the following and press Enter, including the quotes:
regsvr32 "C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat Elements\ContextMenu64.dll"
On 32-bit Windows, type this instead:
regsvr32 "C:\Program Files\Adobe\Acrobat 10.0\Acrobat Elements\ContextMenu.dll"
You should see a message saying it was successful. Close the command prompt window, and your context menus should be back up and running. . -
Sales order right click option
Hai,
Is it possible to deactivate the right click option in the sales order document.
Regards,
Gokul K.hi,
Declare a String as global
Dim oFormUID as string
in ItemEvent use the following code to get the formUID
If pVal.FormType = "139" And pVal.BeforeAction = False And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD Then
oFormUID = pVal.FormUID
End If
in Right Click Event use the following code
1.for form
If eventInfo.FormUID = oFormUID And (eventInfo.BeforeAction = True) Then
BubbleEvent=False
End If
2.for Matrix
If eventInfo.FormUID = oFormUID And eventInfo.ItemUID = "MatrixUID" And (eventInfo.BeforeAction = True) Then
BubbleEvent=False
End If
egards,
varma -
I have made a video player, now i need to add right click option to the video so it can have option to capture the image and save it.
If not atleast anyone tell me how to add right click option.Set the onMouseClicked variable of the appropriate Node similar to the below:
onMouseClicked: function(evt: MouseEvent):Void {
if(evt.button == MouseButton.valueOf("SECONDARY")){
//do stuff to handle right button click...
else{
//do normal mouse click handler
}
Maybe you are looking for
-
How can I connect more than one wireless speaker to my ipad
i have a mini iPad and have linked two wireless Bluetooth speakers but they will only work one at a time. How can I get them both to work together ?
-
Problems with downgrade from Win 8.1 to Win 7 64bit on Satellite S70-A-11H
Hi, My daughter already has a Tosh laptop with Win 7 64bit which is several years old and has seen better days, so for Christmas I bought her a new S70-A-11H notebook with Win 8.1 pre-installed. She hates it. In fact she will not use the new laptop a
-
Outlook 2007 Calendar Monitoring: track send event for recurring meetings
Hi, I'm working on an Outlook 2007, VSTO 2010, .NET 3.5 add-in which monitors AppointmentItem objects changed on the user's calendar. Specifically I'm tracking the send event of the currently selected appointment in the calendar view. Currently my ad
-
PO LONG TEXT of Length 400+ char
Hello ABAPers, I have a case where i want to update the PO_Long_Text field in MM02. The Text Editor in the Po Long Text screen can take only 72 char per line and an internal tables variable to which I will import my actual long text of approx 400 ch
-
when i want to sync my ipod i get really frequnently an error massage saying: could not copy file to ipod. unkown error 69. so i read the faqs, but it is not the problem that the mp3s are broken or something. when i try again, the problem occours wit