WebDynpro ABAP ALV table not refreshed
Hi everyone,
I've got a master table which displays a list of items. On lead selection a query is executed and the result is displayed in a table below the first table (like a master-detail pattern).
This all works all right when the detail view is a standard webdynpro table.
However when I replace the standard table with an ALV table this is not refreshed.
I've also tried to invalidate the node in the even handler "on lead selection" and I've also coded
lo_interfacecontroller->refresh( in = lv_refresh_in ).
but to no avail.
Any ideas?
Hi,
Keep your invalidate method at the end the particular action or method.
DATA LO_ND_<Context Node> TYPE REF TO IF_WD_CONTEXT_NODE.
navigate from <CONTEXT> to <CTX_VN_ITEM_DET> via lead selection
LO_ND_<Context Node> = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_<Context Node> ).
LO_ND_<Context Node>->INVALIDATE( ).
Regards,
Monishankar C
Similar Messages
-
Webdynpro abap ALV export to excel with images problem
Hello experts,
I'm having problems with standard excel export functionality in webdynpro abap ALV.
In my table i have images taken from content server (employee photos) linked with URL to a table_cell Image, when i export the table to excel using standard function the images is showed as a broken picture with the following text:
"The linked image cannot displayed. The file may have been moved, or deleted. Verify that the link points to the correct file and location."
I'm running on sap basis 7.02 SP13 and implemented the notes 1975765 and 1985288 but not resolved this issue.
Do you have any ideas?
Thank you.Hi Jorge,
Are you able to download the ICONs from alv table? try to use some icon source '~Icon/Add' and check out if you can download it to excel successfully.
FYR:
Regards,
Rama -
How to upload file in webdynpro abap alv
Hello Friends,
how to upload file in webdynpro abap alv
Regards
Narendra
Moderator message: please search for available information, post in correct "Web Dynpro ABAP" forum if still required.
Edited by: Thomas Zloch on Jun 6, 2011 11:55 AMHi Narendra,
You ahve to search before posting. This discussed many times.
You need to use file upload ui element to upload data. and display in alv.
Please go thorugh this..
http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
Re: Upload .xls file in WDABAP
http://forums.sdn.sap.com/click.jspa?searchID=72307893&messageID=5425671
Cheers,
Kris. -
Webdynpro ABAP - ALV how can i display Total of Column
Hi friends,
Webdynpro ABAP - ALV how can i display Total of Columns.
Please tell me any metod is there or any solution.
Thanks,
Kumar.Hi
You can take help of following code snippet to create totals for a particular column
Data: lr_function_settings TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_column TYPE REF TO cl_salv_wd_column,
lt_column type salv_wd_t_column_ref,
ls_column type salv_wd_s_column_ref.
Data: lr_field_amnt type REF TO CL_SALV_WD_FIELD.
* get reference of ALV component
lr_salv_wd_table = wd_this->wd_cpifc_OVERVIEW_EARNED_ALV( ).
wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
* get function settings
lr_function_settings ?= wd_this->alv_config_table.
* display columns in correct order
lr_column_settings ?= wd_this->alv_config_table.
lt_column = lr_column_settings->get_columns( ).
loop at lt_column into ls_column.
CASE ls_column-id.
when 'AMOUNT'
* aggregate field
CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_FIELD_SETTINGS~GET_FIELD
EXPORTING
FIELDNAME = 'AMOUNT'
RECEIVING
VALUE = lr_field_amnt.
* create aggregate rule as total
CALL METHOD LR_FIELD_AMNT->IF_SALV_WD_AGGR~CREATE_AGGR_RULE
EXPORTING
AGGREGATION_TYPE = IF_SALV_WD_C_AGGREGATION=>AGGRTYPE_TOTAL
RECEIVING
VALUE = lv_aggr_rule.
endcase.
Regards
Manas DUa -
In webdynpro for ABAP alv table issue
hello gurus,
i am new for webdynpro for ABAP.i strucked at one point at designing time.anybody could you suggest me on this.
thanks in advance.
let me explain my scenario first.
in my webdynpro for ABAP developement i have one alv table having ten fields.i am featching the data for eight fields from one Ztabale and updating , for rest of two fields we need to fill after displaying output using the respective F4 help. Right now these two fields are in input editable mode.now i am getting the values successfully from F4 help and at the same time it is allowing MANUAL ENTRIES also but as per my requirement it should not allow any manual entries . for this i have made these two fields are in readonly mode as like as rest of fields to avoid the MANUAL ENTRIES but at this time i didnot get any F4 helpfor those two fields.
so how can i achive my goal in this thing could any one suggest me.
my final conclusion is we need to get only F4 help values into those two fields . it should not allow any manual values at any point of time.
best regards,
babuya hi harshit,
my self also used same code in my action part . here i have one table with four fields carrid , connid , fldate , price.
for carrid i have created freely programmed search help.but if it is in display mode there is no F4 help in enable mode.
in context for attribute carrid
DATA lo_nd_flight TYPE REF TO if_wd_context_node.
DATA lo_el_flight TYPE REF TO if_wd_context_element.
DATA ls_flight TYPE wd_this->element_flight.
DATA lt_flight TYPE wd_this->elements_flight.
navigate from <CONTEXT> to <FLIGHT> via lead selection
lo_nd_flight = wd_context->get_child_node( name = wd_this->wdctx_flight ).
select connid fldate price from sflight into CORRESPONDING FIELDS OF TABLE
lt_flight UP TO 20 ROWS.
@TODO handle non existant child
IF lo_nd_flight IS INITIAL.
ENDIF.
get element via lead selection
lo_el_flight = lo_nd_flight->get_element( ).
alternative access via index
lo_el_flight = lo_nd_flight->get_element( index = 1 ).
@TODO handle not set lead selection
IF lo_el_flight IS INITIAL.
ENDIF.
get all declared attributes
lo_el_flight->get_static_attributes(
IMPORTING
static_attributes = ls_flight ).
CALL METHOD lo_nd_flight->bind_table
EXPORTING
new_items = lt_flight
set_initial_elements = ABAP_TRUE
index =
DATA: lo_cmp_usage TYPE REF TO if_wd_component_usage.
DATA: lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
instantiate ALV component usage if necessary
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
pass reference to data node to instance of ALV usage
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
lo_interfacecontroller->set_data( r_node_data = lo_nd_flight ).
Configure ALV
DATA lr_config TYPE REF TO cl_salv_wd_config_table.
lr_config = lo_interfacecontroller->get_model( ).
**declerations
DATA: lt_columns TYPE salv_wd_t_column_ref,
ls_columns TYPE salv_wd_s_column_ref,
lr_input TYPE REF TO cl_salv_wd_uie_input_field,
name TYPE string,
lt_node_info TYPE wdr_context_attr_info_map,
ls_node_info TYPE wdr_context_attribute_info,
lv_tabix TYPE sy-tabix,
lr_info TYPE REF TO if_wd_context_node_info.
TYPES: BEGIN OF ty_name,
name TYPE string,
END OF ty_name.
DATA: lt_name TYPE TABLE OF ty_name,
ls_name TYPE ty_name.
**for getting node info
*Get the context node information
lr_info = lo_nd_flight->get_node_info( ).
lt_node_info = lr_info->get_attributes( ).
LOOP AT lt_node_info INTO ls_node_info.
CASE ls_node_info-name.
WHEN 'CARRID'.
ls_name-name = ls_node_info-name.
APPEND ls_name TO lt_name.
WHEN 'REGIONALOFFICER'.
ls_name-name = ls_node_info-name.
APPEND ls_name TO lt_name.
WHEN 'INSPECTORNAME'.
ls_name-name = ls_node_info-name.
APPEND ls_name TO lt_name.
ENDCASE.
ENDLOOP.
*Logic for Table Horizontal Scrolling
lr_config->if_salv_wd_table_settings~set_visible_row_count( 13 ).
" lr_config->if_salv_wd_table_settings~set_width( '1085' ).
lr_config->if_salv_wd_table_settings~set_width( '100%' ).
lr_config->if_salv_wd_table_settings~set_scrollable_col_count( 8 ).
" lr_config->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).
lr_config->if_salv_wd_table_settings~set_first_visible_scroll_col( 'CARRID' ).
lr_config->if_salv_wd_table_settings~set_cell_action_event_enabled( abap_true ).
Set the table editable .
DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
lr_table_settings ?= lr_config.
lr_table_settings->set_read_only( abap_false ).
lr_table_settings->set_read_only( abap_true ).
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_column TYPE REF TO cl_salv_wd_column.
DATA: lt_string TYPE STANDARD TABLE OF string,
ld_string TYPE string,
ld_int TYPE i,
lv_index TYPE i.
Make few columns editable and attach inputfield, if permitted.
DATA lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
CLEAR lt_string.
APPEND 'CARRID' TO lt_string.
LOOP AT lt_string INTO ld_string.
lr_column_settings ?= lr_config.
lr_column = lr_column_settings->get_column( ld_string ).
CREATE OBJECT lr_input_field
EXPORTING
value_fieldname = ld_string.
lr_input_field->set_read_only( abap_true ).
lr_column->set_cell_editor( lr_input_field ).
ENDLOOP.
CLEAR lt_string. -
Webdynpro ABAP ALV tutorial - simple update or use changelog ?
I was working through the alv tutorials for webdynpro abap, and while trying to complete the
"Editing ALV in Web Dynpro for ABAP", I got to page 8 of the pdf document where it explains how to do the ONDATACHECK event handler, and it comments out the portion for updating/saving the data (as noted below), and does not explain anything further about the save.
* save data to database
{* update... => only simlate, to not change the flight data model
* content!
Now, I am new to webdynpro abap, and don't know if I am supposed to utlize the changelog for this, or if a simple update will work.
Any Ideas ?Thank you for your answer - I am guessing from your response that a method would need to be built - similar to one which I found in the SWDP_DEMO_TUTORIALS for a webdynpro called WDT_TABLE (see below) - where a check of the table changes would need to be made before an update to the table - rather than a simple one line update statement placed at that point in the code.
METHOD save_changes.
DATA: table_node TYPE REF TO if_wd_context_node,
read_sbook TYPE
if_componentcontroller=>elements_sbook_node,
aux_read_sbook TYPE
if_componentcontroller=>elements_sbook_node,
wa_read_sbook TYPE LINE OF
if_componentcontroller=>elements_sbook_node,
context TYPE REF TO if_wd_context,
change_line TYPE LINE OF wdr_context_change_list,
changes TYPE wdr_context_change_list,
aux_changes TYPE wdr_context_change,
lv_change_tab_size TYPE sy-tfill,
aux_string TYPE string,
lv_node_size TYPE sy-tfill,
aux_div TYPE int4,
aux_index TYPE i,
l_current_controller TYPE REF TO if_wd_controller,
l_message_manager TYPE REF TO if_wd_message_manager,
text TYPE string,
it_int TYPE STANDARD TABLE OF i WITH KEY table_line.
* check whether context has changed
context = wd_context->get_context( ).
changes = context->get_context_change_log( ).
LOOP AT changes INTO aux_changes.
IF aux_changes-change_kind = 'A' AND aux_changes-node_name = 'SBOOK_NODE'.
INSERT aux_changes INTO TABLE wd_this->sbook_delta.
ENDIF.
ENDLOOP.
* get the complete context in 'read_sbook' table
table_node = wd_context->get_child_node( name = 'MY_BOOKING_NODE' ).
table_node = table_node->get_child_node( name = 'SBOOK_NODE' ).
table_node->get_static_attributes_table( IMPORTING table = read_sbook
* get the size of table and changes
DESCRIBE TABLE read_sbook LINES lv_node_size.
LOOP AT wd_this->sbook_delta INTO change_line.
APPEND change_line-element_index TO it_int.
ENDLOOP.
SORT it_int.
DELETE ADJACENT DUPLICATES FROM it_int.
DESCRIBE TABLE it_int LINES lv_change_tab_size.
* get message manager
l_current_controller ?= wd_this->wd_get_api( ).
CALL METHOD l_current_controller->get_message_manager
RECEIVING
message_manager = l_message_manager.
* decide which way to update databse
IF lv_change_tab_size <> 0.
aux_div = lv_node_size / lv_change_tab_size.
IF aux_div <= 3.
* write complete table to database
lv_change_tab_size = lv_node_size.
CL_WDT_FLIGHT_MODEL=>write_sbook_complete( read_sbook ).
ELSE.
* write only the changed records to database
LOOP AT it_int INTO aux_index.
READ TABLE read_sbook INDEX aux_index INTO wa_read_sbook.
APPEND wa_read_sbook TO aux_read_sbook.
ENDLOOP.
CL_WDT_FLIGHT_MODEL=>write_sbook_records_changed( aux_read_sbook )
ENDIF.
REFRESH wd_this->sbook_delta.
REFRESH it_int.
wd_this->sbook_changed = abap_false.
* report message
aux_string = lv_change_tab_size .
IF lv_change_tab_size = 1.
CONCATENATE aux_string 'record written to database' INTO text.
ELSE.
CONCATENATE aux_string 'records written to database' INTO text.
ENDIF.
CALL METHOD l_message_manager->report_success
EXPORTING
message_text = text.
ELSE.
* report message
CALL METHOD l_message_manager->report_success
EXPORTING
message_text = 'there are no changes to be written to database'.
ENDIF.
ENDMETHOD. -
Splitter Problem - ALV Grid not refreshed when selected another item
Hi Experts!!
I have a container on screen 100 which has to be split into 3 areas. Left area ->tree, Right top area -alv grid and bottom also alv grid. I created the program without splitter and it was working fine. After I added this splitter, I see that in ALV grid, the data is not being refreshed. When double clicked on an item in tree struct, ALV grid (CL_SALV_TABLE) to be shown.. Firstly it's fine but when I double click on another item, it's not refreshing the data but is showing the same previous data.
I have searched existing posts and implemented, but no luck.
PFB my code:
* In PBO of screen 100
CREATE OBJECT go_cc_area1
EXPORTING
container_name = 'CC_AREA1'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc <> 0.
MESSAGE e025 WITH sy-subrc.
ENDIF.
CREATE OBJECT go_splitter
EXPORTING
parent = go_cc_area1
orientation = 1 "Vertical split
sash_position = 40
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
ENDIF.
go_container_tree = go_splitter->top_left_container.
go_container_2 = go_splitter->bottom_right_container.
CREATE OBJECT go_splitter_2
EXPORTING
parent = go_container_2
orientation = 0 "Horizontal split
sash_position = 40
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
ENDIF.
go_cc_area2 = go_splitter_2->top_left_container.
go_cc_area3 = go_splitter_2->bottom_right_container.
CREATE OBJECT go_tree
EXPORTING
i_parent = go_container_tree
i_node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
i_item_selection = gc_x
i_no_html_header = gc_x
i_no_toolbar = space
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.
CALL METHOD go_tree->set_table_for_first_display
EXPORTING
i_background_id = space
is_layout = gs_layout
CHANGING
it_sort = gt_sort
it_outtab = gt_tree_output
it_fieldcatalog = gt_fieldcat_tree.
CALL METHOD go_tree->expand_tree
EXPORTING
i_level = 2.
* End - PBO 100
* CLASS lcl_tree_event_receiver DEFINITION
CLASS lcl_tree_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS: handle_item_double_click
FOR EVENT item_double_click OF cl_gui_alv_tree_simple
IMPORTING fieldname
index_outtab
grouplevel.
ENDCLASS. "lcl_tree_event_receiver DEFINITION
* CLASS lcl_tree_event_receiver IMPLEMENTATION
CLASS lcl_tree_event_receiver IMPLEMENTATION.
METHOD handle_item_double_click.
IF go_alv_area2 IS BOUND.
go_alv_area2->refresh( ).
ENDIF.
cl_salv_table=>factory(
EXPORTING
list_display = space
r_container = go_cc_area2
IMPORTING
r_salv_table = go_alv_area2
CHANGING
t_table = gt_table ).
go_alv_area2->display( ).
ENDMETHOD. "handle_item_double_click
ENDCLASS. "lcl_tree_event_receiver IMPLEMENTATION
I am facing the same problem with area 3 as well. Can somebody please help me out.
Thanks a lot!!
Edited by: Srinivas Kalluri on Jan 28, 2012 1:39 PMHi All,
I am still facing this problem. Can somebody please help me out?
I created a test program wth sflight and spfli tables. Can somebody look into this and tell me where I am going wrong?
On screen 100 i have one cust container named CC.
When I test it, it's showing the same refresh problem. But in this test program refresh is atleast happening once.
REPORT ztest.
PARAMETERS: p_carrid TYPE sflight-carrid.
CLASS lcl_tree_event_receiver DEFINITION DEFERRED.
CONSTANTS: gc_x VALUE 'X'.
DATA: go_cc_area1 TYPE REF TO cl_gui_custom_container,
go_tree TYPE REF TO cl_gui_alv_tree_simple,
go_tree_event_receiver TYPE REF TO lcl_tree_event_receiver,
go_cc_area2 TYPE REF TO cl_gui_container,
go_alv_area2 TYPE REF TO cl_salv_table,
go_cc_area3 TYPE REF TO cl_gui_container,
go_columns TYPE REF TO cl_salv_columns_table,
go_cc_editor TYPE REF TO cl_gui_custom_container,
go_editor TYPE REF TO cl_gui_textedit,
go_content TYPE REF TO cl_salv_form_element,
go_container_tree TYPE REF TO cl_gui_container,
go_container_2 TYPE REF TO cl_gui_container,
go_splitter TYPE REF TO cl_gui_easy_splitter_container,
go_splitter_2 TYPE REF TO cl_gui_easy_splitter_container,
go_cc_comp TYPE REF TO cl_gui_custom_container,
go_alv_comp TYPE REF TO cl_salv_table.
DATA: gt_sflight TYPE TABLE OF sflight,
gt_data TYPE TABLE OF spfli,
gt_fieldcat TYPE lvc_t_fcat,
gt_sort TYPE lvc_t_sort,
gs_sflight TYPE sflight,
gs_layout TYPE lvc_s_layo.
* CLASS lcl_tree_event_receiver DEFINITION
CLASS lcl_tree_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS: handle_item_double_click
FOR EVENT item_double_click OF cl_gui_alv_tree_simple
IMPORTING fieldname
index_outtab
grouplevel.
ENDCLASS. "lcl_tree_event_receiver DEFINITION
* CLASS lcl_tree_event_receiver IMPLEMENTATION
CLASS lcl_tree_event_receiver IMPLEMENTATION.
METHOD handle_item_double_click.
READ TABLE gt_sflight INTO gs_sflight INDEX index_outtab.
IF sy-subrc EQ 0.
SELECT * FROM spfli INTO TABLE gt_data WHERE connid = gs_sflight-connid.
IF go_alv_area2 IS BOUND.
go_alv_area2->refresh( ).
cl_gui_cfw=>flush( ).
ENDIF.
cl_salv_table=>factory(
EXPORTING
r_container = go_cc_area2
IMPORTING
r_salv_table = go_alv_area2
CHANGING
t_table = gt_data ).
go_alv_area2->display( ).
ENDIF.
ENDMETHOD. "handle_item_double_click
ENDCLASS. "lcl_tree_event_receiver IMPLEMENTATION
START-OF-SELECTION.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'MAIN'.
* SET TITLEBAR 'xxx'.
CREATE OBJECT go_cc_area1
EXPORTING
container_name = 'CC'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc <> 0.
* MESSAGE e025 WITH sy-subrc text-e01.
ENDIF.
CREATE OBJECT go_splitter
EXPORTING
parent = go_cc_area1
orientation = 1 "Vertical split
sash_position = 25
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE e025 WITH sy-subrc text-e02.
ENDIF.
go_container_tree = go_splitter->top_left_container.
go_container_2 = go_splitter->bottom_right_container.
CREATE OBJECT go_splitter_2
EXPORTING
parent = go_container_2
orientation = 0 "Horizontal split
sash_position = 40
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE e025 WITH sy-subrc text-e02.
ENDIF.
go_cc_area2 = go_splitter_2->top_left_container.
CREATE OBJECT go_tree
EXPORTING
i_parent = go_container_tree
i_node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
i_item_selection = gc_x
i_no_html_header = gc_x
i_no_toolbar = space
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 e025 WITH sy-subrc text-e03.
ENDIF.
SELECT * FROM sflight INTO TABLE gt_sflight WHERE carrid EQ p_carrid.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SFLIGHT'
i_bypassing_buffer = gc_x
CHANGING
ct_fieldcat = gt_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE e025 WITH sy-subrc text-e05.
ENDIF.
DATA: ls_fieldcatalog TYPE lvc_s_fcat.
LOOP AT gt_fieldcat INTO ls_fieldcatalog.
ls_fieldcatalog-col_opt = gc_x.
CASE ls_fieldcatalog-fieldname.
WHEN 'CARRID'.
ls_fieldcatalog-no_out = gc_x.
WHEN 'CONNID'.
ls_fieldcatalog-no_out = gc_x.
ENDCASE.
MODIFY gt_fieldcat FROM ls_fieldcatalog.
CLEAR ls_fieldcatalog.
ENDLOOP.
DATA: ls_sort TYPE lvc_s_sort.
ls_sort-spos = 1.
ls_sort-fieldname = 'CARRID'.
ls_sort-up = gc_x.
APPEND ls_sort TO gt_sort.
ls_sort-spos = 2.
ls_sort-fieldname = 'CONNID'.
ls_sort-up = gc_x.
APPEND ls_sort TO gt_sort.
DATA: lt_events TYPE cntl_simple_events,
lo_l_event TYPE cntl_simple_event.
lo_l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
APPEND lo_l_event TO lt_events.
lo_l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
APPEND lo_l_event TO lt_events.
lo_l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
APPEND lo_l_event TO lt_events.
lo_l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
APPEND lo_l_event TO lt_events.
lo_l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
APPEND lo_l_event TO lt_events.
lo_l_event-eventid = cl_gui_column_tree=>eventid_button_click.
APPEND lo_l_event TO lt_events.
lo_l_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
APPEND lo_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.
* Set Handler
CREATE OBJECT go_tree_event_receiver.
SET HANDLER go_tree_event_receiver->handle_item_double_click FOR go_tree.
CALL METHOD go_tree->set_table_for_first_display
EXPORTING
i_background_id = space
is_layout = gs_layout
CHANGING
it_sort = gt_sort
it_outtab = gt_sflight
it_fieldcatalog = gt_fieldcat.
CALL METHOD go_tree->expand_tree
EXPORTING
i_level = 2.
IF NOT gt_sflight[] IS INITIAL.
CALL METHOD go_tree->set_top_node
EXPORTING
i_index_outtab = 0.
ENDIF.
* Send data to frontend.
CALL METHOD go_tree->frontend_update.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Edited by: Srinivas Kalluri on Jan 31, 2012 4:49 PM -
How to disable Print button on WebDynpro ABAP ALV
In WebDynpro ABAP, a standard menu appears around the ALV, that has a PRINT button and an EXPORT button.
Is there anyway to disable those buttons????
Thanks
JohnHi John,
Check the interface if_salv_wd_std_functions. It contains methods which are used to hide the standard ALV toolbar buttons.
Also refer : Removing "print version" button in alv
How to hide Print and Filter option from dynamic ALV -
Webdynpro ABAP -- ALV Layout setting
Dear all,
In my development with ALV in Webdynpro ABAP, I want to save the ALV layout via Setting. but it seems that the layout only can be saved as user-specific, is it any possible to use it as the gobal one?
Please kindly provide me some hints. Thanks in Advance.
Best Regards,Hi,
Yes you can make it global in administrative level.
1.In SE80 ,Double click on the name of your Web Dynpro Application .
2.Select Web Dynpro Application Menu .
3.Select Test->-> Execute in Administrative Mode from the menu.
Your application opens in administrative mode .
Go to the ALV settings make the changes and save it as some variant.
This layout will be default and global to all the users.
Regards
John Paul -
Webdynpro ABAP ALV in SAP ECC6 - EHP4: To disable Column Selection
Hi All,
We are using SAP ECC6 EHP4 and for Webdynpro ABAP application, after each column a vertical white line is appearing, and I need to hide this..
SAP suggested us to disable COLUMN SELECTION I have tried the below code but still I am not able to get this done..
Can you please suggest the appropriate method to achieve the same.
Code:
* show tab COLUMN SELECTION in Settings page
CALL METHOD wd_this->alv_conf_table->if_salv_wd_std_functions~set_column_selection_allowed
EXPORTING value = ABAP_false..
here alv_conf_table refers to CL_SALV_WD_CONFIG_TABLE.
Thanks in advance.
Thanks
Srinivas
Edited by: Srinivas Manchi on Apr 22, 2010 11:35 AM
Edited by: Srinivas Manchi on Apr 22, 2010 1:06 PMYou have to disable the DDic binding on the column before your override text will show up:
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
if l_ref_cmp_usage->has_active_component( ) is initial.
l_ref_cmp_usage->create_component( ).
endif.
data l_salv_wd_table type ref to iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv( ).
data l_table type ref to cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
data l_column type ref to cl_salv_wd_column.
l_column = l_table->if_salv_wd_column_settings~get_column( 'POSTING_DATE' ).
data l_header type ref to cl_salv_wd_column_header.
l_header = l_column->get_header( ).
l_header->set_prop_ddic_binding_field(
property = if_salv_wd_c_ddic_binding=>bind_prop_text
value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
l_header->set_text( `Posting Date` ). -
ALV table not displayed in Popup
Hello Experts,
I have created a view which contains an ALV table. This view is embedded in one window.
I am opening this window on click of a button. I am reading data from one custom table and displaying it in ALV.
The problem I am facing is that ALV displays the data the very first time window is opened. After closing the window if we again open the window the ALV table is not displayed.
I have checked the code in debugging and values are coming in Node but not displayed. There is no visibility property attached to this ALV.
Every thing was working fine until patching was applied. The same code is working fine in prod but in Dev I am facing this issue.
Can any one you guys suggest me that why it is happening? Is it because of Patch upgrade and is there any sap note to resolve this.
Thanks in Advance
AmitHi Khandelwala,
Is the entire ALV table disappearing? as it is a popup, the view will always be destroyed when the popup window is closed. It will be again recreated once the popup window is thrown again.
However the component controller instance will not be freed and will exist.
My guess is some plugs are being fired displaying empty view.
Please let us know if it is only data that is disappearing.
Just check the stack level of ur dev and production landscapes. If Dev is on higher version, then it might be due to patch.
Thanks,
Anand -
Hi,
I put a tooltip on every cell of my ALV Table.
I used this code:
DATA: lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
CREATE OBJECT lr_input_field
EXPORTING
value_fieldname = lv_name_day.
lr_input_field->set_tooltip_fieldname( lv_name_desc ).
Unfortunately my tooltip is not long enough. The shown tooltip text is only about 20 chars long.
When I try the tooltip on a "normal" InputField, the text can be longer.
Do you have any idea what to do?
Thanks a lot!
LucieHi,
I just do the same things, what it is work for me. I think the problem is not about the length of tooltip, but the length of your field name ( lv_name_desc ).
Just check the length of your field name that you used as tooltip. Maybe the length of your tooltip field just around 20 characters.
Regards,
$=====$
Are you newbie? Check this out: [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] -
Double click functionality in Webdynpro ABAP ALV
Hello!
I have web dynpro application with ALV Table.
I need to reproduce the standard R/3 functionality: after the double clicking on the table row the new window with content of that row's fields should appear in the form layout .
For example, such functionality we have in the RSDMD transaction.
So I have two questions:
1. How to catch double click in the alv table of the Web dynpro application;
2. How to represent information from the alv table row in the form layout?
Could you please help me?
Thanks,
MariyaHi Maria,
Say suppose I am displaying the information from SFLIGHT in an ALV format & when I click on any 1 row's CARRID I would like to fetch the corresponding BOOKING details for that particular combination of CARRID, CONNID & FLDATE then I can proceed as follows:
1) Make the CARRID cell of your ALV to appear as an LinkToAction
2) Create an event handler for the ON_CLICK event of the ALV & within this event handler fetch the information about the row's CARRID, CONNID & FLDATE. Call a popup window and display the corresponding information in this row.
Below is the code to make your CARRID field as an LinkToAction:
METHOD wddomodifyview .
wd_this->build_alv( ).
ENDMETHOD.
METHOD build_alv .
DATA:
lr_alv_usage TYPE REF TO if_wd_component_usage,
lr_if_controller TYPE REF TO iwci_salv_wd_table,
lr_config TYPE REF TO cl_salv_wd_config_table,
lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lt_columns TYPE salv_wd_t_column_ref,
lr_link TYPE REF TO cl_salv_wd_uie_link_to_action,
lr_checkbox TYPE REF TO cl_salv_wd_uie_checkbox,
lr_image TYPE REF TO cl_salv_wd_uie_image.
FIELD-SYMBOLS
<fs_column> LIKE LINE OF lt_columns.
* Instantiate the ALV Component
lr_alv_usage = wd_this->wd_cpuse_alv( ).
IF lr_alv_usage->has_active_component( ) IS INITIAL.
lr_alv_usage->create_component( ).
ENDIF.
* Get reference to model
lr_if_controller = wd_this->wd_cpifc_alv( ).
lr_config = lr_if_controller->get_model( ).
* Set the UI elements.
lr_column_settings ?= lr_config.
lt_columns = lr_column_settings->get_columns( ).
LOOP AT lt_columns ASSIGNING <fs_column>.
if <fs_column>-id = 'CARRID'.
CREATE OBJECT lr_link.
lr_link->set_text_fieldname( <fs_column>-id ).
<fs_column>-r_column->set_cell_editor( lr_link ).
ENDif.
ENDLOOP.
ENDMETHOD. -
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 -
Web Dynpro for ABAP alv table cell color
Hello,
I have a question about Web Dynpro for ABAP and ALV. I want to change the color of one cell as yellow. how to do it??in that method possible colors are
cellDesign: badvalue_dark
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-BADVALUE_DARK
cellDesign: badvalue_light
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-BADVALUE_LIGHT
cellDesign: badvalue_medium
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-BADVALUE_MEDIUM
cellDesign: criticalvalue_dark
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-CRITICALVALUE_DARK
cellDesign: criticalvalue_light
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-CRITICALVALUE_LIGHT
cellDesign: criticalvalue_medium
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-CRITICALVALUE_MEDIUM
cellDesign: goodvalue_dark
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GOODVALUE_DARK
cellDesign: goodvalue_light
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GOODVALUE_LIGHT
cellDesign: goodvalue_medium
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GOODVALUE_MEDIUM
cellDesign: group_level1
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GROUP_LEVEL1
cellDesign: group_level2
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GROUP_LEVEL2
cellDesign: group_level3
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GROUP_LEVEL3
cellDesign: key_medium
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-KEY_MEDIUM
cellDesign: negative
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-NEGATIVE
cellDesign: positive
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-POSITIVE
cellDesign: standard
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-STANDARD
not able to set column color as yellow....
Maybe you are looking for
-
How do I delete my current number from showing up on my old iPhone 5?
So my girlfriend and I both upgraded our iPhone 5 to the our new iPhone 6. We backed up both phones and transferred everything to the new phones. I was thinking about selling the phones but I noticed that my current number is still on my old phone
-
On my laptop Win7 I get 18 mb download, on my desktop, Xp I get 4, Why?
I have two computers, an HP laptop, Win 7, and a desktop Xp. I have the latest Firefox on both. But on download speed tests, the HP always tests higher (18) as opposed to the desktop (4-6). I had a computer tech, (true tech, not a friend) check this
-
Upgrade when using single middle tier, multiple instances
I'm wondering a little bit about a special case for upgrades. I know that I can install HTML DB once (in a new Oracle Home) and then either 1) install it in other DB's via the installer and drop the new Oracle_home's (creating another DAD in the firs
-
Question about RAC interconnect
Hi all, If I want to set up a RAC with multiple interconnects. Is there any specific configuration on the NIC? I am using SUN. Thanks!
-
Mozila3.6 not load properly . it is not redirect my action page. I am submiting my enquiry form that time mozila 3.6 is not work properly .it not load fully .it is not redirect my action page again .it is not load properly .always show done and lodin