Double-click in ALV Grid on BDC recording not recorded
Hi,
I'm recording a BDC session in a CRM system to enter a business partner. One of the steps is to choose a marketing attribute. To do this you have to double click on a (read only) ALV grid to select the attribute.
When I record this in SHDB or LSMW, the double click is never recorded?
Anybody else had problems recording a double click in an ALV grid.
Thanks
Naidoo
Unfortunely, BDC and gui controls do not get along. The ALV_Grid uses a gui control to intereactive with the user. Doing a recording over these kinds of transaction is not suggested for this very reason. You will have to find another way to achieve your result. Is there any BAPI or function module which does this functionality?
Regards,
Rich Heilman
Similar Messages
-
Hi,
I have this doubt regarding ALV grid display.
I am displaying a list using REUSE_ALV_GRID_DISPLAY.
I need to go to a transaction when i double click on a particular line on the output list based on the content of the 1st cell of that line. (ie if i have 4 columns and 5 records and click on the 3rd column of 2nd record then i need to know the value of the 1st field of the 2nd record)
I am using a call back user command subroutine to capture the index and the field which has been clicked upon. This index is giving perfect result by which I am reading the output table and doing the later operations.
But what if i sort the list in ALV by any column? Then the index that I will get on double clicking will correspond to the index on the screen but not to the index on my internal output table. In that case I will get a wrong value of the 1st field.
I do not want to use OO alv. Is there a way to handle this situation?
Regards,
ShinjanHello Shinjan,
When i display an output table say t_out on ALV GRID, the records in the table shown on the grid is identical to what i have in t_out. Hence the tabindex will correspond to that very record in t_out.
But when i sort the table on the grid, the order of the rows changes... so for example a row which had index 2 will now have an index 6 (say). So on clicking this record, the tabindex will be 6 where as the same record exist in 2nd position in t_out. How to handle this?
{quote]
Did you try this scenario? Your output table t_out also gets refarranged after SORT. Good thing is you DONOT have to code anything for this )
As per your example the table t_out will be rearranged so that the initial 2nd record will be at 6th posn.
FORM f_user_command USING fp_v_ucomm TYPE syucomm
fp_selfield TYPE slis_selfield."#EC CALLED
CONSTANTS:
l_c_ic1 TYPE char4 VALUE '&IC1',
l_c_vl TYPE char2 VALUE 'VL',
l_c_vl03n TYPE char5 VALUE 'VL03N'.
CASE fp_v_ucomm.
* Ok code for double code
WHEN l_c_ic1.
IF fp_selfield-tabindex NE space.
READ TABLE it_final INTO wa_final "it_final gets rearranged as per the SORT condition
INDEX fp_selfield-tabindex. "tabindex keeps the correct index after SORT
SET PARAMETER ID l_c_vl FIELD wa_final-vbeln.
CALL TRANSACTION l_c_vl03n AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. "f_user_command
Please check & let us know.
BR,
Suhas
Edited by: Suhas Saha on Jan 2, 2009 11:48 AM
Edited by: Suhas Saha on Jan 2, 2009 11:53 AM -
Double click in alv grid not refreshing until I click elsewhere
Hello,
I'm very new to abap and just managed to partly implement double click in an alv grid.
I also created a button that calls the exact same function as double click (selects the row and fills in the data areas on the page). When I use the button, everything works fine, but when I double click, nothing changes until I click on a tab or other form of input button on the page.
I have followed the process in debugging and can't find the fault anywhere.
My double click is implemented by:
create object lcl_event_receiver.
set handler lcl_event_receiver->double_click
for search_alv_grid.
endif.
CLASS lcl_event_handler DEFINITION.
public section.
methods:
double_click for event double_click
of cl_gui_alv_grid.
ENDCLASS. "lcl_event_handler
CLASS lcl_event_handler IMPLEMENTATION.
* METHOD double_click *
method double_click.
perform select_search_result.
endmethod. "double_click
ENDCLASS.
Any help would be much appreciatedHello,
Try using the template code given below. Let me know if you have any questions.
data : GT_EVENTS TYPE SLIS_T_EVENT.
get event
PERFORM BUILD_EVENT_TOPOFPAGE USING GT_EVENTS[].
display alv data
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = W_xxxxx
IT_FIELDCAT = GT_xxxx
IT_EVENTS = GT_EVENTS[]
TABLES
T_OUTTAB = T_xxxx
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
get event perform
FORM BUILD_EVENT_TOPOFPAGE USING LT_EVENTS TYPE SLIS_T_EVENT.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = LT_EVENTS.
Read double click event using the below statement
READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND
INTO LS_EVENT.
IF SY-SUBRC = 0.
ENDIF.
ENDFORM. " BUILD_EVENT_TOPOFPAGE
FORM USER_COMMAND USING L_UCOMM LIKE SY-UCOMM
LS_SELFIELD TYPE SLIS_SELFIELD.
CASE L_UCOMM.
WHEN <double click>
Perform do_something.
ENDCASE.
ENDFORM. " USER_COMMAND
Best Regards,
Krishna -
Double-click in ALV grid should take to BSP application
Hi,
In the portals, in an application, R/3 ALV grid is displayed. On double clicking one of the entries in the list, corresponding transaction in R/3 is opened and the details are displayed. Now, instead of opening the transaction in R/3, Corresponding PCUI application has to be opened. Is it possible to do it Portals? Can you please tell me how this can be acheived?
Thanks & Regards
G.Raja
P.S:- I'm not sure whether this topic can be discussed in this forum. Since the functionality is required in Portals, I'm putting it here.Hello G.Raja,
I think we should connect the Topics:
<a href="https://forums.sdn.sap.com/thread.jspa?threadID=70688">Calling PCUI application on clicking ALV grid in portals</a> by a link.
Regards
Gregor -
How to handle double click on alv grid
When I want to double click on a row of the alv grid, I want to give a message or redirecting the user to the row details screen..
I wait for your helps.
Thanks alot.Hello,
Check this report:
FORM ALV_DISPLAY.
*--- ALV List Display
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_PROGNAME
I_CALLBACK_USER_COMMAND = G_CALLBACK_USER_COMMAND
IT_FIELDCAT = G_T_FIELDCAT
* IT_EVENTS = IT_EVENTS
TABLES
T_OUTTAB = G_T_OUTTAB
EXCEPTIONS
PROGRAM_ERROR = 1
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.
ENDFORM. " ALV_DISPLAY
*& Form F_USER_COMMAND_ALV
* text
* --> p1 text
* <-- p2 text
FORM F_ALV_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
*--- Hotspot selektion
CASE RS_SELFIELD-FIELDNAME.
WHEN 'POSID'.
*------ PSP-Element
*-------- Click auf PSP Element -> PSP Element anzeigen (CJ12)
SET PARAMETER ID 'PSP' FIELD SPACE.
SET PARAMETER ID 'PRO' FIELD RS_SELFIELD-VALUE.
CALL TRANSACTION 'CJ12' AND SKIP FIRST SCREEN.
WHEN 'STTXT_INT'.
*------ Systemstatus
G_STTXT_INT = RS_SELFIELD-VALUE.
*-------- G_T_LEGENDE erfüllen
PERFORM F_FILL_G_T_LEGENDE_INT.
G_R_LAYOUT-WINDOW_TITLEBAR = 'Systemstatus'(004).
PERFORM F_STATUS_LEGENDE_POPUP.
WHEN 'STTXT_EXT'.
*------ Anwenderstatus
G_STTXT_EXT = RS_SELFIELD-VALUE.
*-------- G_T_LEGENDE erfüllen
PERFORM F_FILL_G_T_LEGENDE_EXT.
G_R_LAYOUT-WINDOW_TITLEBAR = 'Anwenderstatus'(005).
PERFORM F_STATUS_LEGENDE_POPUP.
ENDCASE.
ENDCASE.
ENDFORM. "F_USER_COMMAND_ALV
IF useful reward.
Vasanth -
How do I execute Double click event in grid and list disaplay?
Hi
Kindly check the following threads:
Re: Double click event of alv grid control
double click on alv grid
Re: Using double click event in ALV Grid
you can find some code samples from the above links.
Hope this helps!
best regards,
Thangesh -
Double click in ALV tree output????
Hi all,
I am able to display output in tree format. But I want to add the double click functionality to some of the fields in output. Means if I double click on some value in output tree, it should call some transaction. Please help me with this issue of double clicking.
Please tell how to handle events in this report tree display.
For the following code its displaying output in tree format and in right way. But i need to add double click functionality to this.
So provide me some sample program for this one....
* create hierarchy
CALL METHOD tree1->set_table_for_first_display
EXPORTING
it_list_commentary = lt_list_commentary
i_background_id = 'ALV_BACKGROUND'
i_save = 'A'
is_variant = ls_variant
CHANGING
it_sort = gt_sort[]
it_outtab = itab_outtab
it_fieldcatalog = t_fieldcat. "gt_fieldcatalog.
* expand first level
CALL METHOD tree1->expand_tree
EXPORTING
i_level = 1.
* optimize column-width
CALL METHOD tree1->column_optimize
EXPORTING
i_start_column = tree1->c_hierarchy_column_name
i_end_column = tree1->c_hierarchy_column_name.
In grid ALV we can have double cilck functionality using code:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_callback_pf_status_set = 'PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
is_layout = ls_layout
it_fieldcat = gt_fc[]
Here we can write subroutine for USER_COMMAND and handle the double click evenet. But tell me how to provide this in tree ALV.
<REMOVED BY MODERATOR>
Regards,
Sachin
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 1:47 PMHello Sachin
The following sample report ZUS_SDN_ALV_TREE_DEMO demonstrates the crucial parts for double-click event handling (nodes & items) in ALV trees.
*& Report ZUS_SDN_ALV_TREE_DEMO
*& Thread: double click in ALV tree output????
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="742412"></a>
REPORT zus_sdn_alv_tree_demo.
CLASS cl_gui_column_tree DEFINITION LOAD.
CLASS cl_gui_cfw DEFINITION LOAD.
TYPE-POOLS: abap.
TYPES: BEGIN OF ty_s_outtab.
INCLUDE TYPE knvv AS data.
TYPES: nkey TYPE lvc_nkey.
TYPES: parent_key TYPE lvc_nkey.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
DATA: gt_outtab TYPE ty_t_outtab.
DATA:
gd_okcode TYPE ui_func,
gd_repid TYPE syst-repid,
gt_fcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo,
gs_variant TYPE disvariant,
go_docking TYPE REF TO cl_gui_docking_container,
go_tree TYPE REF TO cl_gui_alv_tree.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_node_double_click
FOR EVENT node_double_click OF cl_gui_alv_tree
IMPORTING node_key,
handle_item_double_click
FOR EVENT item_double_click OF cl_gui_alv_tree
IMPORTING node_key
fieldname.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_node_double_click.
message 'Event=Double-Click on Node' type 'I'.
call transaction 'XD03'.
ENDMETHOD. "handle_node_double_click
METHOD handle_item_double_click.
message 'Event=Double-Click on Item' type 'I'.
call transaction 'VA03'.
ENDMETHOD. "handle_item_double_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
PERFORM init_controls.
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* container =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
lifetime_dynpro_dynpro_link = 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.
CALL SCREEN '0100'.
** NOTE: no elements on screen
** 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'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
TRANSLATE gd_okcode TO UPPER CASE.
CASE gd_okcode.
WHEN 'BACK' OR
'EXIT' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN 'REFRESH'.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form init_controls
* text
* --> p1 text
* <-- p2 text
FORM init_controls .
* 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 tree control
CREATE OBJECT go_tree
EXPORTING
parent = go_docking
node_selection_mode = cl_gui_column_tree=>node_sel_mode_multiple
item_selection = 'X' " required for double-click event on item
no_html_header = ''
no_toolbar = ''
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
illegal_node_selection_mode = 5
failed = 6
illegal_column_name = 7.
IF sy-subrc <> 0.
MESSAGE x208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
* create Hierarchy-header
DATA ls_hierarchy_header TYPE treev_hhdr.
PERFORM build_hierarchy_header CHANGING ls_hierarchy_header.
PERFORM build_fieldcatalog.
PERFORM set_layout_and_variant.
* create emty tree-control
CALL METHOD go_tree->set_table_for_first_display
EXPORTING
** i_structure_name = 'KNVV'
is_variant = gs_variant
i_save = 'A'
* i_default = 'X'
is_hierarchy_header = ls_hierarchy_header
* is_exception_field =
* it_special_groups =
* it_list_commentary =
* i_logo =
* i_background_id =
* it_toolbar_excluding =
* it_except_qinfo =
CHANGING
it_outtab = gt_outtab
* it_filter =
it_fieldcatalog = gt_fcat.
* create hierarchy
PERFORM create_hierarchy.
* register events
PERFORM register_events.
* adjust column_width
CALL METHOD go_tree->column_optimize.
ENDFORM. " init_controls
*& Form build_hierarchy_header
* build hierarchy-header-information
* -->P_L_HIERARCHY_HEADER strucxture for hierarchy-header
FORM build_hierarchy_header CHANGING
p_hierarchy_header TYPE treev_hhdr.
p_hierarchy_header-heading = 'Hierarchy Header'. "#EC NOTEXT
p_hierarchy_header-tooltip =
'This is the Hierarchy Header !'. "#EC NOTEXT
p_hierarchy_header-width = 30.
p_hierarchy_header-width_pix = ''.
ENDFORM. " build_hierarchy_header
*& Form BUILD_FIELDCATALOG
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog .
REFRESH: gt_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'KNVV'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_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.
DELETE gt_fcat FROM 8.
ENDFORM. " BUILD_FIELDCATALOG
*& Form SET_LAYOUT_AND_VARIANT
* text
* --> p1 text
* <-- p2 text
FORM set_layout_and_variant .
CLEAR: gs_layout,
gs_variant.
gs_variant-report = syst-repid.
gs_variant-handle = 'TREE'.
ENDFORM. " SET_LAYOUT_AND_VARIANT
*& Form create_hierarchy
* text
* --> p1 text
* <-- p2 text
FORM create_hierarchy .
DATA: ls_knvv TYPE sflight,
ls_outtab TYPE ty_s_outtab,
lt_outtab TYPE ty_t_outtab.
* get data
SELECT * FROM knvv INTO CORRESPONDING FIELDS OF TABLE lt_outtab
UP TO 200 ROWS . "#EC CI_NOWHERE
SORT lt_outtab BY kunnr vkorg.
* add data to tree
DATA: ld_kunnr_key TYPE lvc_nkey,
ld_vkorg_key TYPE lvc_nkey,
ld_last_key TYPE lvc_nkey.
LOOP AT lt_outtab INTO ls_outtab.
ON CHANGE OF ls_outtab-kunnr.
PERFORM add_customer_line USING ls_outtab-data
CHANGING ld_kunnr_key.
ENDON.
ON CHANGE OF ls_outtab-vkorg.
PERFORM add_salesorg_line USING ls_outtab-data
ld_kunnr_key
CHANGING ld_vkorg_key.
ENDON.
PERFORM add_complete_line USING ls_outtab-data
ld_vkorg_key
CHANGING ld_last_key.
ENDLOOP.
* calculate totals
CALL METHOD go_tree->update_calculations.
* this method must be called to send the data to the frontend
CALL METHOD go_tree->frontend_update.
ENDFORM. " create_hierarchy
*& Form add_customer_line
* add hierarchy-level 1 to tree
* -->P_LS_SFLIGHT sflight
* -->P_RELEATKEY relatkey
* <-->p_node_key new node-key
FORM add_customer_line USING us_data TYPE ty_s_outtab-data
ud_relat_key TYPE lvc_nkey
CHANGING cd_node_key TYPE lvc_nkey.
DATA: l_node_text TYPE lvc_value,
ls_data TYPE ty_s_outtab-data.
* set item-layout
DATA: lt_item_layout TYPE lvc_t_layi,
ls_item_layout TYPE lvc_s_layi.
ls_item_layout-t_image = '@A0@'. " icon_customer.
ls_item_layout-fieldname = go_tree->c_hierarchy_column_name.
ls_item_layout-style =
cl_gui_column_tree=>style_intensifd_critical.
APPEND ls_item_layout TO lt_item_layout.
* add node
l_node_text = us_data-kunnr.
DATA: ls_node TYPE lvc_s_layn.
ls_node-n_image = space.
ls_node-exp_image = space.
CALL METHOD go_tree->add_node
EXPORTING
i_relat_node_key = ud_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = l_node_text
is_outtab_line = ls_data
is_node_layout = ls_node
it_item_layout = lt_item_layout
IMPORTING
e_new_node_key = cd_node_key.
ENDFORM. " add_customer_line
*& Form add_salesorg_line
* add hierarchy-level 1 to tree
* -->P_LS_SFLIGHT sflight
* -->P_RELEATKEY relatkey
* <-->p_node_key new node-key
FORM add_salesorg_line USING us_data TYPE ty_s_outtab-data
ud_relat_key TYPE lvc_nkey
CHANGING cd_node_key TYPE lvc_nkey.
DATA: l_node_text TYPE lvc_value,
ls_data TYPE ty_s_outtab-data.
* set item-layout
DATA: lt_item_layout TYPE lvc_t_layi,
ls_item_layout TYPE lvc_s_layi.
ls_item_layout-t_image = '@DS@'. " ICON_PARTNER_SALES_ACTIVITY
ls_item_layout-fieldname = go_tree->c_hierarchy_column_name.
ls_item_layout-style =
cl_gui_column_tree=>style_intensifd_critical.
APPEND ls_item_layout TO lt_item_layout.
* add node
l_node_text = us_data-vkorg.
DATA: ls_node TYPE lvc_s_layn.
ls_node-n_image = space.
ls_node-exp_image = space.
CALL METHOD go_tree->add_node
EXPORTING
i_relat_node_key = ud_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = l_node_text
is_outtab_line = ls_data
is_node_layout = ls_node
it_item_layout = lt_item_layout
IMPORTING
e_new_node_key = cd_node_key.
ENDFORM. " add_salesorg_line
*& Form add_cmplete_line
* add hierarchy-level 3 to tree
* -->P_LS_SFLIGHT sflight
* -->P_RELEATKEY relatkey
* <-->p_node_key new node-key
FORM add_complete_line USING us_data TYPE ty_s_outtab-data
ud_relat_key TYPE lvc_nkey
CHANGING cd_node_key TYPE lvc_nkey.
DATA: l_node_text TYPE lvc_value.
* set item-layout
DATA: lt_item_layout TYPE lvc_t_layi,
ls_item_layout TYPE lvc_s_layi.
ls_item_layout-fieldname = go_tree->c_hierarchy_column_name.
ls_item_layout-class = cl_gui_column_tree=>item_class_checkbox.
** ls_item_layout-editable = 'X'.
APPEND ls_item_layout TO lt_item_layout.
** CLEAR ls_item_layout.
** ls_item_layout-fieldname = 'PLANETYPE'.
** ls_item_layout-alignment = cl_gui_column_tree=>align_right.
** APPEND ls_item_layout TO lt_item_layout.
l_node_text = us_data-vtweg.
DATA: ls_node TYPE lvc_s_layn.
ls_node-n_image = space.
ls_node-exp_image = space.
CALL METHOD go_tree->add_node
EXPORTING
i_relat_node_key = ud_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
is_outtab_line = us_data
i_node_text = l_node_text
is_node_layout = ls_node
it_item_layout = lt_item_layout
IMPORTING
e_new_node_key = cd_node_key.
ENDFORM. " add_complete_line
*& Form register_events
* text
* --> p1 text
* <-- p2 text
FORM register_events.
* define the events which will be passed to the backend
DATA: lt_events TYPE cntl_simple_events,
l_event TYPE cntl_simple_event.
* define the events which will be passed to the backend
l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_checkbox_change.
** APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
** APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
** APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
** APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_header_click.
** APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
** APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
APPEND l_event TO lt_events.
CALL METHOD go_tree->set_registered_events
EXPORTING
events = lt_events
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
IF sy-subrc <> 0.
MESSAGE x208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
* set Handler
set handler:
lcl_eventhandler=>handle_node_double_click for go_tree,
lcl_eventhandler=>handle_item_double_click for go_tree.
** DATA: l_event_receiver TYPE REF TO lcl_tree_event_receiver.
** CREATE OBJECT l_event_receiver.
** SET HANDLER l_event_receiver->handle_node_ctmenu_request
** FOR tree1.
** SET HANDLER l_event_receiver->handle_node_ctmenu_selected
** FOR tree1.
** SET HANDLER l_event_receiver->handle_item_ctmenu_request
** FOR tree1.
** SET HANDLER l_event_receiver->handle_item_ctmenu_selected
** FOR tree1.
** SET HANDLER l_event_receiver->handle_checkbox_change FOR tree1.
ENDFORM. " register_events
Regards
Uwe -
Hi friends,
below statement is for double clicking,
WHEN '&IC1'. " SAP standard code for double-clicking, but i need single click because when i select field(not doubble click only single click) in alv grid it has to trigger and perform some action ,can any one know please tell me.gwa_fldcat-col_pos = 2.
gwa_fldcat-fieldname = 'CHK'.
gwa_fldcat-tabname = 'GT_FINAL'.
gwa_fldcat-EMPHASIZE = 'C310'.
gwa_fldcat-input = 'X'.
gwa_fldcat-edit = 'X'.
gwa_fldcat-checkbox = 'X'.
gwa_fldcat-just = 'C'.
gwa_fldcat-key = 'X'.
gwa_fldcat-outputlen = 16.
gwa_fldcat-seltext_l = 'Selection'.
gwa_fldcat-hotspot = 'X'.
APPEND gwa_fldcat TO git_fldcat.
CLEAR gwa_fldcat.
gs_events-name = 'USER_COMMAND'.
gs_events-form = 'USER'.
append gs_events to gi_events.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
i_callback_pf_status_set = 'PFSTATUS'
i_callback_user_command = 'USER'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS = wa_grid
is_layout = gs_layout
it_fieldcat = git_fldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = gi_events
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = gt_final.
gs_layout-colwidth_optimize = 'X'.
gs_layout-zebra = 'X'.
gs_layout-info_fieldname = 'COLOR'.
gs_layout-KEY_HOTSPOT = 'X'.
form user using lv_okcode like sy-ucomm
rs_selfield type slis_selfield.
lv_okcode = sy-ucomm.
case lv_okcode.
when '&IC1'.
loop at gt_final into gwa_final .
where chk = 'X'.
if gwa_final-chk is not initial.
gwa_final-color = 'C111' .
modify gt_final from gwa_final
index sy-tabix transporting color.
clear gwa_final.
endif.
endloop.
encase.
form Grid_settings .
wa_grid-EDT_CLL_CB = 'X'.
endform. -
Double Click on ALV Report Output, Bringing to selections creen
Hello Gurus,
Please help me When i do double click on ALV Report output , it is going back to Selection screen, actually its working as Back button. Now how to stop it.. I did debugging but i cannot trace it.PERFORM SUB_CREATE_FCAT.
DATA W_REPID LIKE SY-REPID.
W_REPID = SY-REPID.
ls_layout-colwidth_optimize = 'X'.
ls_layout-zebra = 'X'.
PERFORM SUB_SORT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-CPROG
I_CALLBACK_PF_STATUS_SET = 'STATUS'
I_CALLBACK_USER_COMMAND = 'C_USERCOMMAND '
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
IS_LAYOUT = ls_layout
IT_FIELDCAT = IT_FIELDCAT
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
IT_SORT = IT_SORT
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
I_SAVE = 'U'
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = T_FINAL
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF. -
Hi all,
Here is the code:
my aim is to double click the alv list and display the correspoonding data .can any one tell me how to solve this.
regards,
Lisa
Message was edited by: Lisa RoyHi Lisa,
**-ALV list Display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
<b> I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'</b>
<b> I_CALLBACK_USER_COMMAND = 'USER_COMMAND'</b>
IS_LAYOUT = X_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_EVENTS = IT_EVENTS
TABLES
T_OUTTAB = IT_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
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.
you need to pass these two forms
FORM PF_STATUS_SET USING P_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STANDARD' EXCLUDING P_EXTAB.
ENDFORM. "PF_STATUS_SET
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE
SLIS_SELFIELD.
case UCOMM.
when '&IC1'. "this is for double click.
"do some thing..
ENDCASE.
ENDFORM. "USER_COMMAND -
Double Click in ALV Report in Web dynpro ABAP4
Hi All,
I am very much new to WDA4 , can anybody plz guide me how to enable double click in ALV Report in Web dynpro ..
Plz help it is urgent .....
Thnks
SahilHi All,
I am very much new to WDA4 , can anybody plz guide me how to enable double click in ALV Report in Web dynpro ..
Plz help it is urgent .....
Thnks
Sahil -
Hi ALL,
I have a doubt in ALV,
My requirement is that, I developed one ALV report.
Now when i double click one field i have to show some fields in a new report.
How this can be done.
Thanks & Regards,
Pradeep AlexBC ALV report will help you using OOABAP.
any method you want to use, what you need to do is pass a subroutine name to the USER_COMMAND method. either directly in the ALV FM export parameter or in the event table.
in this subroutine which you have defined for USER_COMMAND, do what ever code you want. this will trigger when you double click the ALV output. -
Currently when I double click it creates cpgz file and does not open. The only way to open pages doc is to manually ask to open with pages.
Hi Karen,
Sounds like OS X has lost the association between Pages and its files.
Start by quitting Pages, then going to Finder.
In Finder, locate a .pages file. Click on it (once), then press command-I (eye, not one) to Get Info.
In the Info window that opens, expand the Open With section.
In this section, click on the pop-up menu and choose Pages (even if Pages is already shown).
Click the Change All button to associate all files with the .pages extension with Pages.
Close the info window.
Double click any .pages file to check that Pages will now launch and open the file.
Regards,
Barry -
hello
The problem appeared two days ago is that I can't open my mail app. everything was fine and functional. Now I double click on the icon and it does not respond. it receives mail and I can see push notifications on the mail icon but when I try to open it is no use. OS Y 10.10.2 (14C1514)Please follow these directions to delete the Mail "sandbox" folder.
Back up all data.
Triple-click anywhere in the line below on this page to select it:
~/Library/Containers/com.apple.mail
Right-click or control-click the highlighted line and select
Services ▹ Reveal
from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected folder—not just its contents—to the Desktop. Leave the Finder window open for now.
Restart the computer. Launch Mail and test. If the problem is resolved, you may have to recreate some of your Mail settings. Any custom stationery that you created may be lost. Ask for instructions if you want to preserve that data. You can then delete the folder you moved and close the Finder window.
Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.
*If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
Go ▹ Go to Folder...
from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return. -
Problem in double click in ALV
In the ALV GRID , I have used the following code to go to VA02 and VA22 .
WHEN c_ic1.
Retrieve the vbeln value of the record selected and use it to open tcode VA02.
CLEAR wa_outtab.
READ TABLE i_outtab INTO wa_outtab with key p_rs_selfield-fieldname.
SET PARAMETER ID c_pid FIELD wa_outtab-vbeln.
if wa_outtab-auart eq C_ZQT .
CALL TRANSACTION c_tcode2 AND SKIP FIRST SCREEN.
ELSEIF wa_outtab-auart eq C_ZQR .
CALL TRANSACTION c_tcode2 AND SKIP FIRST SCREEN.
ELSE.
CALL TRANSACTION c_tcode1 AND SKIP FIRST SCREEN.
ENDIF .
IF sy-subrc <> 0.
no requirement to display error message in case error
in opening tcode va02.
ENDIF.
Now My problem is that when the user clicks on a particular sales order in ALV GRID , that particular sales order should be displayed in VA02 .I,e instead of user entering the value of sales order manualy in VA02 . It has to automatically take from the ALV GRID tht particular sales order whic he has double clicked in the ALV .
Please tell me how to achieve this functionality ..
Regards
pavanrefer this code.....
pass USER_COMMAND IN ALV AND THEN
ADD THE CODE LIKE THIS..
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
*break mtabap.
data : lv_vbeln TYPE vbeln_va.
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'VBELN' .
Read table IT_FINAL into wa_FINAL index rs_selfield-tabindex.
if sy-subrc = 0.
lv_vbeln = wa_FINAL-vbeln.
SET PARAMETER ID 'AUN' FIELD lv_vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN .
clear lv_vbeln.
endif.
ENDIF.
clear wa_final.
ENDCASE.
ENDFORM. "user_command
Maybe you are looking for
-
Deploying Creative Cloud for Teams via Group Policy
Good afternoon, we are trying to deploy our Creative Cloud for Teams products. Our ideal situation would be where we are able to deploy the Creative Cloud Software (e.g. including Photoshop, InDesign, Illustrator, etc) using Group Policy, then assig
-
We recently upgrade the virtual hardware of some of our VMware VM's running Windows 7. One side-effect is that in Windows on these machines, an instance of the NIC from the previous version of virtual hardware remains, as a hidden device. This can be
-
Sort Order for a VARCHAR2 Column
Hello Everyone, This is probably quite simple, however I cannot see it. I am trying to sort on a varchar2 column that has numbers, text, dashes, tildes, carets and underscores which are mixed to compose a wire number. I have come up with an order by
-
Personal Information nodes missing in ECC 6.0
Hi, Personal Information nodes missing in ECC 6.0 SAP HR Highest Level Support SAPKE60003 EA HR SAPKGPHD03 What may be the reason. Note: Points will be rewarded immediately. Kiran
-
Webmail services as alternative to Thunderbird?
Are there any webmail providers that come to close to the functionality provided by Thunderbird? Here are my requirements: - The ability to display a list of shared accounts/mailboxes, and to be able to very easily access those mailboxes - The abilit