ALV TREE in Web Dynpro
Hi guys,
I am trying to display data from the internal table to ALV tree by using TreeByKeyTableColumn.
can anyone please help me out or suggest proper way to display.
thanks,
>
Kalpana Arumugam wrote:
> Hi ,
> I was telling abt the SAP LOGON release version ( 640 Final Release ) and ofcourse not the WAS version . WAS is 7 0 only .
> The example which is given by you is not having any sample data . So im not able to find the tree .
> Now i have created a tree structure . But could you help me out in adding child nodes to the corresponding parent node in alv tree ? .
>
> Thanks in advance .
Although you might not have the sample data to run the application, you should still be able to look at the source code of the application. Also don't be confused by the File Upload prompt of the test applications. It just is there if you want to override the data in the database. If you just press the upload button without specifying the file it will instead read the data from the database. If you database tables are empty, you can run the program BCALV_GENERATE_ALV_T_T2.
Now as far as adding child nodes - that isn't exactly how things work with the ALV TREE. You don't actually have a heirarchy of nodes like when creating a tree element. You can only set set columns as hierarchy columns. It then uses sorting and grouping based upon these columns to make a psedo tree. However your data has to remain flat.
For example you can take the flat SFLIGHT data in the example and define a hierarchy column of CARRID and CONNID.
http://www.flickr.com/photos/tjung/2802287945/
You then get output that looks like this:
http://www.flickr.com/photos/tjung/2802287971/
If you simply change the hierarchy column definition to add the Departure Date, the output changes (without any changes to the underlying data structure):
http://www.flickr.com/photos/tjung/2802287989/
Similar Messages
-
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 want to include ALV object in web dynpro ABAP, instead of a table in a window. I have SAP Version 4.6 as backend.
Pl help.Hi Nirmal,
the information on ALV and WDA is here: http://help.sap.com/saphelp_nw2004s/helpdata/en/74/fd4142646ab46be10000000a155106/frameset.htm
As you know, Web Dynpro ABAP is availiable with NW2004s, not before.
Regards, Heidi -
Problem of refreshing a tree in web dynpro java
hi all,
I'm facing a problem for refreshing a tree in web dynpro java for SAP HR.
I created a viewset with 2 cells( 1 view for each).
In the 1st view I created a droplistbyindex to select the unit ID and in the 2nd view ( defaut=false) I called a method to populate my tree according to my selection in the 1st view ( method called in wdInit).
When I make the first selection everything is ok.
But when I select another unit ID, the tree is not changed and I know the context is well changed according to my selection.
So I think the method is executed only the first the view is called.
In this case, how can I refresh my tree on real-time?
Thanks for your help
YiminMay be u can write the code wdDoModify instead.
-Ashutosh -
hi,
I developed a web dynpro on the base of the WDT_TREE structure.
Itu2019s important to underline that each node can contain different type of sons: ITEM and NODE as you can see in the structure below
For example:
ROOT
NODE1
Item 1 -> Nodeu2019s 1 son
Item 2 -> Nodeu2019s 1 son
Item 3 -> Nodeu2019s 1 son
Item 4 -> Nodeu2019s 1 son
Node2 -> Nodeu2019s 1 son
Node3. -> Nodeu2019s 1 son
What I need to do is to modify the sonsu2019 order on the base of a key defined in a specific program (see the example below).
Example:
ROOT
NODE1
Item 1 -> Nodeu2019s 1 son
Node2 -> Nodeu2019s 1 son
Item 2 -> Nodeu2019s 1 son
Node3 -> Nodeu2019s 1 son
Item 3 -> Nodeu2019s 1 son
Item 4 -> Nodeu2019s 1 son
Thanks Laura.hi Gunjan ,
refer this article "ALV and Standard Table as Hierarchy in Web Dynpro ABAP" :
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c060fcb4-2c62-2b10-d2b2-f32407a5cc6f&overridelayout=true
also check the standard WD component salv_wd_demo_table_tree
also keep these steps in mind , quoted in SDN thread :
Following 2 things are the most important steps
"A) identify the table as hierarchy table:
wd_this->go_table->if_salv_wd_table_settings~set_display_type( if_salv_wd_c_table_settings=>display_type_hierarchy).
(wd_this->go_table is the reference to wd alv object:)
"B) mark the columns you want to have as nodes with following statement:
ls_col-r_column->if_salv_wd_column_hierarchy~set_hierarchy_column( value = abap_true ).
(ls_col is reference to the column)
regards,
amit -
Hello Experts,
I have a task to migrate the usage of UI element IWDtable to ALV Table in my application for some features like Sorting and filtering supported in ALV table.
I searched in Google and SDN about the ALV table, could not find any document about ALV table in Java (Found docs only with ABAP).
Is ALV table supported in Web dynpro java ? If yes, please pass me the URL for the basics of ALV table.
Thanks in Advance,
Regards,
HarishHello,
I understand from previous posts in this thread, that the ALV is not yet available for use within WebDynpro. Although it is already documented in the NWDS documentation under:
SAP NetWeaver CE Developer Studio Documentation > Developer's Guide > Developing and Composing Applications > Developing User Interfaces with Web Dynpro for Java > Reference > UI Element Guide > Tables and Lists > Displaying Lists with SAP List Viewer > Integrating SAP List Viewer into Applications
Since it is listed under "Developing User Interfaces with Web Dynpro for Java" I would assume that is should be possible. We are on NW CE 7.1 SP5.
I tried to get a test application running based on the documentation, but the documentation is too thin and I run into an Null-Pointer exception in a SAP class called:
at com.sap.ip.bi.alv.rendering.ALVGraphicsRenderer.init(ALVGraphicsRenderer.java:117)
If it is not yet released for use then I wonder why it is already part of the documentation ?
Take care
Ingo -
Standard ALV Component in Web Dynpro Java
Hi,
Is there a standard Component available in Web Dynpro Java for ALV?
Regards,
Reema.Thanks Armin for your reply.
What is the name of the component?
Regards,
Reema. -
Exporting content of ALV grid in Web Dynpro for ABAP
Hello Experts
I have a following request which seems to be giving some headaches.
I need to export results from one of the Web Dynpro reports (ABAP) I have developed to the Excel spreadsheet. Results are stored on ALV component. Request is to add header to export file with additional information like report title, selection criteria, date when report has been executed. By default export file contains only column names and data. I have set the header for ALV grid with all extra information I need to be passed to Excel file but it does not seem to be transferred at all.
At the moment I see 2 possible solutions: 1) write my own Excel export 2) use PDF export where it is possible to set header/footer text. None of these solutions are ideal, I'd rather set header in standard Excel export. Is that even possible? Please help.
Regards
Michael
Edited by: Soltuion Manager on Apr 20, 2009 10:08 AM
Edited by: Soltuion Manager on Apr 20, 2009 10:26 AMHello Michael,
I haven't tried using the builtin functionality of ALV to achieve a similar fnctionality as yours but can suggest you a workaround for that. As how you might be already knowing you can try using the CL_WD_RUNTIME_SERVICES=>attach_file_to_response to download the contents into Excel/notepad/word. So just can modify the internal table to contain the extra information that you need. You can use the approach below for using the attach_file_to_response method:
1) First read the table's data into an internal table.
2) Convert the internal table data to STRING format.
3) Now convert it into tab separated format as how desired.
4) Convert this STRING format to XSTRING format
5) Make use of the attach_file_to_response method.
Regards,
Uday
METHOD onactionon_submit .
DATA: lv_node TYPE REF TO if_wd_context_node,
lt_mara TYPE if_main=>elements_mara,
wa_mara TYPE if_main=>element_mara,
lead_selection_index TYPE i,
mara_string TYPE string,
mara_xstring TYPE xstring.
lv_node = wd_context->get_child_node( name = 'MARA' ).
CALL METHOD lv_node->get_static_attributes_table
IMPORTING
table = lt_mara.
LOOP AT lt_mara INTO wa_mara.
CONCATENATE mara_string
wa_mara-matnr
wa_mara-ersda
wa_mara-ernam
wa_mara-matkl
wa_mara-meins
cl_abap_char_utilities=>cr_lf INTO mara_string
SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
ENDLOOP.
** Now you need to add the column headers & the desired extra information through coding to
** mara_string
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = mara_string
IMPORTING
buffer = mara_xstring.
CL_WD_RUNTIME_SERVICES=>attach_file_to_response( i_filename = 'TEMP.XLS'
i_content = mara_xstring
i_mime_type = 'EXCEL' ).
ENDMETHOD. -
Configuration of alv table in web dynpro abap
Hi,
I'm using component SALV_WD_TABLE in my component. I have created a configuration for the alv.
I want to hide a column in the alv.
Do you know how to do it using the configuration?
Thanks in advance
Karim>
Karim Ja wrote:
> Thomas,
>
> In fact, i think that when user changes the global view and clicks on save button, a copy of the view is created(with the same name) and is then available for all other users. This copy can be delete but not the "standard" global one.
> Is this possible?
>
> Now I'm thniking about creating an ehancement for the standard web dynpro component and hide the column using abap code.
>
> Is it a good idea?
>
> Kind regards
> Karim
Make sure that your security is setup correctly. End users without administrative rights can not create globa views. When they get the Save View As Dialog, what values do they see for the Assignement field? When I logon without Adminstrative mode, I only see Assignment of User:
http://www.flickr.com/photos/tjung/3406367817/
When I launch the same transaction in Administrative or Configuration mode, the Assignment Option is All and only then do I have the optoin to transport the View:
http://www.flickr.com/photos/tjung/3407176898/
Is it good to modify the standard ALV component? I would say not. First of all the functionality you seek is already in the system. Perhaps you need a support package application if your system has a very old SP level. In genreal changing the ALV component, would be a bad idea because it is very widely used and very generic. It is also quite often changed by SAP. -
Hi!
I can´t insert any fields on the right side of a tree item.
I have to do like a docking in SAP with a dynpro on the right side and move dinamically the right side if someone click on the tree.
Can anyone help me?
TranksSorry in Web dynpro Java!
And if it´s not possible. How can I Communicate two Iviews?
how can I pass parameters from an Iview to another?
Thanks! -
Recursive Tree using Web Dynpro java
Hi
I've been trying to create a recursive tree using java in Web Dynpro.
Can you please suggest a good example to try with?Hi,
Check the below links....
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/integration%20of%20a%20tree%20structure%20in%20a%20web%20dynpro%20table.pdf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/constructing%20a%20recursive%20and%20loadable%20web%20dynpro%20tree.pdf
http://help.sap.com/saphelp_nw70/helpdata/en/13/4cde139306304480e89d815ffcf891/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/af/44ea406c9d3d43e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/21/ad884118aa1709e10000000a155106/frameset.htm
Code Example,
http://help.sap.com/saphelp_nw70/helpdata/en/16/1ec1814e566f4baf943c53ccf48552/frameset.htm
null -
How to intrigrate ALV report into Web Dynpro
Hi Experts,
I Done one ALV Report and the same thing should be developed on web dynpro also...so, i want to intigrate the alv in web dynpro is this possible..if so, pl. let me know..asap. Thanks & Rewards,
SatishHi
ALV in Web Dynpro ABAP is different from Dynpro ALV.
In WebDynpro ABAP ALV is SAP's standard component SALV_WD_TABLE
You have to use this component inside your component.
the following tutorial will help you
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/60ea94e5-0901-0010-c3bb-aad5ea9620d8 [original link is broken]
Abhi -
Using alv features in web dynpro abap
Hi Gurus,
I am new at WDA. I have an wda program which shows query results as ALV. This results give me some information about user messages but normally i can't display all of the message text because it is too long.
Now i want to give "hotspot" property to a cell(message text) and thus when i click it, i will see all of the message.
How can i enable these and another functions of ALV?
Thanksyou can use link to action in table.So that when you click link you can see the message in window or where ever you want.
check this link how to insert link to action in ALV Table.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/webDynproABAP-UsingUIelementsinALVcomponentcells
thanks
Suman -
Re: creating check boxes in ALV grid using web dynpro
Hi Techies,
I need to have a check box column in alv grid, and it should allow me to select the check box and the selected row has to be updated in the database.
Kindly assist me with the steps to handle the above mentioned scenario
Thanks in advance.Now to first make the last column of my ALV as a checkbox:
method BUILD_ALV .
data: l_ref_cmp_usage type ref to if_wd_component_usage.
" Instantiate the ALV usage
l_ref_cmp_usage = wd_This->wd_CpUse_My_Alv( ).
if l_ref_cmp_usage->has_active_component( ) is initial.
l_ref_cmp_usage->create_component( ).
endif.
" Get reference to the model
DATA: l_ref_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
l_ref_INTERFACECONTROLLER = wd_This->wd_CpIfc_My_Alv( ).
data: lr_config type ref to Cl_Salv_Wd_Config_Table.
lr_config = l_ref_INTERFACECONTROLLER->Get_Model( ).
|" Set read only mode to false (and display edit toolbar)
lr_config->if_salv_wd_table_settings~set_read_only( abap_false ).
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 ).
data: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lt_columns TYPE salv_wd_t_column_ref,
lr_checkbox1 TYPE REF TO cl_salv_wd_uie_checkbox,
lr_checkbox2 TYPE REF TO cl_salv_wd_uie_checkbox.
FIELD-SYMBOLS <fs_column> LIKE LINE OF lt_columns.
" Embed the UI elements within the ALV
lr_column_settings ?= lr_config.
lt_columns = lr_column_settings->get_columns( ).
" Embed an checkbox within the column APPROVE
LOOP AT lt_columns ASSIGNING <fs_column>.
CASE <fs_column>-id.
WHEN 'APPROVE'.
CREATE OBJECT lr_checkbox1
EXPORTING
checked_fieldname = <fs_column>-id.
<fs_column>-r_column->set_cell_editor( lr_checkbox1 ).
FREE lr_checkbox1.
ENDCASE.
ENDLOOP.
ENDMETHOD. "BUILD_ALV -
Dynamic ALV columns in Web Dynpro ABAP
Hello masters:
Does anybody know how to build an ALV with dynamic columns in a WD4A?
I know how to make an ALV with a dynamic context node (dynamic DDIC structure), but it isn't the problem. First, I need to validate data entries, and then I will know how many fields I have to show.
I've been reading about interface IF_WD_CONTEXT_NODE_INFO. I think some of its methods can be useful to me. Can you help me to solve that?
Thanks.Hi Rodrigo,
There are two ways for it:
1) Creating an attribute dynamically under the Staticly defined node.
2) Creating a new node dynamically with your desired columns in it.
I am explaining the second process, Here it as follows:
1. Create a WDC, and use the component SALV_WD_TABLE.
2. Create a node in the context to store the defined strucutre name.
3. Read the node and set the structure name to that node from which you want to get the columns.
4. Use this structure name and create a new node dynamically.
5. Set the data to this dynamically created node.
6. Set this context node to ALV.
Here is the sample code:
To get the strcutre from where you want to fecth the fields.
tabname_node->get_attribute( Exporting name = 'TABLENAME'
Importing value = tablename ).
translate tablename to upper case.
*create sub node named TEST1 of structure (tablename)
cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
parent_info = rootnode_info
node_name = tablename
structure_name = tablename
is_multiple = abap_true ).
DATA: stru_tab type ref to data.
field-symbols: <tab> type table.*Create Internal Table
create data stru_tab type table of (tablename).
assign stru_tab->* to <tab>.*Get table content
select * from (tablename) into corresponding fields of table <tab>.*get instance of new node
dyn_node = wd_context->get_child_node( name = tablename ).*Bind Internal table to context node.
dyn_node->bind_table( <tab> ).*instantiate alv component
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.*pass context node to alv
data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
l_ref_interfacecontroller->set_data( dyn_node ).
Hope it helps..
Good day!
Regards,
Shashikanth. D
Maybe you are looking for
-
ICal colors have all changed on my iMac
When I turned my iMac (10.7.5) on this morning and turned on iCal (version 5.0.3), all of the colors had been changed. Before they were each distinct and clear and easy to tell apart from each other, now they all seem muted and when I look at my cale
-
QUICKTIME ERROR!! PLEASE HELP
whenever i play videos from itunes onto quicktime, it freezes on the picture but hte audio is stil on any advice from anyone?
-
Demand Planning : Event import
Hello, Is-it possible to import Events through interface into Demand Planning ? In MSD scheme, there are some staging tables for Events, but I found no documentation on how to fill these tables (MSD_ST_EVENTS ...). Thanks in advance.
-
Change all received messages text body colour to black
Hi All, We have a user that is Colour blind and has trouble seeing Blue. Can you please advise if these is any what to change outlook so that all messages are received as Black text please see example below Usually reply comes in like this Would like
-
I tried calling my Home Telephone Number and it wouldn't go thru. I got a weird recording the call couldn't be answered. Funny, it worked last week. I went to my local, useless AT&T store, waited about 15 minites and they heard the same recording whe