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
Similar Messages
-
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 -
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 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 -
ALV Layout set fields stored in Which table?
HI All,
I Developed ALV Report,and created Layout for that . I want to know where the all fields for particular layout set are stored?Hi
i am getting the error, not_found.
if i found the table entries i have 8 entries.
CALL FUNCTION 'LT_VARIANT_LOAD'
EXPORTING
I_TOOL = 'LT'
i_tabname = '1'
I_TABNAME_SLAVE =
I_DIALOG = ' '
I_USER_SPECIFIC = ' '
I_DEFAULT = 'X'
I_NO_REPTEXT_OPTIMIZE =
I_VIA_GRID =
I_FCAT_COMPLETE =
IMPORTING
E_EXIT =
ET_FIELDCAT = ttet_fieldcat[]
ET_SORT =
ET_FILTER =
changing
cs_layout = tcs_layout
ct_default_fieldcat = tct_default_fieldcat
cs_variant = GT_disvari
EXCEPTIONS
WRONG_INPUT = 1
FC_NOT_COMPLETE = 2
NOT_FOUND = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE 'Error loading variant!' TYPE 'I'.
ENDIF.
any clue on this -
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. -
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` ). -
Setting the column labels in webdynpro abap alv report
Hello,
Right now I have programmed an ALV report. The selection criterion and the display of the report all work.
However, there is an issue with the labels of columns in the ALV report. The report takes the field names of the structure I am using in the ALV report as the labels of the report. I have been trying to play around with the ALV class model to see if something will change the labels of the fields but to no avail. Would you guys know of some code or way to change the labels of the columns in the ALV report.
Thank you for your help in advance.
Sumit.
Here is some of the code I tried but does no work in the wdInit() method. It does not change the label. Any suggestions???
METHOD wddoinit .
* instantiate used component from wizard
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
* call a method in the used component from wizard
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
DATA lo_value TYPE REF TO cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model(
DATA: lr_field TYPE REF TO cl_salv_wd_field.
lr_field = lo_value->if_salv_wd_field_settings~get_field( 'CUSTOMER_NUMBER' ).
* change the label of the report.
DATA: lr_CUSTOMER_NUMBER TYPE REF TO cl_salv_wd_column.
CALL METHOD lo_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'CUSTOMER_NUMBER' receiving value = LR_CUSTOMER_NUMBER.
* SET THE LABEL OF THE COLUMN
DATA: HR_CUSTOMER_NUMBER TYPE REF TO CL_SALV_WD_COLUMN_HEADER.
CALL METHOD lr_customer_number->get_header
receiving
value = HR_CUSTOMER_NUMBER.
***** set the text of the column
CALL METHOD hr_customer_number->set_text
EXPORTING
value = 'Customer1 Number1'.
ENDMETHOD.You 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` ). -
Webdynpro abap view layout error: Object espected
Hi guys,
I'm facing a problem when trying to add a new element in the View Layout of a WebDynpro Component.
I will try in the following to be more explicit about the problem.
The technical configuration is following:
Laptop::SAP GUI 710<---Home Network---> Server: SAP NetWeaver 7.0 ABAP Trial Version (Study System)
On my laptop I'm successfully connecting with SAP-GUI to the Server.
Then I open the SE80 transaction and create a new WebDynpro-Component. In this component I create a View.
Now, in the View Layout, when I try to add a new element, off any kind, I receive the error: "Object expected", Code C and the URL form the message is referred to localhost:8000/sap/bc/the/path/to/the/page/preview/for/mandant000.( I think that is a Java Script error.)
As result, in the layout, I kant see anything, allthogh in the ROOTUIELEMENTCONTAINER the added Element and his properties are showing up.
When I copy/paste the URL from the Error Message Window to the Internet Exploder, but changing localhost with the ip of the server, the page shows the element from the view.
I've tried to add on my laptop, in C:\WINDOWS\system32\drivers\etc\ hosts,lmhosts a name for the ip address of the server, but with no results. The port 8000 is fully opened, the server is running on a fresh installed OS without any other programs or firewalls. Telnet to servers ip port 8000 also works.
Also I've tried with the Transaction SICF to look over some configuration directives but found nothing.
Can any one help me solving this problem? I'm prety sure that I'm missing some config file or some configuration somewhere ....
Many many thanks for any hint or help and I hope that I've describet well the problem.
The_ThinkerHi,
I've looked using the transaction you gave me and only 2 services are listed: the http and smtp, both using localhost as address.
Using also the transaction st22, for error reporting, i have concluded that is about the icm service.
Now, I have searched extensive on help.sap.com over the issue of setting up/configuring an icm service.
My question/s:
In order to be able to solve my problem, I have to configure a new icm service? or I need to configure a new alias? or an external service?
I'm a little confuse after all that reading on help.sap.com, witch, by the way, was very helpful for me in acquiring new informations.
Many thanks for help.
regards. -
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. -
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 -
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] -
Setting alv layout as defualt for all usres
Hi,
Is it possible to set the webdynpro alv layout set as default for all users.
I need your input if this is possible in WD ABAP ALV setting.
Thanks in advance !
AlokI found the answer to my question on my own by just digging into the options available in ALV.
Thanks,
Alok -
Changing Default Layout Setting - User-specific
Dear Gurus,
This is related to general ALV Layout setting. When we choose Select Layout -> Choose Layout, the default layout setting will show All, is there any way by which we can change this to User-specific Layouts by default? (may be through some parameter id?).
Many Thanks!
Best Regards,
Sree.Hi ,
Can you explain me your requirement in detail.
Regards,
Rohan.
Maybe you are looking for
-
Save procedures within database instead of reports
I need to execute a procedure before the report to run. Can I save it to database and call to execute from report instead of saving it as before report trigger? Thanks in advance! Winnie
-
TS4006 Using "find my iphone" on my computer
I've downloaded "find my iphone" on my computer but when I click on the app, it does nothing. What am I doing wrong? I've tried opening it when I click on the app window, and the icon.
-
How to email photoshop files with high resolution
I need to send a photoshop file that is resolution 300 but it keeps converting to 72 when I email it. How do I email it and keep the 300 resolution?
-
Mac os 10.6 & Joomla 1.5.23
I can't use the lasts versions of FF (from 8) beacuse i Can't work with the tables of joomla, infact i can't added columns and rows and so i must use the version 7.0.1
-
Using select cursor(select...) from ...
I am trying to use the following construction in the report region: select cursor(select * from employees) as "EMPs", cursor(select * from departments) as "DEPTs" from dual It is failing with the following error: report error: ORA-00932: inconsistent