Re-size Hierarchy column in ALV Tree
Hi all,
I have created a class inheriting from CL_GUI_ALV_TREE that is used to create a Tree structure for Equipment.....
Now my requirement is that the Hierarchy column should be re-sized based on the width of the node text.
Please help.
Thanks in advance.....
Not answered
Similar Messages
-
Re-sizing hierarchy column in ALV Tree
Hi all,
I have created a class inheriting from CL_GUI_ALV_TREE that is used to create a Tree structure for Equipment.....
Now my requirement is that the Hierarchy column should be re-sized based on the width of the node text.
Please help.
Thanks in advance.....You can control the size of the hierarchy column by setting the following field:
*Set the width as follows
g_hierarchy_header-width = 200.
*Reference the g_hierarchy_header structure when calling the following method
CALL METHOD tree1->set_table_for_first_display
EXPORTING
is_hierarchy_header = g_hierarchy_header
it_list_commentary = gt_header[]
is_variant = g_variant
i_save = g_save... -
Average sum for a column in ALV tree layout
Hi,
I've trying to set an average sum for a column in an ALV tree report. In the field catalog i set the DO_SUM field to 'X' and this will do a total sum, but I can't find out how in the code to do the average sum.
Also to get round this I was going to just set a default display variant with the "average" sum option saved after i had manually selected the columns and set it to this. Problem with this is that when i re-run it, the sum comes back as a total rather than an average. I have tried setting display variants on the SAP example ALV tree programs and the same thing happens.
Does anyone know how i can get round this?
Cheers
Matt.Hi,
In addition to setting DO_SUM = 'X' you need to specify function in H_FTYPE field. It should be set to 'AVG' in your case.
ls_fielcat-do_sum = 'X'.
ls_fieldcat-h_ftype = 'AVG. -
Editing of a Column of ALV Tree(OOPS) node
is it possible to edit a column of node of ALV tree.
i am using ALV class "CL_GUI_ALV_TREE".
After searching existing threads, for the same issue..i found the following.
1) Editable Tree ALV
( displays pop up window where user can change values and then transfer these changes back to ALV tree)
2) Editable Field in ALV TREE Display Using OOPs
(this approach is not working for ALV Tree)
But i want to edit directly coulmn of a node of ALV tree.
is it possible in OOPS ALV Tree?
if it possible, can any one provide the sample code,As you already noticed, this is not possible, but you may edit your fields outside the tree and bring your changes back to tree. I struggled with the same once but eventually used described alternative. If you use saplink you may check upgrade [chain and rename|http://code.google.com/p/saplink-chain-and-rename/downloads/list] where this approach is released. The code is free so you will be able to study and copy whatever you need from it.
Editing in a pop up is also an alternative here.
Regards
Marcin -
Hi Experts ,
I want to edit the column contents in a ALV tree and the save the content . I am using CL_ALV_gui_tree class to build the tree structure.please help on this
With regards
RKMHi,
In the field catalog internal table ,
Fcat-edit = 'X'.
This makes the particular field as editable mode. append to field catelog internal table.
include into your internal table.
in the structure.
types: cellstyles type lvc_t_styl.
call this class
class lcl_event_handlers definition.
public section.
methods:handle_button_click for event button_click of cl_gui_alv_grid
importing es_row_no. " METHOD TO HANDLE PUSH BUTTON
endclass. "lcl_event_handlers DEFINITION
class lcl_event_handlers implementation.
method handle_button_click.
perform handle_button_click using es_row_no . " ACTION TO BE PERFORMED WHEN CLICKING ON PUSH BUTTON
endmethod.
layout :
gs_layout-stylefname = 'CELLSTYLES'.
endclass.
ls_style-fieldname = 'BUTTON'.
ls_style-style = cl_gui_alv_grid=>mc_style_button.
append ls_style to wa_str-cellstyles.
***********button name
wa_str-button = 'SAVE'.
modify it_str from wa_str transporting button. -
How to avoid blank column display in output in ALV TREE
how to avoid blank column display in output while decreasing the length of other columns in ALV Tree.
Example: please refer to BCALV_TREE_01 and see the output, then decrease the length of all columns . Then you can see a blank column appearing in screen at last, i.e in container. so how to avoid that.
Thanks for reply.
Edited by: morpeous on Jul 1, 2009 1:53 PMHi,
Check BCALV_TREE_02 on how to hide columns.
Thanks & Regards,
Anand Patil -
To display complete Column as Pushbottons in Simple ALV Tree
Hi Everybody,
Are pushbuttons possible in Simple ALV Tree?
If yes, Can anybody help me in displaying one of the Columns in ALV Tree as Pushbuttons.
Sample Code for this would also be appreciated.
Thanks in Advance.
Regards,
ArshadHi,
Check this out.
http://help.sap.com/saphelp_erp2004/helpdata/en/88/387f380c2f2e3ce10000009b38f8cf/content.htm
Reward if helpful.
Regards,
Ramya -
Hi all,
I followed SAP example program to create 'COLUMN structure ALV tree' to diaplay and i have to make some of the fields as editable and get back the changed values in the internal table.Here i did not use field catalog at all.
I used gui_custom_container,cl_gui_custom_container,cl_gui_column_tree ...and added every column to the the tree object .Built the node with two internal table(like order header & order item ) to form a tree.How should i get the changed values in the internal table when user changes values in Colums of order item node.
Any help is appreciated.
thanks,
dan.Hello all,
Thanks for you reponses.I was actually referring COLUMN_TREE_CONTROL_DEMOF01,now kind of changing the code like BCALV_TREE_DEMO, BCALV_TREE_SIMPLE_DEMO .Looks like i can make the field as editable by changing the edit field in layout object.But unlike 'GRID' object this tree object is not having any method like 'check_change_data' .
How to get back the changed/values in iternal table or by any other means.
Any idea of getting changed values from ALV tree object would be really helpful.
thanks,
dan -
ALV Tree (Fixed Columns)
Hi,
I'm currently working on a program using ALV Tree (cl_gui_alv_tree) and I need to have fixed columns other than the hierarchy column (columns which cannot be scrolled). I tried editing the field catalog but it's not working. Is it also possible to make single cells editable in the ALV tree?
Thanks a lot.
Bonn MendozaHi,
I think the method SET_HEIGHT of class CL_GUI_ALV_TREE can be used to set the heights of various controls. Just try for columns in your case.
Else as you are looking for column with special function, we have an expansion column but is available in hierarchical-sequential list.
For this you need to use class CL_SALV_COLUMNS_HIERSEQ
there are 2 methods in this class
SET_EXPAND_COLUMN and GET_EXPAND_COLUMN.
As far as second query is concerned go through the below link
http://help.sap.com/download/documentation/additional/getstart/ecc50/GettingStarted_ECC50_EN.pdf
Regards
Khushboo -
Webdynpro ALV Tree hierarchy N
Hi Experts ,
Can you tell me how to use ALV tree to list the NOT flat data?
1
***1-1
******1-1-1
******1-1-2
***1-2
******1-2-1
******1-2-2
***1-3
2
3
I will very appreciate if you can give me an example!
Karl.
Edited by: Karl Li on Jun 13, 2010 11:43 AMHello,
thranks for your information.
I have a column in my table with the name 'Level', which has values as following:
1.1; 1.1.0; 1.1.1 .... 2.1; 2.2; 2.2.1 etc.
This means that I want to specify one column as hierarchy column depending on the value. If I just follow the steps of the tutorial above. There is only one hiearchy in the ALV table.
Do you have any idea, how to implement it? Many thanks!
Regards
meer -
ALV Tree, Expanded node do not show data in certain column
Hi all,
I need your help regard to below problem.
I have an ALV grid in which one of the columns has F4 (search help). If search help is called by pressing a F4 button a dialog box will be shown with ALV tree on it.
The ALV Tree has 2 columns which are: hierarchy column and one other column called WBS column. At the first show, all expanded node show data contained in WBS column, but if I click to expand a collapsed node, data is not shown in WBS column for the new expanded rows, only shows data in hierarchy column. How to show data in WBS column for the new expanded rows..?
Basically if at the first show I expand all node, data in WBS column are shown for all rows. It seems that the Expand Node event doesn't update all column data to be shown.
Please share if anyone of you has faced this kind of problem. Thank you.
Regards,
Ramses Hutahaean
Edited by: Ramses Hutahaean on Feb 29, 2012 1:38 PMHi Fenja,
as the click-events only raise the node_key (at least I couldn't detect another information), I assume the only way is maintaining an internal helper table by yourself which you build up in parallel when creating the tree and its nodes.
The (hashed) table might contain 2 columns:
1. node_key (as table key)
2. reference to an object
When a click-event is raised, you look up the corresponding object reference in your table.
Regards,
Ulrich -
How to identify column name in ALV tree when user clicks a particular field
Hi All,
In My requirement i am displaying ALV Tree.
In Which When the user clicks on a particular header column it should navigate to other transaction.
Now the issue is it is navigating to other transaction when we click on any column of the header row.
But, the user requires only for particular column .
Is there any method to catch the field name in CLASS 'CL_GUI_ALV_TREE'.
Regards,
Bhanu.RCheck out for CUCOL system field.
Regards,
Lalit Mohan Gupta. -
Hierarchial ALV Tree Report.
Hi!
iam designing a module pool to get all the info of the idoc like status record control record etc.the 3 rd screen would be a hierarchial tree structure.All the data would be retrieved from Z tables.
My requirement is on the left side of the pane the tree would contain 6 tables as nodes and these would be constant for all the idoc numbers.On the right side of the screen i would have to populate the complete data from these tables.
When user clicks on the first table only that table data needs to appear.This would be only a display report.
Plz tell me if this logic would work
I will create the tree structure on the left side of the pane with all the 6 tables as default.I would also define a subscren on the right side and would call a table control for the respective tables along with the data populated in them.
Now can i link the double click event of the tree ie the table name to populate the table control in the subscreen.
Please provide suggestions.
thanks
kedarHI Kedar,
What u r trying to do is going to work.
Evn I tried to do the same, but since I ahve less knowledge in ALV class I couldnt do it.
U can refer to DWDM, it is for demo programs...it has ALV tree method -
Coloring column in an ALV tree
Hi all,
What I want to do is set background color for columns in a tree-view ALV(class cl_gui_alv_tree). However no matter how I set the field EMPHASIZE in the fieldcatalog internal table, the display of the ALV tree keeps unchange. Anyone can help me on this?
Thanks,
Chen ChangHi,
<b>If u want to change the node colr in ALV tree do as follows</b>
Adding Root Nodes for the tree.
Key:
NODE_KEY, RELATKEY, RELATSHIP, HIDDEN, DISABLED, ISFOLDER, N_IMAGE,
EXP_IMAGE, <b>STYLE</b>, LAST_HITEM, NO_BRANCH, EXPANDER, DRAGDROPID, TEXT
perform f9101_node_list using: '1' 'ROOT' '' '' '' c_x '' '' '' '' ''
c_x '' text-003.
Adding subitems for the root node.
perform f9101_node_list using:
Material Details
'MATRL' '1' '' '' '' '' '' '' '' '' '' '' ''
text-001,
Document Details
'DOCU' '1' '' '' '' '' '' '' '' '' '' '' ''
text-002.
form f9101_node_list using value(pnodekey)
value(prelatkey)
value(prelatship)
value(phidden)
value(pdisabled)
value(pisfolder)
value(pimage)
value(pexpimage)
value(pstyle)
value(plastitem)
value(pnobranch)
value(pexpander)
value(pdragdropid)
value(ptext).
w_nodes-node_key = pnodekey.
w_nodes-relatkey = prelatkey.
w_nodes-relatship = prelatship. "Natural number
w_nodes-hidden = phidden.
w_nodes-disabled = pdisabled.
w_nodes-isfolder = pisfolder.
w_nodes-n_image = pimage. "Icons / embedded bitmap
w_nodes-exp_image = pexpimage. "Icons / embedded bitmap
<b> w_nodes-style = pstyle.</b> w_nodes-last_hitem = plastitem. "Tree Control: Column Name / Item
"Name
w_nodes-no_branch = pnobranch.
w_nodes-expander = pexpander.
w_nodes-dragdropid = pdragdropid.
w_nodes-text = ptext.
append w_nodes to i_nodes.
endform. " f9101_node_list
Try changing the style so that u can change the column color.
If u want that in ALV grid
1. different color in line of alv
2. Coloring Cells/rows in ALV Grid.
Got this from forum
report .
Use of colours in ALV grid (cell, line and column) *
Table
tables : mara.
Type
types : begin of ty_mara,
matnr like mara-matnr,
matkl like mara-matkl,
counter(4) type n,
free_text(15) type c,
color_line(4) type c, " Line color
color_cell type lvc_t_scol, " Cell color
end of ty_mara.
Structures
data : wa_mara type ty_mara,
wa_fieldcat type lvc_s_fcat,
is_layout type lvc_s_layo,
wa_color type lvc_s_scol.
Internal table
data : it_mara type standard table of ty_mara,
it_fieldcat type standard table of lvc_s_fcat,
it_color type table of lvc_s_scol.
Variables
data : okcode like sy-ucomm,
w_alv_grid type ref to cl_gui_alv_grid,
w_docking_container type ref to cl_gui_docking_container.
parameters : p_column as checkbox,
p_line as checkbox,
p_cell as checkbox.
at selection-screen output.
perform get_data.
perform fill_catalog.
if w_docking_container is initial.
perform create_objects.
endif.
*& Form create_objects
form create_objects.
create object w_docking_container
exporting
ratio = 60
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
create object w_alv_grid
exporting
i_parent = w_docking_container.
Field that identify color line in internal table
move 'COLOR_LINE' to is_layout-info_fname.
Field that identify cell color in inetrnal table
move 'COLOR_CELL' to is_layout-ctab_fname.
call method w_alv_grid->set_table_for_first_display
exporting
is_layout = is_layout
changing
it_outtab = it_mara
it_fieldcatalog = it_fieldcat
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
endform.
*& Form get_data
form get_data.
select * from mara up to 5 rows.
clear : wa_mara-color_line, wa_mara-color_cell.
move-corresponding mara to wa_mara.
add 1 to wa_mara-counter.
move 'Blabla' to wa_mara-free_text.
if wa_mara-counter = '0002'
and p_line = 'X'.
Color line move 'C410' to wa_mara-color_line.
elseif wa_mara-counter = '0004'
and p_cell = 'X'.
Color cell
move 'FREE_TEXT' to wa_color-fname.
move '6' to wa_color-color-col.
move '1' to wa_color-color-int.
move '1' to wa_color-color-inv.
append wa_color to it_color.
wa_mara-color_cell[] = it_color[].
endif.
append wa_mara to it_mara.
endselect.
endform.
*& Form fill_catalog
form fill_catalog.
Colour code : *
Colour is a 4-char field where : *
- 1st char = C (color property) *
- 2nd char = color code (from 0 to 7) *
0 = background color *
1 = blue *
2 = gray *
3 = yellow *
4 = blue/gray *
5 = green *
6 = red *
7 = orange *
- 3rd char = intensified (0=off, 1=on) *
- 4th char = inverse display (0=off, 1=on) *
Colour overwriting priority : *
1. Line *
2. Cell *
3. Column *
data : w_position type i value '1'.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'MATNR' to wa_fieldcat-fieldname.
move 'MARA' to wa_fieldcat-ref_table.
move 'MATNR' to wa_fieldcat-ref_field.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'MATKL' to wa_fieldcat-fieldname.
move 'MARA' to wa_fieldcat-ref_table.
move 'MATKL' to wa_fieldcat-ref_field.
Color column
if p_column = 'X'.
move 'C610' to wa_fieldcat-emphasize.
endif.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'COUNTER' to wa_fieldcat-fieldname.
move 'N' to wa_fieldcat-inttype.
move '4' to wa_fieldcat-intlen.
move 'Counter' to wa_fieldcat-coltext.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'FREE_TEXT' to wa_fieldcat-fieldname.
move 'C' to wa_fieldcat-inttype.
move '20' to wa_fieldcat-intlen.
move 'Text' to wa_fieldcat-coltext.
append wa_fieldcat to it_fieldcat.
endform.
Check this link to get code for different colors http://www.sapdesignguild.org/resources/ma_guidelines/VisualDesignRules/colors.html
Try this out the same thing will work for Reuse also.
Thanks & Regards,
Judith.
Message was edited by: Judith Jessie Selvi -
Peoplesoft Trees as Hierarchial Columns in OBIEE 11g
Sorry for a duplicate posting. Logged in as a normal user with random number. I know how much people hate it. Logged in as myself now.
Hi,
I have extensively searched using Google or 11g docs but could not find a proper solution to using Peoplesoft trees in form of hierarchial columns in obiee 11g. Can the rpd of obiee 11g be designed to view the Peoplesoft tree structure( as it is in Tree manager in Pplsoft) as hierachial columns in obiee 11g? I am sure hierarchial columns as a 11g feature are not just for visual representation in tree format but also can be viewed in Answers and queried against it,am I right?
Anybody who has worked on trees and OBIEE 11g hierarchial columns? Ahsan/Navin??
Thanks,
DanI have not used the 11g hierarchical columns for PSoft Trees but I can think of a glaring reason NOT to do this..PERFORMANCE. If I understand correctly, 11g issues a group by and Union as you traverse this type of structure and PeopleSoft trees have a number of tables to represent the actual TREE. I cannot possibly see how this can be effective especially with a large scale BI Apps DW? This is part of the reason the trees get flattened out via the OOTB ETL adaptors for PSoft.
Maybe you are looking for
-
Creation of LiveID using a program
I am trying to create a windows liveID accounts using windows live admin center SDK using a different domain. My question is, Has anyone tried using this liveId as external user in SharePoint Online site? Thanks Nate
-
Will my ipt work in japan if wifi is available?
-
Does Captivate 4 contain Adobe Acrobat 8.1.0?
Does Captivate 4 contact Adobe Acrobat 8.1.0 or do you need to purchase this software separately? Thank you.
-
Executing multiple workitems at a time
Hi, Whenever the user selects multiple workitems that belong to the same task and executes the first item, then the samething should all the applicable to other items also. For example, consider that I have 20 workitems that correspond to leave reque
-
Stutters and logging out half way through movies
Hi all, At first I thought this was just me. I had created a couple of trailers in iMovie which played fine on everything but the AppleTV. That continuously dropped frames every second, turning smooth video into something that is jittery and unpleasa