10-23-2010 6:03 AM
Hi All,
I am getting dump when I try to sum the CURR field in my ALV Grid Display. The field is of CURR 23. I am using classes and methods to display alv grid.
I tried passing <fs_fieldcat>-do_sum = 'X'. When I did this, it is dumping without even displaying the alv grid.
Here is the part it is throwing dump:
ls_lvc_data-value = space.
clear ls_lvc_data-style.
loop at it_fcat_local assigning <ls_fcat>
where tech ne 'X' and no_out ne 'X'.
if l_invisible eq 'X'.
clear l_invisible.
if <ls_fcat>-do_sum is initial.
continue.
else.
clear ls_lvc_data-col_pos.
endif.
endif.
add 1 to ls_lvc_data-col_pos.
assign component <ls_fcat>-fieldname
of structure <ls_data> to <l_field_value>.
_if sy-subrc ne 0.
message x000(0k).
endif._
Regards,
Guru
10-23-2010 5:14 PM
10-23-2010 8:09 PM
Please help us first by stating exactly what the dump says, title and error analysis section.
Thomas
10-24-2010 12:03 PM
Thomas,
Here is the dump:
Runtime Errors MESSAGE_TYPE_X
Date and Time 10/22/2010 23:30:53
-
-
Short text |
The current application triggered a termination with a short 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). |
-
-
Error analysis |
Short text of error message: |
Long text of error message: |
Technical information about the message: |
Message class....... "0K" |
Number.............. 000 |
Variable 1.......... " " |
Variable 2.......... " " |
Variable 3.......... " " |
Variable 4.......... " " |
-
-
How to correct the error |
Probably the only way to eliminate the error is to correct the program. |
- |
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: |
"MESSAGE_TYPE_X" " " |
"SAPLSLVC" or "LSLVCF36" |
"FILL_DATA_TABLE" |
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. |
-
-
Source Code Extract |
-
Line | SourceCde |
-
2708 | is_subtottxt_info = ls_subtot_info |
2709 | ip_subtot_line = lr_data |
2710 | changing |
2711 | c_subtottxt = l_subtottxt. |
2712 | ls_lvc_data-value = l_subtottxt. |
2713 | |
2714 | append ls_lvc_data to ct_lvc_data. |
2715 | endif. |
2716 | |
2717 | |
2718 |
|
2719 | |
2720 | ls_lvc_data-value = space. |
2721 | clear ls_lvc_data-style. |
2722 | loop at it_fcat_local assigning <ls_fcat> |
2723 | where tech ne 'X' and no_out ne 'X'. |
2724 | if l_invisible eq 'X'. |
2725 | clear l_invisible. |
2726 | if <ls_fcat>-do_sum is initial. |
2727 | continue. |
2728 | else. |
2729 | clear ls_lvc_data-col_pos. |
2730 | endif. |
2731 | endif. |
2732 | |
2733 | add 1 to ls_lvc_data-col_pos. |
2734 | |
2735 | assign component <ls_fcat>-fieldname |
2736 | of structure <ls_data> to <l_field_value>. |
2737 | if sy-subrc ne 0. |
>>>>> | message x000(0k). |
2739 | endif. |
2740 | |
2741 | *... work on average |
2742 | if <ls_fcat>-do_sum eq 'C'. |
2743 |
|
2744 | <l_field_value> = 0. |
2745 | clear l_entries. |
2746 | |
2747 |
|
2748 | assign space to <l_unit>. |
2749 | if not <ls_fcat>-cfieldname is initial. |
2750 | assign component <ls_fcat>-cfieldname |
2751 | of structure <ls_data> to <l_unit>. |
2752 | endif. |
2753 | if not <ls_fcat>-qfieldname is initial. |
2754 | assign component <ls_fcat>-qfieldname |
2755 | of structure <ls_data> to <l_unit>. |
2756 | endif. |
2757 |
-
-
10-24-2010 1:33 PM
Hi Guru,
as I have repeatedly written: 99% of all ALV errors are field catalog errors. Please let me know what messages are displayed in the [consistency check|http://help.sap.com/saphelp_nw70/helpdata/EN/d6/23253963143e6ae10000000a11402f/content.htm]
If you do not want to use the consistency check, you may put a break point on in program LSLVCF36" , Form FILL_DATA_TABLE, at the statement message x000(0k) where the dump is raised. You will see (switch on system debugging!) that the value in <ls_fcat>-fieldname is not part of your displayed table.
Regards,
Clemens
10-25-2010 9:02 AM
Thank you Clemens. I did checked my fieldcatalog thoroughly and found that one of the field is not specified correctly.
But just to develop my knowledge, I wanted to know more abt and I checked the link about the consistency check but couldnt understand much from the link you have given.
Can you please explain how to check that with a small example.
Regards,
Guru.
10-23-2010 8:57 PM
Hi GuruCharan,
the first thing you should do is run the [ALV consistency test.|http://help.sap.com/saphelp_nw70/helpdata/EN/d6/23253963143e6ae10000000a11402f/content.htm]
Check the field catalog.
Regards,
Clemens