Dump in creating tree
hi,
i have create a tree structure when i click on the nodes it is giving dump.dump is describing like this.how to rectify the dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
rgds,
Hi.
hi ,
see this simple code for a tree structure and function modules for tree structures...
REPORT Ztree_TEST_PGM.
Type-pools : fibs,stree.
data : t_node type snodetext.
data : node_tab like t_node occurs 0 with header line.
clear : node_tab, node_tab[].
node_tab-type = 'T'.
node_tab-name = 'Earth'.
node_tab-tlevel = '01'.
node_tab-nlength = '5'.
node_tab-color = '4'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Europe'.
node_tab-tlevel = '02'.
node_tab-nlength = '6'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 4.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Germany'.
node_tab-tlevel = '03'.
node_tab-nlength = '7'.
node_tab-color = '4'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 4.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Berlin'.
node_tab-tlevel = '04'.
node_tab-nlength = '6'.
node_tab-color = '4'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Asia'.
node_tab-tlevel = '02'.
node_tab-nlength = '4'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'India'.
node_tab-tlevel = '03-'.
node_tab-nlength = '5'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Bombay'.
node_tab-tlevel = '04-'.
node_tab-nlength = '6'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
CALL FUNCTION 'RS_TREE_CONSTRUCT'
TABLES
NODETAB = node_tab .
DATA: type_mapping TYPE stree_ctl_type_mapping_tab.
DATA: wa_type TYPE stree_ctl_type_mapping.
CLEAR: type_mapping[].
wa_type-type = 'A'.
wa_type-icon = '@BL@'.
APPEND wa_type TO type_mapping.
CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
EXPORTING
USE_CONTROL = 'L'.
*A list of other function modules that can also be used to construct tree reports:
*SEUT, Hierarchy framework
*RS_TREE_ADD_NODE Insert nodes
*RS_TREE_AUTOMATIC_REFRESH
*RS_TREE_COMPRESS Hide subtree(s)
*RS_TREE_CONSTRUCT Construct new hierarchy or insert subtree
*RS_TREE_CONTROL_PREPARE
*RS_TREE_CREATE Create hierarchy
*RS_TREE_DELETE_NODE Delete node with associated sub-tree
*RS_TREE_EXPAND Expand subtree
*RS_TREE_GET_CURRENT_LAYOUT Get layout information for displayed hierarchy
*RS_TREE_GET_CURRENT_NODE Get node at which cursor is positioned
*RS_TREE_GET_CURRENT_ROOT Get current root node
*RS_TREE_GET_CURRENT_TREE Get structure information for displayed hierarchy
*RS_TREE_GET_INPUT Get entires from input fields
*RS_TREE_GET_MARKED_NODES Get selected nodes
*RS_TREE_GET_MODIFICATION_LOG Get change log for hierarchy
*RS_TREE_GET_NODE Get nodes for specified ID
*RS_TREE_GET_NODE_BY_NAME Get node for specified node name
*RS_TREE_GET_PREDECESSOR Get preceding node
*RS_TREE_GET_SEARCHSTRING Get last search strinng
*RS_TREE_LIST Simulate hierarchy or subtree display
*RS_TREE_LIST_DISPLAY Display hierarchy
*RS_TREE_LIST_DISPLAY Display hierarchy
*RS_TREE_MODIFY_NODE
*RS_TREE_MOVE Reassign node with subtree
*RS_TREE_POP Get hierarchy from the stack and restore
*RS_TREE_PUSH Place hierarchy on the stack
*RS_TREE_RESET_LOCK Deselect node
*RS_TREE_SET_CURRENT_LAYOUT Set layout with marked cursor position
*RS_TREE_SET_CURRENT_TREE Set other hierarchy
*RS_TREE_SET_LOCK Select node
*RS_TREE_SET_NODE Change Nodes
*RS_TREE_SET_SCROLL_POS Position node at the beginning of the page
*RS_TREE_SLEEP
*RS_TREE_SORT_CHILDREN
reward points if useful,
venkat.
Similar Messages
-
Short Dump while creating Configuration (Application or Component)
Hi All,
I m facing a short dump, while creating a Component or Applcation Configuration
in the standard FPM_GAF_COMPONENT.
Short dump states the Runtine error as MESSAGE_TYPE_UNKNOWN
Short text
Message type " " is unknown.
What happened?
Error in the ABAP Application Program
The current ABAP program "CL_WDR_MESSAGE_MANAGER========CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
Information on where terminated
Termination occurred in the ABAP program "CL_WDR_MESSAGE_MANAGER========CP" -
in "IF_WD_MESSAGE_MANAGER~REPORT_T100_MESSAGE".
The main program was "SAPMHTTP ".
In the source code you have the termination point in line 16
of the (Include) program "CL_WDR_MESSAGE_MANAGER========CM00R".
12 exporting
13 textid = cx_wdr_rt_exception=>invalid_
14 endif.
15
>>>> message id msgid type msgty number msgno
17 with p1 p2 p3 p4
18 into msg.
19
20 if p1 is not initial.Hello Srikanth,
I have no issues in trying to help someone as polite as you! It is very nice to have questions answered in an intelligible manner - not unfortunately always the case.
Without being able to debug on your system it is quite difficult to say what might be causing this error - especially as you say this was working in a different system.
I'm sure you've already tried eliminating differences in your authorisations between the two systems? Are you registered as a developer in the new system?
Sorry I'm now just guessing as I've not come across the error myself - hopefully now that we have clearly documented the issue, someone else might be able to shed some light on what might cause it!
Chris -
How to create tree by database table
hello sir ,
my table is as follows,
NAME LINK ID PID ROLLID
User mgt. f?p=131:1: 1 - 10 ////root node///
district 10 1 1 child
Roles 16 14 4 child
Users 11 10 1 child
ROLLID is given from another table whis is (ROLES). i making tree by the combinations of id , pid, & roll id. by the roll id i can manage the tree to do not display specific nodes to specific users.
ROLE table as :
ROLE_ID NAME DESCRIPTION
1 Administrator This is administrator
2 Assistant Director -
3 Assistant Statistical Officer -
4 Data Entry Operator -
but i think it is very complicated process . give me solution about it
also i have to give my images to each node. how can i do that?You already have a thread going about this: Re: how to create tree by database table .
Scott -
ABAP Dump while creating Group Asset
Hi all
I am getting the following dump while creating Group Asset through AS21-
Runtime Errors OBJECTS_OBJREF_NOT_ASSIGNED
Except. CX_SY_REF_IS_INITIAL
Date and Time 19.11.2007 21:16:06
Short text
Access via 'NULL' object reference not possible.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLGLO_FIAA_SCREENS" had to be terminated because it
has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
caught in procedure "SET_MANAGER_FOR_UPDATE" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
You attempted to use a 'NULL' object reference (points to 'nothing')
access a component (variable: "GO_ASSET_MAINDATA").
An object reference must point to an object (an instance of a class)
before it can be used to access components.
Either the reference was never set or it was set to 'NULL' using the
CLEAR statement.
Source Code Extract
Line SourceCde
545 * -->P_LS_WORK text
546 * <--P_LO_ASSET_MANAGER text
547 * <--P_LO_TIMEDPNDNT_MANGER text
548 *----
549 FORM set_manager_for_update
550 USING
551 is_work TYPE raist03
552 CHANGING
553 co_asset_manager LIKE go_asset_manager
554 co_timedpndt_manger LIKE go_timedpndt_manager
555 ct_err_msg TYPE tt_err_msg.
556
557 DATA:
558 ls_asset_maindata TYPE gty_s_asset_maindata,
559 ls_anla_key TYPE anla_key,
560 ls_err_msg LIKE LINE OF ct_err_msg.
561
562 * check operation
563 IF is_work-kz EQ con_ins AND
564 is_work-flg_unr NE on.
565
566 MOVE-CORRESPONDING is_work TO ls_anla_key.
567 ls_anla_key-mandt = sy-mandt.
568 ls_anla_key-anln1 = is_work-anln1_new.
569 * start of Note # 954513
570 IF ls_anla_key-anln1 IS INITIAL.
571 ls_anla_key-anln1 = is_work-anln1.
572 ENDIF.
573 * end of Note # 954513
>>>>> ls_asset_maindata = go_asset_maindata->get( ).
576
577 * clone time-independent asset data manager
578 TRY.
579 co_asset_manager = lcl_amd_mngr_clone_factory=>clone_asset_manager( ls_anla_key ).
580
581 CATCH cx_faa_asset.
Any1 has a clue where I might be going wrong?
Cheers
HrishiHello Hrishi
I have researched your issue and note 1063792 should resolve it. The
SAP_APPL that it is included in is SAPKH60011. I recommend you to upgrade to the latest support package available to avoid eventual errors.
For program errors you should open a support ticket in the SAP Service Market place.
Regards
Javier -
Dump while creating Process Order -COR1
Hi,
I am getting dump while creating a Process Order thru COR1. the dump error discription GETWA_NOT_ASSIGNED .HI omprasath rajendiran,
Do you solve the problème, because i get the same problème with COR1 ? -
Basic Requirement to create Tree View
Hi gurus.
While creating Custom Tree View, I am getting following error when i click the Search button in search page..
**An error occurred during event processing in view ASSEG.htm of UI Component ZHIER_VIEW**
**An exception has occurred Exception Class CX_SY_REF_IS_INITIAL - Dereferencing of the NULL reference**
**Method: ZL_ZHIER_VI_ASSEG_IMPL=>EH_ONSEARCH**
**Source Text Row: 109**
please help me if any one done tree view..
helpful if provide correct procedure to create tree view..
Regards.
Ashok.Hi Lakshmi and Raj
The answer was correct, i was able to resolve that exception...
But the thing is when i click on the search button it is not displaying the result.. i mean it is not triggering the event...
what will be the answer for this please help me .. urgent requirement..
let me explain the scenario here i am taking one advance search page and if u click on search button result should display in tree format...
I done all correctly but i am now unable to point the error... my requirement similar to the standard component SEGAS_SEG.
Thanks
Ashok.. -
How to create tree structure in abap
hi,
I am mohan. Please send the how to create the tree structure. how to insert the child nodes in root node. actually our requirement is we have list transaction codes. We are planning to put all transaction codes in tree level.
please tell me how to do the program in tree structure.Hi Mohan,
Check the following program on ALV tree.
REPORT zalvtree.
CLASS cl_gui_column_tree DEFINITION LOAD.
CLASS cl_gui_cfw DEFINITION LOAD.
DATA: go_grid TYPE REF TO cl_gui_alv_grid.
DATA: ro_grid TYPE REF TO cl_gui_alv_grid.
DATA tree1 TYPE REF TO cl_gui_alv_tree.
DATA mr_toolbar TYPE REF TO cl_gui_toolbar.
DATA : gt_checked TYPE lvc_t_chit,
gs_checked LIKE LINE OF gt_checked,
l_part_key TYPE lvc_nkey,
gt_node TYPE lvc_s_chit-nodekey.
INCLUDE <icon>.
INCLUDE zamit_alv_tree_toolbar_event.
INCLUDE zbcalv_tree_event_receiver.
*DATA: toolbar_event_receiver TYPE REF TO lcl_toolbar_event_receiver.
DATA: gt_sflight TYPE sflight OCCURS 0, "Output-Table
gt_fieldcatalog TYPE lvc_t_fcat, "Fieldcatalog
ok_code LIKE sy-ucomm. "OK-Code
START-OF-SELECTION.
END-OF-SELECTION.
CALL SCREEN 100.
*& Module PBO OUTPUT
process before output
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
IF tree1 IS INITIAL.
PERFORM init_tree.
else.
CALL METHOD me->refresh_table_display
EXCEPTIONS
PROGRAM_ERROR = 1
others = 2
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.
CALL METHOD cl_gui_cfw=>flush.
ENDMODULE. " PBO OUTPUT
*& Module PAI INPUT
process after input
MODULE pai INPUT.
CASE ok_code.
WHEN 'EXIT' OR 'BACK' OR 'CANC'.
PERFORM exit_program.
*mrk
WHEN 'MOVE'.
PERFORM check_selection.
WHEN 'MBAK'.
PERFORM another_selection.
WHEN 'ALL'.
PERFORM select_all.
WHEN 'CLEAR'.
PERFORM clear_all.
WHEN 'DELETE'.
PERFORM delete_all.
WHEN 'EXPAND'.
PERFORM expand_all.
WHEN 'COLLAPSE'.
PERFORM collapse_all.
WHEN OTHERS.
CALL METHOD cl_gui_cfw=>dispatch.
ENDCASE.
CLEAR ok_code.
CALL METHOD cl_gui_cfw=>flush.
ENDMODULE. " PAI INPUT
*& Form build_fieldcatalog
build fieldcatalog for structure sflight
FORM build_fieldcatalog.
get fieldcatalog
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
ct_fieldcat = gt_fieldcatalog.
change fieldcatalog
DATA: ls_fieldcatalog TYPE lvc_s_fcat.
LOOP AT gt_fieldcatalog INTO ls_fieldcatalog.
CASE ls_fieldcatalog-fieldname.
WHEN 'CARRID' OR 'CONNID' OR 'FLDATE'.
ls_fieldcatalog-no_out = 'X'.
ls_fieldcatalog-key = ''.
WHEN 'PRICE' OR 'SEATSOCC' OR 'SEATSMAX' OR 'PAYMENTSUM'.
ls_fieldcatalog-do_sum = 'X'.
ENDCASE.
MODIFY gt_fieldcatalog FROM ls_fieldcatalog.
ENDLOOP.
ENDFORM. " build_fieldcatalog
*& Form build_hierarchy_header
build hierarchy-header-information
-->P_L_HIERARCHY_HEADER strucxture for hierarchy-header
FORM build_hierarchy_header CHANGING
p_hierarchy_header TYPE treev_hhdr.
p_hierarchy_header-heading = 'Hierarchy Header'. "#EC NOTEXT
p_hierarchy_header-tooltip =
'This is the Hierarchy Header !'. "#EC NOTEXT
p_hierarchy_header-width = 30.
p_hierarchy_header-width_pix = ''.
ENDFORM. " build_hierarchy_header
*& Form exit_program
free object and leave program
FORM exit_program.
CALL METHOD tree1->free.
LEAVE PROGRAM.
ENDFORM. " exit_program
*& Form check_selection
text
--> p1 text
<-- p2 text
FORM check_selection .
create container for alv-tree
DATA: l_tree_container_name(30) TYPE c,
l_custom_container2 TYPE REF TO cl_gui_custom_container.
l_tree_container_name = 'TREE2'.
IF sy-batch IS INITIAL.
CREATE OBJECT l_custom_container2
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.
IF sy-subrc <> 0.
MESSAGE x208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
ENDIF.
CREATE OBJECT go_grid
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
i_parent = l_custom_container2
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
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.
PERFORM load_data_into_grid.
*data: lt_nodes type LVC_T_NKEY,
ls_nodes like line of lt_nodes,
ls_checked like line of gt_checked.
*loop at gt_checked into ls_checked.
ls_nodes = ls_checked-nodekey.
append ls_nodes to lt_nodes.
*endloop.
*CALL METHOD tree1->unselect_nodes
EXPORTING
it_node_key = lt_nodes
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
DP_ERROR = 2
MULTIPLE_NODE_SELECTION_ONLY = 3
ERROR_IN_NODE_KEY_TABLE = 4
FAILED = 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.
ENDFORM. " check_selection
*& Form another_selection
text
--> p1 text
<-- p2 text
FORM another_selection .
create container for alv-tree
DATA: l_tree_container_name(30) TYPE c,
l_custom_container2 TYPE REF TO cl_gui_custom_container.
l_tree_container_name = 'TREE2'.
IF sy-batch IS INITIAL.
CREATE OBJECT l_custom_container2
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.
IF sy-subrc <> 0.
MESSAGE x208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
ENDIF.
CREATE OBJECT ro_grid
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
i_parent = l_custom_container2
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
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.
PERFORM load_data_into_grid1.
DATA: lt_unsel TYPE lvc_t_nkey,
ls_unsel LIKE LINE OF lt_unsel.
LOOP AT gt_checked INTO gs_checked.
ls_unsel = gs_checked-nodekey.
APPEND ls_unsel TO lt_unsel.
ENDLOOP.
CALL METHOD tree1->unselect_nodes
EXPORTING
it_node_key = lt_unsel
EXCEPTIONS
cntl_system_error = 1
dp_error = 2
multiple_node_selection_only = 3
error_in_node_key_table = 4
failed = 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.
*CALL METHOD tree1->unselect_all
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
FAILED = 2
others = 3
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
DATA: text TYPE lvc_value,
item TYPE lvc_t_layi,
node TYPE lvc_s_layn,
inode TYPE lvc_nkey.
FIELD-SYMBOLS: <wa> TYPE ANY.
DATA: l_dref_wa LIKE LINE OF gt_sflight.
ASSIGN l_dref_wa TO <wa>.
READ TABLE gt_checked INTO gs_checked WITH KEY nodekey = 3.
inode = gs_checked-nodekey.
CALL METHOD tree1->get_outtab_line
EXPORTING
i_node_key = inode
IMPORTING
e_outtab_line = <wa>
e_node_text = text
et_item_layout = item
es_node_layout = node
EXCEPTIONS
node_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA: lt_layout TYPE lvc_t_laci,
layout LIKE LINE OF lt_layout.
layout-chosen = 'X'.
layout-fieldname = tree1->c_hierarchy_column_name.
ls_item_layout-chosen = 'X'. "To give default checkbox value checked
layout-class = cl_gui_column_tree=>item_class_checkbox.
layout-editable = 'X'.
LAYOUT-U_CHOSEN = 'X'.
APPEND layout TO lt_layout.
CALL METHOD tree1->change_node
EXPORTING
i_node_key = inode
i_outtab_line = <wa>
IS_NODE_LAYOUT =
it_item_layout = lt_layout
I_NODE_TEXT =
I_U_NODE_TEXT =
EXCEPTIONS
node_not_found = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*CALL METHOD tree1->change_item
EXPORTING
i_node_key = inode
i_fieldname = gs_checked-FIELDNAME
i_data = <wa>
I_U_DATA = ''
IS_ITEM_LAYOUT = layout
EXCEPTIONS
NODE_NOT_FOUND = 1
others = 2
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*loop at lt_unsel into ls_unsel.
*CALL METHOD tree1->update_checked_items
EXPORTING
i_node_key = ls_unsel
i_fieldname = ''
i_checked = ''
EXCEPTIONS
PROGRAM_ERROR = 1
others = 2
*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.
ENDFORM. " another_selection
*& Form select_all
text
--> p1 text
<-- p2 text
FORM select_all .
CONSTANTS: c_x(1) TYPE c VALUE 'X'.
*********Check box modifications.
CALL METHOD tree1->delete_all_nodes
EXCEPTIONS
failed = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear l_part_key.
create hierarchy
PERFORM create_hierarchy USING c_x.
CALL METHOD tree1->expand_node
EXPORTING
i_node_key = gt_node
I_LEVEL_COUNT = 1
i_expand_subtree = 'X'
EXCEPTIONS
failed = 1
illegal_level_count = 2
cntl_system_error = 3
node_not_found = 4
cannot_expand_leaf = 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.
add own functioncodes to the toolbar
perform change_toolbar.
register events
perform register_events.
adjust column_width
call method tree1->COLUMN_OPTIMIZE.
ENDFORM. " select_all
*& Form clear_all
text
--> p1 text
<-- p2 text
FORM clear_all .
CONSTANTS: c_x(1) TYPE c VALUE space.
*********Check box modifications.
CALL METHOD tree1->delete_all_nodes
EXCEPTIONS
failed = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
create hierarchy
PERFORM create_hierarchy USING c_x.
CALL METHOD tree1->expand_node
EXPORTING
i_node_key = gt_node
I_LEVEL_COUNT = 1
i_expand_subtree = 'X'
EXCEPTIONS
failed = 1
illegal_level_count = 2
cntl_system_error = 3
node_not_found = 4
cannot_expand_leaf = 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.
ENDFORM. " clear_all
*& Form delete_all
text
--> p1 text
<-- p2 text
FORM delete_all .
*********Check box modifications.
CALL METHOD tree1->delete_all_nodes
EXCEPTIONS
failed = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " delete_all
*& Form expand_all
text
--> p1 text
<-- p2 text
FORM expand_all .
CALL METHOD tree1->expand_node
EXPORTING
i_node_key = gt_node
I_LEVEL_COUNT = 1
i_expand_subtree = 'X'
EXCEPTIONS
failed = 1
illegal_level_count = 2
cntl_system_error = 3
node_not_found = 4
cannot_expand_leaf = 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.
ENDFORM. " expand_all
*& Form collapse_all
text
--> p1 text
<-- p2 text
FORM collapse_all .
CALL METHOD tree1->collapse_all_nodes
EXCEPTIONS
failed = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " collapse_all
*& Form load_data_into_grid
text
--> p1 text
<-- p2 text
FORM load_data_into_grid .
DATA:
For parameter IS_VARIANT
l_layout TYPE disvariant,
gs_layout TYPE lvc_s_layo.
DATA gi_sflight TYPE TABLE OF zsflight.
Load data into the grid and display them
l_layout-report = sy-repid.
gs_layout-grid_title = 'Amits Test Program'.
gs_layout-sel_mode = 'A'.
SELECT *
FROM zsflight
INTO TABLE gi_sflight.
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
is_layout = gs_layout
is_variant = l_layout
i_save = 'A'
CHANGING
it_outtab = gi_sflight.
ENDFORM. " load_data_into_grid
*& Form load_data_into_grid
text
--> p1 text
<-- p2 text
FORM load_data_into_grid1.
DATA:
For parameter IS_VARIANT
l_layout TYPE disvariant,
gs_layout TYPE lvc_s_layo.
DATA gi_sflight TYPE TABLE OF zapempl.
Load data into the grid and display them
l_layout-report = sy-repid.
gs_layout-grid_title = 'Rams Test Program'.
gs_layout-sel_mode = 'A'.
SELECT *
FROM zapempl
INTO TABLE gi_sflight.
CALL METHOD ro_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'ZAPEMPL'
is_layout = gs_layout
is_variant = l_layout
i_save = 'A'
CHANGING
it_outtab = gi_sflight.
ENDFORM. " load_data_into_grid1
*& Form build_header
build table for html_header
--> p1 text
<-- p2 text
FORM build_comment USING
pt_list_commentary TYPE slis_t_listheader
p_logo TYPE sdydo_value.
DATA: ls_line TYPE slis_listheader.
LIST HEADING LINE: TYPE H
CLEAR ls_line.
ls_line-typ = 'H'.
LS_LINE-KEY: NOT USED FOR THIS TYPE
ls_line-info = 'ALV-tree-demo: flight-overview'. "#EC NOTEXT
APPEND ls_line TO pt_list_commentary.
STATUS LINE: TYPE S
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = 'valid until'. "#EC NOTEXT
ls_line-info = 'January 29 1999'. "#EC NOTEXT
APPEND ls_line TO pt_list_commentary.
ls_line-key = 'time'.
ls_line-info = '2.00 pm'. "#EC NOTEXT
APPEND ls_line TO pt_list_commentary.
ACTION LINE: TYPE A
CLEAR ls_line.
ls_line-typ = 'A'.
LS_LINE-KEY: NOT USED FOR THIS TYPE
ls_line-info = 'actual data'. "#EC NOTEXT
APPEND ls_line TO pt_list_commentary.
p_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "build_comment
*& Form create_hierarchy
text
--> p1 text
<-- p2 text
FORM create_hierarchy USING p_x.
DATA: ls_sflight TYPE sflight,
lt_sflight TYPE sflight OCCURS 0.
get data
SELECT * FROM sflight INTO TABLE lt_sflight
UP TO 200 ROWS .
SORT lt_sflight BY carrid connid fldate.
add data to tree
DATA: l_carrid_key TYPE lvc_nkey,
l_connid_key TYPE lvc_nkey,
l_last_key TYPE lvc_nkey.
l_part_key TYPE lvc_nkey
PERFORM add_carrid_line USING ls_sflight
CHANGING l_part_key.
gt_node = l_part_key.
LOOP AT lt_sflight INTO ls_sflight.
ON CHANGE OF ls_sflight-carrid.
PERFORM add_carrid_line USING ls_sflight
l_part_key
CHANGING l_carrid_key.
PERFORM add_connid_line USING ls_sflight
l_carrid_key
CHANGING l_connid_key.
PERFORM add_complete_line USING ls_sflight
l_connid_key
p_x
CHANGING l_last_key.
CONTINUE.
ENDON.
ON CHANGE OF ls_sflight-connid.
PERFORM add_connid_line USING ls_sflight
l_carrid_key
CHANGING l_connid_key.
PERFORM add_complete_line USING ls_sflight
l_connid_key
p_x
CHANGING l_last_key.
CONTINUE.
ENDON.
PERFORM add_complete_line USING ls_sflight
l_connid_key
p_x
CHANGING l_last_key.
ENDLOOP.
calculate totals
CALL METHOD tree1->update_calculations.
this method must be called to send the data to the frontend
CALL METHOD tree1->frontend_update.
ENDFORM. " create_hierarchy
*& Form add_carrid_line
add hierarchy-level 1 to tree
-->P_LS_SFLIGHT sflight
-->P_RELEATKEY relatkey
<-->p_node_key new node-key
FORM add_carrid_line USING ps_sflight TYPE sflight
p_relat_key TYPE lvc_nkey
CHANGING p_node_key TYPE lvc_nkey.
DATA: l_node_text TYPE lvc_value,
ls_sflight TYPE sflight.
set item-layout
DATA: lt_item_layout TYPE lvc_t_layi,
ls_item_layout TYPE lvc_s_layi.
ls_item_layout-t_image = '@3P@'.
ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
ls_item_layout-style =
cl_gui_column_tree=>style_intensifd_critical.
APPEND ls_item_layout TO lt_item_layout.
add node
l_node_text = ps_sflight-carrid.
CALL METHOD tree1->add_node
EXPORTING
i_relat_node_key = p_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = l_node_text
is_outtab_line = ls_sflight
it_item_layout = lt_item_layout
IMPORTING
e_new_node_key = p_node_key.
ENDFORM. " add_carrid_line
*& Form add_connid_line
add hierarchy-level 2 to tree
-->P_LS_SFLIGHT sflight
-->P_RELEATKEY relatkey
<-->p_node_key new node-key
FORM add_connid_line USING ps_sflight TYPE sflight
p_relat_key TYPE lvc_nkey
CHANGING p_node_key TYPE lvc_nkey.
DATA: l_node_text TYPE lvc_value,
ls_sflight TYPE sflight.
set item-layout
DATA: lt_item_layout TYPE lvc_t_layi,
ls_item_layout TYPE lvc_s_layi.
ls_item_layout-t_image = '@3Y@'.
ls_item_layout-style =
cl_gui_column_tree=>style_intensified.
ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
APPEND ls_item_layout TO lt_item_layout.
add node
l_node_text = ps_sflight-connid.
CALL METHOD tree1->add_node
EXPORTING
i_relat_node_key = p_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = l_node_text
is_outtab_line = ls_sflight
it_item_layout = lt_item_layout
IMPORTING
e_new_node_key = p_node_key.
ENDFORM. " add_connid_line
*& Form add_cmplete_line
add hierarchy-level 3 to tree
-->P_LS_SFLIGHT sflight
-->P_RELEATKEY relatkey
<-->p_node_key new node-key
FORM add_complete_line USING ps_sflight TYPE sflight
p_relat_key TYPE lvc_nkey
p_x
CHANGING p_node_key TYPE lvc_nkey.
DATA: l_node_text TYPE lvc_value.
set item-layout
DATA: lt_item_layout TYPE lvc_t_layi,
ls_item_layout TYPE lvc_s_layi.
ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
ls_item_layout-chosen = p_x. "To give default checkbox value checked
ls_item_layout-class = cl_gui_column_tree=>item_class_checkbox.
ls_item_layout-editable = 'X'.
APPEND ls_item_layout TO lt_item_layout.
l_node_text = ps_sflight-fldate.
CALL METHOD tree1->add_node
EXPORTING
i_relat_node_key = p_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
is_outtab_line = ps_sflight
i_node_text = l_node_text
it_item_layout = lt_item_layout
IMPORTING
e_new_node_key = p_node_key.
ENDFORM. " add_complete_line
*& Form register_events
text
--> p1 text
<-- p2 text
FORM register_events.
define the events which will be passed to the backend
DATA: lt_events TYPE cntl_simple_events,
l_event TYPE cntl_simple_event.
define the events which will be passed to the backend
l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_checkbox_change.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_header_click.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
APPEND l_event TO lt_events.
CALL METHOD tree1->set_registered_events
EXPORTING
events = lt_events
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
IF sy-subrc <> 0.
MESSAGE x208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
set Handler
DATA: l_event_receiver TYPE REF TO lcl_tree_event_receiver.
CREATE OBJECT l_event_receiver.
SET HANDLER l_event_receiver->handle_node_ctmenu_request
FOR tree1.
SET HANDLER l_event_receiver->handle_node_ctmenu_selected
FOR tree1.
SET HANDLER l_event_receiver->handle_item_ctmenu_request
FOR tree1.
SET HANDLER l_event_receiver->handle_item_ctmenu_selected
FOR tree1.
SET HANDLER l_event_receiver->handle_checkbox_change FOR tree1.
ENDFORM. " register_events
*& Form change_toolbar
text
--> p1 text
<-- p2 text
FORM change_toolbar.
DATA: toolbar_event_receiver TYPE REF TO lcl_toolbar_event_receiver.
get toolbar control
CALL METHOD tree1->get_toolbar_object
IMPORTING
er_toolbar = mr_toolbar.
CHECK NOT mr_toolbar IS INITIAL.
add seperator to toolbar
CALL METHOD mr_toolbar->add_button
EXPORTING
fcode = ''
icon = ''
butn_type = cntb_btype_sep
text = ''
quickinfo = 'This is a Seperator'. "#EC NOTEXT
add Standard Button to toolbar (for Delete Subtree)
CALL METHOD mr_toolbar->add_button
EXPORTING
fcode = 'DELETE'
icon = '@18@'
butn_type = cntb_btype_button
text = ''
quickinfo = 'Delete subtree'. "#EC NOTEXT
add Dropdown Button to toolbar (for Insert Line)
CALL METHOD mr_toolbar->add_button
EXPORTING
fcode = 'INSERT_LC'
icon = '@17@'
butn_type = cntb_btype_dropdown
text = ''
quickinfo = 'Insert Line'. "#EC NOTEXT
set event-handler for toolbar-control
CREATE OBJECT toolbar_event_receiver.
SET HANDLER toolbar_event_receiver->on_function_selected
FOR mr_toolbar.
SET HANDLER toolbar_event_receiver->on_toolbar_dropdown
FOR mr_toolbar.
ENDFORM. " change_toolbar
*& Form init_tree
text
--> p1 text
<-- p2 text
FORM init_tree.
create fieldcatalog for structure sflight
PERFORM build_fieldcatalog.
create container for alv-tree
DATA: l_tree_container_name(30) TYPE c,
l_custom_container TYPE REF TO cl_gui_custom_container.
l_tree_container_name = 'TREE1'.
IF sy-batch IS INITIAL.
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.
IF sy-subrc <> 0.
MESSAGE x208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
ENDIF.
create tree control
CREATE OBJECT tree1
EXPORTING
parent = l_custom_container
node_selection_mode = cl_gui_column_tree=>node_sel_mode_multiple "node_sel_mode_single
item_selection = 'X'
no_html_header = ''
no_toolbar = ''
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.
IF sy-subrc <> 0.
MESSAGE x208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
create Hierarchy-header
DATA l_hierarchy_header TYPE treev_hhdr.
PERFORM build_hierarchy_header CHANGING l_hierarchy_header.
create info-table for html-header
DATA: lt_list_commentary TYPE slis_t_listheader,
l_logo TYPE sdydo_value.
PERFORM build_comment USING
lt_list_commentary
l_logo.
repid for saving variants
DATA: ls_variant TYPE disvariant.
ls_variant-report = sy-repid.
create emty tree-control
CALL METHOD tree1->set_table_for_first_display
EXPORTING
is_hierarchy_header = l_hierarchy_header
it_list_commentary = lt_list_commentary
i_logo = l_logo
i_background_id = 'ALV_BACKGROUND'
i_save = 'A'
is_variant = ls_variant
CHANGING
it_outtab = gt_sflight "table must be emty !!
it_fieldcatalog = gt_fieldcatalog.
CONSTANTS: c_s(1) TYPE c VALUE space.
create hierarchy
PERFORM create_hierarchy USING c_s.
add own functioncodes to the toolbar
PERFORM change_toolbar.
register events
PERFORM register_events.
adjust column_width
call method tree1->COLUMN_OPTIMIZE.
ENDFORM. " init_tree
Award points if found useful.
Regards
Indrajit -
Help:create tree node dynamically from java code...
hi there...can anyone give me solution how to create or add tree node dynamically from java code???
currently i am using tree node to handle my menu...i try to create tree and add treenode dynamically from .java page, but it failed...can anyone give solution how to create tree ui from java code, so i can create a dynamic menu...thanz before...Hi:
Just put the statements you would normally put on a sqlplus command line in jdbc statements and execute them?
http://www-db.stanford.edu/~ullman/fcdb/oracle/or-jdbc.html#0.1_executeUpdate
MJG -
Facing problems while creating tree view
Hi gurus,
I am facing problems while crating the tree view can please explain me what are the basic requirements for creating tree view and explain me which are the methods i need to redefine.
any answer is appreciated.
Regards,
Chetan AgaliHi Chetan,
Maybe Poonam Assudani weblog may help you a little more. Check it's location here:
/people/poonam.assudani/blog/2009/06/24/create-a-tree-view-display-in-crm-web-ui
Kind regards,
Garcia -
Bug Report: Create Tree Wizard
Just a minor one...
1) The create tree wizard doesn't clear it's pages when it's called again, that's why all the old values of the last creation are displayed as default -> problem is that the page number, ... is already used.
2) When selecting "Existing Application Item" as Link Option, the LOV on page 118 also shows page item buttons (eg you can select the P101_LOGIN button from page 101). But I don't think that's a valid target...
Patrick
*** New *** Oracle APEX Essentials *** http://essentials.oracleapex.info/
My Blog, APEX Builder Plugin, ApexLib Framework: http://www.oracleapex.info/Bug filed, thanks.
Scott -
Hello,
Do you know how to create Tree like structure in Visual Composer. Tree should contain XML data coming from Web Service.
Thanks,
PrashantHi Prashant,
we have already a discussion about trees in VC [here|How to create Tree structure in Visual Composer;.
Best Regards,
Marcel -
Short Dump While creating a Value Driver Tree
Hi all,
I am trying to create a value driver tree in CPM. i am on SEM verion 3.1b. I am able to create the value driver tree but when i goto the graphical view it generates a ABAP short dump. does anybody have any idea on thishi srini,
Elaborate it clearly .
Regards ,
Muneeh Gitta. -
Short dump while creating a plant.
Dear experts,
Iam getting a short dump whenever I try to create a plant and save it. Iam posting the contents of the dump ... Iam using Ecc 6.0 with Oracle as database. Kindly help me to resolve this ...
Runtime Errors RAISE_EXCEPTION
Date and Time 27.10.2007 17:10:59
Short text
Exception condition "DATA_INCONS_IN_EXIT_MANAGEM" raised.
What happened?
The current ABAP/4 program encountered an unexpected
situation.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
A RAISE statement in the program "CL_EXITHANDLER================CP" raised the
exception
condition "DATA_INCONS_IN_EXIT_MANAGEM".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
How to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"RAISE_EXCEPTION" " "
"CL_EXITHANDLER================CP" or "CL_EXITHANDLER================CM001"
"GET_INSTANCE"
or
"CL_EXITHANDLER================CP" "DATA_INCONS_IN_EXIT_MANAGEM"
or
"SAPLS_IMG_TOOL_5 " "DATA_INCONS_IN_EXIT_MANAGEM"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
System environment
SAP-Release 700
Application server... "BSLERP"
Network address...... "10.60.0.30"
Operating system..... "Windows NT"
Release.............. "5.2"
Hardware type........ "4x Intel 801586"
Character length.... 16 Bits
Pointer length....... 32 Bits
Work process number.. 0
Shortdump setting.... "full"
Database server... "BSLERP"
Database type..... "ORACLE"
Database name..... "BTS"
Database user ID.. "SAPSR3"
Char.set.... "C"
SAP kernel....... 700
created (date)... "Apr 2 2006 23:08:16"
create on........ "NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10"
Database version. "OCI_10103_SHARE "
Patch level. 52
Patch text.. " "
Database............. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE 10.2.0.."
SAP database version. 700
Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2"
Memory consumption
Roll.... 8176
EM...... 17768808
Heap.... 0
Page.... 65536
MM Used. 12293456
MM Free. 1291704
User and Transaction
Client.............. 800
User................ "MURTHYTSN"
Language key........ "E"
Transaction......... "SPRO "
Program............. "CL_EXITHANDLER================CP"
Screen.............. "SAPLSZA1 0201"
Screen line......... 70
Information on where terminated
Termination occurred in the ABAP program "CL_EXITHANDLER================CP" -
in "GET_INSTANCE".
The main program was "SAPLS_IMG_TOOL_5 ".
In the source code you have the termination point in line 36
of the (Include) program "CL_EXITHANDLER================CM001".
Source Code Extract
Line
SourceCde
6
type_ref TYPE REF TO cl_abap_typedescr,
7
class_name TYPE seoclsname,
8
abs_type_classname TYPE string,
9
def_impl TYPE seex_boolean VALUE seex_false,
10
mig_enhspotname TYPE enhspotname,
11
is_impl TYPE enhboolean,
12
mig_badi_name TYPE enhbadiid.
13
14
CALL METHOD cl_exithandler=>get_class_name_by_interface
15
EXPORTING
16
instance = instance
17
IMPORTING
18
class_name = class_name
19
CHANGING
20
exit_name = exit_name
21
EXCEPTIONS
22
no_reference = 1
23
no_interface_reference = 2
24
no_exit_interface = 3
25
data_incons_in_exit_managem = 4
26
class_not_implement_interface = 5
27
OTHERS = 6.
28
CASE sy-subrc.
29
WHEN 1.
30
RAISE no_reference.
31
WHEN 2.
32
RAISE no_interface_reference.
33
WHEN 3.
34
RAISE no_exit_interface.
35
WHEN 4.
>>>>>
RAISE data_incons_in_exit_managem.
37
WHEN 5.
38
RAISE class_not_implement_interface.
39
ENDCASE.
40
41
CONCATENATE '\CLASS=' class_name INTO abs_type_classname.
42
43
Is the given instance initial?
44
IF NOT instance IS INITIAL.
45
CALL METHOD cl_abap_typedescr=>describe_by_object_ref
46
EXPORTING
47
p_object_ref = instance
48
RECEIVING
49
p_descr_ref = type_ref.
50
CHECK type_ref->absolute_name NE abs_type_classname.
51
ENDIF.
52
53
SELECT SINGLE mig_enhspotname mig_badi_name FROM sxs_attr INTO (mig_enhspotname,mig_badi_n
54
WHERE exit_name = exit_name.
55
Contents of system fields
Name
Val.
SY-SUBRC
4
SY-INDEX
1
SY-TABIX
0
SY-DBCNT
0
SY-FDPOS
0
SY-LSIND
0
SY-PAGNO
0
SY-LINNO
1
SY-COLNO
1
SY-PFKEY
ADDR0200
SY-UCOMM
CHCK
SY-TITLE
Edit address: 5002
SY-MSGTY
SY-MSGID
SY-MSGNO
000
SY-MSGV1
SY-MSGV2
SY-MSGV3
SY-MSGV4
SY-MODNO
0
SY-DATUM
20071024
SY-UZEIT
171059
SY-XPROG
SAPCNVE
SY-XFORM
CONVERSION_EXIT
Active Calls/Events
No. Ty. Program Include Line
Name
43 METHOD CL_EXITHANDLER================CP CL_EXITHANDLER================CM001 36
CL_EXITHANDLER=>GET_INSTANCE
42 FUNCTION SAPLXSZAR ZXSZARU01 25
EXIT_SAPLSZAR_001
41 FUNCTION SAPLSZAR LSZARU01 108
ADDR_REGIONAL_DATA_CHECK
40 FORM SAPLSZA2 LSZA2F20 382
CHECK_ADDR1_DATA
39 FUNCTION SAPLSZA2 LSZA2U02 42
ADDR_CHECK
38 FUNCTION SAPLSZA0 LSZA0U01 79
ADDR_INSERT
37 FORM SAPLSZA1 LSZA1F22 1886
INSERT_ADDRESS_INTO_MEMORY
36 FORM SAPLSZA1 LSZA1F22 2234
PUT_ADDRESS_TO_MEMORY
35 FORM SAPLSZA1 LSZA1I02 409
D0100_OK_CODE
34 FORM SAPLSZA1 LSZA1F03 17
D0100_OK_CODE_WRAPPER
33 MODULE (PAI) SAPLSZA1 LSZA1I02 13
D0100_OK_CODE
32 FUNCTION SAPLSZA1 LSZA1U01 200
ADDR_DIALOG_INTERN
31 FUNCTION SAPLSZA1 LSZA1U05 177
ADDR_DIALOG
30 FORM SAPL0ORG LSVIMF24 292
ADDRESS_MAINTAIN
29 FORM SAPL0ORG LSVIMFX2 577
DETAIL_PAI
28 MODULE (PAI) SAPL0ORG LSVIMIXX 354
DETAIL_PAI
27 FORM SAPL0ORG LSVIMF2L 337
CALL_DYNPRO
26 FUNCTION SAPL0ORG L0ORGU34 35
VIEWPROC_V_T001W
25 FUNCTION SAPL0ORG L0ORGU33 49
VIEWFRAME_V_T001W
24 FUNCTION SAPLSVIM LSVIMU01 138
VIEW_MAINTENANCE
23 FUNCTION SAPLSVIM LSVIMU03 427
VIEW_MAINTENANCE_CALL
22 FORM SAPLS_CUS_ACTIVITY LS_CUS_ACTIVITYF01 358
START_SELECTED_TRANSACTION
21 MODULE (PAI) SAPLDSYH LDSYHI12 56
D1200_PAI_MODULE
20 FUNCTION SAPLDSYH LDSYHU11 70
OUTLINE_LIST_TCODES
19 FUNCTION SAPLS_CUS_ACTIVITY LS_CUS_ACTIVITYU07 103
S_CUS_ACTIVITY_EXECUTE
18 FUNCTION SAPLS_CUS_IMG_ACTIVITY LS_CUS_IMG_ACTIVITYU04 35
S_CUS_IMG_ACTIVITY_EXECUTE
17 FUNCTION SAPLS_IMG_TOOL_1 LS_IMG_TOOL_1U02 63
STREE_EXIT_TO_OBJECT_COBJ
16 FUNCTION SAPLSHI1 LSHI1U16 120
STREE_EXIT_TO_OBJECT
15 FORM SAPLSHI01 LSHI01F0Y 185
EXIT_TO_OBJECT_HC
14 FORM SAPLSHI01 LSHI01F05 70
HANDLE_LINK_CLICK
13 METHOD SAPLSHI01 LSHI01CI1 25
LCL_APPLICATION=>HANDLE_LINK_CLICK
12 METHOD CL_ITEM_TREE_CONTROL==========CP CL_ITEM_TREE_CONTROL==========CM013 53
CL_ITEM_TREE_CONTROL=>HANDLE_NODE_KEY_ITEM_NAME_EVT
11 METHOD CL_ITEM_TREE_CONTROL==========CP CL_ITEM_TREE_CONTROL==========CM00S 60
CL_ITEM_TREE_CONTROL=>HANDLE_EVENT
10 METHOD CL_GUI_COLUMN_TREE============CP CL_GUI_COLUMN_TREE============CM01O 15
CL_GUI_COLUMN_TREE=>HANDLE_EVENT
9 METHOD CL_TREE_CONTROL_BASE==========CP CL_TREE_CONTROL_BASE==========CM017 32
CL_TREE_CONTROL_BASE=>DISPATCH
8 METHOD CL_GUI_CFW====================CP CL_GUI_CFW====================CM001 138
CL_GUI_CFW=>DISPATCH
7 FORM SAPLSHI01 LSHI01F1M 17
EXECUTE_USER_COMMAND_W_EXITS
6 FUNCTION SAPLSHI01 LSHI01U12 30
STREE_BROWSER_PAI
5 MODULE (PAI) SAPLSHI01 LSHI01I01 55
PAI_200
4 FUNCTION SAPLSHI01 LSHI01U07 165
STREE_BROWSER_DYNP_HC
3 FUNCTION SAPLSHI21 LSHI21U03 144
STREE_EXTERNAL_DISPLAY
2 FORM SAPLS_IMG_TOOL_5 LS_IMG_TOOL_5F01 20
DISPLAY_REFERENCE_IMG
1 MODULE (PAI) SAPLS_IMG_TOOL_5 LS_IMG_TOOL_5I01 39
USER_COMMAND_0100
Chosen variables
Name
Val.
No. 43 Ty. METHOD
Name CL_EXITHANDLER=>GET_INSTANCE
EXIT_NAME
22222222222222222222
00000000000000000000
00000000000000000000
00000000000000000000
NULL_INSTANCE_ACCEPTED
2
0
0
0
ACT_IMP_EXISTING
2
0
0
0
INSTANCE
F0000000
F0000000
SY-REPID
CL_EXITHANDLER================CP
4454545444444533333333333333334522222222
3CF589481E4C52DDDDDDDDDDDDDDDD3000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
%_SPACE
2
0
0
0
CL_DRAGDROP=>COPY
1
0000
1000
CL_WB_REQUEST=>TO_IMMEDIATE_START
SY-SUBRC
4
0000
4000
CL_DRAGDROP=>USEDEFAULTEFFECT
4
0000
4000
SYST-REPID
CL_EXITHANDLER================CP
4454545444444533333333333333334522222222
3CF589481E4C52DDDDDDDDDDDDDDDD3000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
CL_GUI_CONTROL=>LIFETIME_DEFAULT
0
0000
0000
%_ARCHIVE
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ABS_TYPE_CLASSNAME
No. 42 Ty. FUNCTION
Name EXIT_SAPLSZAR_001
IV_NATION
2
0
0
0
X_ACCEPT_ERROR
2
0
0
0
X_ADRC_STRUC
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
X_DIALOG_ALLOWED
X
5
8
0
0
Y_ADRC_STRUC
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Y_RETCODE
2
0
0
0
ERROR_TABLE[]
Table IT_2299[0x572]
\FUNCTION-POOL=SZA1\FORM=INSERT_ADDRESS_INTO_MEMORY\DATA=ERROR_TABLE[]
Table reference: 208
TABH+ 0(20) = 00000000F8EB2E3D00000000D0000000FB080000
TABH+ 20(20) = 000000003C020000FFFFFFFF04A90100303E0000
TABH+ 40( 8) = 10000000C1248001
store = 0x00000000
ext1 = 0xF8EB2E3D
shmId = 0 (0x00000000)
id = 208 (0xD0000000)
label = 2299 (0xFB080000)
fill = 0 (0x00000000)
leng = 572 (0x3C020000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000317
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 2 (cmpSingleMcmpR)
occu0 = 1
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
isCtfyAble = 1
>>>>> Shareable Table Header Data <<<<<
tabi = Not allocated
pghook = Not allocated
idxPtr = Not allocated
shmTabhSet = Not allocated
id = Not allocated
refCount = Not allocated
tstRefCount = Not allocated
lineAdmin = Not allocated
lineAlloc = Not allocated
shmVersId = Not allocated
shmRefCount = Not allocated
shmIsReadOnly = Not allocated
>>>>> 1st level extension part <<<<<
regHook = 0x00000000
collHook = 0x00000000
ext2 = 0xD09AD03C
>>>>> 2nd level extension part <<<<<
tabhBack = 0x30F18E3D
delta_head = 000000000000000000000000000000000000000000000000000000000000000000000000
pb_func = 0x00000000
pb_handle = 0x00000000
SY-XPROG
SAPCNVE
5454454222222222222222222222222222222222
3103E65000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
SY-XFORM
CONVERSION_EXIT
444545544454545222222222222222
3FE65239FEF5894000000000000000
000000000000000000000000000000
000000000000000000000000000000
%_VIASELSCR
0
4
%_SPACE
2
0
0
0
SY-REPID
SAPLXSZAR
5454555452222222222222222222222222222222
310C83A120000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
LR_EXIT
F0000000
F0000000
%_DUMMY$$
2222
0000
0000
0000
Y_ERROR_TABLE
Table[initial]
No. 41 Ty. FUNCTION
Name ADDR_REGIONAL_DATA_CHECK
IV_NATION
2
0
0
0
X_ACCEPT_ERROR
2
0
0
0
X_ADRC_STRUC
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
X_DIALOG_ALLOWED
X
5
8
0
0
X_T005
800IN IND064 ININD000 00 15500 4111 0000 00 436 664000INDIEN 000 1
3334424443332222222222224444433322233233333223333223333233233322222233333344444423332322222222
8009E09E40640000000000009E9E40000000001550000411100000000004360000006640009E495E00000100000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Y_ADRC_REGIO
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Y_ADRC_STRUC
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Y_RETCODE
2
0
0
0
ERROR_TABLE[]
Table IT_2299[0x572]
SY-XPROG
SAPCNVE
5454454222222222222222222222222222222222
3103E65000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
LV_MAND
C
422
300
000
000
SY-REPID
SAPLSZAR
5454554522222222222222222222222222222222
310C3A1200000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
%_SPACE
2
0
0
0
%_CX_GRID_ID
1
0000
1000
SYST-REPID
SAPLSZAR
5454554522222222222222222222222222222222
310C3A1200000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
SV_THERE_IS_CUST_EXIT
X
5
8
0
0
T005S
22222222222222
00000000000000
00000000000000
00000000000000
T005
00 000 00 00 00 00 0000 00 000 000
2222222223322222222222222222233322233233233222332223333233222222222222233322222223332222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CO_ERROR
E
4
5
0
0
No. 40 Ty. FORM
Name CHECK_ADDR1_DATA
SY-MSGV3
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
SY-MSGV4
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
FIELDNAME
222222222222222222222222222222
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
C_NULL
0
0000
0000
RETURNCODE_ERRORS
2
0
0
0
C_ERROR_OCCURRED
E
4
5
0
0
H_ADRC_STRUC+0(1800)
2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ADDR1_DATA+460(1800)
2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
H_ADRC_STRUC
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
C_COMM_TTX
TTX
555
448
000
000
NATION
2
0
0
0
G_ACCEPT_ERROR
2
0
0
0
G_DIALOG_ALLOWED
X
5
8
0
0
T005
800IN IND064 ININD000 00 15500 4111 0000 00 436 664000INDIEN 000 1
3334424443332222222222224444433322233233333223333223333233233322222233333344444423332322222222
8009E09E40640000000000009E9E40000000001550000411100000000004360000006640009E495E00000100000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
TSAD6T
222222222222222222222222222222222222222222222222
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
ERROR_TABLE[]
Table IT_2299[0x572]
%_SPACE
2
0
0
0
No. 39 Ty. FUNCTION
Name ADDR_CHECK
ADDRESS_HANDLE
8005002
3333333222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
8005002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ADDRESS_NUMBER
2222222222
0000000000
0000000000
0000000000
ADDRESS_OBJECT_TYPE
1
3
1
0
0
NATION
2
0
0
0
RETURNCODE
2
0
0
0
ERROR_TABLE[]
Table IT_2299[0x572]
ADDRESS_DATA_1
00000000000000000003XYZ SOLUTIONS LIMITED
3333333333333333333355525445544452444454422222222222222222222222222222222222222222222222222222
0000000000000000000389A03FC549FE30C9D945400000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ADDRESS_DATA_2
0000000000000000
3333333333333333222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ADDRESS_DATA_3
0000000000000000
3333333333333333222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
LV_ADRC_STRUC+0(1800)
2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ADDRESS_DATA_1+460(1800)
2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
C_DEFAULT_HANDLE
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
SYST-REPID
SAPLSZA2
5454554322222222222222222222222222222222
310C3A1200000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
ERROR_TABLE
000
2222222222222222222223332222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
LV_ADRC_STRUC
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
C_DEFAULT_NATION
2
0
0
0
C_SHOW_ALL
2
0
0
0
C_PERSONAL_ADDRESS
2
3
2
0
0
SY-REPID
SAPLSZA2
5454554322222222222222222222222222222222
310C3A1200000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
ADDRESS_DATA_2+32(1800)
2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
No. 38 Ty. FUNCTION
Name ADDR_INSERTDear Sunil,
Thanks a lot for your reply. I did search in service market place for notes regarding this problem. However, i could not find possible solutions to resolve this. I will once again search the notes in case if i have missed something. in case, if you come across any solutions to resolve this problem, Kindly post that here and that would be a great help for me.
Regards,
Chaitanya -
Error while trying to create tree using same EMP how to tutorial
Hi,
I get the following error while trying to create a sample tree similar to the one
posted in the how-tos web page.
The final query that creates the tree is also as follows
The Current Query shown in my apex window and the one on the howtos tutorial is as follows
select "EMPNO" id,
"MGR" pid,
"ENAME" name,
null link,
null a1,
null a2
from "RJOSEEMPCLUB"."EMP"
where DEPTNO = 1
The error is as follows
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
Debug:
1: begin
2: wwv_flow_wiz_confirm.create_tree (
3: p_flow_id => :FB_FLOW_ID,
4: p_region_template => replace(:F4000_P112_REGION_TEMPLATE,'%'||'null%',null),
5: p_start_option => :F4000_P112_START_OPTION,
6: p_owner => :F4000_P112_OWNER,
7: p_table_name => :F4000_P112_TABLE,
8: p_id => :F4000_P112_ID,
9: p_pid => :F4000_P112_PID,
10: p_name => :F4000_P112_NAME,
11: p_link_option => :F4000_P112_LINK_OPTION,
12: p_link_page_id => :F4000_P112_LINK_PAGE_ID,
13: p_link_item => :F4000_P112_LINK_ITEM,
14: p_where => :F4000_P112_WHERE,
15: p_order_by => :F4000_P112_ORDER_BY,
16: p_page_id => :F4000_P112_PAGE_ID,
17: p_page_name => :F4000_P112_PAGE_NAME,
18: p_tab_set => :F4000_P112_TAB_SET,
19: p_tab_text => :F4000_P112_TAB_TEXT,
20: p_region_name => :F4000_P112_REGION_NAME,
21: p_tree_name => :F4000_P112_TREE_NAME,
22: p_tree_type => :F4000_P112_TREE_TYPE,
23: p_max_levels => :F4000_P112_MAX_LEVELS);
24: end;Hi Kart,
If you have the sample EMP table, the DEPTNO values are 10, 20 or 30.
Did you specify a root value for the tree?
Regards
Andy -
Creating TREE REPORT with CHECKBOX against each row
Hi Friends,
I need to create a <b>TREE REPORT with CHECK BOX</b> against each row. when the user selects a row and clicks on a custom button then those should get populated into an internal table. <b>This is HIGH priority</b> one and I have tried my best but couldnt find any solution. Please advise me some sol.
thanks in advance for your valuable time and help.
Regards
srithan
Message edited by me for easyness
ReddyHi
Following code is to add checkboxes in ALV tree:
FORM add_root_request USING pls_data_ TYPE csg_gs_outtab_p_key__l_is_sub_node_ TYPE c
CHANGING pl_carrid_key._node = nodes->add_node( related_node = p_key
relationship = cl_gui_column_tree=>relat_last_child ).
... §0.2 if information should be displayed at
the hierarchy column set the carrid as text for this node
text = p_ls_data-object.
node->set_text( text ).
... §0.3 set the data for the nes node
node->set_data_row( p_ls_data ).
item = node->get_hierarchy_item( ).
item = node->get_item( 'FCHECKBOX' ). "FCHECKBOX is my radio button field in internal table which I am using to populate the ALV
item->set_type( if_salv_c_item_type=>checkbox ).
pl_carrid_key = node->get_key( )._
CATCH cx_salv_msg.
ENDFORM_._Following code is for handling checbox_change event
PERFORM application_action_events.
FORM application_action_events .
data: lr_events type ref to cl_salv_events_tree.
*data gr_events type ref to lcl_handle_events.
lr_events = gr_tree->get_event( ).
create object gr_events.
set handler gr_events->check for lr_events.
set handler gr_events->on_link_click for lr_events.
set handler gr_events->on_before_user_command for lr_events.
set handler gr_events->on_after_user_command for lr_events.
set handler gr_events->on_keypress for lr_events.
endform. " application_action_events----
CLASS lcl_handle_events DEFINITION.
PUBLIC SECTION.
METHODS:
check FOR EVENT checkbox_change OF cl_salv_events_tree IMPORTING node_key columnname checked. "Here node_key is the row number
ENDCLASS. "lcl_handle_events DEFINITION
CLASS lcl_handle_events IMPLEMENTATION
§4.2 implement the events for handling the events of cl_salv_table
CLASS lcl_handle_events IMPLEMENTATION_._
METHOD check_._
WRITE 'hello'_._
DATA lwa_modify_check_ TYPE REF TO csg_gs_outtab.
node_key = node_key - 1_._
READ TABLE csg_gt_list INDEX node_key REFERENCE INTO lwa_modify_check._
if columnname = 'FCHECKBOX'_._
IF checked = 'X'_._
If the value in internal table is set to X, then it is deselct
lwa_modify_check->fcheckbox =_ ' '_._
ELSE_._
lwa_modify_check->fcheckbox =_ 'X'_._
ENDIF_._
ENDIF_._
if columnname = 'CHECKBOX_READ'_._
IF checked = 'X'_._
If the value in internal table is set to X, then it is deselct
lwa_modify_check->checkbox_read =_ ' '_._
ELSE_._
lwa_modify_check->checkbox_read =_ 'X'_._
ENDIF_._
ENDIF_._
*MODIFY TABLE csg_gt_list from l_wa_modify_check.
flag_test = flag_test + 1_._
ENDMETHOD_._ "check
ENDCLASS_._ "lcl_handle_events IMPLEMENTATION
Please give me reward points
Maybe you are looking for
-
I can't open a .pdf file any more
i made the mistake of subscribing to adobe acrobat. i couldn't use so many features that i dropped my subscription. upon expiry, all it does it prompt me to renew when i click on a .pdf file. they used to have no problem opening with the free reade
-
Error message while using the hyperion planning copy utility
When i try to copy an application from production server to development server using copy utility ,having relation databases in SQL server i got the following error message. " D:\Hyperion\Planning\bin>copyApp /S:PLAN /T:HYP_PLAN /P:copyapp.properties
-
Psu calculator and some load test
while reading a thread I found this psu calculator link on a moderators sig. it seems so good i had to copy it. I had seen this once before from a magazine link but had forgotten it. http://www.adecy.com/psu/. also i got some power loads for the guid
-
OBIEE installation error-(ASInstance Failed)
Hi, I am installing OBIEE 11.1.1.6 in windows server 2003(32 bit). During the configuration process i am getting an error- ASInstance Failed When i checked the error log file, it is showing the following error- oracle.as.provisioning.engine.CfgWorkfl
-
Creation of multiple connectors if we have backend systems with multiple
Hi All, If I have 5 backend systems with 2 clients each. Do I need to create UWL connector for each client. Regards Suneel