ALV Tree Edit mode
Hi,
I have wrote a program using CL_GUI_ALV_TREE.
I want to make some of the columns editable.
Alternatively, is it possible to include a tree structure in normal CL_GUI_ALV_GRID?
Thanks.
Michael Pang
Hi Leif,
I have not achieved that myself. Maybe you could use a different approach: display the fields into the tree, then use another subscree to show the field contents and allow the user to chage it.
You could find useful these demo programs: SAPSIMPLE_TREE_CONTROL_DEMO, SAPCOLUMN_TREE_CONTROL_DEMO, SAPTLIST_TREE_CONTROL_DEMO, SAPTLIST_TREE_CONTROL_DEMO_HDR, because they show a tree and then, in another subscreen, they show some properties of the selected fields and so.
I hope it helps. Best regards,
Alvaro
Similar Messages
-
How to make some fields in ALV tree editable
Hello All,
Can any one tell me how to make some fields in ALV tree editable.
If possible please post some code.
Regards,
Lisa.Hi Lisa,
I want to make 3 fields in the ALV tree editable and update the saved values in ztable.
I tried making the wa_fieldcat-edit = 'X' But in vain.
Also i made the layout fields wa_layout-edit = 'X' and wa_layout-edit_mode = 'X'.
But still the alv tree field appears as display.
As you have mentioned in the post as answered, So please guide me to make the field editable.
I am using oops method.
Please provide me code if any.
Thanks & Regards,
Mozila -
ALV GRID edit mode keyboard issue
Hi,
I have created a program that displays an ALV GRID.
From the Layout I said to edit in edit mode the ALV Grid.
In the menu toolbar I exclude the button 'cut - copy -paste and delete line'.
When I run the program I see that these buttons are not displayed --> OK.
BUT my problem is: if I use the keyboard then the ALV Grid manages these actions.
For instance. I select some lines and press the key DELETE on the keyboard --> the lines are removed and that is not that I expect because I removed this action from the toolbar.
For the cut - copy and paste it's the same.
Do you have a solution for me --> intercept an event or change the function keys or ....
I would like that the ALV Grid does not manage the keys delete, CRTL-C, CRTL-V in edit mode.
Thanks,
Stevie,Hi Steve
I was not aware of this. So, I recommend you to try this:
At the event <b>"before_user_command"</b> you can terminate the process by resetting the ALV user command.
<u><b>e.g.</b></u>
CASE e_ucomm .
WHEN '&INFO' .
CALL METHOD gr_alvgrid->set_user_command
EXPORTING i_ucomm = space.
ENDCASE .
This code within the event overrides the '&INFO' function and terminates its process. For cut and copy, you can find out ucomm values by putting a break point inside the event and tracing the value of <b>"i_ucomm"</b>.
For some relevant issues, you can inspect the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf">"An Easy Reference For ALV Grid Control"</a>.
<i>As another thing, since you are a new SDN member, you are welcome and let me introduce you the SDN forums pointing system: You can assign points to posts you find helpful while solving your question. You can reward points by clicking the yellow star icon at header of each reply post. You can reward;
- one 10 points (solved)
- two 6 points (very helpful answer)
- many 2 points (helpful answer)</i>
Kind regards...
*--Serdar -
Class ALV in Edit mode and F4 Value help
I am displaying Customer Information in ALV Grid with class method. Customer Number is editable mode and having search help. When user F4 on Customer Number and select any value from search help. This selected new value is not passing to ALV grid in Customer number column. I tried with on_f4 method, but it is not working or something i doing incorrect.
Can any one help to solve this problem ?
Many thanksHi.
try with method check_changed_data in after event.
CALL METHOD go_grid->check_changed_data
IMPORTING
or implement a local_event_class to handle F4 event and Change event.
The demo program "BCALV_TEST_GRID_F4_HELP" can help you tu find the correct code. -
ALV in EDIT-Mode: can't hide the toolbar in edit-mode
Hi,
I have supressed in my ALV all standard-buttons with the help of an it_toolbar_excluding. I have built my own toolbar (p_object->mt_toolbar). Until know everything is fine, the ALV shows only my own generated toolbar.
In that moment, when I change a property of a column in the fieldcatalog ( wa_catalog-edit = 'X' ), both toolbars are shown, the standard toolbar and my own generated buttons.
What's wrong, how can I hide the standard toolbar when I am in the edit mode?
Kind regards
Andreas
Edited by: Andreas Waldt on Sep 3, 2008 5:19 PMThank you very much,
during testing I have recognized, that the buttons in the toolbar are new functions, because of the edit mode.
So I have put all the new button into the excluding list. It worked!
Thanks again!
Andreas -
Hi all,
I have a requirement to display the Data in ALV tree format with some fields as editable.I have to display data in 3 levels,which are of differents structures.
To achieve editable in ALV tree display,I have used ALV GRID along with Tree display but here in GRID the 3 levels data is of same structure,but my requirement is of different structures.
Inputs regarding this will be highly appreciated.
Thanks,
Sravanthi .VHi Simone,
Thanks for your quick reply,I have used this Class also but iam not able to get the Fields editable even though it has the method for EDITABLE feature.
Thanks,
Sravanthi.V -
Hello guys,
I need (again) your help!!!
How to I set focus (select text) when the Tree Item is in
edit mode???
I searched in web, but I could'nt find it.
See my code:
=====================================================================
editTree.mxml
=====================================================================
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.managers.CursorManager;
import mx.core.UIComponent;
import mx.controls.Tree;
import mx.controls.listClasses.IListItemRenderer;
import mx.events.ListEvent;
import myComponents.TreeEditor;
private function disableEditing(event:ListEvent):void {
if (event.rowIndex==0) {
event.preventDefault();
public function processData(event:ListEvent):void {
event.preventDefault();
tree.editedItemRenderer.data.@label =
TreeEditor(event.currentTarget.itemEditorInstance).playlistName.text;
tree.destroyItemEditor();
tree.dataProvider.notifyItemUpdate(tree.editedItemRenderer);
]]>
</mx:Script>
<mx:Style>
Tree {
backgroundAlpha: 0;
borderStyle: none;
indentation: 6;
TextInput {
borderStyle: none;
backgroundAlpha: 0;
focusThickness: 1;
</mx:Style>
<mx:XML id="treeData" xmlns="">
<node label="PLAYLIST" type="lists" data="MA">
<node label="Musics" type="list" />
<node label="My Top Musics" type="list" />
<node label="Recently Added" type="list" />
</node>
</mx:XML>
<mx:Panel width="350" height="350" title="Edit">
<mx:Tree id="tree"
width="200"
height="220"
dataProvider="{treeData}"
labelField="@label"
editable="true"
itemEditor="myComponents.TreeEditor"
itemEditBeginning="disableEditing(event);"
itemEditEnd="processData(event);" >
</mx:Tree>
</mx:Panel>
</mx:Application>
=====================================================================
and...
=====================================================================
TreeEditor.mxml
=====================================================================
<?xml version="1.0" encoding="iso-8859-1"?>
<mx:VBox xmlns:mx="
http://www.adobe.com/2006/mxml"
implements="mx.managers.IFocusManagerComponent">
<mx:Script>
<![CDATA[
public var newName:String;
override public function drawFocus(isFocused:Boolean):void {
// This method can be empty, or you can use it
// to make a visual change to the component.
]]>
</mx:Script>
<mx:TextInput id="playlistName"
text="{data.@label}"
backgroundAlpha="1"
height="18"
change="newName=playlistName.text;" />
</mx:VBox>
=====================================================================
Thanks!!!
KleberHi there,
You can set the navigable and mouse-navigate property to no.
Then create a visual-attribute which you want to show when the user can't change the item.
When you want to change the visual_attribute for the item use:
set_item_property('<block>.<item>', VISUAL_ATTRIBUTE, '<name of attribute>'.
when you use enabled, the field is simply grey, but with the visual attribute you can show any color you like!
Hope this helps... -
Alv tree editable fields?
Hi gusrus does any one knows if there is a way to set an entire
column editable or maybe only a cell in an alvtree
thanksok first you have to register the alv tree event handler for double click, once you have done this you need to use the method
g_alv_tree->get_selected_item, once you have got the selected node by using the g_alv_tree->get_selected_item , you have to use the method g_alv_tree->get_outtab_line, then use the function 'POPUP_GET_VALUES', and finaly use the method g_alv_tree->change_item where you can insert the obtained values from 'POPUP_GET_VALUES'.
thanks i hope you can solve your problem, let me know if you want to receive my source code because i think is complex explaning by here.
regards -
Hi All,
Can any on tell me how to get the coloumns of the O/P ALV table in eit mode. I have an alv table ready its working fine.
All I know is I need to use some codes like
call method l_value->if_salv_wd_table_settings~SET_READ_ONLY
EXPORTING
VALUE = ABAP_FALSE
along with method SET_CELL_EDITOR. But I am not able to implement it. Can anyone give me the details. The only thing ready is an alv table which takes i/p from select parameter and gies the data in the display.
I get a lot of syntax error and am not able to understand clearly .
Thanks in advance.
Rgds,
Anu.I'm afraid you might have to clarify your question a little bit. What exactly are you needing help with? Are you just wanting to know how to interact with the ALV Table model. If so, you can do that via the component usage and the component interface. Here is a small example. The thing to keep mind is that the code must be adjust for what you named your alv component usage. For example in this code I named my component usage alv. Therefore the method names are wd_this->wd_cpuse_alv and wd_this->wd_cpifc_alv. If I had instead named the component usage XYX, the generated method names would change to wd_this->wd_cpuse_xyz and wd_this->wd_cpifc_xyz.
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( ).
l_table->if_salv_wd_table_settings~set_scrollable_col_count( 8 ).
data l_column type ref to cl_salv_wd_column.
l_column = l_table->if_salv_wd_column_settings~get_column( 'CLIENT' ).
l_column->set_visible( cl_wd_uielement=>e_visible-none ).
data textview type ref to cl_salv_wd_uie_text_view.
l_column = l_table->if_salv_wd_column_settings~get_column( 'ADD_PARTICIPANTS' ).
create object textview.
textview->set_text_fieldname( 'ADD_PARTICIPANTS' ).
textview->set_wrapping( abap_true ).
l_column->set_cell_editor( textview ).
l_column = l_table->if_salv_wd_column_settings~get_column( 'STATUS' ).
data ddlb type ref to cl_salv_wd_uie_dropdown_by_key.
create object ddlb
exporting
selected_key_fieldname = 'STATUS'.
ddlb->set_read_only( abap_true ).
l_column->set_cell_editor( ddlb ).
l_column = l_table->if_salv_wd_column_settings~get_column( 'CHANGED_BY' ).
l_header = l_column->get_header( ).
l_header->set_text( `Changed By` ).
l_column = l_table->if_salv_wd_column_settings~get_column( 'LIFE_CYCLE_STAT' ).
l_column->set_visible( cl_wd_uielement=>e_visible-none ). -
How to make editable cell in ALV TREE?
Hi all,
I have a problem to make the cell in item row (I mean not the cell in hierarchy columns and not in the node row) in ALV tree editable.
I know to make it in "normal" ALV, but my ALV is type class: cl_gui_alv_tree and the nodes are calculated in a sum.Can anyone help me to set the cell editable in ALV tree?
Thank you a lot!
Best regards,
Danijela Zivanovic
Message was edited by: Danijela ZivanovicHI,
To make a column editable, it will be sufficient to set the field <b>EDIT</b> in the field catalog. The ALV Grid perceives if there are some editable fields and adds buttons for editing purposes. If you do not need these new buttons
<u><i>if you want it in the Classes</i></u>
For this procedure; add the name of the field to the field FIELDNAME, and pass cl_gui_alv_grid=>mc_style_enabled to make a field editable and cl_gui_alv_grid=>mc_style_disabled to make a field non-editable,
<b>Example:</b>
FORM adjust_editables USING pt_list LIKE gt_list[] .
DATA ls_listrow LIKE LINE OF pt_list .
DATA ls_stylerow TYPE lvc_s_styl .
DATA lt_styletab TYPE lvc_t_styl .
LOOP AT pt_list INTO ls_listrow .
IF ls_listrow-carrid = 'XY' .
ls_stylerow-fieldname = 'SEATSMAX' .
ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled . APPEND ls_stylerow TO lt_styletab .
ENDIF .
IF ls_listrow-connid = '02' .
ls_stylerow-fieldname = 'PLANETYPE' .
ls_stylerow-style = cl_gui_alv_grid=>mc_style_enabled . APPEND ls_stylerow TO lt_styletab .
ENDIF .
INSERT LINES OF lt_styletab INTO ls_listrow-cellstyles . MODIFY pt_list FROM ls_listrow .
ENDLOOP .
ENDFORM
Thanks
Sudheer -
hi Experts!!
I am working on a ALV Grids which are on a Tabstrip Sub screen area.I have done the ALV in Edit mode and :
> <b>when we enter the values in the editing colums i want it to be updateted in the DB table.
>But when we enter values it is not comming in the internal table also and not updateing in DB table.
>Plz suggest waht needs to be done to catch the edited valuse and update the same into DB table</b>.hi,
Check this might help you...
Regard points if helpful....
DATA: G_CONTROL TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
G_ALV TYPE REF TO CL_GUI_ALV_GRID.
DATA: T_FCAT TYPE LVC_T_FCAT,
WA_FCAT TYPE LVC_S_FCAT.
DATA: I_ZAMIT TYPE TABLE OF ZAMIT_SHIP_TAB WITH HEADER LINE.
DATA: I_INDEX TYPE I.
DATA: G_OK_CODE TYPE SY-UCOMM.
DATA: G_OK_CODE1 TYPE SY-UCOMM.
SELECT * FROM ZAMIT_SHIP_TAB INTO TABLE I_ZAMIT.
CALL SCREEN 9000.
SCREEN FORMS>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
*& Module STATUS_9000 OUTPUT
text
MODULE STATUS_9000 OUTPUT.
SET PF-STATUS 'PF9001'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_9000 OUTPUT
*& Module CREATE_CONTROL OUTPUT
text
MODULE CREATE_CONTROL OUTPUT.
CREATE OBJECT G_CONTROL
EXPORTING
PARENT =
CONTAINER_NAME = 'G_CUSTOM_CONTROL'
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " CREATE_CONTROL OUTPUT
*& Module CREATE_ALV OUTPUT
text
MODULE CREATE_ALV OUTPUT.
CREATE OBJECT G_ALV
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = G_CONTROL
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
others = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " CREATE_ALV OUTPUT
*& Module DISPLAY_ALV OUTPUT
text
MODULE DISPLAY_ALV OUTPUT.
PERFORM PREPARE_FIELD_CATALOG.
CALL METHOD G_ALV->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = 'SFLIGHT'
IS_VARIANT =
I_SAVE = 'X'
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING = T_TOOLBAR[]
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = I_ZAMIT[]
IT_FIELDCATALOG = T_FCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " DISPLAY_ALV OUTPUT
*& Form PREPARE_FIELD_CATALOG
text
--> p1 text
<-- p2 text
FORM PREPARE_FIELD_CATALOG .
REFRESH T_FCAT.
CLEAR WA_FCAT.
WA_FCAT-COL_POS = 1.
WA_FCAT-COLTEXT = 'SHIPMENT NO.'.
WA_FCAT-FIELDNAME = 'ZSHIP_NO'.
WA_FCAT-REF_TABLE = 'I_ZAMIT'.
WA_FCAT-edit = 'X'.
APPEND WA_FCAT TO T_FCAT.
CLEAR WA_FCAT.
WA_FCAT-COL_POS = 2.
WA_FCAT-COLTEXT = 'DOC TYPE'.
WA_FCAT-FIELDNAME = 'ZDOC_TYP'.
WA_FCAT-REF_TABLE = 'I_ZAMIT'.
WA_FCAT-KEY = 'X'.
APPEND WA_FCAT TO T_FCAT.
CLEAR WA_FCAT.
WA_FCAT-COL_POS = 3.
WA_FCAT-COLTEXT = 'NAME_CR'.
WA_FCAT-FIELDNAME = 'ZNAME_CR'.
WA_FCAT-REF_TABLE = 'I_ZAMIT'.
WA_FCAT-KEY = 'X'.
APPEND WA_FCAT TO T_FCAT.
CLEAR WA_FCAT.
WA_FCAT-COL_POS = 4.
WA_FCAT-COLTEXT = 'SHIP_TYP'.
WA_FCAT-FIELDNAME = 'ZSHIP_TYP'.
WA_FCAT-REF_TABLE = 'I_ZAMIT'.
WA_FCAT-KEY = 'X'.
APPEND WA_FCAT TO T_FCAT.
CLEAR WA_FCAT.
WA_FCAT-COL_POS = 5.
WA_FCAT-COLTEXT = 'LEG_IND'.
WA_FCAT-FIELDNAME = 'ZLEG_IND'.
WA_FCAT-REF_TABLE = 'I_ZAMIT'.
WA_FCAT-KEY = 'X'.
APPEND WA_FCAT TO T_FCAT.
CLEAR WA_FCAT.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Module LEAVE INPUT
text
MODULE LEAVE INPUT.
LEAVE PROGRAM.
ENDMODULE. " LEAVE INPUT
*& Module USER_COMMAND_9000 INPUT
text
MODULE USER_COMMAND_9000 INPUT.
IF G_OK_CODE = 'CHANGE'.
DATA: VALUE TYPE C,
COL TYPE I ,
ROW TYPE LVC_S_ROW,
COLNO TYPE LVC_S_COL,
ROWNO TYPE LVC_S_ROID.
CALL METHOD G_ALV->GET_CURRENT_CELL
IMPORTING
E_ROW = I_INDEX
CALL METHOD G_ALV->GET_CURRENT_CELL
IMPORTING
E_ROW =
E_VALUE = VALUE
E_COL = COL
ES_ROW_ID = ROW
ES_COL_ID = COLNO
ES_ROW_NO = ROWNO.
READ TABLE I_ZAMIT INDEX I_INDEX.
CALL SCREEN 9001 STARTING AT 10 10 .
ENDIF.
ENDMODULE. " USER_COMMAND_9000 INPUT
*& Module STATUS_9001 OUTPUT
text
MODULE STATUS_9001 OUTPUT.
SET PF-STATUS 'PF9002'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_9001 OUTPUT
*& Module USER_COMMAND_9001 INPUT
text
MODULE USER_COMMAND_9001 INPUT.
IF G_OK_CODE1 = 'SAVE'.
MODIFY ZAMIT_SHIP_TAB FROM I_ZAMIT.
SELECT * FROM ZAMIT_SHIP_TAB INTO TABLE I_ZAMIT.
CALL METHOD G_ALV->REFRESH_TABLE_DISPLAY.
CALL SCREEN 9000.
ENDIF.
ENDMODULE. " USER_COMMAND_9001 INPUT -
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. -
Edit a field in ALV tree in a subscreen of a module pool
Hi
I want to make a field editable in the ALV tree based on some condtions in a subscreen of a module pool. I used the edit = 'X' field in the fieldcatalog still it is showing the field as display and not edit.
Please help me to get the field as editable and save it to the database table.
Please not this is ALV TREE
Regards,
MozilaHi Mayank,
Thanks for the reply
I am using oops method.
I tried making the field which is to be made editable as wa_fieldcatalog-edit = 'X'. But its not working. I didnt get you when you said edit in layout object.
I also went through the demo programs but these programs are not having editable fields.
My code is as follows:
IF tree4 IS INITIAL.
* create container for alv-tree
l_tree_container_name = 'TREE4'.
CREATE OBJECT l_custom_container
EXPORTING
container_name = l_tree_container_name
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
* create tree control
CREATE OBJECT tree4
EXPORTING
i_parent = l_custom_container
i_node_selection_mode = cl_gui_column_tree=>node_sel_mode_multiple
i_item_selection = 'X'
i_no_html_header = 'X'
i_no_toolbar = 'X'
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.
* create hierarchy
CALL METHOD tree4->set_table_for_first_display
EXPORTING
is_layout = s_layo
CHANGING
it_sort = it_sort
it_outtab = it_final
it_fieldcatalog = it_fieldcat.
ELSE.
CALL METHOD tree4->refresh_table_display
EXPORTING
it_sort = it_sort
EXCEPTIONS
program_error = 1
failed = 2
cntl_system_error = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif. -
Editable Field in ALV Tree Control
Hello All,
Can anyone tell me how can i make a field editable in an Alv Tree grid. I have tried with fiedcatalog-edit = 'X'. but that doesn't work.
also please provide a piece of code to be clear ...
Thanks,
Ravi AswanihI ,
Data : LI_fieldcat type lvc_t_fcat,
ls_fcat type lvc_s_fcat.
IF OKCODE = 'MAIN'.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'ZCUS'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = LI_fieldcat[] .
LOOP AT LI_FIELDCAT INTO LS_FCAT.
CASE ls_fcat-fieldname.
WHEN 'KUNNR'.
ls_fcat-col_pos = 1.
WHEN 'NAME1'.
ls_fcat-edit = 'X'.
ls_fcat-col_pos = 2.
WHEN 'ORT01'.
ls_fcat-edit = 'X'.
ls_fcat-col_pos = 3.
ls_fcat-drdn_hndl = '1'.
ls_fcat-outputlen = 20.
WHEN 'LAND1'.
ls_fcat-edit = 'X'.
ls_fcat-col_pos = 4.
ENDCASE.
MODIFY LI_fieldcat FROM ls_fcat.
ENDLOOP.
ENDIF.
With this The internal Table contains 4 fields Kunnr Name1 Ort01 Land1 Here Kunnr is the Key field so , it is not editable , reaming fields are Editable.
There u must write the Modify statement.
check it once
Regards
Krishna -
Editable field in alv tree output using cl_gui_alv_tree
Hi,
i need Editable field with F4 help in alv tree output using cl_gui_alv_tree.
regards,
Nareshsadly, this is not possible. An ALV Tree cannot by editable.
Regards
Maybe you are looking for
-
Custom page size results in blank page
I have a networked HP Color Laserjet 2605dn printer and have some 7.25"x5.25" envelopes that I need to print addresses on. So, I created a FileMaker database and went to print them with a custom page size I created and only get blank pages. If I chan
-
Secondary colur correction mask not working! Help!
I am currently working on Premier Pro CS6 editing a music video. I have edited my footage, fixed the tonality and I am now onto color grading it. I took the saturation down to take out the colour and applied RGB curves to add blue into the shadows an
-
Associative Arrays, Indexes vs. Full Table Scans
Hello, I just started using ODP.Net to connect my .Net Web Service to our Oracle Database. The reason why I switched to ODP.Net is support for arrays. If I wanted to pass in arrays to the procedure I had to pass it in through a varchar2 in a CSV form
-
Hallo, it is possible to become the time for processing in the JDBC-Adapter. I´m interesing for the time splitted in XI-handling and real data-base time to deliver the data. In the RWB --> Performance-Monitoring --> data source: PMI --> component: XI
-
I config alchemy step by step 1. ./config 2. source alchemy-setup 3. alc-on and then I run "which gcc" , and it is alchemy gcc .. but when I run gcc --version to show the gcc version , it doesn't show any thing, So I think that alchemy gcc could no