ALV in Webdynpro ABAP
Hi,
When ALV is in edit mode, there are four default actions (buttons) in the toolbar of ALV - 'Check', 'Append row', 'Insert row' and 'Delete row'. I just want to know that when 'Append row' is clicked, Which event is triggered.
I need this to set some default values in the cells of newly inserted row.
Regards,
Gaurav
Hi Anoop,
Thats correct. But I have not checked the Date when it was posted. I always try to resolve all the open problems because those things i can take it up as High priprity. From now onwards , I will look into the date and other information also.
thanks and BEst Regards,
Vijay
Similar Messages
-
How to use traffic lights concept in alv in webdynpro abap
Hai ,
How to use traffic lights concept for alv in webdynpro abap. If possible give me some code.Hi Ravi,
You can create ICON to get traffic light.
Go through this step by step.. in this example
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9?quicklink=index&overridelayout=true
Please go through this...
Re: Display ICON in the ALV table column
Re: Image in ALV
cheers,
Kris. -
Hierarchical sequential display in ALV for webdynpro ABAP
Hello,
I am doing an ALV report WebDynpro for abap. I have a situation where I have to display Open Items and all the partial payments in the ALV report. In short. In summary, I have to display a Hierarchical Table of data which two different structures of data, but linked and displayed together.
The only information I have to go about this is [Table as Hierarchy|http://help.sap.com/saphelp_nw2004s/helpdata/EN/3e/904b2624534e0db707c7314a5e1e9d/frameset.htm] in SAP Help.
If you have any pointers for programming a Hierarchical Sequential report in Webdynpro alv that would be great. Any classes, methods etc I can use or , how I can do bindings to the context etc...
Thank you for all your help.
Sumit.Hello,
I am doing an ALV report WebDynpro for abap. I have a situation where I have to display Open Items and all the partial payments in the ALV report. In short. In summary, I have to display a Hierarchical Table of data which two different structures of data, but linked and displayed together.
The only information I have to go about this is [Table as Hierarchy|http://help.sap.com/saphelp_nw2004s/helpdata/EN/3e/904b2624534e0db707c7314a5e1e9d/frameset.htm] in SAP Help.
If you have any pointers for programming a Hierarchical Sequential report in Webdynpro alv that would be great. Any classes, methods etc I can use or , how I can do bindings to the context etc...
Thank you for all your help.
Sumit. -
Drop down in ALV for Webdynpro ABAP
Hi Experts,
I was trying to implement one Web dynpro ABAP application that will show one ALV and ALV will content one dropdown so that user can select data from the drop down. Addtion to that, my dropdown should have data based on another column of ALV.
I have followed one article which is available in Net.
At the end of development, ALV is displayed with dropdown. Also dropdown has data binded. However, no data is visible in dropdown.
I have created one context node having four dictionary element and one elemt for dispplaying the dropdown.
In the DoInit method of view, i have written below code:
Data Declaration
DATA:
lo_node_cskt TYPE REF TO if_wd_context_node,
lo_el_cskt TYPE REF TO if_wd_context_element,
ls_cskt TYPE wd_this->element_cskt,
lt_cskt TYPE wd_this->elements_cskt,
lo_cmp_usage TYPE REF TO if_wd_component_usage,
lv_value TYPE REF TO cl_salv_wd_config_table,
lr_column TYPE REF TO cl_salv_wd_column,
lr_drdn TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
ls_value_set TYPE wdr_context_attr_value,
lv_tabix TYPE sy-tabix,
lv_count(2) TYPE c,
lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
Navigate from <CONTEXT> to <CSKT> via lead selection:
lo_node_cskt = wd_context->get_child_node( name = wd_this->wdctx_cskt ).
get element via lead selection
lo_el_cskt = lo_node_cskt->get_element( ).
Get Data:
SELECT kokrs kostl datbi ktext FROM cskt INTO CORRESPONDING FIELDS OF TABLE lt_cskt.
lv_count = 0.
Populate value set
LOOP AT lt_cskt INTO ls_cskt.
lv_tabix = sy-tabix.
CLEAR ls_cskt-ktext.
DO 3 TIMES.
lv_count = lv_count + 1.
CONCATENATE 'TEST' lv_count INTO ls_value_set-text.
CONCATENATE 'TEST' lv_count INTO ls_value_set-value.
if lv_tabix = 2.
if sy-index = 2.
EXIT.
endif.
endif.
APPEND ls_value_set TO ls_cskt-valueset.
ENDDO.
MODIFY lt_cskt FROM ls_cskt INDEX lv_tabix TRANSPORTING ktext valueset.
ENDLOOP.
Bind data
lo_node_cskt->bind_table( lt_cskt ).
Instantiate ALV
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
Bind Data to Interface Controller Node
lo_interfacecontroller->set_data(
r_node_data = lo_node_cskt
Get ALV reference table
lv_value = lo_interfacecontroller->get_model( ).
Make KTEXT column as drop down
CALL METHOD lv_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'KTEXT'
RECEIVING
value = lr_column.
Create Object for Drop down
CREATE OBJECT lr_drdn
EXPORTING
selected_key_fieldname = 'KTEXT'.
CALL METHOD lr_drdn->set_valueset_fieldname
EXPORTING
value = 'VALUESET'.
CALL METHOD lr_drdn->set_type
EXPORTING
value = IF_SALV_WD_C_UIE_DRDN_BY_INDEX=>TYPE_KEY_CONVERT_TO_VALUE.
CALL METHOD lr_column->set_cell_editor
EXPORTING
value = lr_drdn.
CALL METHOD lv_value->if_salv_wd_table_settings~set_read_only
EXPORTING
value = abap_false.
I am still finding the answer why data in drop down is not visible. However, I can select by clicking dropdown and blank elements (since data is not visible) can be selected.Hey
i am using the same code except i have just modified little bit the select statement to restrict the number of entries.
and also besides writing the code in wddoinit i have added the compenent usage of alv component and added the node
having the structure ckst and after that deleting the dictionary reference to add the attribute valueset in both places
component controller and view controller and mapped them and mapped the data node of interface controller of comp
usage to this node in comp contrlr.
and adding the view container and embeding table view of alv comp there.
that's it
and here is the code which is almost same as yours except small change in select statement.
method WDDOINIT .
DATA:
lo_node_cskt TYPE REF TO if_wd_context_node,
lo_el_cskt TYPE REF TO if_wd_context_element,
ls_cskt TYPE wd_this->element_cskt,
lt_cskt TYPE wd_this->elements_cskt,
lo_cmp_usage TYPE REF TO if_wd_component_usage,
lv_value TYPE REF TO cl_salv_wd_config_table,
lr_column TYPE REF TO cl_salv_wd_column,
lr_drdn TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
ls_value_set TYPE wdr_context_attr_value,
lv_tabix TYPE sy-tabix,
lv_count(2) TYPE c,
lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
* Navigate from <CONTEXT> to <CSKT> via lead selection:
lo_node_cskt = wd_context->get_child_node( name = wd_this->wdctx_cskt ).
* get element via lead selection
lo_el_cskt = lo_node_cskt->get_element( ).
* Get Data:
SELECT kokrs kostl datbi ktext FROM cskt INTO CORRESPONDING FIELDS OF TABLE lt_cskt up to 10 rows .
lv_count = 0.
* Populate value set
LOOP AT lt_cskt INTO ls_cskt.
lv_tabix = sy-tabix.
CLEAR ls_cskt-ktext.
DO 3 TIMES.
lv_count = lv_count + 1.
CONCATENATE 'TEST' lv_count INTO ls_value_set-text.
CONCATENATE 'TEST' lv_count INTO ls_value_set-value.
if lv_tabix = 2.
if sy-index = 2.
EXIT.
endif.
endif.
APPEND ls_value_set TO ls_cskt-valueset.
ENDDO.
MODIFY lt_cskt FROM ls_cskt INDEX lv_tabix TRANSPORTING ktext valueset.
ENDLOOP.
* Bind data
lo_node_cskt->bind_table( lt_cskt ).
* Instantiate ALV
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
* Bind Data to Interface Controller Node
lo_interfacecontroller->set_data(
r_node_data = lo_node_cskt
* Get ALV reference table
lv_value = lo_interfacecontroller->get_model( ).
* Make KTEXT column as drop down
CALL METHOD lv_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'KTEXT'
RECEIVING
value = lr_column.
* Create Object for Drop down
CREATE OBJECT lr_drdn
EXPORTING
selected_key_fieldname = 'KTEXT'.
CALL METHOD lr_drdn->set_valueset_fieldname
EXPORTING
value = 'VALUESET'.
CALL METHOD lr_drdn->set_type
EXPORTING
value = IF_SALV_WD_C_UIE_DRDN_BY_INDEX=>TYPE_KEY_CONVERT_TO_VALUE.
CALL METHOD lr_column->set_cell_editor
EXPORTING
value = lr_drdn.
CALL METHOD lv_value->if_salv_wd_table_settings~set_read_only
EXPORTING
value = abap_false.
endmethod.
thanks
sarbjeet -
Interactive ALV in webdynpro ABAP
I have a requirement where in, i have to show a report in ALV and on lead selection from ALV list i need to show another screen with some UI elements.Since i use view container elemnt it doesnt have required properties.
Please help me to find out existing methods which can help me making the ALV list interactive to show another screen.
I searched in the forum but didnt get the required solution.
Thanks in advance.Naveen,
The basic Concept of using the ViewContainerElement is to bring the View of another component into the calling component. That means, the actions and methods for the table or any UI Element will still exist inside the View of the Called Component, the ViewContainerElement is just a Place Holder for this Called View.
Let us consider an Example:
v_view1 --> Calling Component
v_view2 --> Called Component
v_view1 will have the ViewContainerElement (V_CONT) binded with the inbound plug of v_view2 window.
v_view2 will have all the actions, methods, events to handle and manipulate the data.
So, anytime, there is a lead selection of the data, the events from v_view2 will be active to handle the leads.
To understand this, you need to debugg the v_view2 methods, anything which you have already created.
Please let me know, whether I've addressed your query properly.
Regards,
-Syed. -
Configuring alv in webdynpro abap
Hi ,
i m trying to create meeting planner application , on one view i want to display location booking information in alv with columns havaing headings as dates like 1-APR-09 ,2-APR-09 ....ETC of week & rows names marked with time of day like 7:00 ,8:00 ...etc HOW I CAN SET THE FIELD CATALOG DYNAMINCALLY FOR THE ALV IN WEB DYNPRO ABAPHi,
Please check out this code.
Use the cl_alv_table_create=>create_dynamic_table
to cretate a dynamic FCAT.
DATA:
lt_fcat TYPE lvc_t_fcat, " Field Catalog
lt_table TYPE REF TO data, " Dynamic Internal Table
ls_line TYPE REF TO data, " Line Type of Dynamic Table
DATA:
lt_efforts TYPE REF TO data,
lr_s_eff TYPE REF TO cl_abap_typedescr,
lr_t_eff TYPE REF TO cl_abap_tabledescr,
lr_handler_eff TYPE REF TO data,
lr_strucdescr TYPE REF TO cl_abap_structdescr,
lr_nd_eff TYPE REF TO if_wd_context_node,
lr_nd_eff_info TYPE REF TO if_wd_context_node_info,
lr_nd_root_info TYPE REF TO if_wd_context_node_info,
lo_cmp_usage TYPE REF TO if_wd_component_usage,
lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,
lv_value TYPE ref to cl_salv_wd_config_table.
FIELD-SYMBOLS:
<fs_table> TYPE STANDARD TABLE.
* fill the LV_T_FCAT to have your own fields
* To create a dynamic table importing field catalog table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt_fcat
IMPORTING
ep_table = lt_efforts
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
ASSIGN lt_efforts->* TO <fs_table>.
**Get the structure
if sy-subrc eq 0.
MOVE cl_abap_structdescr=>describe_by_data_ref( lt_efforts ) ?TO lr_s_eff.
endif. "IF sy-subrc eq 0.
**Get the table type from the structure
lr_t_eff ?= lr_s_eff.
**Create handler for table type
CREATE DATA lr_handler_eff TYPE HANDLE lr_t_eff.
ASSIGN lr_handler_eff->* TO <fs_tab_efforts2>.
<fs_tab_efforts2> = <fs_tab_efforts1>.
**Get the Structure from the Table Object
lr_strucdescr ?= lr_t_eff->get_table_line_type( ).
** create node dynamically
lr_nd_root_info = wd_context->get_node_info( ).
lr_nd_eff_info = lr_nd_root_info->add_new_child_node(
name = wd_assist->gc_periodcost "PERIODCOST'
static_element_rtti = lr_strucdescr "RTTI structure
is_static = abap_false
is_mandatory = abap_false
is_mandatory_selection = abap_false
is_multiple = abap_true
is_multiple_selection = abap_true
is_singleton = abap_false ).
** bind table to node
lr_nd_eff = wd_context->get_child_node( NODENAME ).
lr_nd_eff->bind_table( <fs_tab_efforts2> ).
**If ALV component is initial, then create it
lo_cmp_usage = wd_this->wd_cpuse_u_alv_pwc( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif. "IF lo_cmp_usage->has_active_component( ) is initial.
** Get reference of ALV interface controller
lo_INTERFACECONTROLLER = wd_this->wd_cpifc_u_alv_pwc( ).
if lo_interfacecontroller is not initial.
lo_interfacecontroller->set_data(
* only_if_new_descr = " wdy_boolean
r_node_data = lr_nd_eff " ref to if_wd_context_node
lv_value = lo_interfacecontroller->get_model( ).
Regards,
Lekha. -
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 -
How to restrict the no of rows to be displayes in ALV in webdynpro
Hi All,
Can any one suggest how to restrict the no of records to be displayed in the portal in the ALV through webdynpro ABAP.
Thanks & Regards,
Sreelatha Gullapalli.HI,
If you want to change the Source (Design time) then you can do that via the alv configuration.
Something like this in the component SALV_WD_COLUMNS_UI
lr_available_model->if_salv_wd_table_settings~set_visible_row_count( lc_row_count ). -
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 -
Calling smartform and displaying ALV grid in ABAP WEBDYNPRO
Hi all,
I am new to ABAP web dynpro.I ahve few custom reports which are simple ALV list reports which I now need to convert to ABAP web dynpro application .
For one particular report,based on the selection screen input,I need to display the ALV list and when I select the records from the ALV list,I need to call a smartform on clik of a push button.
My questions:
1. Im using 'REUSE_ALV_GRID_DISPLAY' FM to display the o/p in my report.Is there any similar FM in webdynpro ABAP which will display my list in ALV GRID in my web dynpro application??/
2. How to call a smartfrm in ALV grid in web dynpro??
Edited by: abap_1000 on Jan 9, 2011 6:09 PMHi,
You can search SDN, there are several posts available. Just to get some idea, you can check --
[Beginneru00B4s questions on WDA ALV;
[Reg ALV Display;
For clicking event on ALV --
[Reg Row Data fetching on click in ALV;
For ALV display on WDA --
[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110?quicklink=index&overridelayout=true]
Thanks.
Kumar Saurav. -
How to make cell editable alv in WebDynpro for ABAP?
I make Column editable ALV.(See under source code)
But I can't make Cell editable ALV.
How to make Cell editable ALV in WebDynpro for ABAP?
and..how to get changed data?
DATA: l_value TYPE REF TO cl_salv_wd_config_table.
l_value = l_ref_interfacecontroller->get_model( ).
* { EDITABLE
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_input_field TYPE REF TO cl_salv_wd_uie_input_field,
lr_column TYPE REF TO cl_salv_wd_column.
lr_column_settings ?= l_value.
lr_column = lr_column_settings->get_column( 'TOTAL_COUNT' ).
CREATE OBJECT lr_input_field
EXPORTING
value_fieldname = 'TOTAL_COUNT'.
lr_column->set_cell_editor( lr_input_field ).
DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
lr_table_settings ?= l_value.
lr_table_settings->set_read_only( abap_false ).the code seems to be correct....but where are you writing it?
put the code in the wddoinit method and it should work.
have a look at this article..
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1 -
How can I change column name in ALV table in WebDynpro ABAP?
Hi Everyone,
I have created an ALV table in WebDynpro ABAP. I have created a context node and added the required attributes there - for the ALV display.
Now I want to change one columnn name of the ALV table.... Currently it is showing the description of the data element, which I don't want to show. I cannot create a new DE only for this purpose.
Please let me know how can I change the name of the column.
RegardsHi,
This may help you to define your own column text in the ALV Table of webdynpro.
see the below code.
Here 'STATUS_ICON' is the column of the the output display of the ALV Table of webdynpro.
"change the label of the report.
DATA: lr_weeknum TYPE REF TO cl_salv_wd_column.
CALL METHOD l_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'STATUS_ICON'
RECEIVING
value = lr_weeknum.
SET THE LABEL OF THE COLUMN
DATA: hr_weeknum TYPE REF TO cl_salv_wd_column_header.
CALL METHOD lr_weeknum->get_header
RECEIVING
value = hr_weeknum.
CALL METHOD lr_weeknum->set_resizable
EXPORTING
value = abap_false.
hr_weeknum->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 ).
set the text of the column
CALL METHOD hr_weeknum->set_text
EXPORTING
value = 'C Form'.
regarads,
balu -
DIfference Between OOPS ALV and WEBDYNPRO FOR ABAP ALV?
Hi to All,
i want some information that What is main difference when we develop ALV Report in OOPS and WEBDYNPRO For ABAP.which is good n in what way it is good?
In the Same way I m also want know that WHICH IS BETTER AMONG WEBDYNPRO FOR JAVA/ABAP.In which way?
Regards,
Ravi KThanku for ur valuble Information.
could u give me information regarding OOPS ALV and WEBDYNPRO FOR ABAP ALV?which is better?is there differences?
Edited by: ravi k on Mar 26, 2008 12:23 PM -
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. -
Hierarchical ALV Report in webdynpro abap
Hi Experts,
I'm facing the trouble with requirement as below. Please help me to resolve this issue.
Output as:
Material Number Description Created Date
- 10001(Header data) abc 09-09-2013
1001 (item level data) abc 10-09-2013
1002 xyz 11-09-2013
1003 xyz 11-09-2013
- 10002(Header data) abc 09-09-2013
2001 (item level data) abc 10-09-2013
2002 xyz 11-09-2013
2003 xyz 11-09-2013
- 10003(Header data) abc 09-09-2013
3001 (item level data) abc 10-09-2013
3002 xyz 11-09-2013
3003 xyz 11-09-2013
.... and so on...
- when I expand on header Materail number, it has to be display with item level data with in alv report in webdynpro abap.
Looking forward your valuable comments.
Regards,
VenkatHi Venkat,
We can achieve the HIERARCHY through the following code.In this case I have used CARRID as the drill down column.
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_flight_tree( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
lo_INTERFACECONTROLLER = wd_this->wd_cpifc_flight_tree( ).
DATA lv_value TYPE ref to cl_salv_wd_config_table.
lv_value = lo_interfacecontroller->get_model(
lv_value->IF_SALV_WD_TABLE_SETTINGS~SET_DISPLAY_TYPE( IF_SALV_WD_C_TABLE_SETTINGS=>DISPLAY_TYPE_HIERARCHY ).
"Enable HIERARCHY structure
data lr_col type ref to CL_SALV_WD_COLUMN.
lr_col = lv_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'CARRID' )." Enable HIERARCHY for the col. specified
lr_col->IF_SALV_WD_COLUMN_HIERARCHY~SET_HIERARCHY_COLUMN( ABAP_TRUE ).
Regards,
Harsha
Maybe you are looking for
-
Select One Choice-select multiple attributes into mutiple columns
Select One Choice-select multiple attributes into mutiple columns does not work. read-only view object view1 - columns a, b, c updatable view object view2 - also columns a, b, c Select One choice has the capability to bind multiple columns to multipl
-
Dynamic Insertion of graphics in Smart from
Hi guys, I want to insert a dynamic graphic image from the presentation server into smart from its possible? Reg, Hriharan
-
We use ICX to invoke a jweb catridge, and parameters was tranfered with hashtable. when get the Http Request,we found the character is error. we know it must the NLS setting error,but we don't know how to correct it. please mail to me [email protecte
-
Any way to speed up cd ripping on itunes?
I am in the process of transfering my entire cd collection onto itunes and i am going crazy because it's taking forever! My dvd rom has a reading speed of x48 but it only seems to rip at around x8. Is there anything I can do to speed this up or shoul
-
Hi, i need your help on ajax with struts. what i did is i have a 3 text box with two button what i want to do is, in page load i want disable 2 textbox and one button. i enter a value in the 1st textbox then after press the button that button become