cancel
Showing results for 
Search instead for 
Did you mean: 

Short dump on sort column of alv

Former Member
0 Kudos

Hi,

IN ALV there is application defined button to add element with in context node attached to alv. After adding elements to node the data show in alv but when user try to sort this data set it gives following short dump.

****************************************************************************************************************

The followin error text was processed in VMF the systm: The ASSERT condition was violated.

The error occurred on the application server ldcivmf_VMF_20 and in the work process. 11

The termination type was: RABAX_STATE

The ABAP call hierarchy was:

Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP

Method: IF_SALV_BS_RESULT_DATA~REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP

Method: PRE_MODIFY of program CL_SALV_WD_C_TABLE============CP

Method: IF_SALV_WD_COMPONENT~MODIFY of program CL_SALV_WD_C_TABLE============CP

Method: IF_SALV_WD_COMP_TABLE_EVENTS~ON_SERVICE_AFTER of program CL_SALV_WD_C_TABLE_V_TABLE====CP

Method: IF_SALV_WD_COMP_TABLE_EVENTS~ON_SERVICE of program CL_SALV_WD_C_TABLE_V_TABLE====CP

Method: IF_SALV_WD_COMP_TABLE_EVENTS~DO_FUNCTION_STD of program CL_SALV_WD_C_TABLE_V_TABLE====CP

Method: IF_SALV_WD_COMP_TABLE_EVENTS~ON_FUNCTION_STD of program CL_SALV_WD_C_TABLE_V_TABLE====CP

Method: IF_SALV_WD_VIEW~ON_ACTION of program CL_SALV_WD_C_TABLE_V_TABLE====CP

*****************************************************************************************************************************

If user add row using default "Append button" it work fine and user can sort the data set using any column.

Following is alv config setting:

********************************************************************************************************************

lr_config->if_salv_wd_std_functions~set_sort_complex_allowed( abap_false ).

lr_config->if_salv_wd_table_settings~set_multi_column_sort( abap_false ).

lr_config->if_salv_wd_std_functions~set_sort_headerclick_allowed( abap_true ).

********************************************************************************************************************

Any help?

Thanks,

Rahul

Accepted Solutions (0)

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

How is the context node structured for which this ALV is bound to? Does it have a child node? Is it a Child itself? This is from the online help:

Important Exception: Sorting

Here ALV has to use the entire dataset so that the data records can be arranged in the new order. For this purpose, the ALV component temporarily takes control of the internal data table and invalidates the corresponding context node of your application during this time. This ensures that the application cannot access the context node while the ALV component is editing the internal data table.

Once the internal data table has been resorted, ALV rebuilds the context node, releases it again for the application, and displays the data accordingly.

This ensures that the internal data table is never copied. This is important because large volumes of data would considerably impact performance and memory space.

When you are planning your application, note the following side-effects of this mechanism:

● When the context node is invalidated, information about current selections, and in particular the lead selection, is lost.

If your application has created subnodes for the context node, (master-detail scenario), these subnodes are lost as soon as the ALV component invalidates the context node. If the application then tries to access the subnodes, a runtime error occurs.

That last section is the most common cause of a short dump when you sort within an ALV.

Former Member
0 Kudos

Hi Thomas,

ALV is bound to one of the subnode of root node and there is no further subnode.

This probelm is occuring only if i add rows with application specific button at alv toolbar. If i use the standard alv button "Append Row" then this problem does not occure and user is able to sort successfully on any column. So, now this lead to a question why dump is occuring for application specific buttons on alv toobar.

Place where dump is occuring

************************************************************

if data_reset eq abap_true and

( lt_attribute_properties is not initial ).

assert lr_data_description->is_key_table_index( ) eq abap_true.

if me->t_new_data_order is not initial.

data:

ls_index type s_type_index.

loop at lt_attribute_properties assigning <ls_attribute_properties>.

if ls_index-old ne <ls_attribute_properties>-element_index.

read table me->t_new_data_order into ls_index

with key old = <ls_attribute_properties>-element_index.

check sy-subrc eq 0.

endif.

<ls_attribute_properties>-element_index = ls_index-new.

endloop.

endif.

*******************************************************************************

line mentioned above in bold is causing dump and this method lr_data_description->is_key_table_index( ) has following values at run time:

if me->index_field eq me->c_table_index_field.

value = abap_true.

else.

value = abap_false.

Values at runtime:

ME->INDEX_FIELD =

ME->C_TABLE_INDEX_FIELD = SALV_WD_TABLE_INDEX

Index values are dfiferent which lead to fail of assertion condition.

Thanks,

Rahul

Because index

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

How are you appending the line? It seems like the ALV is getting out of sync with the context node leading to the dump - where as the built in function is directly updating the internal copy of the data within the ALV Component. Are you using the SET_DATA method of the ALV Component interface to let it know that the data has updated?

Former Member
0 Kudos

hi Rahul ,

refer the related thread :

refer the SAP online help :

http://help.sap.com/saphelp_sm32/helpdata/EN/e9/e5eb40c4f8712ae10000000a155106/content.htm

regards,

amit

Former Member
0 Kudos

Hi Amit,

I have gone through help doc but i do not see any reason for this dump.

Thanks,

Rahul

Former Member
0 Kudos

hi ,

Check transaction ST22. In the short dump look at the call stack and the lines of code that threw the assert and provide the details back here. This will tell us more about what caused the error.

rgds,

amit

Former Member
0 Kudos

Hi,

go thru this thread