on 08-24-2011 8:38 AM
Hi Experts,
When i am executing a webdynpro application it says Error when inserting or changing in a sorted table. Can any one help for this.
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: GET_CATEGORY_LIST of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
Method: IF_COMPONENTCONTROLLER~GET_CATEGORY_LIST of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
Method: WDDOMODIFYVIEW of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
Method: IF_WDR_VIEW_DELEGATE~WD_DO_MODIFY_VIEW of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
Method: DO_MODIFY_VIEW of program CL_WDR_DELEGATING_VIEW========CP
Method: MODIFY_VIEW of program CL_WDR_VIEW===================CP
Method: DO_MODIFY_VIEW of program CL_WDR_CLIENT_COMPONENT=======CP
Method: DO_MODIFY_VIEW of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
in ST22
Object Definition
DATA: lo_node TYPE REF TO if_wd_context_node,
lo_node_info TYPE REF TO if_wd_context_node_info,
lo_element TYPE REF TO if_wd_context_element.
Additional Data declarations
DATA: lv_key TYPE string.
Get context node.
lo_node = wd_context->get_child_node( name = 'DROPDOWNLISTS' ).
lo_node_info = lo_node->get_node_info( ).
Call method to fetch the categories.
CALL METHOD cl_hap_wd_start_page_ui=>category_get_list
EXPORTING
add_on_application = add_on_application
IMPORTING
t_categories = lt_categories.
Append Default selection entry 'All'.
lw_category-category_id = '00000000'.
lw_category-category_name = 'All'.
APPEND lw_category TO lt_categories.
Sort table after appending the new entry.
SORT lt_categories ASCENDING.
Loop through the category list and populate key(category_id) value(category_name) pair for
LOOP AT lt_categories INTO lw_category.
lw_key_value-key = lw_category-category_id.
625 lw_key_value-value = lw_category-category_name.
>>>>> APPEND lw_key_value TO lt_key_values.------>Here it throws an error
627 CLEAR: lw_key_value, lw_category.
628 ENDLOOP.
629
630 * Bind the category key-value pair to the context attribute.
631 CALL METHOD lo_node_info->set_attribute_value_set
632 EXPORTING
633 name = 'CATEGORY_LIST'
634 value_set = lt_key_values.
635
636 * Make the entry 'All' as default selected.
637 CALL METHOD lo_node->set_attribute
638 EXPORTING
639 value = '00000000'
640 name = 'CATEGORY_LIST'.
641
642 ENDMETHOD.
643
644 method GET_EMPLOYEES.
645
Hello Durga,
from the error what I understood is lt_key_values is a sorted table and you are trying append a new line to it. Incase of sorted table you need to use the INSERT statement and not the APPEND statement.
INSERT lw_key_value INTO table lt_key_values.
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.